1 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3 * sem_attr.ads Add new table Universal_Type_Attribute.
4 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
7 2016-04-20 Ed Schonberg <schonberg@adacore.com>
9 * exp_aggr.adb (Init_Stored_Discriminants,
10 Init_Visible_Discriminants): New procedures, subsidiary of
11 Build_Record_Aggr_Code, to handle properly the construction
12 of aggregates for a derived type that constrains some parent
13 discriminants and renames others.
15 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
17 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
18 (Save_References_In_Operator): Add explicit qualifications in
19 the generic template for all operands of universal type.
20 * sem_type.adb (Disambiguate): Update the call to Matches.
21 (Matches): Reimplemented.
22 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
24 2016-04-20 Ed Schonberg <schonberg@adacore.com>
26 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
27 an illegal aspect that freezes the entity to which it applies.
29 2016-04-20 Bob Duff <duff@adacore.com>
31 * a-stwibo.ads, a-stzbou.ads
32 ("="): Add overriding keyword before function to avoid crash when
33 compiler is called with -gnatyO (check overriding indicators).
35 2016-04-20 Ed Schonberg <schonberg@adacore.com>
37 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
38 is a configuration pragma and it uses the ARG syntax, insert
39 the rewritten pragma after the current one rather than using
42 2016-04-20 Arnaud Charlet <charlet@adacore.com>
44 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
47 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
49 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
50 s-imglli.adb: Minor reformatting.
52 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
54 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
55 renamed operator when the associated node appears within a
57 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
59 2016-04-20 Yannick Moy <moy@adacore.com>
61 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
62 * einfo.adb (Set_Overridden_Operation): Add assertion.
63 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
66 2016-04-20 Javier Miranda <miranda@adacore.com>
68 * exp_unst.adb (Append_Unique_Call): New subprogram.
69 (Unnest_Subprogram): Replace the unique occurrence
70 of Call.Append() by Append_Unique_Call() which protects us from
71 adding to the Calls table duplicated entries.
73 2016-04-20 Arnaud Charlet <charlet@adacore.com>
75 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
76 * xref_lib.ads (Dependencies_Tables): instantiate
77 Table package with types that guarantee its safe use.
78 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
81 2016-04-20 Arnaud Charlet <charlet@adacore.com>
83 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
84 Disable expansion when generating C code.
85 * sinfo.ads, inline.ads: Minor editing.
87 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
89 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
92 2016-04-20 Javier Miranda <miranda@adacore.com>
94 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
95 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
96 declaration of the internally built _postcondition procedure.
98 2016-04-20 Arnaud Charlet <charlet@adacore.com>
100 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
102 * sem_util.adb (Is_Unchecked_Conversion_Instance):
103 defense against library-level renamings of other functions,
104 which are never instances of Unchecked_Conversion.
105 * einfo.ads: minor fix of casing in comment
107 2016-04-20 Ed Schonberg <schonberg@adacore.com>
109 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
110 that has been analyzed and expanded already. Qualify the names
111 in the proper body for use in the generation of C code.
113 2016-04-20 Javier Miranda <miranda@adacore.com>
115 * contracts.adb (Build_Postconditions_Procedure): Force its
116 inlining when generating C code.
117 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
118 _postconditions when generating C code.
119 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
120 _postconditions when generating C code.
121 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
122 types of return value and argument changed from Node_Id to
125 2016-04-20 Vincent Celier <celier@adacore.com>
127 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
129 2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
131 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
132 the Has_Delayed_Freeze flag on the anonymous instance node.
134 2016-04-20 Javier Miranda <miranda@adacore.com>
136 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
137 scope associated with the renaming object declaration.
138 * exp_util.adb (Insert_Actions): Remove handling of iterator
139 loop marked as requiring the secondary stack.
141 2016-04-20 Ed Schonberg <schonberg@adacore.com>
143 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
144 AI12-0124, which extends the functionality of the attribute so it
145 reflects the semantics of GNAT 'Img when applied to scalar types.
146 * lib-xref.adb: minor whitespace layout fix.
148 2016-04-20 Vincent Celier <celier@adacore.com>
150 * clean.adb (Gnatclean): Fail if project file specified and
151 gprclean is not available.
152 * gnatname.adb: Fail is -P is used and gprname is not available.
153 * make.adb (Initialize): Fail if project file specified and
154 gprbuild is not available.
156 2016-04-20 Bob Duff <duff@adacore.com>
158 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
161 2016-04-20 Gary Dismukes <dismukes@adacore.com>
163 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
166 2016-04-20 Ed Schonberg <schonberg@adacore.com>
168 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
169 If the pragma comes from an aspect specification, verify that
170 the aspect applies to an entity with a declarative part.
171 * exp_ch5.adb: Code cleanup.
173 2016-04-20 Ed Schonberg <schonberg@adacore.com>
175 * sem_res.adb (Resolve_If_Expression): If first expression is
176 universal, resolve subsequent ones with the corresponding class
177 type (Any_Integer or Any_Real).
179 2016-04-20 Ed Schonberg <schonberg@adacore.com>
181 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
182 disabled, complete the analysis of the iterator name to ensure
183 that reference for entities within are properly generated.
185 2016-04-20 Arnaud Charlet <charlet@adacore.com>
187 * a-dispat.ads (Yield): add Global contract.
188 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
189 * a-taside.adb: Added Initializes => Tasking_State.
191 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
193 * sem_ch13.adb (Build_Invariant_Procedure):
194 Reimplement the invariant procedure spec and body insertion.
196 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
198 * sem_ch13.adb (Add_Invariant): Do not replace
199 the saved expression of an invariatn aspect when inheriting
200 a class-wide type invariant as this clobbers the existing
201 expression. Do not use New_Copy_List as it is unnecessary
202 and leaves the parent pointers referencing the wrong part of
203 the tree. Do not replace the type references for ASIS when
204 inheriting a class-wide type invariant as this clobbers the
205 existing replacement.
207 2016-04-20 Ed Schonberg <schonberg@adacore.com>
209 * sem_util.adb (Build_Explicit_Dereference): If the designated
210 expression is an entity name, generate reference to the entity
211 because it will not be resolved again.
213 2016-04-19 Arnaud Charlet <charlet@adacore.com>
215 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
216 gnat_rm.texi: Update documentation.
218 2016-04-19 Olivier Hainque <hainque@adacore.com>
220 * par_sco.adb (Traverse_One, case N_Case_Statement):
221 Skip pragmas before the first alternative.
222 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
224 2016-04-19 Tristan Gingold <gingold@adacore.com>
226 * adaint.c (__gnat_lwp_self): New function (for darwin).
227 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
230 2016-04-19 Olivier Hainque <hainque@adacore.com>
232 * sem_util.adb (Build_Elaboration_Entity): Always request an
233 elab counter when preserving control-flow.
235 2016-04-19 Olivier Hainque <hainque@adacore.com>
237 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
238 Needs_Debug_Info when producing SCOs.
239 * par_sco.adb (Traverse_Aspects): Fix categorization of
240 Type_Invariant to match actual processing as activated depending
241 on pragma Assertion_Policy.
242 * sem_prag.adb (Analyze_Pragma): Remove special case for
243 Name_Invariant regarding SCO generation, which completely disabled
244 the production of SCOs for Invariant pragmas and aspects.
246 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
248 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
251 2016-04-19 Ed Schonberg <schonberg@adacore.com>
253 * freeze.adb (Freeze_Profile): Refine predicate that checks
254 whether a function that returns a limited view is declared in
255 another unit and cannot be frozen at this point.
257 2016-04-19 Ed Schonberg <schonberg@adacore.com>
259 * exp_aggr.adb (Component_Count): Handle properly superflat
260 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
261 return value of the function is Natural, rather than leaving
262 the handling of such arrays to the caller of this function.
264 2016-04-19 Arnaud Charlet <charlet@adacore.com>
266 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
267 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
268 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
269 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
270 to publicly visible routine in Sem_Util.
272 2016-04-19 Ed Schonberg <schonberg@adacore.com>
274 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
275 the check if the type of the actual is By_Reference.
277 2016-04-19 Arnaud Charlet <charlet@adacore.com>
279 * sem_res.adb (Within_Subprogram_Call): Detect
280 also nodes that appear in entry calls.
281 (Resolve_Actuals, Insert_Default): Propagate
282 dimension information if any, from default expression to the
283 copy that appears in the list of actuals.
284 * uintp.ads: minor whitespace fix in comment.
285 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
287 * set_targ.adb (Set_Targ): convert directly from
288 Natural to Pos, without intermediate conversion to Int.
290 2016-04-19 Arnaud Charlet <charlet@adacore.com>
292 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
294 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
296 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
297 to SPARK RM in both comment and error message.
299 2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
301 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
302 CW type, then the subprogram must have a delayed freeze. This
303 ensures that the backend can properly recover the full view when
304 elaborating the access subprogram declaration.
306 2016-04-19 Ed Schonberg <schonberg@adacore.com>
308 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
309 overloadable entity if originally overloaded.
311 2016-04-19 Arnaud Charlet <charlet@adacore.com>
313 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
314 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
315 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
316 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
319 2016-04-19 Arnaud Charlet <charlet@adacore.com>
321 * sem_util.adb (Copy_Node_With_Replacement):
322 use Set_Comes_From_Source instead of directly manipulating
323 internals of the node table.
324 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
325 * sem_aux.adb (Get_Rep_Pragma,
326 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
327 do not change as constants and initialize them in the declaration.
328 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
329 variables that do not change as constants and initialize them
332 2016-04-19 Ed Schonberg <schonberg@adacore.com>
334 * sem_res.adb (Resolve_Entry_Call): If the entry has
335 preconditions it is rewritten by means of a wrapper that
336 incorporates the original call. Before rewriting generate a
337 reference to the entry being called to prevent spurious warnings
338 and provide correct cross-reference information.
340 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
342 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
343 local constant Scop. Ignore any internally generated loops when
344 performing the check concerning an abstract subprogram call
345 without a controlling argument.
346 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
348 2016-04-19 Bob Duff <duff@adacore.com>
350 * sem_elab.adb (Check_A_Call): There are cases where we have No
351 (Ent) after the Alias loop, even when there was no previous error,
352 so we can't assert that there was an error.
354 2016-04-19 Ed Schonberg <schonberg@adacore.com>
356 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
357 Reject use of type name as a prefix to 'access within an aggregate
358 in a context that is not the declarative region of a type.
360 2016-04-19 Vincent Celier <celier@adacore.com>
362 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
363 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
364 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
365 Remove anything related to project files
366 * g-mbdira.adb: minor whitespace cleanup
367 * g-spipat.adb: minor removal of extra spaces after closing paren
369 2016-04-19 Ed Schonberg <schonberg@adacore.com>
371 * exp_ch6.adb (Expand_Actuals): If post-statements are present
372 and the enclosing context is a function call or indexing, build
373 an Expression_With_Actions for the call.
375 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
377 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
378 a with line for an ignored Ghost unit.
379 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
380 Par. A child package is Ghost when its parent is Ghost.
381 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
382 a subprogram declaration that acts as a compilation unit.
384 2016-04-18 Michael Matz <matz@suse.de>
386 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
387 (gnat_to_gnu_field): Ditto.
388 (components_to_record): Ditto.
389 (create_variant_part_from): Ditto.
390 (copy_and_substitute_in_size): Ditto.
391 (substitute_in_type): Ditto.
392 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
393 (make_packable_type): Ditto.
394 (maybe_pad_type): Ditto.
395 (finish_fat_pointer_type): Ditto.
396 (finish_record_type): Ditto and use SET_DECL_ALIGN.
397 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
398 (create_field_decl): Use SET_DECL_ALIGN.
400 2016-04-18 Arnaud Charlet <charlet@adacore.com>
402 * einfo.adb (Overridden_Operation): assert that
403 function is called for valid arguments.
404 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
405 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
406 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
407 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
408 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
409 No space after closing parenthesis except where required for
411 * sem_res.adb: Minor reformatting.
413 2016-04-18 Arnaud Charlet <charlet@adacore.com>
415 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
416 statement when relevant.
418 2016-04-18 Bob Duff <duff@adacore.com>
420 * a-cuprqu.adb (Enqueue): Properly handle the
421 case where the new element has a unique priority.
423 2016-04-18 Tristan Gingold <gingold@adacore.com>
425 * adaint.h: Define stat structures and functions for iOS
428 2016-04-18 Arnaud Charlet <charlet@adacore.com>
430 * sem_res.adb (Resolve_Entry_Call): reset
431 Is_Overloaded flag after resolving calls to overloaded protected
433 * exp_spark.adb (Expand_SPARK): call
434 Qualify_Entity_Names for tasking nodes, i.e. protected types,
435 task types and entries.
436 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
437 in case of an unconstrained type.
439 2016-04-18 Yannick Moy <moy@adacore.com>
441 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
442 comment to document usage of subprogram in GNATprove.
444 2016-04-18 Ed Schonberg <schonberg@adacore.com>
446 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
447 message for wrong placement of aspect Test_Case.
449 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
451 * einfo.ads: Update the documentation of attribute Renamed_Object.
452 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
454 2016-04-18 Gary Dismukes <dismukes@adacore.com>
456 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
457 in the case of AAMP (same as for use of the -gnatd.P switch) to
458 suppress this optimization, which avoids creating a dependence
459 on the 64-bit arithmetic package.
461 2016-04-18 Arnaud Charlet <charlet@adacore.com>
463 * exp_ch4.adb: Update comment.
465 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
467 * exp_ch6.adb (Expand_Call): Make sure instantiations are
468 registered only once as pending here.
470 2016-04-18 Arnaud Charlet <charlet@adacore.com>
472 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
473 (Minimize_Expression_With_Actions): New flag.
474 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
476 (Resolve_Short_Circuit): Redo previous change
477 using Minimize_Expression_With_Actions.
478 (Expand_N_If_Expression,
479 Expand_Short_Circuit_Operator): Restore old code to avoid
480 Expression_With_Actions when Minimize_Expression_With_Actions
483 2016-04-18 Vincent Celier <celier@adacore.com>
485 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
486 Stderr_File): Close local file descriptors when no longer needed.
488 2016-04-18 Ed Schonberg <schonberg@adacore.com>
490 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
491 mode check that the type of the cursor in an iteration over
492 a formal container is not volatile. The proper check on the
493 element type is done elsewhere.
495 2016-04-18 Ed Schonberg <schonberg@adacore.com>
497 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
498 a subprogram that returns a class-wide type, if the subprogram
499 is a compilation unit, because otherwise gigi will treat the
500 subprogram as external, leading to link errors.
502 2016-04-18 Arnaud Charlet <charlet@adacore.com>
504 * sem_res.adb (Resolve_Short_Circuit): Do not use
505 expression-with-actions when generating C.
507 2016-04-18 Yannick Moy <moy@adacore.com>
509 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
510 raise node in GNATprove mode.
512 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
514 * s-fileio.adb: Minor reformatting.
515 * sem_prag.adb (Analyze_Input_Item): Add local
516 variable Input_OK. Do not consider mappings of generic formal
517 parameters to actuals.
519 2016-04-18 Ed Schonberg <schonberg@adacore.com>
521 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
522 type, the cursor is declared in the scope of the parent type.
523 (Analyze_Parameter_Specification): A qualified expression with an
524 iterator type indicates an iteration over a container (explicit
527 2016-04-18 Arnaud Charlet <charlet@adacore.com>
529 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
530 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
531 * debug.adb: Reserve -gnatd.4 to force generation of C files.
533 2016-04-18 Yannick Moy <moy@adacore.com>
535 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
536 division by zero, instead possibly issue a warning.
537 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
538 static division by zero, instead add check flag on original
540 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
541 Only issue error when both SPARK_Mode is On and Warn is False.
543 2016-04-18 Yannick Moy <moy@adacore.com>
545 * checks.adb (Apply_Scalar_Range_Check): Force
546 warning instead of error when SPARK_Mode is On, on index out of
547 bounds, and set check flag for GNATprove.
549 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
551 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
552 Update the comment on usage. Reimplemented.
553 (Check_Input_States.Check_Constituent_Usage): Update the comment
554 on usage. A Proof_In constituent can now refine an Input state
555 as long as there is at least one Input constituent present.
557 2016-04-18 Ed Schonberg <schonberg@adacore.com>
559 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
560 body id as the sloc of the entity in the generated subprogram
561 declaration, to avoid spurious conformance errors when style
564 2016-04-18 Ed Schonberg <schonberg@adacore.com>
566 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
567 Refine check on illegal calls to entities within a task body,
568 when the entity is declared in an object of the same type. In
569 a generic context there might be no explicit dereference but if
570 the prefix includes an access type the construct is legal.
572 2016-04-18 Arnaud Charlet <charlet@adacore.com>
574 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
577 2016-04-18 Bob Duff <duff@adacore.com>
579 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
580 if the pragma came from an aspect specification.
582 2016-04-18 Gary Dismukes <dismukes@adacore.com>
584 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
586 2016-04-18 Ed Schonberg <schonberg@adacore.com>
588 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
589 superfluous conformance check on an inlined body with a previous
590 spec, use the fact that the generated declaration does not come
591 from source. We must treat the entity as coming from source to
592 enable some back-end inlining when pragma appears after the body.
594 2016-04-18 Gary Dismukes <dismukes@adacore.com>
596 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
597 exp_intr.adb: Minor reformatting and typo corrections.
599 2016-04-18 Ed Schonberg <schonberg@adacore.com>
601 * sem_ch6.adb: Code cleanup.
603 2016-04-18 Thomas Quinot <quinot@adacore.com>
605 * sem_ch13.adb: Minor reformatting and error message tweaking
606 (remove extraneous spaces).
608 2016-04-18 Johannes Kanig <kanig@adacore.com>
610 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
612 2016-04-18 Bob Duff <duff@adacore.com>
614 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
615 exists, and it's a fifo, we use "w" as the open string instead of
616 "r+". This is necessary to make a write to the fifo block until
619 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
621 * sem_attr.adb (Denote_Same_Function): Account
622 for a special case where a primitive of a tagged type inherits
623 a class-wide postcondition from a parent type.
625 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
627 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
628 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
629 of reserved words is OK.
630 (Scan_Pragma_Argument_Association):
631 Add new formal Reserved_Words_OK and update the comment on
632 usage. Code cleanup. Parse an expression or a reserved word in
633 identifier form for pragmas Restriction_Warnings and Restrictions
635 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
636 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
637 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
639 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
640 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
641 Update the parameter profile.
642 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
644 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
645 the comment on usage.
646 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
647 * sem_attr.adb (Analyze_Attribute): Check restriction
649 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
650 restriction No_Use_Of_Attribute before any rewritings have
652 * sem_prag.adb (Analyze_Pragma): Check restriction
653 No_Use_Of_Pragma before any rewritings have taken place.
655 2016-04-18 Bob Duff <duff@adacore.com>
657 * sem_ch6.adb (Is_Inline_Pragma): The pragma
658 argument can be a selected component, which has no Chars field,
659 so we need to deal with that case (use the Selector_Name).
660 (Check_Inline_Pragma): We need to test Is_List_Member before
661 calling In_Same_List, because in case of a library unit, they're
662 not in lists, so In_Same_List fails an assertion.
664 2016-04-18 Bob Duff <duff@adacore.com>
666 * namet.ads, namet.adb: Add an Append that appends a
667 Bounded_String onto a Bounded_String. Probably a little more
668 efficient than "Append(X, +Y);". Also minor cleanup.
669 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
670 Append_Unqualified_Decoded): Make sure these work with non-empty
672 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
673 parameter, defaulting to Global_Name_Buffer.
674 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
675 Bounded_String parameter, no default.
676 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
677 Bounded_String instead of Global_Name_Buffer.
678 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
679 to Append_Entity_Name, and pass a Bounded_String parameter,
680 instead of using globals.
681 (Add_Source_Info): Pass a Bounded_String parameter, instead of
683 (Expand_Source_Info): Use local instead of globals.
684 * stringt.ads, stringt.adb (Append): Add an Append procedure
685 for appending a String_Id onto a Bounded_String.
686 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
688 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
689 Adjust_Name_Case parameter.
690 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
691 Set_Casing; that's the default.
692 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
693 protected subprograms are entry calls; otherwise it is not possible to
694 distinguish them from regular subprogram calls.
696 2016-04-18 Gary Dismukes <dismukes@adacore.com>
698 * sem_ch13.adb (Has_Good_Profile): Improvement
699 of error message. Now indicates subtype_mark of formal parameter
700 rather than the formal's name, plus minor rewording.
702 2016-04-18 Pascal Obry <obry@adacore.com>
704 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
706 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
708 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
710 2016-04-18 Gary Dismukes <dismukes@adacore.com>
712 * par-ch4.adb, sem_prag.adb: Minor reformatting.
714 2016-04-18 Bob Duff <duff@adacore.com>
716 * sinput.ads, sinput.adb (Build_Location_String): Take a
717 parameter instead of using a global variable. The function
718 version no longer destroys the Name_Buffer.
719 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
720 parameter, which defaults to the Global_Name_Buffer, so some
721 calls can avoid the global.
722 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
723 to avoid using globals. All but one call to Build_Location_String
724 avoids the global. Only one call to String_From_Name_Buffer
727 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
729 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
731 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
733 * sem_eval.adb (Choice_Matches): Check the expression
734 against the predicate values when the choice denotes a
735 subtype with a static predicate.
736 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
737 tests for predicates.
738 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
739 is not static. (Is_Static_Subtype): A subtype with a dynamic
740 predicate is not static.
741 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
742 (Is_Static_Subtype): Update the comment on usage.
744 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
746 * sem_prag.adb (Analyze_Input_Item): Allow
747 generic formals to appear as initialization items.
749 2016-04-18 Ed Schonberg <schonberg@adacore.com>
751 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
752 Has_Good_Profile): Additional error message to indicate that
753 the second parameter of the subprogram must be a first subtype.
755 2016-04-18 Ed Schonberg <schonberg@adacore.com>
757 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
758 Use the pragma lookahead that determines whether a subprogram
759 is to be inlined, when some level of backend optimization is
761 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
762 code used to create an instance body when needed for inlining.
763 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
764 call appears within an instantiation that is not a compilation
765 unit, add a pending instantiation for the enclosing instance,
766 so the backend can inline in turn the calls contained in the
769 2016-04-18 Ed Schonberg <schonberg@adacore.com>
771 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
772 that relates operations of the parent type to the operations of
773 the derived type has three distinct sources:
774 a) explicit operations of the derived type carry an
775 Overridden_Operation that designates the operation in the
777 b) Implicit operations that are inherited by the derived type
778 carry an alias that may be an explicit subprogram (in which case
779 it may have an Overridden_ Operation indicator) or may also be
780 inherited and carry its own alias.
781 c) If the parent type is an interface, the operation of the
782 derived type does not override, but the interface operation
783 indicates the operation that implements it.
784 * sem_prag.adb: Minor reformatting.
785 * sem_prag.adb (Check_External_Property): Update
786 the comment on usage. Reimplement.
788 2016-04-18 Ed Schonberg <schonberg@adacore.com>
790 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
791 profiles such as ZFP, ceiling priority is not available.
793 2016-04-18 Bob Duff <duff@adacore.com>
795 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
797 2016-04-18 Bob Duff <duff@adacore.com>
799 * sem_elab.adb (Output_Calls): Use
800 Get_Name_String, to clearly indicate that the global Name_Buffer
801 is being used. The previous code used Is_Internal_Name, which
802 returns a Boolean, but also has a side effect of setting the
803 Name_Buffer. Then it called the other Is_Internal_Name, which uses
804 the Name_Buffer for its input. And then it called Error_Msg_N,
805 again using the Name_Buffer. We haven't eliminated the global
806 usage here, but we've made it a bit clearer.
807 This also allows us to have a side-effect-free version of
809 * namet.ads, namet.adb: Provide a type Bounded_String, along with
810 routines that can be used without using global variables. Provide
811 Global_Name_Buffer so existing code can continue to use the
812 global. Mark the routines that use globals as obsolete. New code
813 shouldn't call the obsolete ones, and we should clean up existing
814 code from time to time.
815 Name_Find_Str is renamed as Name_Find.
816 * namet.h: Changed as necessary to interface to the new version
818 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
821 2016-04-18 Yannick Moy <moy@adacore.com>
823 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
824 outside of GNATprove, hence it should not be removed.
826 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
828 * sem_prag.adb (Analyze_Refinement_Clause):
829 The refinement of an external abstract state can now mention
830 non-external constituents.
831 (Check_External_Property): Update all SPARK RM references.
833 2016-04-18 Bob Duff <duff@adacore.com>
835 * exp_intr.adb: Remove some duplicated code.
837 2016-04-18 Yannick Moy <moy@adacore.com>
839 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
840 package spec and body out of SPARK.
842 2016-04-18 Johannes Kanig <kanig@adacore.com>
844 * spark_xrefs.ads: Minor comment update.
846 2016-04-18 Johannes Kanig <kanig@adacore.com>
848 * gnat1drv.adb (Gnat1drv): Force loading of System
851 2016-04-18 Bob Duff <duff@adacore.com>
853 * a-cuprqu.adb: Correction to previous change. If a new node
854 is inserted at the front of the queue (because it is higher
855 priority than the previous front node), we need to update
856 Header.Next_Unequal -- not just in the case where the queue was
859 2016-04-18 Bob Duff <duff@adacore.com>
861 * a-cuprqu.ads: Change the representation of List_Type from a
862 singly-linked list to a doubly-linked list. In addition, add a
863 pointer Next_Unequal, which points past a possibly-long chain
864 of equal-priority items. This increases efficiency, especially
865 in the case of many equal-priority items.
866 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
867 advantage of new data structure.
868 (Finalize): Rewrite in terms of Dequeue, for simplicity.
870 2016-04-18 Yannick Moy <moy@adacore.com>
872 * contracts.adb (Analyze_Object_Contract,
873 Analyze_Protected_Contract): Remove tests performed in GNATprove.
874 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
875 Remove query for tests performed in GNATprove.
877 2016-04-18 Ed Schonberg <schonberg@adacore.com>
879 * sem_aggr.adb (Resolve_Record_Aggregate): If
880 Warn_On_Redundant_Constructs is enabled, report a redundant box
881 association that does not cover any components, as it done for
882 redundant others associations in case statements.
884 2016-04-18 Ed Schonberg <schonberg@adacore.com>
886 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
887 Analyze the generated Check pragma for an inherited condition so
888 that it does not freeze the dispatching type of the primitive
889 operation, because it is pre-analyzed at the point of the
890 subprogram declaration (and not in the subprogram body, as is
891 done during regular expansion).
893 2016-04-18 Vincent Celier <celier@adacore.com>
895 * ali.ads: Increase the range of all _Id types to 100 millions.
897 2016-04-18 Gary Dismukes <dismukes@adacore.com>
899 * sem_warn.adb (Check_References): Change warning to suggest
900 using pragma Export rather than saying "volatile has no effect".
902 2016-04-18 Bob Duff <duff@adacore.com>
904 * g-souinf.ads (Compilation_ISO_Date): New function to return
905 the current date in ISO form.
906 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
907 a call to Compilation_ISO_Date into a string literal containing
908 the current date in ISO form.
909 * exp_intr.ads (Add_Source_Info): Improve documentation.
910 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
911 Compilation_ISO_Date.
912 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
914 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
916 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
917 to subtypes that are not first subtypes.
919 2016-04-18 Ed Schonberg <schonberg@adacore.com>
921 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
923 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
924 generated pragmas after subprogram declaration, rather than in
925 the corresponding subprogram body.
926 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
927 mode, if the operation is overridding, call
928 Collect_Inherited_Class_Wide_Conditions to generate the
929 corresponding pragmas immediately after the corresponding
930 subprogram declaration.
932 2016-04-18 Arnaud Charlet <charlet@adacore.com>
934 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
935 type to natural numbers.
936 (Stype): document code characters for concurrent entities.
938 2016-04-18 Olivier Hainque <hainque@adacore.com>
940 * targparm.ads: Update the Frontend_Exceptions default internal
942 (Frontend_Exceptions_On_Target): Change default value to True.
944 2016-04-18 Ed Schonberg <schonberg@adacore.com>
946 * sem_ch4.adb (Analyze_Selected_Component): Refine error
947 detection when a selected component in the body of a synchronized
948 type is a reference to an object of the same type declared
949 elsewhere. The construct is legal if the prefix of the selected
950 component includes an explicit dereference at any point.
952 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
954 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
955 internally generated expressions when trying to determine whether
956 a formal parameter of a tagged type subject to Extensions_Visible
957 False is used to initialize an object.
958 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
959 internally generated expressions when trying to determine whether
960 a formal parameter of a tagged type subject to Extensions_Visible
961 False is used in a type conversion.
963 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
965 * sem_res.adb (Is_Protected_Operation_Call):
966 Add guards to account for a non-decorated selected component.
968 2016-04-18 Yannick Moy <moy@adacore.com>
970 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
971 implementation of Body_Has_SPARK_Mode_On.
972 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
973 New function replacing previous Get_SPARK_Mode_From_Pragma, that
974 deals also with aspects.
975 (Get_SPARK_Mode_Type): Make function internal again.
976 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
977 Get_SPARK_Mode_From_Annotation.
979 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
981 * contracts.adb (Analyze_Object_Contract): Update references to
983 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
984 * ghost.adb Add with and use clauses for Sem_Disp.
985 (Check_Ghost_Derivation): Removed.
986 (Check_Ghost_Overriding):
987 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
988 (Check_Ghost_Primitive): New routine.
989 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
990 Update references to SPARK RM. (Is_OK_Pragma): Update references
991 to SPARK RM. Predicates are now a valid context for references
993 * ghost.ads (Check_Ghost_Derivation): Removed.
994 (Check_Ghost_Overriding): Update the comment on usage.
995 (Check_Ghost_Primitive): New routine.
996 (Check_Ghost_Refinement): New routine.
997 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
998 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
999 related to Ghost derivations
1000 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
1001 related to the convention-like behavior of pragma Ghost.
1002 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
1003 of a tagged type and its primitive agree.
1004 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
1005 RM. Move the verification of pragma Assertion_Policy Ghost
1006 to the proper place. Remove the now obsolete check related
1007 to Ghost derivations.
1008 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
1009 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
1011 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1013 * layout.adb: Fix more minor typos in comments.
1015 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1017 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
1019 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1021 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
1022 mode, collect inherited class-wide conditions to generate the
1023 corresponding pragmas.
1024 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
1025 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
1026 procedure for overriding subprograms, used to generate the pragmas
1027 corresponding to an inherited class- wide pre- or postcondition.
1028 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
1029 from contracts.adb (Replace_Condition_Entities): Subsidiary
1030 Build_Pragma_Check_Equivalent, to implement the proper semantics
1031 of inherited class-wide conditions, as given in AI12-0113.
1032 (Process_Class_Wide_Condition): Removed.
1033 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
1034 in contract of subprogram, to collect inherited class-wide
1036 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
1038 2016-04-18 Yannick Moy <moy@adacore.com>
1040 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
1041 * a-calend.ads (Ada.Calendar): Mark package spec as
1042 SPARK_Mode and add synchronous external abstract state Clock_Time.
1044 2016-04-18 Yannick Moy <moy@adacore.com>
1046 * sem_res.adb (Resolve_Call): Prevent inlining of
1047 calls inside expression functions. Factor previous code issuing
1048 errors to call Cannot_Inline instead, which does appropriate
1049 processing of message for GNATprove.
1051 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1053 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
1054 osint-b.adb: Cleanups.
1056 2016-04-18 Yannick Moy <moy@adacore.com>
1058 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
1059 body to inline in GNATprove mode when SPARK_Mode On applies to
1061 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
1064 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1066 * layout.adb: Fix minor typo in comment.
1067 * inline.adb: Fix minor pasto.
1068 * sem_ch12.ads: Fix minor typos in comments.
1070 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1072 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
1073 handle some complex cases of tag indeterminate calls that are
1074 actuals in other dispatching calls that are themselves tag
1076 (Check_Dispatching_Context): Add parameter to support recursive
1077 check for an enclosing construct that may provide a tag for a
1078 tag-indeterminate call.
1080 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1082 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
1083 Add global variables Task_Input_Seen and Task_Output_Seen.
1084 (Analyze_Global_Item): Detect an illegal use of the current
1085 instance of a single protected/task type in a global annotation.
1086 (Analyze_Input_Output): Inputs and output related to the current
1087 instance of a task unit are now tracked.
1088 (Check_Usage): Require
1089 the presence of the current instance of a task unit only when
1090 one input/output is available. (Current_Task_Instance_Seen):
1092 (Is_CCT_Instance): New parameter profile. Update
1093 the comment on usage. The routine now properly recognizes several
1094 cases related to single protected/task types.
1096 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1098 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
1099 to create a brand new freeze node. This handles a case where an
1100 ignored Ghost context is freezing something which is not ignored
1101 Ghost and whose freeze node should not be removed from the tree.
1102 (New_Freeze_Node): New routine.
1104 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
1106 * sigtramp.h (__gnat_set_is_vxsim) New function to
1107 tell sigtramp-vxworks to handle vxsim signal contexts. *
1108 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
1109 differences in the sigcontext structure between the expected
1110 regular x86 or x86_64 ones and the ones received in case of
1111 exexution on the vxworks simulator.
1112 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
1113 this information to sigtramp-vxworks.c. Remove the old mechanism for
1115 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
1117 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1119 * exp_ch3.adb (Inline_Init_Proc): New function returning
1120 whether the initialization procedure of a type should be
1121 inlined. Return again True for controlled type themselves.
1122 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
1123 (Build_Record_Init_Proc): Likewise.
1125 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1127 * gnatvsn.ads (Library_Version): Bump to 7.
1129 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1131 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
1132 on the entity of a subprogram declaration that is completed by
1133 an expression function.
1135 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1137 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
1138 declaration can appear in an aspect specification for a dynamic
1139 predicate, and a pragma for aspect Predicate_Failure.
1140 * exp_util.adb (Replace_Subtype_References): Replace current
1141 occurrences of the subtype to which a dynamic predicate applies,
1142 byt the expression that triggers a predicate check. Needed to
1143 implement new aspect Predicate_Failure.
1145 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1147 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
1148 * Makefile.rtl: update accordingly.
1150 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1152 * sem_type.adb (Disambiguate): Call Covers only when necessary
1153 for standard operators.
1155 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1157 * atree.ads (Num_Extension_Nodes): Add couple of figures
1159 * atree.adb: Add GNAT.Heap_Sort_G dependency.
1160 (Print_Statistics): New exported procedure to print statistics.
1162 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1164 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
1165 as to be inlined if the type needs finalization.
1167 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
1169 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
1170 alignment for x86_64.
1171 * init.c: Better fix for guard page reset on x86_64-vx7.
1172 Do not try to retrieve the page that actually raised
1173 the signal as the probing mechanism used on x86_64 do not allow
1174 such retrieval. We thus just test if the guard page is active,
1175 and re-activate it if not.
1177 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1179 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
1182 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
1184 * affinity.c: Use the proper type for task id.
1185 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
1187 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1189 * sem_prag.adb (Process_Convention): Relax rule on exporting
1190 Intrinsic types if Relaxed_RM_Semantics is True.
1192 2016-04-18 Vincent Celier <celier@adacore.com>
1194 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
1195 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
1196 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
1197 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
1198 exp_ch3.ads, exp_unst.adb: Change "descendent" to
1199 "descendant" in comments, error messages and identifiers.
1200 * gcc-interface/decl.c: Ditto.
1202 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1204 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
1205 New_S only once at the beginning of the function.
1207 2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
1209 * gcc-interface/decl.c (components_to_record): Restrict the previous
1210 change to fields with variable size.
1212 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
1214 * gcc-interface/decl.c (components_to_record): Add special case for
1215 single field with representation clause at offset 0.
1217 2016-03-16 Svante Signell <svante.signell@gmail.com>
1219 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
1220 * s-osinte-gnu.ads: New file.
1222 2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
1224 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
1225 (Stack_Check_Limits): Set to False.
1226 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
1227 (Stack_Check_Limits): Set to False.
1228 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
1229 (Stack_Check_Limits): Set to False.
1230 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
1231 (Stack_Check_Limits): Set to False.
1232 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
1233 (Stack_Check_Limits): Set to False.
1235 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
1237 * gcc-interface/trans.c (statement_node_p): New predicate.
1238 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
1239 not return dummy results for expressions attached to packed array
1240 implementation types.
1242 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
1244 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
1245 the expression of a renaming manually in case #3.
1247 2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
1249 * system-linux-s390.ads: Enable Stack_Check_Probes.
1250 * system-linux-s390.ads: Likewise.
1252 2016-02-29 Martin Liska <mliska@suse.cz>
1254 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
1255 Replace ENABLE_CHECKING macro with flag_checking.
1257 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1259 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
1260 handling of unconstrained array types as designated types into common
1261 processing. Also handle array types as incomplete designated types.
1263 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1265 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
1266 ASIS mode, fully lay out the minimal record type.
1268 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1270 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
1271 (build_return_expr): Likewise.
1272 (Call_to_gnu): If this is a function call and there is no target,
1273 create a temporary for the return value for all aggregate types,
1274 but never create it for a return statement. Push a binding level
1275 around the call in more cases. Remove obsolete code.
1277 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1279 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
1280 * gcc-interface/gigi.h (gigi): Remove useless attribute.
1281 (gnat_gimplify_expr): Likewise.
1282 (gnat_to_gnu_external): Declare.
1283 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
1284 code dealing with the expression of external constants into...
1285 Invoke gnat_to_gnu_external instead.
1286 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
1287 when not for a definition. Deal with COMPOUND_EXPR and variables with
1288 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
1289 'reference to a function call in a renaming. Remove obsolete test and
1290 adjust associated comment.
1291 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
1292 temporaries created to hold the return value, if any.
1293 (gnat_to_gnu_external): ...this. New function.
1294 * gcc-interface/utils.c (create_var_decl): Detect a constant created
1295 to hold 'reference to function call.
1296 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
1297 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
1299 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
1301 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
1302 the prefix denotes an entity which Has_Atomic_Components.
1303 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
1304 denotes an entity which Has_Atomic_Components.
1306 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
1308 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
1309 for fat pointer or scalar types.
1311 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
1313 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
1314 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
1315 Call maybe_character_value on the array bounds. Get to the base type
1316 of the index type and call maybe_debug_type on it.
1317 * gcc-interface/utils.c (finish_character_type): Add special treatment
1320 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
1322 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
1323 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
1325 2016-02-12 Jakub Jelinek <jakub@redhat.com>
1327 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
1328 neighbour -> neighbor.
1329 * prep.adb: Likewise.
1330 * prj.ads: Likewise.
1331 * prepcomp.adb: Likewise.
1332 * g-socket.ads: Likewise.
1333 * s-imgrea.adb: Likewise.
1334 * a-calend.adb: Likewise.
1335 * exp_disp.adb: Likewise.
1336 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
1337 * g-socket.adb: Likewise.
1338 * sem_ch12.adb: Likewise.
1339 * terminals.c: Likewise.
1341 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
1343 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
1344 build_common_tree_nodes.
1346 2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
1348 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
1349 DECL_IGNORED_P last.
1351 2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
1353 * gcc-interface/gigi.h (enum attr_type): Rename into...
1354 (enum attrib_type): ...this.
1355 (struct attrib): Adjust.
1356 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
1358 2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
1360 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
1361 literal if the entity is of a character type.
1362 * gcc-interface/lang.opt (fsigned-char): New option.
1363 * gcc-interface/misc.c (gnat_handle_option): Accept it.
1364 (gnat_init): Adjust comment.
1365 * gcc-interface/gigi.h (finish_character_type): New prototype.
1366 (maybe_character_type): New inline function.
1367 (maybe_character_value): Likewise.
1368 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
1369 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
1370 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
1371 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
1372 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
1373 Copy TYPE_STRING_FLAG from type to subtype.
1374 <E_Array_Type>: Deal with character index types.
1375 <E_Array_Subtype>: Likewise.
1376 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
1377 char_type_node throughout.
1378 (build_raise_check): Likewise.
1379 (get_type_length): Deal with character types.
1380 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
1382 <Attr_Pred>: Likewise.
1383 (Loop_Statement_to_gnu): Likewise.
1384 (Raise_Error_to_gnu): Likewise.
1385 <N_Indexed_Component>: Deal with character index types. Remove
1387 <N_Slice>: Likewise.
1388 <N_Type_Conversion>: Deal with character types. Minor tweak.
1389 <N_Unchecked_Type_Conversion>: Likewise.
1391 <N_Op_Eq>: Likewise.
1392 (emit_index_check): Delete.
1393 * gcc-interface/utils.c (finish_character_type): New function.
1394 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
1395 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
1396 with char_type_node.
1397 (build_call_raise): Likewise.
1398 (build_call_raise_column): Likewise.
1399 (build_call_raise_range): Likewise.
1401 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
1403 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
1404 (build_call_raise_range): Likewise.
1405 (gnat_unsigned_type): Delete.
1406 (gnat_signed_type): Likewise.
1407 (gnat_signed_or_unsigned_type_for): New prototype.
1408 (gnat_unsigned_type_for): New inline function.
1409 (gnat_signed_type_for): Likewise.
1410 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
1411 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
1412 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
1413 and compute their base type from that.
1414 <E_Array_Subtype>: Remove duplicate declaration.
1415 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
1416 * gcc-interface/trans.c (get_type_length): Likewise.
1417 (Attribute_to_gnu): Likewise.
1418 (Loop_Statement_to_gnu): Likewise.
1419 (Call_to_gnu): Likewise.
1420 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
1421 and gnat_signed_type_for. Minor tweaks.
1422 (build_binary_op_trapv): Likewise.
1423 (emit_check): Likewise.
1424 (convert_with_check): Likewise.
1425 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
1426 functions. Minor tweaks.
1427 (Case_Statement_to_gnu): Remove dead code.
1428 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
1429 (init_code_table): Minor reordering.
1430 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
1431 (gnat_signed_type): Likewise.
1432 (gnat_signed_or_unsigned_type_for): New function.
1433 (unchecked_convert): Use directly the size in the test for precision
1434 vs size adjustments.
1435 (install_builtin_elementary_types): Call gnat_signed_type_for.
1436 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
1438 (build_goto_raise): New function taken from...
1439 (build_call_raise): ...here. Call it.
1440 (build_call_raise_column): Add KIND parameter and call it.
1441 (build_call_raise_range): Likewise.
1443 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
1445 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
1446 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
1447 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
1448 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
1449 and tweak gnat_encodings tests throughout.
1450 (initial_value_needs_conversion): Likewise.
1451 (intrin_arglists_compatible_p): Likewise.
1452 * gcc-interface/misc.c (gnat_print_type): Likewise.
1453 (gnat_get_debug_type): Likewise.
1454 (gnat_get_fixed_point_type_info): Likewise.
1455 (gnat_get_array_descr_info): Likewise.
1456 (get_array_bit_stride): Likewise.
1457 (gnat_get_type_bias): Fix formatting.
1458 (enumerate_modes): Likewise.
1459 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
1460 (add_decl_expr): Simplify NULL_TREE test.
1461 (end_stmt_group): Likewise.
1462 (build_binary_op_trapv): Fix formatting.
1463 (get_exception_label): Use switch statement.
1464 (init_code_table): Move around.
1465 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
1466 (gnat_poplevel): Likewise.
1467 (gnat_set_type_context): Likewise.
1468 (defer_or_set_type_context): Fix formatting.
1469 (gnat_pushdecl): Simplify NULL_TREE test.
1470 (maybe_pad_type): Likewise.
1471 (add_parallel_type): Likewise.
1472 (create_range_type): Likewise.
1473 (process_deferred_decl_context): Likewise.
1474 (convert): Likewise.
1475 (def_builtin_1): Likewise.
1476 * gcc-interface/utils2.c (find_common_type): Likewise.
1477 (build_binary_op): Likewise.
1478 (gnat_rewrite_reference): Likewise.
1479 (get_inner_constant_reference): Likewise.
1481 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
1484 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
1485 the parent function instead of the current function in order to issue
1486 the warning or the error. Add guard for ignored functions.
1488 2016-01-17 Jakub Jelinek <jakub@redhat.com>
1490 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
1492 2016-01-15 Jakub Jelinek <jakub@redhat.com>
1494 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
1495 of char * for path_val to avoid warnings.
1497 2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
1499 * gcc-interface/utils.c: Bump copyright year.
1500 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
1501 the current lexical scope.
1503 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1505 * gnat_ugn.texi: Bump @copying's copyright year.
1506 * gnat_rm.texi: Likewise.
1508 2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
1510 * gnatvsn.ads: Bump copyright year.
1513 Copyright (C) 2016 Free Software Foundation, Inc.
1515 Copying and distribution of this file, with or without modification,
1516 are permitted in any medium without royalty provided the copyright
1517 notice and this notice are preserved.