1 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
3 * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
4 * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
6 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
8 * exp_ch6.adb: Minor reformatting.
10 2016-04-21 Ed Schonberg <schonberg@adacore.com>
12 * sem_ch13.adb: Minor comment update.
14 2016-04-21 Ed Schonberg <schonberg@adacore.com>
16 * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
17 boolean parameter to determine whether freezing an overloadable
18 entity freezes its profile as well. This is required by
19 AI05-019. The call to Freeze_Profile within Freeze_Entity is
20 conditioned by the value of this flag, whose default is True.
21 * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
22 reference freezes the prefix, but it the prefix is a subprogram
23 it does not freeze its profile.
25 2016-04-21 Javier Miranda <miranda@adacore.com>
27 * exp_util.adb (Build_Procedure_Form): No action needed for
28 subprogram renamings since the backend can generate the call
29 using the renamed subprogram. This leaves the tree more clean
31 * exp_ch6.adb (Expand_Call): Extend previous patch for
32 rewritten-for-c entities to handle subprogram renamings.
33 (Rewrite_Function_Call_For_C): Handle subprogram renamings.
35 2016-04-21 Ed Schonberg <schonberg@adacore.com>
37 * sem_ch13.adb: Code cleanup.
39 2016-04-21 Ed Schonberg <schonberg@adacore.com>
41 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
42 created for SPARK_To_C, the entity must remain invisible so it
43 does not overload subsequent references to the original function.
44 * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
45 Handle Extended_Return_Statements by replacing it with a block
46 with assignments and a simple return statement.
47 * exp_util.adb (Build_Procedure_Form): Make procedure entity
48 invisible after analyzing declaration, to prevent improper
51 2016-04-21 Javier Miranda <miranda@adacore.com>
53 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
54 attribute Rewritten_For_C to the body since since the expander
55 may generate calls using that entity.
56 * exp_ch6.adb (Expand_Call): For internally generated
57 calls ensure that they reference the entity of the spec
58 of the called function.
59 (Rewritten_For_C_Func_Id): New subprogram.
60 (Rewritten_For_C_Proc_Id): New subprogram.
61 (Rewrite_Function_Call_For_C): Invoke the new subprogram to
62 ensure that we skip freezing entities.
63 * exp_util.adb (Build_Procedure_Form): No action needed if the
64 procedure was already built.
66 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
68 * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
71 2016-04-21 Ed Schonberg <schonberg@adacore.com>
73 * sem_util.adb (Denotes_Iterator): Use root type to determine
74 whether the ultimate ancestor is the predefined iterator
76 * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
77 and avoid reuse of Pack local variable.
79 2016-04-21 Olivier Hainque <hainque@adacore.com>
81 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
82 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
83 system-vxworks-mips.ads, system-vxworks-x86.ads: Define
84 Executable_Extension to ".out".
86 2016-04-21 Javier Miranda <miranda@adacore.com>
88 * frontend.adb: Update call to Unnest_Subprograms.
89 * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
90 (Unnest_Subprograms): Moved to package exp_unst.
91 * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
93 * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
94 enumeration literals when generating C code.
96 2016-04-21 Javier Miranda <miranda@adacore.com>
98 * frontend.adb: Remove call to initialize Exp_Ch6.
99 * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
100 (Unest_Entry/Unest_Bodies): Removed.
101 (Unnest_Subprograms): Code cleanup.
103 2016-04-21 Arnaud Charlet <charlet@adacore.com>
105 * set_targ.adb (Read_Target_Dependent_Values):
106 close target description file once its contents is read.
107 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
108 and Stderr_File): Close local file descriptors before spawning
110 * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
111 local variables to make the code easier to understand and avoid
112 duplicated calls to Parent and Generic_Parent.
114 2016-04-20 Bob Duff <duff@adacore.com>
116 * s-os_lib.ads: Minor comment fix.
118 2016-04-20 Ed Schonberg <schonberg@adacore.com>
120 * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
121 a discriminant check for a type whose partial view has unknown
122 discriminants when the full view has discriminants with defaults.
124 2016-04-20 Javier Miranda <miranda@adacore.com>
126 * exp_util.adb (Remove_Side_Effects): When generating C code
127 remove side effect of type conversion of access to unconstrained
129 (Side_Effect_Free): Return false for the type
130 conversion of access to unconstrained array type when generating
132 * sem_res.adb (Resolved_Type_Conversion): Remove side effects
133 of access to unconstrained array type conversion when generating
136 2016-04-20 Ed Schonberg <schonberg@adacore.com>
138 * sem_ch13.adb (Build_Predicate_Function_Declaration): New
139 function, to construct the declaration of a predicate function
140 at the end of the current declarative part rather than at the
141 (possibly later) freeze point of the type. This also allows uses
142 of a type with predicates in instantiations elsewhere.
143 (Resolve_Aspect_Expression): New procedure to detect visiblity
144 errors in aspect expressions, at the end of the declarative part
145 that includes the type declaration.
146 * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
147 predicate function from private to full view.
148 * einfo.adb (Predicate_Function): Refine search for predicate
149 function when type has a full view and predicate function may
150 be defined on either view.
152 2016-04-20 Javier Miranda <miranda@adacore.com>
154 * frontend.adb: Passing the root of the tree to
155 Unnest_Subprograms().
156 * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
157 took care of adding subprograms to the Unest_Bodies table since
158 performing such action too early disables the ability to process
159 generic instantiations.
160 (Unnest_Subprograms): Adding parameter.
161 (Search_Unnesting_Subprograms): New subprogram.
162 * exp_ch6.ads (Unnest_Subrograms): Update documentation.
164 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
166 * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
168 2016-04-20 Ed Schonberg <schonberg@adacore.com>
170 * exp_unst.adb (Check_Static_Type): For a private type, check
173 2016-04-20 Ed Schonberg <schonberg@adacore.com>
175 * sem_attr.adb (Check_Type): Reject an attribute reference in
176 an aspect expression, when the prefix of the reference is the
177 current instance of the type to which the aspect applies.
179 2016-04-20 Bob Duff <duff@adacore.com>
181 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
182 hiding unless we're actually hiding something. The previous
183 code would (for example) warn about a "<" on a record type
184 because it incorrectly thought it was hiding the "<" on Boolean
185 in Standard. We need to check that the homonym S is in fact a
186 homograph of a predefined operator.
188 2016-04-20 Ed Schonberg <schonberg@adacore.com>
190 * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
191 from exp_ch6.adb, for use in SPARK_To_C mode when creating the
192 procedure equivalent to a function returning an array, when this
193 construction is deferred to the freeze point of the function.
194 * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
195 function that renames an instance of Unchecked_Conversion.
196 * freeze.adb (Freeze_Subprogram): Generate the proper procedure
197 declaration for a function returning an array.
198 * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
200 2016-04-20 Ed Schonberg <schonberg@adacore.com>
202 * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
203 New predicate to determine that in a context with full run-time,
204 a function call is an expansion of a reference to attribute
206 * sem_ch5.adb (Analyze_Function_Call): use it.
207 * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
209 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
211 * einfo.adb Flag286 is now used as Is_Exception_Handler.
212 (Is_Exception_Handler): New routine.
213 (Set_Is_Exception_Handler): New routine.
214 (Write_Entity_Flags): Output the status of Is_Exception_Handler.
215 * einfo.ads New attribute Is_Exception_Handler along with
216 occurrences in entities.
217 (Is_Exception_Handler): New routine along with pragma Inline.
218 (Set_Is_Exception_Handler): New routine along with pragma Inline.
219 * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
220 for exception handlers with a choice parameter.
221 * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
222 generated for a choice parameter as an exception handler.
224 2016-04-20 Ed Schonberg <schonberg@adacore.com>
226 * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
227 (Constrain_Discriminated_Type): In an instance, if the type has
228 unknown discriminants, use its full view.
229 (Process_Subtype): Check that the base type is private before
230 adding subtype to Private_Dependents list.
232 2016-04-20 Bob Duff <duff@adacore.com>
234 * sem_ch13.adb: Minor comment fix.
236 2016-04-20 Yannick Moy <moy@adacore.com>
238 * sem_ch4.adb: Fix typos in comments.
239 * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
241 2016-04-20 Ed Schonberg <schonberg@adacore.com>
243 * sem_ch4.adb (Analyze_Selected_Component): A reference to the
244 current instance of a task type is legal if the prefix is an
245 expression of that task type and the selector is an entry or
248 2016-04-20 Arnaud Charlet <charlet@adacore.com>
250 * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
251 varsize field at the end for efficiency.
253 2016-04-20 Vincent Celier <celier@adacore.com>
255 * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
256 ls" includes the switch -V.
257 * clean.adb: "<target>-gnatclean -P" now calls "gprclean
259 * make.adb: "<target>-gnatmake -P" now calls "gprbuild
262 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
264 * sem_ch12.adb (Qualify_Type): Do not perform
265 partial qualification when the immediate scope is a generic unit.
267 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
269 * exp_unst.adb: Minor reformatting.
271 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
273 * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
274 tag assignment and adjustment preceed the accessibility check.
275 * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
277 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
279 * exp_prag.adb (Expand_Attributes): Ensure that
280 the temporary used to capture the value of attribute 'Old's
281 prefix is properly initialized.
283 2016-04-20 Javier Miranda <miranda@adacore.com>
285 * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
288 2016-04-20 Arnaud Charlet <charlet@adacore.com>
290 * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
293 2016-04-20 Vincent Celier <celier@adacore.com>
295 * make.adb: Code cleanup.
297 2016-04-20 Arnaud Charlet <charlet@adacore.com>
299 * exp_ch4.adb (Expand_Allocator_Expression): Help C code
302 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
304 * sem_ch12.adb (Copy_Generic_Node): Handle the special
305 qualification installed for universal literals that act as
306 operands in binary or unary operators. (Qualify_Operand): Mark
307 the qualification to signal the instantiation mechanism how to
308 handle global reference propagation.
309 * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
310 (Set_Is_Qualified_Universal_Literal): New routine.
311 * sinfo.ads New attribute Is_Qualified_Universal_Literal along
312 with occurrences in nodes.
313 (Is_Qualified_Universal_Literal):
314 New routine along with pragma Inline.
315 (Set_Is_Qualified_Universal_Literal): New routine along with
318 2016-04-20 Ed Schonberg <schonberg@adacore.com>
320 * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
321 so that the corresponding checks are preserved across compilations
322 that include System.Constants in their context.
324 2016-04-20 Gary Dismukes <dismukes@adacore.com>
326 * sem_type.adb: Minor typo fix and reformatting.
327 * a-conhel.ads: Update comment.
329 2016-04-20 Bob Duff <duff@adacore.com>
331 * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
332 code so it doesn't trigger an "uninit var" warning.
334 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
336 * sem_attr.ads Add new table Universal_Type_Attribute.
337 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
340 2016-04-20 Ed Schonberg <schonberg@adacore.com>
342 * exp_aggr.adb (Init_Stored_Discriminants,
343 Init_Visible_Discriminants): New procedures, subsidiary of
344 Build_Record_Aggr_Code, to handle properly the construction
345 of aggregates for a derived type that constrains some parent
346 discriminants and renames others.
348 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
350 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
351 (Save_References_In_Operator): Add explicit qualifications in
352 the generic template for all operands of universal type.
353 * sem_type.adb (Disambiguate): Update the call to Matches.
354 (Matches): Reimplemented.
355 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
357 2016-04-20 Ed Schonberg <schonberg@adacore.com>
359 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
360 an illegal aspect that freezes the entity to which it applies.
362 2016-04-20 Bob Duff <duff@adacore.com>
364 * a-stwibo.ads, a-stzbou.ads
365 ("="): Add overriding keyword before function to avoid crash when
366 compiler is called with -gnatyO (check overriding indicators).
368 2016-04-20 Ed Schonberg <schonberg@adacore.com>
370 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
371 is a configuration pragma and it uses the ARG syntax, insert
372 the rewritten pragma after the current one rather than using
375 2016-04-20 Arnaud Charlet <charlet@adacore.com>
377 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
380 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
382 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
383 s-imglli.adb: Minor reformatting.
385 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
387 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
388 renamed operator when the associated node appears within a
390 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
392 2016-04-20 Yannick Moy <moy@adacore.com>
394 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
395 * einfo.adb (Set_Overridden_Operation): Add assertion.
396 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
399 2016-04-20 Javier Miranda <miranda@adacore.com>
401 * exp_unst.adb (Append_Unique_Call): New subprogram.
402 (Unnest_Subprogram): Replace the unique occurrence
403 of Call.Append() by Append_Unique_Call() which protects us from
404 adding to the Calls table duplicated entries.
406 2016-04-20 Arnaud Charlet <charlet@adacore.com>
408 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
409 * xref_lib.ads (Dependencies_Tables): instantiate
410 Table package with types that guarantee its safe use.
411 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
414 2016-04-20 Arnaud Charlet <charlet@adacore.com>
416 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
417 Disable expansion when generating C code.
418 * sinfo.ads, inline.ads: Minor editing.
420 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
422 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
425 2016-04-20 Javier Miranda <miranda@adacore.com>
427 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
428 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
429 declaration of the internally built _postcondition procedure.
431 2016-04-20 Arnaud Charlet <charlet@adacore.com>
433 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
435 * sem_util.adb (Is_Unchecked_Conversion_Instance):
436 defense against library-level renamings of other functions,
437 which are never instances of Unchecked_Conversion.
438 * einfo.ads: minor fix of casing in comment
440 2016-04-20 Ed Schonberg <schonberg@adacore.com>
442 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
443 that has been analyzed and expanded already. Qualify the names
444 in the proper body for use in the generation of C code.
446 2016-04-20 Javier Miranda <miranda@adacore.com>
448 * contracts.adb (Build_Postconditions_Procedure): Force its
449 inlining when generating C code.
450 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
451 _postconditions when generating C code.
452 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
453 _postconditions when generating C code.
454 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
455 types of return value and argument changed from Node_Id to
458 2016-04-20 Vincent Celier <celier@adacore.com>
460 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
462 2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
464 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
465 the Has_Delayed_Freeze flag on the anonymous instance node.
467 2016-04-20 Javier Miranda <miranda@adacore.com>
469 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
470 scope associated with the renaming object declaration.
471 * exp_util.adb (Insert_Actions): Remove handling of iterator
472 loop marked as requiring the secondary stack.
474 2016-04-20 Ed Schonberg <schonberg@adacore.com>
476 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
477 AI12-0124, which extends the functionality of the attribute so it
478 reflects the semantics of GNAT 'Img when applied to scalar types.
479 * lib-xref.adb: minor whitespace layout fix.
481 2016-04-20 Vincent Celier <celier@adacore.com>
483 * clean.adb (Gnatclean): Fail if project file specified and
484 gprclean is not available.
485 * gnatname.adb: Fail is -P is used and gprname is not available.
486 * make.adb (Initialize): Fail if project file specified and
487 gprbuild is not available.
489 2016-04-20 Bob Duff <duff@adacore.com>
491 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
494 2016-04-20 Gary Dismukes <dismukes@adacore.com>
496 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
499 2016-04-20 Ed Schonberg <schonberg@adacore.com>
501 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
502 If the pragma comes from an aspect specification, verify that
503 the aspect applies to an entity with a declarative part.
504 * exp_ch5.adb: Code cleanup.
506 2016-04-20 Ed Schonberg <schonberg@adacore.com>
508 * sem_res.adb (Resolve_If_Expression): If first expression is
509 universal, resolve subsequent ones with the corresponding class
510 type (Any_Integer or Any_Real).
512 2016-04-20 Ed Schonberg <schonberg@adacore.com>
514 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
515 disabled, complete the analysis of the iterator name to ensure
516 that reference for entities within are properly generated.
518 2016-04-20 Arnaud Charlet <charlet@adacore.com>
520 * a-dispat.ads (Yield): add Global contract.
521 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
522 * a-taside.adb: Added Initializes => Tasking_State.
524 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
526 * sem_ch13.adb (Build_Invariant_Procedure):
527 Reimplement the invariant procedure spec and body insertion.
529 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
531 * sem_ch13.adb (Add_Invariant): Do not replace
532 the saved expression of an invariatn aspect when inheriting
533 a class-wide type invariant as this clobbers the existing
534 expression. Do not use New_Copy_List as it is unnecessary
535 and leaves the parent pointers referencing the wrong part of
536 the tree. Do not replace the type references for ASIS when
537 inheriting a class-wide type invariant as this clobbers the
538 existing replacement.
540 2016-04-20 Ed Schonberg <schonberg@adacore.com>
542 * sem_util.adb (Build_Explicit_Dereference): If the designated
543 expression is an entity name, generate reference to the entity
544 because it will not be resolved again.
546 2016-04-19 Arnaud Charlet <charlet@adacore.com>
548 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
549 gnat_rm.texi: Update documentation.
551 2016-04-19 Olivier Hainque <hainque@adacore.com>
553 * par_sco.adb (Traverse_One, case N_Case_Statement):
554 Skip pragmas before the first alternative.
555 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
557 2016-04-19 Tristan Gingold <gingold@adacore.com>
559 * adaint.c (__gnat_lwp_self): New function (for darwin).
560 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
563 2016-04-19 Olivier Hainque <hainque@adacore.com>
565 * sem_util.adb (Build_Elaboration_Entity): Always request an
566 elab counter when preserving control-flow.
568 2016-04-19 Olivier Hainque <hainque@adacore.com>
570 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
571 Needs_Debug_Info when producing SCOs.
572 * par_sco.adb (Traverse_Aspects): Fix categorization of
573 Type_Invariant to match actual processing as activated depending
574 on pragma Assertion_Policy.
575 * sem_prag.adb (Analyze_Pragma): Remove special case for
576 Name_Invariant regarding SCO generation, which completely disabled
577 the production of SCOs for Invariant pragmas and aspects.
579 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
581 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
584 2016-04-19 Ed Schonberg <schonberg@adacore.com>
586 * freeze.adb (Freeze_Profile): Refine predicate that checks
587 whether a function that returns a limited view is declared in
588 another unit and cannot be frozen at this point.
590 2016-04-19 Ed Schonberg <schonberg@adacore.com>
592 * exp_aggr.adb (Component_Count): Handle properly superflat
593 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
594 return value of the function is Natural, rather than leaving
595 the handling of such arrays to the caller of this function.
597 2016-04-19 Arnaud Charlet <charlet@adacore.com>
599 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
600 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
601 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
602 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
603 to publicly visible routine in Sem_Util.
605 2016-04-19 Ed Schonberg <schonberg@adacore.com>
607 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
608 the check if the type of the actual is By_Reference.
610 2016-04-19 Arnaud Charlet <charlet@adacore.com>
612 * sem_res.adb (Within_Subprogram_Call): Detect
613 also nodes that appear in entry calls.
614 (Resolve_Actuals, Insert_Default): Propagate
615 dimension information if any, from default expression to the
616 copy that appears in the list of actuals.
617 * uintp.ads: minor whitespace fix in comment.
618 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
620 * set_targ.adb (Set_Targ): convert directly from
621 Natural to Pos, without intermediate conversion to Int.
623 2016-04-19 Arnaud Charlet <charlet@adacore.com>
625 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
627 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
629 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
630 to SPARK RM in both comment and error message.
632 2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
634 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
635 CW type, then the subprogram must have a delayed freeze. This
636 ensures that the backend can properly recover the full view when
637 elaborating the access subprogram declaration.
639 2016-04-19 Ed Schonberg <schonberg@adacore.com>
641 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
642 overloadable entity if originally overloaded.
644 2016-04-19 Arnaud Charlet <charlet@adacore.com>
646 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
647 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
648 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
649 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
652 2016-04-19 Arnaud Charlet <charlet@adacore.com>
654 * sem_util.adb (Copy_Node_With_Replacement):
655 use Set_Comes_From_Source instead of directly manipulating
656 internals of the node table.
657 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
658 * sem_aux.adb (Get_Rep_Pragma,
659 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
660 do not change as constants and initialize them in the declaration.
661 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
662 variables that do not change as constants and initialize them
665 2016-04-19 Ed Schonberg <schonberg@adacore.com>
667 * sem_res.adb (Resolve_Entry_Call): If the entry has
668 preconditions it is rewritten by means of a wrapper that
669 incorporates the original call. Before rewriting generate a
670 reference to the entry being called to prevent spurious warnings
671 and provide correct cross-reference information.
673 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
675 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
676 local constant Scop. Ignore any internally generated loops when
677 performing the check concerning an abstract subprogram call
678 without a controlling argument.
679 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
681 2016-04-19 Bob Duff <duff@adacore.com>
683 * sem_elab.adb (Check_A_Call): There are cases where we have No
684 (Ent) after the Alias loop, even when there was no previous error,
685 so we can't assert that there was an error.
687 2016-04-19 Ed Schonberg <schonberg@adacore.com>
689 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
690 Reject use of type name as a prefix to 'access within an aggregate
691 in a context that is not the declarative region of a type.
693 2016-04-19 Vincent Celier <celier@adacore.com>
695 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
696 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
697 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
698 Remove anything related to project files
699 * g-mbdira.adb: minor whitespace cleanup
700 * g-spipat.adb: minor removal of extra spaces after closing paren
702 2016-04-19 Ed Schonberg <schonberg@adacore.com>
704 * exp_ch6.adb (Expand_Actuals): If post-statements are present
705 and the enclosing context is a function call or indexing, build
706 an Expression_With_Actions for the call.
708 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
710 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
711 a with line for an ignored Ghost unit.
712 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
713 Par. A child package is Ghost when its parent is Ghost.
714 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
715 a subprogram declaration that acts as a compilation unit.
717 2016-04-18 Michael Matz <matz@suse.de>
719 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
720 (gnat_to_gnu_field): Ditto.
721 (components_to_record): Ditto.
722 (create_variant_part_from): Ditto.
723 (copy_and_substitute_in_size): Ditto.
724 (substitute_in_type): Ditto.
725 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
726 (make_packable_type): Ditto.
727 (maybe_pad_type): Ditto.
728 (finish_fat_pointer_type): Ditto.
729 (finish_record_type): Ditto and use SET_DECL_ALIGN.
730 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
731 (create_field_decl): Use SET_DECL_ALIGN.
733 2016-04-18 Arnaud Charlet <charlet@adacore.com>
735 * einfo.adb (Overridden_Operation): assert that
736 function is called for valid arguments.
737 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
738 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
739 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
740 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
741 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
742 No space after closing parenthesis except where required for
744 * sem_res.adb: Minor reformatting.
746 2016-04-18 Arnaud Charlet <charlet@adacore.com>
748 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
749 statement when relevant.
751 2016-04-18 Bob Duff <duff@adacore.com>
753 * a-cuprqu.adb (Enqueue): Properly handle the
754 case where the new element has a unique priority.
756 2016-04-18 Tristan Gingold <gingold@adacore.com>
758 * adaint.h: Define stat structures and functions for iOS
761 2016-04-18 Arnaud Charlet <charlet@adacore.com>
763 * sem_res.adb (Resolve_Entry_Call): reset
764 Is_Overloaded flag after resolving calls to overloaded protected
766 * exp_spark.adb (Expand_SPARK): call
767 Qualify_Entity_Names for tasking nodes, i.e. protected types,
768 task types and entries.
769 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
770 in case of an unconstrained type.
772 2016-04-18 Yannick Moy <moy@adacore.com>
774 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
775 comment to document usage of subprogram in GNATprove.
777 2016-04-18 Ed Schonberg <schonberg@adacore.com>
779 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
780 message for wrong placement of aspect Test_Case.
782 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
784 * einfo.ads: Update the documentation of attribute Renamed_Object.
785 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
787 2016-04-18 Gary Dismukes <dismukes@adacore.com>
789 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
790 in the case of AAMP (same as for use of the -gnatd.P switch) to
791 suppress this optimization, which avoids creating a dependence
792 on the 64-bit arithmetic package.
794 2016-04-18 Arnaud Charlet <charlet@adacore.com>
796 * exp_ch4.adb: Update comment.
798 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
800 * exp_ch6.adb (Expand_Call): Make sure instantiations are
801 registered only once as pending here.
803 2016-04-18 Arnaud Charlet <charlet@adacore.com>
805 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
806 (Minimize_Expression_With_Actions): New flag.
807 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
809 (Resolve_Short_Circuit): Redo previous change
810 using Minimize_Expression_With_Actions.
811 (Expand_N_If_Expression,
812 Expand_Short_Circuit_Operator): Restore old code to avoid
813 Expression_With_Actions when Minimize_Expression_With_Actions
816 2016-04-18 Vincent Celier <celier@adacore.com>
818 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
819 Stderr_File): Close local file descriptors when no longer needed.
821 2016-04-18 Ed Schonberg <schonberg@adacore.com>
823 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
824 mode check that the type of the cursor in an iteration over
825 a formal container is not volatile. The proper check on the
826 element type is done elsewhere.
828 2016-04-18 Ed Schonberg <schonberg@adacore.com>
830 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
831 a subprogram that returns a class-wide type, if the subprogram
832 is a compilation unit, because otherwise gigi will treat the
833 subprogram as external, leading to link errors.
835 2016-04-18 Arnaud Charlet <charlet@adacore.com>
837 * sem_res.adb (Resolve_Short_Circuit): Do not use
838 expression-with-actions when generating C.
840 2016-04-18 Yannick Moy <moy@adacore.com>
842 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
843 raise node in GNATprove mode.
845 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
847 * s-fileio.adb: Minor reformatting.
848 * sem_prag.adb (Analyze_Input_Item): Add local
849 variable Input_OK. Do not consider mappings of generic formal
850 parameters to actuals.
852 2016-04-18 Ed Schonberg <schonberg@adacore.com>
854 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
855 type, the cursor is declared in the scope of the parent type.
856 (Analyze_Parameter_Specification): A qualified expression with an
857 iterator type indicates an iteration over a container (explicit
860 2016-04-18 Arnaud Charlet <charlet@adacore.com>
862 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
863 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
864 * debug.adb: Reserve -gnatd.4 to force generation of C files.
866 2016-04-18 Yannick Moy <moy@adacore.com>
868 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
869 division by zero, instead possibly issue a warning.
870 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
871 static division by zero, instead add check flag on original
873 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
874 Only issue error when both SPARK_Mode is On and Warn is False.
876 2016-04-18 Yannick Moy <moy@adacore.com>
878 * checks.adb (Apply_Scalar_Range_Check): Force
879 warning instead of error when SPARK_Mode is On, on index out of
880 bounds, and set check flag for GNATprove.
882 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
884 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
885 Update the comment on usage. Reimplemented.
886 (Check_Input_States.Check_Constituent_Usage): Update the comment
887 on usage. A Proof_In constituent can now refine an Input state
888 as long as there is at least one Input constituent present.
890 2016-04-18 Ed Schonberg <schonberg@adacore.com>
892 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
893 body id as the sloc of the entity in the generated subprogram
894 declaration, to avoid spurious conformance errors when style
897 2016-04-18 Ed Schonberg <schonberg@adacore.com>
899 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
900 Refine check on illegal calls to entities within a task body,
901 when the entity is declared in an object of the same type. In
902 a generic context there might be no explicit dereference but if
903 the prefix includes an access type the construct is legal.
905 2016-04-18 Arnaud Charlet <charlet@adacore.com>
907 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
910 2016-04-18 Bob Duff <duff@adacore.com>
912 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
913 if the pragma came from an aspect specification.
915 2016-04-18 Gary Dismukes <dismukes@adacore.com>
917 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
919 2016-04-18 Ed Schonberg <schonberg@adacore.com>
921 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
922 superfluous conformance check on an inlined body with a previous
923 spec, use the fact that the generated declaration does not come
924 from source. We must treat the entity as coming from source to
925 enable some back-end inlining when pragma appears after the body.
927 2016-04-18 Gary Dismukes <dismukes@adacore.com>
929 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
930 exp_intr.adb: Minor reformatting and typo corrections.
932 2016-04-18 Ed Schonberg <schonberg@adacore.com>
934 * sem_ch6.adb: Code cleanup.
936 2016-04-18 Thomas Quinot <quinot@adacore.com>
938 * sem_ch13.adb: Minor reformatting and error message tweaking
939 (remove extraneous spaces).
941 2016-04-18 Johannes Kanig <kanig@adacore.com>
943 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
945 2016-04-18 Bob Duff <duff@adacore.com>
947 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
948 exists, and it's a fifo, we use "w" as the open string instead of
949 "r+". This is necessary to make a write to the fifo block until
952 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
954 * sem_attr.adb (Denote_Same_Function): Account
955 for a special case where a primitive of a tagged type inherits
956 a class-wide postcondition from a parent type.
958 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
960 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
961 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
962 of reserved words is OK.
963 (Scan_Pragma_Argument_Association):
964 Add new formal Reserved_Words_OK and update the comment on
965 usage. Code cleanup. Parse an expression or a reserved word in
966 identifier form for pragmas Restriction_Warnings and Restrictions
968 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
969 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
970 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
972 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
973 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
974 Update the parameter profile.
975 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
977 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
978 the comment on usage.
979 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
980 * sem_attr.adb (Analyze_Attribute): Check restriction
982 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
983 restriction No_Use_Of_Attribute before any rewritings have
985 * sem_prag.adb (Analyze_Pragma): Check restriction
986 No_Use_Of_Pragma before any rewritings have taken place.
988 2016-04-18 Bob Duff <duff@adacore.com>
990 * sem_ch6.adb (Is_Inline_Pragma): The pragma
991 argument can be a selected component, which has no Chars field,
992 so we need to deal with that case (use the Selector_Name).
993 (Check_Inline_Pragma): We need to test Is_List_Member before
994 calling In_Same_List, because in case of a library unit, they're
995 not in lists, so In_Same_List fails an assertion.
997 2016-04-18 Bob Duff <duff@adacore.com>
999 * namet.ads, namet.adb: Add an Append that appends a
1000 Bounded_String onto a Bounded_String. Probably a little more
1001 efficient than "Append(X, +Y);". Also minor cleanup.
1002 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
1003 Append_Unqualified_Decoded): Make sure these work with non-empty
1005 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
1006 parameter, defaulting to Global_Name_Buffer.
1007 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
1008 Bounded_String parameter, no default.
1009 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
1010 Bounded_String instead of Global_Name_Buffer.
1011 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
1012 to Append_Entity_Name, and pass a Bounded_String parameter,
1013 instead of using globals.
1014 (Add_Source_Info): Pass a Bounded_String parameter, instead of
1016 (Expand_Source_Info): Use local instead of globals.
1017 * stringt.ads, stringt.adb (Append): Add an Append procedure
1018 for appending a String_Id onto a Bounded_String.
1019 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
1021 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
1022 Adjust_Name_Case parameter.
1023 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
1024 Set_Casing; that's the default.
1025 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
1026 protected subprograms are entry calls; otherwise it is not possible to
1027 distinguish them from regular subprogram calls.
1029 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1031 * sem_ch13.adb (Has_Good_Profile): Improvement
1032 of error message. Now indicates subtype_mark of formal parameter
1033 rather than the formal's name, plus minor rewording.
1035 2016-04-18 Pascal Obry <obry@adacore.com>
1037 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
1039 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1041 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
1043 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1045 * par-ch4.adb, sem_prag.adb: Minor reformatting.
1047 2016-04-18 Bob Duff <duff@adacore.com>
1049 * sinput.ads, sinput.adb (Build_Location_String): Take a
1050 parameter instead of using a global variable. The function
1051 version no longer destroys the Name_Buffer.
1052 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
1053 parameter, which defaults to the Global_Name_Buffer, so some
1054 calls can avoid the global.
1055 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
1056 to avoid using globals. All but one call to Build_Location_String
1057 avoids the global. Only one call to String_From_Name_Buffer
1060 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1062 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
1064 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1066 * sem_eval.adb (Choice_Matches): Check the expression
1067 against the predicate values when the choice denotes a
1068 subtype with a static predicate.
1069 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
1070 tests for predicates.
1071 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
1072 is not static. (Is_Static_Subtype): A subtype with a dynamic
1073 predicate is not static.
1074 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
1075 (Is_Static_Subtype): Update the comment on usage.
1077 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1079 * sem_prag.adb (Analyze_Input_Item): Allow
1080 generic formals to appear as initialization items.
1082 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1084 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
1085 Has_Good_Profile): Additional error message to indicate that
1086 the second parameter of the subprogram must be a first subtype.
1088 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1090 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
1091 Use the pragma lookahead that determines whether a subprogram
1092 is to be inlined, when some level of backend optimization is
1094 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
1095 code used to create an instance body when needed for inlining.
1096 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
1097 call appears within an instantiation that is not a compilation
1098 unit, add a pending instantiation for the enclosing instance,
1099 so the backend can inline in turn the calls contained in the
1102 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1104 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
1105 that relates operations of the parent type to the operations of
1106 the derived type has three distinct sources:
1107 a) explicit operations of the derived type carry an
1108 Overridden_Operation that designates the operation in the
1110 b) Implicit operations that are inherited by the derived type
1111 carry an alias that may be an explicit subprogram (in which case
1112 it may have an Overridden_ Operation indicator) or may also be
1113 inherited and carry its own alias.
1114 c) If the parent type is an interface, the operation of the
1115 derived type does not override, but the interface operation
1116 indicates the operation that implements it.
1117 * sem_prag.adb: Minor reformatting.
1118 * sem_prag.adb (Check_External_Property): Update
1119 the comment on usage. Reimplement.
1121 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1123 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
1124 profiles such as ZFP, ceiling priority is not available.
1126 2016-04-18 Bob Duff <duff@adacore.com>
1128 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
1130 2016-04-18 Bob Duff <duff@adacore.com>
1132 * sem_elab.adb (Output_Calls): Use
1133 Get_Name_String, to clearly indicate that the global Name_Buffer
1134 is being used. The previous code used Is_Internal_Name, which
1135 returns a Boolean, but also has a side effect of setting the
1136 Name_Buffer. Then it called the other Is_Internal_Name, which uses
1137 the Name_Buffer for its input. And then it called Error_Msg_N,
1138 again using the Name_Buffer. We haven't eliminated the global
1139 usage here, but we've made it a bit clearer.
1140 This also allows us to have a side-effect-free version of
1142 * namet.ads, namet.adb: Provide a type Bounded_String, along with
1143 routines that can be used without using global variables. Provide
1144 Global_Name_Buffer so existing code can continue to use the
1145 global. Mark the routines that use globals as obsolete. New code
1146 shouldn't call the obsolete ones, and we should clean up existing
1147 code from time to time.
1148 Name_Find_Str is renamed as Name_Find.
1149 * namet.h: Changed as necessary to interface to the new version
1151 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
1154 2016-04-18 Yannick Moy <moy@adacore.com>
1156 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
1157 outside of GNATprove, hence it should not be removed.
1159 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1161 * sem_prag.adb (Analyze_Refinement_Clause):
1162 The refinement of an external abstract state can now mention
1163 non-external constituents.
1164 (Check_External_Property): Update all SPARK RM references.
1166 2016-04-18 Bob Duff <duff@adacore.com>
1168 * exp_intr.adb: Remove some duplicated code.
1170 2016-04-18 Yannick Moy <moy@adacore.com>
1172 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
1173 package spec and body out of SPARK.
1175 2016-04-18 Johannes Kanig <kanig@adacore.com>
1177 * spark_xrefs.ads: Minor comment update.
1179 2016-04-18 Johannes Kanig <kanig@adacore.com>
1181 * gnat1drv.adb (Gnat1drv): Force loading of System
1184 2016-04-18 Bob Duff <duff@adacore.com>
1186 * a-cuprqu.adb: Correction to previous change. If a new node
1187 is inserted at the front of the queue (because it is higher
1188 priority than the previous front node), we need to update
1189 Header.Next_Unequal -- not just in the case where the queue was
1192 2016-04-18 Bob Duff <duff@adacore.com>
1194 * a-cuprqu.ads: Change the representation of List_Type from a
1195 singly-linked list to a doubly-linked list. In addition, add a
1196 pointer Next_Unequal, which points past a possibly-long chain
1197 of equal-priority items. This increases efficiency, especially
1198 in the case of many equal-priority items.
1199 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
1200 advantage of new data structure.
1201 (Finalize): Rewrite in terms of Dequeue, for simplicity.
1203 2016-04-18 Yannick Moy <moy@adacore.com>
1205 * contracts.adb (Analyze_Object_Contract,
1206 Analyze_Protected_Contract): Remove tests performed in GNATprove.
1207 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
1208 Remove query for tests performed in GNATprove.
1210 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1212 * sem_aggr.adb (Resolve_Record_Aggregate): If
1213 Warn_On_Redundant_Constructs is enabled, report a redundant box
1214 association that does not cover any components, as it done for
1215 redundant others associations in case statements.
1217 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1219 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
1220 Analyze the generated Check pragma for an inherited condition so
1221 that it does not freeze the dispatching type of the primitive
1222 operation, because it is pre-analyzed at the point of the
1223 subprogram declaration (and not in the subprogram body, as is
1224 done during regular expansion).
1226 2016-04-18 Vincent Celier <celier@adacore.com>
1228 * ali.ads: Increase the range of all _Id types to 100 millions.
1230 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1232 * sem_warn.adb (Check_References): Change warning to suggest
1233 using pragma Export rather than saying "volatile has no effect".
1235 2016-04-18 Bob Duff <duff@adacore.com>
1237 * g-souinf.ads (Compilation_ISO_Date): New function to return
1238 the current date in ISO form.
1239 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
1240 a call to Compilation_ISO_Date into a string literal containing
1241 the current date in ISO form.
1242 * exp_intr.ads (Add_Source_Info): Improve documentation.
1243 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
1244 Compilation_ISO_Date.
1245 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
1247 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1249 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
1250 to subtypes that are not first subtypes.
1252 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1254 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
1256 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
1257 generated pragmas after subprogram declaration, rather than in
1258 the corresponding subprogram body.
1259 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
1260 mode, if the operation is overridding, call
1261 Collect_Inherited_Class_Wide_Conditions to generate the
1262 corresponding pragmas immediately after the corresponding
1263 subprogram declaration.
1265 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1267 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
1268 type to natural numbers.
1269 (Stype): document code characters for concurrent entities.
1271 2016-04-18 Olivier Hainque <hainque@adacore.com>
1273 * targparm.ads: Update the Frontend_Exceptions default internal
1275 (Frontend_Exceptions_On_Target): Change default value to True.
1277 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1279 * sem_ch4.adb (Analyze_Selected_Component): Refine error
1280 detection when a selected component in the body of a synchronized
1281 type is a reference to an object of the same type declared
1282 elsewhere. The construct is legal if the prefix of the selected
1283 component includes an explicit dereference at any point.
1285 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1287 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
1288 internally generated expressions when trying to determine whether
1289 a formal parameter of a tagged type subject to Extensions_Visible
1290 False is used to initialize an object.
1291 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
1292 internally generated expressions when trying to determine whether
1293 a formal parameter of a tagged type subject to Extensions_Visible
1294 False is used in a type conversion.
1296 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1298 * sem_res.adb (Is_Protected_Operation_Call):
1299 Add guards to account for a non-decorated selected component.
1301 2016-04-18 Yannick Moy <moy@adacore.com>
1303 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
1304 implementation of Body_Has_SPARK_Mode_On.
1305 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
1306 New function replacing previous Get_SPARK_Mode_From_Pragma, that
1307 deals also with aspects.
1308 (Get_SPARK_Mode_Type): Make function internal again.
1309 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
1310 Get_SPARK_Mode_From_Annotation.
1312 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1314 * contracts.adb (Analyze_Object_Contract): Update references to
1316 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
1317 * ghost.adb Add with and use clauses for Sem_Disp.
1318 (Check_Ghost_Derivation): Removed.
1319 (Check_Ghost_Overriding):
1320 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
1321 (Check_Ghost_Primitive): New routine.
1322 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
1323 Update references to SPARK RM. (Is_OK_Pragma): Update references
1324 to SPARK RM. Predicates are now a valid context for references
1326 * ghost.ads (Check_Ghost_Derivation): Removed.
1327 (Check_Ghost_Overriding): Update the comment on usage.
1328 (Check_Ghost_Primitive): New routine.
1329 (Check_Ghost_Refinement): New routine.
1330 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
1331 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
1332 related to Ghost derivations
1333 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
1334 related to the convention-like behavior of pragma Ghost.
1335 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
1336 of a tagged type and its primitive agree.
1337 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
1338 RM. Move the verification of pragma Assertion_Policy Ghost
1339 to the proper place. Remove the now obsolete check related
1340 to Ghost derivations.
1341 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
1342 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
1344 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1346 * layout.adb: Fix more minor typos in comments.
1348 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1350 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
1352 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1354 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
1355 mode, collect inherited class-wide conditions to generate the
1356 corresponding pragmas.
1357 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
1358 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
1359 procedure for overriding subprograms, used to generate the pragmas
1360 corresponding to an inherited class- wide pre- or postcondition.
1361 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
1362 from contracts.adb (Replace_Condition_Entities): Subsidiary
1363 Build_Pragma_Check_Equivalent, to implement the proper semantics
1364 of inherited class-wide conditions, as given in AI12-0113.
1365 (Process_Class_Wide_Condition): Removed.
1366 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
1367 in contract of subprogram, to collect inherited class-wide
1369 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
1371 2016-04-18 Yannick Moy <moy@adacore.com>
1373 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
1374 * a-calend.ads (Ada.Calendar): Mark package spec as
1375 SPARK_Mode and add synchronous external abstract state Clock_Time.
1377 2016-04-18 Yannick Moy <moy@adacore.com>
1379 * sem_res.adb (Resolve_Call): Prevent inlining of
1380 calls inside expression functions. Factor previous code issuing
1381 errors to call Cannot_Inline instead, which does appropriate
1382 processing of message for GNATprove.
1384 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1386 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
1387 osint-b.adb: Cleanups.
1389 2016-04-18 Yannick Moy <moy@adacore.com>
1391 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
1392 body to inline in GNATprove mode when SPARK_Mode On applies to
1394 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
1397 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1399 * layout.adb: Fix minor typo in comment.
1400 * inline.adb: Fix minor pasto.
1401 * sem_ch12.ads: Fix minor typos in comments.
1403 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1405 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
1406 handle some complex cases of tag indeterminate calls that are
1407 actuals in other dispatching calls that are themselves tag
1409 (Check_Dispatching_Context): Add parameter to support recursive
1410 check for an enclosing construct that may provide a tag for a
1411 tag-indeterminate call.
1413 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1415 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
1416 Add global variables Task_Input_Seen and Task_Output_Seen.
1417 (Analyze_Global_Item): Detect an illegal use of the current
1418 instance of a single protected/task type in a global annotation.
1419 (Analyze_Input_Output): Inputs and output related to the current
1420 instance of a task unit are now tracked.
1421 (Check_Usage): Require
1422 the presence of the current instance of a task unit only when
1423 one input/output is available. (Current_Task_Instance_Seen):
1425 (Is_CCT_Instance): New parameter profile. Update
1426 the comment on usage. The routine now properly recognizes several
1427 cases related to single protected/task types.
1429 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1431 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
1432 to create a brand new freeze node. This handles a case where an
1433 ignored Ghost context is freezing something which is not ignored
1434 Ghost and whose freeze node should not be removed from the tree.
1435 (New_Freeze_Node): New routine.
1437 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
1439 * sigtramp.h (__gnat_set_is_vxsim) New function to
1440 tell sigtramp-vxworks to handle vxsim signal contexts. *
1441 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
1442 differences in the sigcontext structure between the expected
1443 regular x86 or x86_64 ones and the ones received in case of
1444 exexution on the vxworks simulator.
1445 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
1446 this information to sigtramp-vxworks.c. Remove the old mechanism for
1448 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
1450 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1452 * exp_ch3.adb (Inline_Init_Proc): New function returning
1453 whether the initialization procedure of a type should be
1454 inlined. Return again True for controlled type themselves.
1455 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
1456 (Build_Record_Init_Proc): Likewise.
1458 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1460 * gnatvsn.ads (Library_Version): Bump to 7.
1462 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1464 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
1465 on the entity of a subprogram declaration that is completed by
1466 an expression function.
1468 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1470 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
1471 declaration can appear in an aspect specification for a dynamic
1472 predicate, and a pragma for aspect Predicate_Failure.
1473 * exp_util.adb (Replace_Subtype_References): Replace current
1474 occurrences of the subtype to which a dynamic predicate applies,
1475 byt the expression that triggers a predicate check. Needed to
1476 implement new aspect Predicate_Failure.
1478 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1480 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
1481 * Makefile.rtl: update accordingly.
1483 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1485 * sem_type.adb (Disambiguate): Call Covers only when necessary
1486 for standard operators.
1488 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1490 * atree.ads (Num_Extension_Nodes): Add couple of figures
1492 * atree.adb: Add GNAT.Heap_Sort_G dependency.
1493 (Print_Statistics): New exported procedure to print statistics.
1495 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1497 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
1498 as to be inlined if the type needs finalization.
1500 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
1502 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
1503 alignment for x86_64.
1504 * init.c: Better fix for guard page reset on x86_64-vx7.
1505 Do not try to retrieve the page that actually raised
1506 the signal as the probing mechanism used on x86_64 do not allow
1507 such retrieval. We thus just test if the guard page is active,
1508 and re-activate it if not.
1510 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1512 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
1515 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
1517 * affinity.c: Use the proper type for task id.
1518 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
1520 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1522 * sem_prag.adb (Process_Convention): Relax rule on exporting
1523 Intrinsic types if Relaxed_RM_Semantics is True.
1525 2016-04-18 Vincent Celier <celier@adacore.com>
1527 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
1528 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
1529 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
1530 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
1531 exp_ch3.ads, exp_unst.adb: Change "descendent" to
1532 "descendant" in comments, error messages and identifiers.
1533 * gcc-interface/decl.c: Ditto.
1535 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1537 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
1538 New_S only once at the beginning of the function.
1540 2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
1542 * gcc-interface/decl.c (components_to_record): Restrict the previous
1543 change to fields with variable size.
1545 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
1547 * gcc-interface/decl.c (components_to_record): Add special case for
1548 single field with representation clause at offset 0.
1550 2016-03-16 Svante Signell <svante.signell@gmail.com>
1552 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
1553 * s-osinte-gnu.ads: New file.
1555 2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
1557 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
1558 (Stack_Check_Limits): Set to False.
1559 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
1560 (Stack_Check_Limits): Set to False.
1561 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
1562 (Stack_Check_Limits): Set to False.
1563 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
1564 (Stack_Check_Limits): Set to False.
1565 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
1566 (Stack_Check_Limits): Set to False.
1568 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
1570 * gcc-interface/trans.c (statement_node_p): New predicate.
1571 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
1572 not return dummy results for expressions attached to packed array
1573 implementation types.
1575 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
1577 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
1578 the expression of a renaming manually in case #3.
1580 2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
1582 * system-linux-s390.ads: Enable Stack_Check_Probes.
1583 * system-linux-s390.ads: Likewise.
1585 2016-02-29 Martin Liska <mliska@suse.cz>
1587 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
1588 Replace ENABLE_CHECKING macro with flag_checking.
1590 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1592 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
1593 handling of unconstrained array types as designated types into common
1594 processing. Also handle array types as incomplete designated types.
1596 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1598 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
1599 ASIS mode, fully lay out the minimal record type.
1601 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1603 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
1604 (build_return_expr): Likewise.
1605 (Call_to_gnu): If this is a function call and there is no target,
1606 create a temporary for the return value for all aggregate types,
1607 but never create it for a return statement. Push a binding level
1608 around the call in more cases. Remove obsolete code.
1610 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1612 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
1613 * gcc-interface/gigi.h (gigi): Remove useless attribute.
1614 (gnat_gimplify_expr): Likewise.
1615 (gnat_to_gnu_external): Declare.
1616 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
1617 code dealing with the expression of external constants into...
1618 Invoke gnat_to_gnu_external instead.
1619 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
1620 when not for a definition. Deal with COMPOUND_EXPR and variables with
1621 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
1622 'reference to a function call in a renaming. Remove obsolete test and
1623 adjust associated comment.
1624 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
1625 temporaries created to hold the return value, if any.
1626 (gnat_to_gnu_external): ...this. New function.
1627 * gcc-interface/utils.c (create_var_decl): Detect a constant created
1628 to hold 'reference to function call.
1629 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
1630 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
1632 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
1634 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
1635 the prefix denotes an entity which Has_Atomic_Components.
1636 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
1637 denotes an entity which Has_Atomic_Components.
1639 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
1641 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
1642 for fat pointer or scalar types.
1644 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
1646 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
1647 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
1648 Call maybe_character_value on the array bounds. Get to the base type
1649 of the index type and call maybe_debug_type on it.
1650 * gcc-interface/utils.c (finish_character_type): Add special treatment
1653 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
1655 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
1656 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
1658 2016-02-12 Jakub Jelinek <jakub@redhat.com>
1660 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
1661 neighbour -> neighbor.
1662 * prep.adb: Likewise.
1663 * prj.ads: Likewise.
1664 * prepcomp.adb: Likewise.
1665 * g-socket.ads: Likewise.
1666 * s-imgrea.adb: Likewise.
1667 * a-calend.adb: Likewise.
1668 * exp_disp.adb: Likewise.
1669 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
1670 * g-socket.adb: Likewise.
1671 * sem_ch12.adb: Likewise.
1672 * terminals.c: Likewise.
1674 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
1676 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
1677 build_common_tree_nodes.
1679 2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
1681 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
1682 DECL_IGNORED_P last.
1684 2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
1686 * gcc-interface/gigi.h (enum attr_type): Rename into...
1687 (enum attrib_type): ...this.
1688 (struct attrib): Adjust.
1689 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
1691 2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
1693 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
1694 literal if the entity is of a character type.
1695 * gcc-interface/lang.opt (fsigned-char): New option.
1696 * gcc-interface/misc.c (gnat_handle_option): Accept it.
1697 (gnat_init): Adjust comment.
1698 * gcc-interface/gigi.h (finish_character_type): New prototype.
1699 (maybe_character_type): New inline function.
1700 (maybe_character_value): Likewise.
1701 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
1702 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
1703 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
1704 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
1705 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
1706 Copy TYPE_STRING_FLAG from type to subtype.
1707 <E_Array_Type>: Deal with character index types.
1708 <E_Array_Subtype>: Likewise.
1709 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
1710 char_type_node throughout.
1711 (build_raise_check): Likewise.
1712 (get_type_length): Deal with character types.
1713 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
1715 <Attr_Pred>: Likewise.
1716 (Loop_Statement_to_gnu): Likewise.
1717 (Raise_Error_to_gnu): Likewise.
1718 <N_Indexed_Component>: Deal with character index types. Remove
1720 <N_Slice>: Likewise.
1721 <N_Type_Conversion>: Deal with character types. Minor tweak.
1722 <N_Unchecked_Type_Conversion>: Likewise.
1724 <N_Op_Eq>: Likewise.
1725 (emit_index_check): Delete.
1726 * gcc-interface/utils.c (finish_character_type): New function.
1727 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
1728 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
1729 with char_type_node.
1730 (build_call_raise): Likewise.
1731 (build_call_raise_column): Likewise.
1732 (build_call_raise_range): Likewise.
1734 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
1736 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
1737 (build_call_raise_range): Likewise.
1738 (gnat_unsigned_type): Delete.
1739 (gnat_signed_type): Likewise.
1740 (gnat_signed_or_unsigned_type_for): New prototype.
1741 (gnat_unsigned_type_for): New inline function.
1742 (gnat_signed_type_for): Likewise.
1743 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
1744 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
1745 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
1746 and compute their base type from that.
1747 <E_Array_Subtype>: Remove duplicate declaration.
1748 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
1749 * gcc-interface/trans.c (get_type_length): Likewise.
1750 (Attribute_to_gnu): Likewise.
1751 (Loop_Statement_to_gnu): Likewise.
1752 (Call_to_gnu): Likewise.
1753 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
1754 and gnat_signed_type_for. Minor tweaks.
1755 (build_binary_op_trapv): Likewise.
1756 (emit_check): Likewise.
1757 (convert_with_check): Likewise.
1758 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
1759 functions. Minor tweaks.
1760 (Case_Statement_to_gnu): Remove dead code.
1761 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
1762 (init_code_table): Minor reordering.
1763 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
1764 (gnat_signed_type): Likewise.
1765 (gnat_signed_or_unsigned_type_for): New function.
1766 (unchecked_convert): Use directly the size in the test for precision
1767 vs size adjustments.
1768 (install_builtin_elementary_types): Call gnat_signed_type_for.
1769 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
1771 (build_goto_raise): New function taken from...
1772 (build_call_raise): ...here. Call it.
1773 (build_call_raise_column): Add KIND parameter and call it.
1774 (build_call_raise_range): Likewise.
1776 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
1778 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
1779 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
1780 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
1781 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
1782 and tweak gnat_encodings tests throughout.
1783 (initial_value_needs_conversion): Likewise.
1784 (intrin_arglists_compatible_p): Likewise.
1785 * gcc-interface/misc.c (gnat_print_type): Likewise.
1786 (gnat_get_debug_type): Likewise.
1787 (gnat_get_fixed_point_type_info): Likewise.
1788 (gnat_get_array_descr_info): Likewise.
1789 (get_array_bit_stride): Likewise.
1790 (gnat_get_type_bias): Fix formatting.
1791 (enumerate_modes): Likewise.
1792 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
1793 (add_decl_expr): Simplify NULL_TREE test.
1794 (end_stmt_group): Likewise.
1795 (build_binary_op_trapv): Fix formatting.
1796 (get_exception_label): Use switch statement.
1797 (init_code_table): Move around.
1798 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
1799 (gnat_poplevel): Likewise.
1800 (gnat_set_type_context): Likewise.
1801 (defer_or_set_type_context): Fix formatting.
1802 (gnat_pushdecl): Simplify NULL_TREE test.
1803 (maybe_pad_type): Likewise.
1804 (add_parallel_type): Likewise.
1805 (create_range_type): Likewise.
1806 (process_deferred_decl_context): Likewise.
1807 (convert): Likewise.
1808 (def_builtin_1): Likewise.
1809 * gcc-interface/utils2.c (find_common_type): Likewise.
1810 (build_binary_op): Likewise.
1811 (gnat_rewrite_reference): Likewise.
1812 (get_inner_constant_reference): Likewise.
1814 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
1817 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
1818 the parent function instead of the current function in order to issue
1819 the warning or the error. Add guard for ignored functions.
1821 2016-01-17 Jakub Jelinek <jakub@redhat.com>
1823 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
1825 2016-01-15 Jakub Jelinek <jakub@redhat.com>
1827 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
1828 of char * for path_val to avoid warnings.
1830 2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
1832 * gcc-interface/utils.c: Bump copyright year.
1833 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
1834 the current lexical scope.
1836 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1838 * gnat_ugn.texi: Bump @copying's copyright year.
1839 * gnat_rm.texi: Likewise.
1841 2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
1843 * gnatvsn.ads: Bump copyright year.
1846 Copyright (C) 2016 Free Software Foundation, Inc.
1848 Copying and distribution of this file, with or without modification,
1849 are permitted in any medium without royalty provided the copyright
1850 notice and this notice are preserved.