1 2016-06-22 Arnaud Charlet <charlet@adacore.com>
3 * sem_prag.adb: Revert unwanted change in previous commit,
6 2016-06-22 Ed Schonberg <schonberg@adacore.com>
8 * sem_prag.ads (Build_Classwide_Expression): new procedure to
9 build the expression for an inherited classwide condition, and
10 to validate such expressions when they apply to an inherited
11 operation that is not overridden.
12 * sem_prag.adb (Primitives_Mapping): new data structure to
13 handle the mapping between operations of a root type and the
14 corresponding overriding operations of a type extension. Used
15 to construct the expression for an inherited classwide condition.
16 (Update_Primitives_Mapping): add to Primitives_Mapping the links
17 between primitive operations of a root type and those of a given
19 (Build_Pragma_Check_Equivalent): use Primitives_Mapping.
20 * sem_ch6.adb (New_Overloaded_Entity): Remove call to
21 Collect_Iherited_Class_Wide_Conditions in GNATprove_Mode. This
22 needs to be done at freeze point of the type.
23 * freeze.adb (Check_Inherited_Conditions): new procedure to
24 verify the legality of inherited classwide conditions. In normal
25 compilation mode the procedure determines whether an inherited
26 operation needs a wrapper to handle an inherited condition that
27 differs from the condition of the root type. In SPARK mode
28 the routine invokes Collect_Inherited_Class_Wide_Conditions to
29 produce the SPARK version of these inherited conditions.
30 (Freeze_Record_Type): For a type extension, call
31 Check_Inherited_Conditions.
33 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
35 * sem_ch3.adb, sem_type.adb, sem.adb, freeze.adb, sem_util.adb,
36 s-htable.adb, exp_ch11.adb, s-secsta.adb, restrict.adb, exp_disp.adb,
37 sem_ch8.adb, s-tpobop.adb, exp_aggr.ads, sem_ch13.adb: Minor
40 2016-06-22 Yannick Moy <moy@adacore.com>
42 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Inverse order of
43 treatments so that files without compilation unit are simply skipped
44 before more elaborate treatments.
46 2016-06-22 Bob Duff <duff@adacore.com>
48 * s-memory.ads: Minor typo fixes in comments.
49 * s-memory.adb: Code cleanup.
51 2016-05-22 Olivier Hainque <hainque@adacore.com>
53 * vxworks-crtbe-link.spec: Removed, no longer used.
55 2016-06-22 Justin Squirek <squirek@adacore.com>
57 * sem_ch8.adb (Push_Scope): Add a check for when the
58 scope table is empty to assign the global variable
59 Configuration_Component_Alignment.
60 * sem.adb (Do_Analyze): Add Configuration_Component_Alignment
61 to be assigned when the environment is cleaned instead of the
63 * sem.ads Add a global variable Configuration_Component_Alignment
64 to store the value given by pragma Component_Alignment in the
65 context of a configuration file.
66 * sem_prag.adb (Analyze_Pragma): Correct the case for
67 Component_Alignment so that the pragma is verified and add
68 comments to explain how it is applied to the scope stack.
70 2016-06-22 Justin Squirek <squirek@adacore.com>
72 * sprint.adb (Sprint_Node_Actual): Add check in
73 the case of an N_Object_Declaration when evaluating an expression
74 to properly ignore errors.
76 2016-06-22 Bob Duff <duff@adacore.com>
78 * g-comlin.ads (Parameter_Type): Change subtype of Last to
80 * g-comlin.adb (Set_Parameter): Change subtype of Last to
82 (Getopt): Check for Arg = "", and Switches /= "".
83 (Internal_Initialize_Option_Scan): Check for Argument (Parser,
86 2016-06-22 Gary Dismukes <dismukes@adacore.com>
88 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
90 2016-06-22 Ed Schonberg <schonberg@adacore.com>
92 * einfo.ads, einfo.adb (Is_Actual_Subtype): New flag, defined
93 on subtypes that are created within subprogram bodies to handle
94 unconstrained composite formals.
95 * checks.adb (Apply_Predicate_Check): Do not generate a check on
96 an object whose type is an actual subtype.
97 * sem_ch6.adb (Set_Actual_Subtypes): Do not generate an
98 actual subtype for a formal whose base type is private.
99 Set Is_Actual_Subtype on corresponding entity after analyzing
102 2016-06-22 Justin Squirek <squirek@adacore.com>
104 * sem_prag.adb (Check_Expr_Is_OK_Static_Expression): Fix ordering
105 of if-block and add in a condition to test for errors during
107 * sem_res.adb (Resolution_Failed): Add comment to explain why
108 the type of a node which failed to resolve is set to the desired
109 type instead of Any_Type.
110 * sem_ch8.adb (Analyze_Object_Renaming): Add a check for Any_Type
111 to prevent crashes on Is_Access_Constant.
113 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
115 * lib-xref-spark_specific.adb, checks.adb, sem_ch13.adb: Minor
117 * exp_ch7.adb: Minor typo fix.
118 * lib.ads (Get_Top_Level_Code_Unit): Add comment.
120 2016-06-22 Bob Duff <duff@adacore.com>
122 * s-tassta.adb (Task_Wrapper): Fix handling of Fall_Back_Handler
123 wrt independent tasks.
125 2016-06-22 Ed Schonberg <schonberg@adacore.com>
127 * sem_dim.adb (Analyze_Dimension): Propagate dimension for
128 explicit_dereference nodes when they do not come from source,
129 to handle correctly dimensional analysis on iterators over
130 containers whose elements have declared dimensions.
132 2016-06-22 Arnaud Charlet <charlet@adacore.com>
134 * spark_xrefs.ads (Scope_Num): type refined to positive integers.
135 * lib-xref-spark_specific.adb (Detect_And_Add_SPARK_Scope):
136 moved into scope of Collect_SPARK_Xrefs.
137 (Add_SPARK_Scope): moved into scope of Collect_SPARK_Xrefs;
138 now uses Dspec and Scope_Id from Collect_SPARK_Xrefs.
139 (Collect_SPARK_Xrefs): refactored to avoid retraversing the list
141 (Traverse_Compilation_Unit): refactored as a generic procedure.
142 * types.ads (Unit_Number_Type): range refined.
144 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
146 * lib-xref-spark_specific.adb, a-cuprqu.ads, sem_ch6.adb: Minor
149 2016-06-22 Eric Botcazou <ebotcazou@adacore.com>
151 * sem_util.ads (Address_Value): Declare new function.
152 * sem_util.adb (Address_Value): New function extracted
153 unmodified from Apply_Address_Clause_Check, which returns the
154 underlying value of the expression of an address clause.
155 * checks.adb (Compile_Time_Bad_Alignment): Delete.
156 (Apply_Address_Clause_Check): Call Address_Value on
157 the expression. Do not issue the main warning here and
158 issue the secondary warning only when the value of the
159 expression is not known at compile time.
160 * sem_ch13.adb (Address_Clause_Check_Record): Add A component and
161 adjust the description.
162 (Analyze_Attribute_Definition_Clause): In the case
163 of an address, move up the code creating an entry in the table of
164 address clauses. Also create an entry for an absolute address.
165 (Validate_Address_Clauses): Issue the warning for absolute
166 addresses here too. Tweak condition associated with overlays
169 2016-06-22 Ed Schonberg <schonberg@adacore.com>
171 * sem_ch13.adb (Is_Predicate_Static): An inherited predicate
172 can be static only if it applies to a scalar type.
174 2016-06-22 Ed Schonberg <schonberg@adacore.com>
176 * exp_util.adb (Adjust_Result_Type): Convert operand to base
177 type to prevent spurious constraint checks on subtypes of Boolean.
179 2016-06-22 Bob Duff <duff@adacore.com>
181 * debug.adb: Document debug switch -gnatd.o.
182 * sem_elab.adb (Check_Internal_Call): Debug switch -gnatd.o
183 now causes a more conservative treatment of indirect calls,
184 treating P'Access as a call to P in more cases. We Can't make
185 this the default, because it breaks common idioms, for example
187 * sem_util.adb: Add an Assert.
189 2016-06-22 Bob Duff <duff@adacore.com>
191 * a-cuprqu.ads, a-cuprqu.adb: Completely rewrite this package. Use
192 red-black trees, which gives O(lg N) worst-case performance on
193 Enqueue and Dequeue. The previous version had O(N) Enqueue in
196 2016-06-22 Arnaud Charlet <charlet@adacore.com>
198 * sem_warn.adb: minor style fix in comment.
199 * spark_xrefs.ads (Scope_Num): type refined to positive integers.
200 * lib-xref-spark_specific.adb (Detect_And_Add_SPARK_Scope):
201 moved into scope of Collect_SPARK_Xrefs.
202 (Add_SPARK_Scope): moved into scope of Collect_SPARK_Xrefs;
203 now uses Dspec and Scope_Id from Collect_SPARK_Xrefs.
204 (Collect_SPARK_Xrefs): refactored to avoid retraversing the list
206 * sem_ch3.adb (Build_Discriminal): Set Parent of the discriminal.
208 2016-06-22 Arnaud Charlet <charlet@adacore.com>
210 * lib-xref-spark_specific.adb (Generate_Dereference): Assignment to not
211 commented local variables replaced with direct uses of their values.
213 2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
215 * exp_ch7.adb (Add_Invariant): Replace the
216 current type instance with the _object parameter even in ASIS mode.
217 (Build_Invariant_Procedure_Body): Do not insert the
218 invariant procedure body into the tree for ASIS and GNATprove.
219 (Build_Invariant_Procedure_Declaration): Do not insert the
220 invariant procedure declaration into the tree for ASIS and
222 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Update comment.
224 2016-06-22 Ed Schonberg <schonberg@adacore.com>
226 * sem_ch6.adb (Set_Actual_Subtypes): If the type of the actual
227 has predicates, the actual subtype must be frozen properly
228 because of the generated tests that may follow. The predicate
229 may be specified by an explicit aspect, or may be inherited in
232 2016-06-22 Ed Schonberg <schonberg@adacore.com>
234 * exp_ch4.adb (In_Range_Chec)): New predicate, subsidiary of
235 Expand_N_In: within an expanded range check that might raise
236 Constraint_Error do not generate a predicate check as well. It
237 is redundant because the context will add an explicit predicate
238 check, and it will raise the wrong exception if it fails.
239 * lib-xref-spark_specific.adb (Add_SPARK_File): Remove useless checks
240 since dependency units always have an associated compilation unit.
242 2016-06-22 Arnaud Charlet <charlet@adacore.com>
244 * lib.ads: Code cleanup.
245 * inline.adb: Type refinement for a counter variable.
246 * lib-xref-spark_specific.adb (Add_SPARK_File): removal of no-op code.
249 2016-06-21 Eric Botcazou <ebotcazou@adacore.com>
251 * gcc-interface/decl.c (set_nonaliased_component_on_array_type): New
253 (set_reverse_storage_order_on_array_type): Likewise.
254 (gnat_to_gnu_entity) <E_Array_Type>: Call them to set the flags.
255 <E_Array_Subtype>: Likewise.
256 <E_String_Literal_Subtype>: Likewise.
257 (substitute_in_type) <ARRAY_TYPE>: Likewise.
258 * gcc-interface/utils.c (gnat_pushdecl): Always create a variant for
259 the DECL_ORIGINAL_TYPE of a type.
261 2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
263 * make.adb, gnatbind.adb, g-socket.adb, sem_ch13.adb: Minor
265 * lib.ads, sem_util.adb: Minor typo in comment.
267 2016-06-20 Yannick Moy <moy@adacore.com>
269 * sem_prag.adb, sem_prag.ads (Build_Pragma_Check_Equivalent):
270 Add parameter Keep_Pragma_Id to optionally keep
271 the identifier of the pragma instead of converting
272 to pragma Check. Also set type of new function call
273 appropriately. (Collect_Inherited_Class_Wide_Conditions):
274 Call Build_Pragma_Check_Equivalent with the new parameter
275 Keep_Pragma_Id set to True to keep the identifier of the copied
277 * sinfo.ads: Add comment.
279 2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
281 * exp_ch7.adb (Build_Invariant_Procedure_Body):
282 Always install the scope of the invariant procedure
283 in order to produce better error messages. Do not
284 insert the body when the context is a generic unit.
285 (Build_Invariant_Procedure_Declaration): Perform minimal
286 decoration of the invariant procedure and its formal parameter
287 in case they are not analyzed. Do not insert the declaration
288 when the context is a generic unit.
290 2016-06-20 Ed Schonberg <schonberg@adacore.com>
292 * sem_ch13.adb (Visible_Component): New procedure, subsidiary
293 of Replace_Type_References_ Generic, to determine whether an
294 identifier in a predicate or invariant expression is a visible
295 component of the type to which the predicate or invariant
296 applies. Implements the visibility rule stated in RM 13.1.1
299 2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
301 * s-regpat.adb, sem_prag.adb, pprint.adb, sem_ch13.adb: Minor
304 2016-06-20 Tristan Gingold <gingold@adacore.com>
306 * make.adb (Check_Standard_Library): Consider system.ads
307 if s-stalib.adb is not available.
308 * gnatbind.adb (Add_Artificial_ALI_File): New procedure extracted from
311 2016-06-20 Thomas Quinot <quinot@adacore.com>
313 * g-socket.adb (Is_IP_Address): A string consisting in digits only is
316 2016-06-20 Arnaud Charlet <charlet@adacore.com>
318 * exp_ch7.adb (Build_Invariant_Procedure_Body):
319 decorate invariant procedure body with typical properties of
322 2016-06-20 Arnaud Charlet <charlet@adacore.com>
324 * a-exetim-darwin.adb: New file.
326 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
328 * atree.ads, atree.adb (Elist29): New routine.
329 (Set_Elist29): New routine.
330 * atree.h New definition for Elist29.
331 * einfo.adb Subprograms_For_Type is now an Elist rather than
332 a node. Has_Invariants is now a synthesized attribute
333 and does not require a flag. Has_Own_Invariants
334 is now Flag232. Has_Inherited_Invariants is
335 Flag291. Is_Partial_Invariant_Procedure is Flag292.
336 (Default_Init_Cond_Procedure): Reimplemented.
337 (Has_Inherited_Invariants): New routine.
338 (Has_Invariants): Reimplemented.
339 (Has_Own_Invariants): New routine.
340 (Invariant_Procedure): Reimplemented.
341 (Is_Partial_Invariant_Procedure): New routine.
342 (Partial_Invariant_Procedure): Reimplemented.
343 (Predicate_Function): Reimplemented.
344 (Predicate_Function_M): Reimplemented.
345 (Set_Default_Init_Cond_Procedure): Reimplemented.
346 (Set_Has_Inherited_Invariants): New routine.
347 (Set_Has_Invariants): Removed.
348 (Set_Has_Own_Invariants): New routine.
349 (Set_Invariant_Procedure): Reimplemented.
350 (Set_Is_Partial_Invariant_Procedure): New routine.
351 (Set_Partial_Invariant_Procedure): Reimplemented.
352 (Set_Predicate_Function): Reimplemented.
353 (Set_Predicate_Function_M): Reimplemented.
354 (Set_Subprograms_For_Type): Reimplemented.
355 (Subprograms_For_Type): Reimplemented.
356 (Write_Entity_Flags): Output Flag232 and Flag291.
357 * einfo.ads Add new attributes Has_Inherited_Invariants
358 Has_Own_Invariants Is_Partial_Invariant_Procedure
359 Partial_Invariant_Procedure Change the documentation
360 of attributes Has_Inheritable_Invariants Has_Invariants
361 Invariant_Procedure Is_Invariant_Procedure Subprograms_For_Type
362 (Has_Inherited_Invariants): New routine along with pragma Inline.
363 (Has_Own_Invariants): New routine along with pragma Inline.
364 (Is_Partial_Invariant_Procedure): New routine along with pragma Inline.
365 (Partial_Invariant_Procedure): New routine.
366 (Set_Has_Inherited_Invariants): New routine along with pragma Inline.
367 (Set_Has_Invariants): Removed along with pragma Inline.
368 (Set_Has_Own_Invariants): New routine along with pragma Inline.
369 (Set_Is_Partial_Invariant_Procedure): New routine
370 along with pragma Inline.
371 (Set_Partial_Invariant_Procedure): New routine.
372 (Set_Subprograms_For_Type): Update the signature.
373 (Subprograms_For_Type): Update the signature.
374 * exp_ch3.adb Remove with and use clauses for Sem_Ch13.
375 (Build_Array_Invariant_Proc): Removed.
376 (Build_Record_Invariant_Proc): Removed.
377 (Freeze_Type): Build the body of the invariant procedure.
378 (Insert_Component_Invariant_Checks): Removed.
379 * exp_ch7.adb Add with and use clauses for Sem_Ch6, Sem_Ch13,
381 (Build_Invariant_Procedure_Body): New routine.
382 (Build_Invariant_Procedure_Declaration): New routine.
383 * exp_ch7.ads (Build_Invariant_Procedure_Body): New routine.
384 (Build_Invariant_Procedure_Declaration): New routine.
385 * exp_ch9.adb (Build_Corresponding_Record): Do not propagate
386 attributes related to invariants to the corresponding record
387 when building the corresponding record. This is done by
388 Build_Invariant_Procedure_Declaration.
389 * exp_util.adb (Make_Invariant_Call): Reimplemented.
390 * freeze.adb (Freeze_Array_Type): An array type requires an
391 invariant procedure when its component type has invariants.
392 (Freeze_Record_Type): A record type requires an invariant
393 procedure when at least one of its components has an invariant.
394 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Inherit
395 invariant-related attributes.
396 (Analyze_Subtype_Declaration):
397 Inherit invariant-related attributes.
398 (Build_Derived_Record_Type): Inherit invariant-related attributes.
399 (Check_Duplicate_Aspects): Reimplemented.
400 (Get_Partial_View_Aspect): New routine.
401 (Process_Full_View): Inherit invariant-related attributes. Reimplement
402 the check on hidden inheritance of class-wide invariants.
403 (Remove_Default_Init_Cond_Procedure): Reimplemented.
404 * sem_ch6.adb (Analyze_Subprogram_Specification): Do not modify
405 the controlling type for an invariant procedure declaration
407 (Is_Invariant_Procedure_Or_Body): New routine.
408 * sem_ch7.adb (Analyze_Package_Specification): Build the partial
409 invariant body in order to preanalyze and resolve all invariants
410 of a private type at the end of the visible declarations. Build
411 the full invariant body in order to preanalyze and resolve
412 all invariants of a private type's full view at the end of
413 the private declarations.
414 (Preserve_Full_Attributes): Inherit invariant-related attributes.
415 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Ensure that
416 aspects are analyzed with the proper view when the protected type
417 is a completion of a private type. Inherit invariant-related attributes.
418 (Analyze_Task_Type_Declaration): Ensure that
419 aspects are analyzed with the proper view when the task type
420 is a completion of a private type. Inherit invariant-related
422 * sem_ch13.adb Remove with and use clauses for Stringt.
423 (Build_Invariant_Procedure_Declaration): Removed.
424 (Build_Invariant_Procedure): Removed.
425 (Freeze_Entity_Checks): Do not build the body of the invariant
427 The body is built when the type is frozen in Freeze_Type.
428 (Inherit_Aspects_At_Freeze_Point): Do not inherit any attributes
429 related to invariants here because this leads to erroneous
431 (Replace_Node): Rename to Replace_Type_Ref.
432 * sem_ch13.ads (Build_Invariant_Procedure_Declaration): Removed.
433 (Build_Invariant_Procedure): Removed.
434 * sem_prag.adb Add with and use clauses for Exp_Ch7.
435 (Analyze_Pragma): Reimplement the analysis of pragma Invariant.
436 * sem_res.adb (Resolve_Actuals): Emit a specialized error when
437 the context is an invariant.
438 * sem_util.adb (Get_Views): New routine.
439 (Incomplete_Or_Partial_View): Consider generic packages when
440 examining declarations.
441 (Inspect_Decls): Consider full type
442 declarations because they may denote a derivation from a
444 (Propagate_Invariant_Attributes): New routine.
445 * sem_util.ads (Get_Views): New routine.
446 (Propagate_Invariant_Attributes): New routine.
448 2016-06-16 Arnaud Charlet <charlet@adacore.com>
450 * pprint.adb (Expression_Image): Add better handling of UCs,
451 we don't want to strip them all for clarity.
454 2016-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
456 * exp_util.adb (Safe_Unchecked_Type_Conversion): Use "alignment"
457 instead of "alignement".
459 2016-06-16 Gary Dismukes <dismukes@adacore.com>
461 * sem_util.adb: Minor typo fix.
463 2016-06-16 Emmanuel Briot <briot@adacore.com>
465 * s-regpat.adb: Further fix for invalid index in GNAT.Regexp.
467 2016-06-16 Eric Botcazou <ebotcazou@adacore.com>
469 * sem_ch13.adb (Validate_Address_Clauses): Use the same logic to
470 issue the warning on the offset for the size as for the alignment
471 and tweak the wording for the sake of consistency.
473 2016-06-16 Ed Schonberg <schonberg@adacore.com>
475 * sem_prag.adb (Check_Class_Wide_COndition): New procedure,
476 subsidiary of Analyze_Pre_Post_ Condition_In_Decl_Part, to
477 check legality rules that follow from the revised semantics of
478 class-wide pre/postconditions described in AI12-0113.
479 (Build_Pragma_Check_Equivalent): Abstract subprogram declarations
480 must be included in list of overriding primitives of a derived
483 2016-06-16 Ed Schonberg <schonberg@adacore.com>
485 * sem_util.adb (May_Be_Lvalue): An actual in an unexpanded
486 attribute reference 'Read is an assignment and must be considered
487 a modification of the object.
489 2016-06-16 Gary Dismukes <dismukes@adacore.com>
491 * einfo.adb: Minor editorial.
493 2016-06-16 Ed Schonberg <schonberg@adacore.com>
495 * sem_prag.adb (Overridden_Ancestor): Clean up code to use
496 controlling type of desired primitive rather than its scope,
497 because the primitive that inherits the classwide condition may
498 comes from several derivation steps.
500 2016-06-16 Javier Miranda <miranda@adacore.com>
502 * einfo.adb (Set_Default_Init_Cond_Procedure): Allow calls setting
503 this attribute to Empty (only if the attribute has not been set).
504 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
505 No action needed if the spec was not built.
506 (Build_Default_Init_Cond_Procedure_Declaration): The spec is
507 not built if DIC is set to NULL or no condition was specified.
508 * exp_ch3.adb (Expand_N_Object_Declaration): Check availability
509 of the Init_Cond procedure before generating code to call it.
511 2016-06-16 Emmanuel Briot <briot@adacore.com>
513 * s-regpat.adb: Fix invalid index check when matching end-of-line
516 2016-06-16 Arnaud Charlet <charlet@adacore.com>
518 * gnat1drv.adb: Minor reformatting.
520 2016-06-16 Ed Schonberg <schonberg@adacore.com>
522 * sem_ch3.adb (Check_Entry_Contracts): New procedure, subsidiary
523 of Analyze_Declarations, that performs pre-analysis of
524 pre/postconditions on entry declarations before full analysis
525 is performed after entries have been converted into procedures.
526 Done solely to capture semantic errors.
527 * sem_attr.adb (Analyze_Attribute, case 'Result): Add guard to
528 call to Denote_Same_Function.
530 2016-06-16 Emmanuel Briot <briot@adacore.com>
532 * g-comlin.adb: Fix minor memory leak in GNAT.Command_Line.
534 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
536 * exp_ch7.adb (Find_Last_Init): Remove obsolete code. The
537 logic is now performed by Process_Object_Declaration.
538 (Process_Declarations): Recognize a controlled deferred
539 constant which is in fact initialized by means of a
540 build-in-place function call as needing finalization actions.
541 (Process_Object_Declaration): Insert the counter after the
542 build-in-place initialization call for a controlled object. This
543 was previously done in Find_Last_Init.
544 * exp_util.adb (Requires_Cleanup_Actions): Recognize a controlled
545 deferred constant which is in fact initialized by means of a
546 build-in-place function call as needing finalization actions.
548 2016-06-16 Justin Squirek <squirek@adacore.com>
550 * exp_aggr.adb (Expand_Array_Aggregate): Minor comment changes and
551 additional style fixes.
552 * exp_ch7.adb: Minor typo fixes and reformatting.
554 2016-06-16 Justin Squirek <squirek@adacore.com>
556 * sem_ch3.adb (Analyze_Object_Declaration): Add a missing check
557 for optimized aggregate arrays with qualified expressions.
558 * exp_aggr.adb (Expand_Array_Aggregate): Fix block and
559 conditional statement in charge of deciding whether to perform
560 in-place expansion. Specifically, use Parent_Node to jump over
561 the qualified expression to the object declaration node. Also,
562 a check has been inserted to skip the optimization if SPARK 2005
563 is being used in strict adherence to RM 4.3(5).
565 2016-06-16 Tristan Gingold <gingold@adacore.com>
567 * sem_prag.adb (Analyze_Pragma): Simplify code
570 2016-06-16 Eric Botcazou <ebotcazou@adacore.com>
572 * sem_util.ads (Indexed_Component_Bit_Offset): Declare.
573 * sem_util.adb (Indexed_Component_Bit_Offset): New
574 function returning the offset of an indexed component.
575 (Has_Compatible_Alignment_Internal): Call it.
576 * sem_ch13.adb (Offset_Value): New function returning the offset of an
577 Address attribute reference from the underlying entity.
578 (Validate_Address_Clauses): Call it and take the offset into
579 account for the size warning.
581 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
583 * bindgen.adb, exp_util.adb, sem_ch9.adb, sem_util.adb: Minor
586 2016-06-16 Gary Dismukes <dismukes@adacore.com>
588 * sem_ch9.adb, sem_util.ads, sem_res.adb: Minor reformatting and typo
591 2016-06-16 Javier Miranda <miranda@adacore.com>
593 * sem_res.adb (Resolve): Under relaxed RM semantics silently
594 replace occurrences of null by System.Null_Address.
595 * sem_ch4.adb (Analyze_One_Call, Operator_Check): Under
596 relaxed RM semantics silently replace occurrences of null by
598 * sem_util.ad[sb] (Null_To_Null_Address_Convert_OK): New subprogram.
599 (Replace_Null_By_Null_Address): New subprogram.
601 2016-06-16 Bob Duff <duff@adacore.com>
603 * exp_util.adb (Is_Controlled_Function_Call):
604 This was missing the case where the call is in prefix format,
605 with named notation, as in Obj.Func (Formal => Actual).
607 2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
609 * exp_attr.adb, inline.adb, sem_attr.adb, sem_elab.adb: Minor
612 2016-06-16 Bob Duff <duff@adacore.com>
614 * sem_util.adb (Collect): Avoid Empty Full_T. Otherwise Etype
615 (Full_T) crashes when assertions are on.
616 * sem_ch12.adb (Matching_Actual): Correctly handle the case where
617 "others => <>" appears in a generic formal package, other than
620 2016-06-16 Arnaud Charlet <charlet@adacore.com>
622 * usage.adb: Remove confusing comment in usage line.
623 * bindgen.adb: Fix binder generated file in codepeer mode wrt
626 2016-06-16 Javier Miranda <miranda@adacore.com>
628 * restrict.adb (Check_Restriction_No_Use_Of_Entity): Avoid
629 never-ending loop, code cleanup; adding also support for Text_IO.
630 * sem_ch8.adb (Find_Expanded_Name): Invoke
631 Check_Restriction_No_Use_Entity.
633 2016-06-16 Tristan Gingold <gingold@adacore.com>
635 * exp_ch9.adb: Minor comment fix.
636 * einfo.ads (Has_Protected): Clarify comment.
637 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Do not
638 consider private protected types declared in the runtime for
639 the No_Local_Protected_Types restriction.
641 2016-06-14 Ed Schonberg <schonberg@adacore.com>
643 * sem_ch6.adb (Set_Actual_Subtypes): Do not generate actual
644 subtypes for unconstrained formals when analyzing the generated
645 body of an expression function, because it may lead to premature
646 and misplaced freezing of the types of formals.
648 2016-06-14 Gary Dismukes <dismukes@adacore.com>
650 * sem_elab.adb, sem_ch4.adb: Minor reformatting and typo fix.
652 2016-06-14 Tristan Gingold <gingold@adacore.com>
654 * einfo.adb (Set_Has_Timing_Event): Add assertion.
655 * sem_util.ads, sem_util.adb (Propagate_Concurrent_Flags): New
656 name for Propagate_Type_Has_Flags.
657 * exp_ch3.adb, sem_ch3.adb, sem_ch7.adb, sem_ch9.adb: Adjust after
660 2016-06-14 Bob Duff <duff@adacore.com>
662 * sem_elab.adb (Check_A_Call): Do nothing if the callee is
663 (or is in) an instance, and the caller is outside. Misc cleanup.
665 2016-06-14 Javier Miranda <miranda@adacore.com>
667 * sem_ch4.adb (Analyze_Quantified_Expression):
668 Generating C code avoid spurious warning on loop variable of
669 inlinined postconditions.
671 2016-06-14 Javier Miranda <miranda@adacore.com>
673 * sem_attr.adb (Analyze_Attribute_Old_Result): Adding assertion.
674 (Analyze_Attribute [Attribute_Old]): Generating C handle
675 analysis of 'old in inlined postconditions.
676 (Analyze_Attribute [Attribute_Result]): Generating C handle analysis
677 of 'result in inlined postconditions.
678 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]):
679 Generating C handle expansion of 'old in inlined postconditions.
680 * inline.adb (Declare_Postconditions_Result): New subprogram.
681 * sem_ch12.adb (Copy_Generic_Node): Copy pragmas generated from
682 aspects when generating C code since pre/post conditions are
683 inlined and the frontend inlining relies on this routine to
685 * exp_ch6.adb (Inlined_Subprogram): Replace Generate_C_Code
686 by Modify_Tree_For_C.
687 * exp_unst.adb (Visit_Node): Searching for up-level references
688 skip entities defined in inlined subprograms.
690 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
692 * sem_ch7.adb, sem_ch12.adb, freeze.adb, lib-xref.ads, exp_ch3.adb:
695 2016-06-14 Bob Duff <duff@adacore.com>
697 * sem_elab.adb: Do nothing if the callee is intrinsic.
698 * sinfo.ads, einfo.ads: Minor comment fixes.
700 2016-06-14 Ed Schonberg <schonberg@adacore.com>
702 * contracts.adb (Has_Null_Body): Move to sem_util, for general
704 * sem_util.ads, sem_util.adb (Has_Null_Body): Predicate to
705 determine when an internal procedure created for some assertion
706 checking (e.g. type invariant) is a null procedure. Used to
707 eliminate redundant calls to such procedures when they apply to
708 components of composite types.
709 * exp_ch3.adb (Build_Component_Invariant_Call): Do not add call
710 if invariant procedure has a null body.
712 2016-06-14 Thomas Quinot <quinot@adacore.com>
714 * g-socket.ads (Check_Selector): Clarify effect on IN OUT socket
717 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
719 * exp_ch4.adb (Process_Action): Pass the action
720 list to Process_Transient_Object.
721 (Process_If_Case_Statements): Pass the action list to
722 Process_Transient_Object.
723 (Process_Transient_Object): Add new parameter Stmts and update the
724 comment on usage. When the context is a Boolean evaluation, insert
725 any finalization calls after the last statement of the construct.
727 2016-06-14 Tristan Gingold <gingold@adacore.com>
729 * einfo.adb, einfo.ads (Has_Timing_Event,
730 Set_Has_Timing_Event): Add Has_Timing_Event flag.
731 (Write_Entity_Flags): Display * sem_util.ads, sem_util.adb:
732 (Propagate_Type_Has_Flags): New procedure to factorize code.
733 * exp_ch3.adb (Expand_Freeze_Array_Type,
734 Expand_Freeze_Record_Type): Call Propagate_Type_Has_Flags.
735 * sem_ch3.adb (Access_Type_Decalaration): Initialize
736 Has_Timing_Event flag. (Analyze_Object_Declaration):
737 Move code that check No_Local_Timing_Events near
738 the code that check No_Local_Protected_Objects.
739 (Analyze_Private_Extension_Declaration, Array_Type_Declaration)
740 (Build_Derived_Type, Copy_Array_Base_Type_Attributes,
741 Process_Full_View) (Record_Type_Definition): Call
742 Propagate_Type_Has_Flags.
743 * sem_ch4.adb (Analyze_Allocator): Check No_Local_Timing_Events.
744 * sem_ch7.adb (New_Private_Type): Set Has_Timing_Event on the
746 (Uninstall_Declaration): Call Propagate_Type_Has_Flags.
747 * sem_ch9.adb (Analyze_Protected_Definition): Call
748 Propagate_Type_Has_Flags.
750 2016-06-14 Arnaud Charlet <charlet@adacore.com>
752 * sem.ads: Minor style fix.
754 2016-06-14 Ed Schonberg <schonberg@adacore.com>
756 * sem_ch12.adb (Analyze_Associations): An actual parameter
757 with a box must be included in the count of actuals, to detect
758 possible superfluous named actuals that do not match any of the
759 formals of the generic unit in a formal package declaration.
761 2016-06-14 Justin Squirek <squirek@adacore.com>
763 * sem_ch3.adb (Analyze_Object_Declaration): Fix formatting
764 of error output related to SPARK RM 6.1.7(3) and pragma
766 * sem_ch4.adb (Analyze_Type_Conversion): Fix formatting of error
767 output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
768 * sem_prag.adb (Analyze_Pragma): Fix formatting of error output
769 related to SPARK RM 7.1.2(15) and pragma Volatile_Function
770 so that the values True and False are no longer surrounded by
772 * sem_res.adb (Resolve_Actuals): Fix formatting of error output
773 related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
775 2016-06-14 Arnaud Charlet <charlet@adacore.com>
777 * gnat1drv.adb (Adjust_Global_Switches): Enable access checks
779 * freeze.adb: Minor grammar fix in comment.
780 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
782 * lib.adb: Minor reformatting.
783 * sem_util.adb (Is_OK_Volatile_Context): Do
784 include Address in the supported attributes.
786 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
788 * exp_ch4.adb (Expand_N_Case_Expression):
789 Code cleanup. Finalize any transient controlled
790 objects on exit from a case expression alternative.
791 (Expand_N_If_Expression): Code cleanup.
792 (Process_Actions): Removed.
793 (Process_If_Case_Statements): New routine.
794 (Process_Transient_Object): Change the name of formal Rel_Node to
795 N and update all occurrences. Update the comment on usage. When
796 the type of the context is Boolean, the proper insertion point
797 for the finalization call is after the last declaration.
799 2016-06-14 Ed Schonberg <schonberg@adacore.com>
801 * lib-xref.ads, lib-xref.adb (Has_Deferred_Reference): new
802 predicate to determine whether an entity appears in a context
803 for which a Deferred_Reference was created, because it is not
804 possible to determine when reference is analyzed whether it
805 appears in a context in which the entity is modified.
806 * sem_ch5.adb (Analyze_Statement): Do not emit a useless warning
807 on assignment for an entity that has a deferred_reference.
809 2016-06-14 Javier Miranda <miranda@adacore.com>
811 * sem_res.adb (Resolve_Actuals): Generate a reference to actuals that
812 come from source. Previously the reference was generated only if the
813 call comes from source but the call may be rewritten by the expander
814 thus causing the notification of spurious warnings.
816 2016-06-14 Arnaud Charlet <charlet@adacore.com>
818 * gnat1drv.adb: Remove further references to AAMP.
819 * checks.adb (Apply_Scalar_Range_Check): Take
820 Check_Float_Overflow info account.
821 * live.ads, live.adb Added subprogram headers and
822 start-of-processing-for comments.
823 * sem_ch12.adb (Instantiate_Package_Body): Do not suppress
824 checks when instantiating runtime units in CodePeer mode.
826 2016-06-14 Arnaud Charlet <charlet@adacore.com>
828 * exp_ch3.adb (Expand_N_Object_Declaration): Only consider
831 2016-06-14 Arnaud Charlet <charlet@adacore.com>
833 * switch-c.adb, gnat1drv.adb (Adjust_Global_Switches): Only disable
834 simple value propagation in CodePeer mode when warnings are disabled.
835 (Scan_Front_End_Switches): Enable relevant front-end switches
838 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
840 * sem_util.adb (Is_OK_Volatile_Context): A
841 reference to a volatile object is considered OK if appears as
842 the prefix of attributes Address, Alignment, Component_Size,
843 First_Bit, Last_Bit, Position, Size, Storage_Size.
845 2016-06-14 Yannick Moy <moy@adacore.com>
847 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not traverse
848 subunits directly, as they are already traversed as part of the
849 top-level unit to which they belong.
850 (Add_SPARK_Xrefs): Add assertions to ensure correct sorting.
851 (Generate_Dereference): Use unique definition place for special
852 variable __HEAP, to ensure correct sorting of references.
853 * lib-xref.adb (Generate_Reference): Use top-level unit in case
855 * lib.adb, lib.ads (Get_Top_Level_Code_Unit): New functions that
856 compute the top-level code unit for a source location of AST node,
857 that go past subunits.
859 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
861 * gcc-interface/decl.c (gnat_to_gnu_subprog_type): Build only a minimal
862 PARM_DECL when the parameter type is dummy.
863 * gcc-interface/trans.c (Call_to_gnu): Translate formal types before
866 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
868 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
869 PLUS_EXPR in the expression of a renaming.
871 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
873 * gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
874 with calls to malloc.
876 2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
878 * gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
879 constant, use the generic implementation of the middle-end; otherwise
880 turn the dynamic conditions into static conditions and simplify.
882 2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
884 * gcc-interface/trans.c (Case_Statement_to_gnu): Deal with characters.
886 2016-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
888 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not clobber
889 gnat_entity_name with temporary names for XUP and XUT types.
891 2016-06-10 Martin Sebor <msebor@redhat.com>
894 * gcc/ada/gcc-interface/utils.c (handle_nonnull_attribute): Accept
895 the nonnull attribute in type-generic builtins.
897 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
899 * gcc-interface/decl.c (Gigi_Equivalent_Type): Make sure equivalent
900 types are present before returning them. Remove final assertion.
901 (gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Adjust to
903 <E_Protected_Type>: Likewise.
905 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
907 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also do
908 not elaborate Itypes.
910 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
912 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
913 for noinline and noclone attributes.
914 (handle_noinline_attribute): New handler.
915 (handle_noclone_attribute): Likewise.
917 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
919 * gcc-interface/trans.c (process_type): Beef up comment.
921 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
923 * gcc-interface/utils2.c (build_call_alloc_dealloc): Do not substitute
924 placeholder expressions here but...
925 * gcc-interface/trans.c (gnat_to_gnu) <N_Free_Statement>: ...here.
926 Make an exception to the protection of a CALL_EXPR result with an
927 unconstrained type only in the same cases as Call_to_gnu.
929 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
931 * gcc-interface/trans.c (gnat_to_gnu): Rework special code dealing
932 with boolean rvalues and set the location directly. Do not set the
933 location in the other cases for a simple name.
934 (gnat_to_gnu_external): Clear the location on the expression.
936 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
938 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Remove
939 useless 'else' statements and tidy up.
940 <E_Array_Subtype>: Fully deal with the declaration here.
941 <E_Incomplete_Type>: Use properly-typed constant.
942 Assert that we don't apply the special type treatment to dummy types.
943 Separate this treatment from the final back-annotation and simplify
944 the condition for the RM size.
945 (gnat_to_gnu_param): Add GNU_PARAM_TYPE parameter and adjust.
946 (gnat_to_gnu_subprog_type): Ajust call to gnat_to_gnu_param.
947 * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Declaration>: Add
949 (process_freeze_entity): Remove obsolete code.
950 (process_type): Minor tweaks.
952 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
954 * einfo.ads (Returns_Limited_View): Remove.
955 (Set_Returns_Limited_View ): Likewise.
956 * einfo.adb (Returns_Limited_View): Likewise.
957 (Set_Returns_Limited_View ): Likewise.
958 * freeze.adb (Late_Freeze_Subprogram): Remove.
959 (Freeze_Entity): Do not defer the freezing of functions returning an
960 incomplete type coming from a limited context.
962 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
964 * gcc-interface/gigi.h (finish_subprog_decl): Add ASM_NAME parameter.
965 * gcc-interface/decl.c (gnu_ext_name_for_subprog): New function.
966 (gnat_to_gnu_entity) <E_Subprogram_Type>: Do not check compatibility
967 of profiles for builtins here... Call gnu_ext_name_for_subprog.
968 Also update profiles if pointers to limited_with'ed types are
970 (gnat_to_gnu_param): Restore the correct source location information
971 for vector ABI warnings.
972 (associate_subprog_with_dummy_type): Add comment about AI05-019.
973 Set TYPE_DUMMY_IN_PROFILE_P flag unconditionally.
974 (update_profile): Deal with builtin declarations.
975 Call gnu_ext_name_for_subprog. Adjust call to finish_subprog_decl.
976 (update_profiles_with): Add comment.
977 (gnat_to_gnu_subprog_type): Reuse the return type if it is complete.
978 Likewise for parameter declarations in most cases. Do not change
979 the return type for the CICO mechanism if the profile is incomplete.
980 ...but here instead. Always reset the slot for the parameters.
981 * gcc-interface/utils.c (create_subprog_decl): Call
982 gnu_ext_name_for_subprog. Do not set the assembler name here but...
983 (finish_subprog_decl): ...but here instead. Add ASM_NAME parameter.
985 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
987 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Insert the
988 declaration of the corresponding record type before that of the
989 unprotected version of the subprograms that operate on it.
990 (Expand_Access_Protected_Subprogram_Type): Declare the Equivalent_Type
991 just before the original type.
992 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Point the current
993 declaration to the newly created declaration for the primitive.
994 (Analyze_Subtype_Declaration): Remove obsolete code forcing the
995 freezing of the subtype before its declaration.
996 (Replace_Anonymous_Access_To_Protected_Subprogram): Insert the new
997 declaration in the nearest enclosing scope for formal parameters too.
998 (Build_Derived_Access_Type): Restore the status of the created Itype
999 after it is erased by Copy_Node.
1000 * sem_ch6.adb (Exchange_Limited_Views): Remove guard on entry.
1001 (Analyze_Subprogram_Body_Helper): Call Exchange_Limited_Views only if
1002 the specification is present.
1003 Move around the code changing the designated view of the return type
1004 and save the original view. Restore it on exit.
1005 * sem_ch13.adb (Build_Predicate_Function_Declaration): Always insert
1006 the declaration right after that of the type.
1008 2016-06-01 Simon Wright <simon@pushface.org>
1011 * g-comlin.adb (Display_Section_Help): Do not dereference
1012 Config.Switches if it's null.
1015 2016-05-31 Eric Botcazou <ebotcazou@adacore.com>
1017 * s-osinte-kfreebsd-gnu.ads (clock_getres): Define.
1018 (Get_Page_Size): Remove duplicate and return int.
1020 2016-05-31 Jan Sommer <soja-lists@aries.uberspace.de>
1023 * s-osinte-rtems.ads (clock_getres): Define.
1024 (Get_Page_Size): Remove duplicate and return int.
1026 2016-05-20 Eric Botcazou <ebotcazou@adacore.com>
1028 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
1029 Make same-sized subtypes of signed base types signed.
1030 * gcc-interface/utils.c (make_type_from_size): Adjust to above change.
1031 (unchecked_convert): Likewise.
1033 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
1035 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
1036 a specific type for the object if it is deemed a constant.
1038 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
1040 * freeze.adb (Freeze_Record_Type): Extend pragma Implicit_Packing to
1041 components of any elementary types and of composite types.
1043 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
1045 * freeze.adb (Freeze_Array_Type): Call Addressable predicate instead
1046 of testing for individual sizes.
1047 (Freeze_Entity): Rework implementation of pragma Implicit_Packing for
1048 array types, in particular test for suitable sizes upfront and do not
1049 mimic the processing that will be redone later in Freeze_Array_Type.
1051 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
1053 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also skip
1056 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
1058 * doc/gnat_rm/implementation_defined_attributes.rst
1059 (Scalar_Storage_Order): Adjust restriction for packed array types.
1060 * einfo.ads (Is_Bit_Packed_Array): Adjust description.
1061 (Is_Packed): Likewise.
1062 (Is_Packed_Array_Impl_Type): Likewise.
1063 (Packed_Array_Impl_Type): Likewise.
1064 * exp_ch4.adb (Expand_N_Indexed_Component): Do not do anything special
1065 if the prefix is not a packed array implemented specially.
1066 * exp_ch6.adb (Expand_Actuals): Expand indexed components only for
1067 bit-packed array types.
1068 * exp_pakd.adb (Install_PAT): Set Is_Packed_Array_Impl_Type flag on
1069 the PAT before analyzing its declaration.
1070 (Create_Packed_Array_Impl_Type): Remove redundant statements.
1071 * freeze.adb (Check_Component_Storage_Order): Reject packed array
1072 components only if they are bit packed.
1073 (Freeze_Array_Type): Fix logic detecting bit packing and do not bit
1074 pack for composite types whose size is multiple of a byte.
1075 Create the implementation type for packed array types only when it is
1076 needed, i.e. bit packing or packing because of holes in index types.
1077 Make sure the Has_Non_Standard_Rep and Is_Packed flags agree.
1078 * gcc-interface/gigi.h (make_packable_type): Add MAX_ALIGN parameter.
1079 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
1080 Call maybe_pad_type instead of building the padding type manually.
1081 (gnat_to_gnu_entity) <E_Array_Subtype>: Do not assert that
1082 Packed_Array_Impl_Type is present for packed arrays.
1083 (gnat_to_gnu_component_type): Also handle known alignment for packed
1084 types by passing it to make_packable_type.
1085 * gcc-interface/utils.c (make_packable_type): Add MAX_ALIGN parameter
1086 and deal with it in the array case. Adjust recursive call. Simplify
1087 computation of new size and cap the alignment to BIGGEST_ALIGNMENT.
1089 2016-05-16 Thomas Quinot <quinot@adacore.com>
1091 * freeze.adb (Check_Component_Storage_Order): Also get full view of
1094 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
1096 * exp_util.adb (Remove_Side_Effects): Also make a constant if we need
1097 to capture the value for a small not by-reference record type.
1098 * freeze.ads (Check_Compile_Time_Size): Adjust comment.
1099 * freeze.adb (Set_Small_Size): Likewise. Accept a size in the range
1101 (Check_Compile_Time_Size): Merge scalar and access type cases. Change
1102 variable name in array type case. For the computation of the packed
1103 size, deal with record components and remove redundant test.
1104 (Freeze_Array_Type): Also adjust packing status when the size of the
1105 component type is in the range 33 .. 64 bits.
1106 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Turn primitive
1107 into elementary type throughout. Minor tweaks.
1108 (Alignment Clauses): Document actual alignment of packed array types.
1109 (Pragma Pack for Arrays): List only the 3 main cases and adjust. Add
1110 "simple" to the record case. Document effect on non packable types.
1111 (Pragma Pack for Records): Likewise. Add record case and adjust.
1113 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
1115 * gcc-interface/Make-lang.in (GNATMAKE_FOR_HOST): In the canadian
1116 cross case, use host_noncanonical instead of host as prefix.
1117 (GNATBIND_FOR_HOST): Likewise.
1118 (GNATLINK_FOR_HOST): Likewise.
1119 (GNATLS_FOR_HOST): Likewise.
1121 2016-05-06 Eric Botcazou <ebotcazou@adacore.com>
1124 * system-darwin-ppc64.ads: Add pragma No_Elaboration_Code_All.
1125 * system-linux-armeb.ads: Likewise.
1126 * system-linux-mips64el.ads: Likewise.
1127 * system-linux-mips.ads: Likewise.
1128 * system-linux-mipsel.ads: Likewise.
1129 * system-linux-ppc64.ads: Likewise.
1130 * system-linux-sparcv9.ads: Likewise.
1131 * system-rtems.ads: Likewise.
1133 2016-05-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
1135 * s-osinte-gnu.ads (Get_Page_Size): Return int and use getpagesize
1136 instead of __getpagesize.
1138 2016-05-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1140 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
1143 2016-05-02 Tristan Gingold <gingold@adacore.com>
1145 * fname.adb (Is_Predefined_File_Name): Also consider non-krunched
1148 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1150 * sem_util.adb (Aggregate_Constraint_Checks): Separate
1151 accessibility checks and non-null checks for aggregate components,
1152 to prevent spurious accessibility errors.
1154 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1156 * sem_ch3.adb (OK_For_Limited_Init): A type conversion is not
1157 always legal in the in-place initialization of a limited entity
1158 (e.g. an allocator).
1159 * sem_res.adb (Resolve_Allocator): Improve error message with RM
1160 reference when allocator expression is illegal.
1162 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1164 * exp_ch6.adb (Expand_Call): When inlining a call to a function
1165 declared in a package instance, locate the instance node of the
1166 package after the actual package declaration. skipping over
1167 pragmas that may have been introduced when the generic unit
1168 carries aspects that are transformed into pragmas.
1170 2016-05-02 Bob Duff <duff@adacore.com>
1172 * s-memory.adb (Alloc, Realloc): Move checks
1173 for Size = 0 or size_t'Last into the Result = System.Null_Address
1174 path for efficiency. Improve comments (based on actual C language
1175 requirements for malloc).
1176 * exp_util.adb (Build_Allocate_Deallocate_Proc): Optimize the
1177 case where we are using the default Global_Pool_Object, and we
1178 don't need the heavy finalization machinery.
1180 2016-05-02 Gary Dismukes <dismukes@adacore.com>
1182 * exp_util.ads, sem_ch12.adb: Minor reformatting.
1184 2016-05-02 Javier Miranda <miranda@adacore.com>
1186 * exp_util.ads, exp_util.adb (Force_Evaluation): Adding new formal.
1187 (Remove_Side_Effects): Adding a new formal.
1188 * exp_ch6.adb (Expand_Simple_Function_Return): Generating the
1189 call to the _Postconditions procedure ensure that side-effects
1190 are unconditionally removed.
1192 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1194 * sem_ch12.adb (Check_Formal_Package_Instance, Check_Mismatch):
1195 Use original node to determine whether the declaration is for
1196 a formal type declaration, to take into account that formwl
1197 private types are rewritten as private extension declarations
1198 to simplify semantic analysis.
1200 2016-05-02 Gary Dismukes <dismukes@adacore.com>
1202 * exp_ch9.adb, sem_ch6.adb, sem_ch6.ads: Minor reformatting and typo
1205 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1207 * sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
1210 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1212 * exp_ch4.adb (Expand_N_Allocator): If the designated type
1213 is a private derived type with no discriminants, examine its
1214 underlying_full_view to determine whether the full view has
1215 defaulted discriminants, so their defaults can be used in the
1216 call to the initialization procedure for the designated object.
1218 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1220 * exp_prag.adb, comperr.adb: Minor reformatting.
1222 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1224 * exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an
1225 unchecked conversion if the source size is 0 (indicating that
1226 its RM size is unknown). This will happen with packed arrays of
1227 non-discrete types, in which case the component type is known
1230 2016-05-02 Arnaud Charlet <charlet@adacore.com>
1232 * debug.adb: Reserve -gnatd.V.
1234 2016-05-02 Javier Miranda <miranda@adacore.com>
1236 * sem_ch3.adb (Process_Full_View): Remove from visibility
1237 wrappers of synchronized types to avoid spurious errors with
1238 their wrapped entity.
1239 * exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper
1240 if no interface primitive is covered by the subprogram and this is
1241 not a primitive declared between two views; see Process_Full_View.
1242 (Build_Protected_Sub_Specification): Link the dispatching
1243 subprogram with its original non-dispatching protected subprogram
1244 since their names differ.
1245 (Expand_N_Protected_Type_Declaration):
1246 If a protected subprogram overrides an interface primitive then
1247 do not build a wrapper if it was already built.
1248 * einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute.
1249 * sem_ch4.adb (Names_Match): New subprogram.
1250 * sem_ch6.adb (Check_Synchronized_Overriding): Moved
1251 to library level and defined in the public part of the
1252 package to invoke it from Exp_Ch9.Build_Wrapper_Spec
1253 (Has_Matching_Entry_Or_Subprogram): New subprogram.
1254 (Report_Conflict): New subprogram.
1256 2016-05-02 Jerome Lambourg <lambourg@adacore.com>
1258 * s-unstyp.ads: Code cleanups.
1260 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1262 * sem_ch13.adb (Size_Too_Small_Error): Fix the error message format.
1264 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1266 * exp_prag.adb (Expand_attributes_In_Consequence,
1267 Expand_Attributes): If the prefix of'Old is an unconstrained type,
1268 for example an unconstrained formal of the enclosing subprogram,
1269 create an object declaration with an expression to obtain the
1270 actual subtype of the temporary.
1272 2016-05-02 Arnaud Charlet <charlet@adacore.com>
1274 * comperr.adb (Delete_SCIL_Files): Add missing handling of
1275 N_Subprogram_Declaration.
1277 2016-05-02 Gary Dismukes <dismukes@adacore.com>
1279 * exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, checks.adb, sem_attr.adb,
1280 gnat1drv.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting and typo
1282 * sem_prag.adb, sem_ch12.adb: Minor typo fixes.
1284 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1286 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): The
1287 function call may be wrapped in an explicit type conversion.
1289 2016-05-02 Jerome Lambourg <lambourg@adacore.com>
1291 * interfac.ads: use pragma No_Elaboration_Code_All.
1292 * s-unstyp.ads: s-unstyp.ads: use pragma No_Elaboration_Code_All.
1294 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1296 * sem.adb (Analyze: If node is an error node previously created
1297 by the parser, disable expansion to prevent subsequent glitches
1300 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1302 * sem_ch13.adb (Alignment_Error): Removed.
1303 (Get_Alignment_Value): Code cleanup.
1305 2016-05-02 Tristan Gingold <gingold@adacore.com>
1307 * sem_ch3.adb (Analyze_Object_Declaration): Use Has_Protected
1308 to check for the no local protected objects restriction.
1310 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1312 * einfo.adb Anonymous_Master now uses Node35.
1313 (Anonymous_Master): Update the assertion and node reference.
1314 (Set_Anonymous_Master): Update the assertion and node reference.
1315 (Write_Field35_Name): Add output for Anonymous_Master.
1316 (Write_Field36_Name): The output is now undefined.
1317 * einfo.ads Update the node and description of attribute
1318 Anonymous_Master. Remove prior occurrences in entities as this
1319 is now a type attribute.
1320 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove local variable
1321 Ins_Node. Anonymous access- to-controlled component types no
1322 longer need finalization masters. The master is now built when
1323 a related allocator is expanded.
1324 (Expand_Freeze_Record_Type): Remove local variable Has_AACC. Do not
1325 detect whether the record type has at least one component of anonymous
1326 access-to- controlled type. These types no longer need finalization
1327 masters. The master is now built when a related allocator is expanded.
1328 * exp_ch4.adb Remove with and use clauses for Lib and Sem_Ch8.
1329 (Current_Anonymous_Master): Removed.
1330 (Expand_N_Allocator): Call Build_Anonymous_Master to create a
1331 finalization master for an anonymous access-to-controlled type.
1332 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
1333 Call routine Build_Anonymous_Master to create a finalization master
1334 for an anonymous access-to-controlled type.
1335 * exp_ch7.adb (Allows_Finalization_Master): New routine.
1336 (Build_Anonymous_Master): New routine.
1337 (Build_Finalization_Master): Remove formal parameter
1338 For_Anonymous. Use Allows_Finalization_Master to determine whether
1339 circumstances warrant a finalization master. This routine no
1340 longer creates masters for anonymous access-to-controlled types.
1341 (In_Deallocation_Instance): Removed.
1342 * exp_ch7.ads (Build_Anonymous_Master): New routine.
1343 (Build_Finalization_Master): Remove formal parameter For_Anonymous
1344 and update the comment on usage.
1345 * sem_util.adb (Get_Qualified_Name): New routines.
1346 (Output_Name): Reimplemented.
1347 (Output_Scope): Removed.
1348 * sem_util.ads (Get_Qualified_Name): New routines.
1350 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1352 * debug.adb: Document the use of switch -gnatd.H.
1353 * gnat1drv.adb (Adjust_Global_Switches): Set ASIS_GNSA mode when
1354 -gnatd.H is present.
1355 (Gnat1drv): Suppress the call to gigi when ASIS_GNSA mode is active.
1356 * opt.ads: Add new option ASIS_GNSA_Mode.
1357 * sem_ch13.adb (Alignment_Error): New routine.
1358 (Analyze_Attribute_Definition_Clause): Suppress certain errors in
1359 ASIS mode for attribute clause Alignment, Machine_Radix, Size, and
1361 (Check_Size): Use routine Size_Too_Small_Error to
1362 suppress certain errors in ASIS mode.
1363 (Get_Alignment_Value): Use routine Alignment_Error to suppress certain
1364 errors in ASIS mode.
1365 (Size_Too_Small_Error): New routine.
1367 2016-05-02 Arnaud Charlet <charlet@adacore.com>
1369 * spark_xrefs.ads Description of the spark cross-references
1370 clarified; small style fixes.
1371 * lib-xref-spark_specific.adb (Add_SPARK_Scope,
1372 Detect_And_Add_SPARK_Scope): consider protected types and bodies
1373 as yet another scopes.
1374 (Enclosing_Subprogram_Or_Library_Package): refactored using
1375 Hristian's suggestions; added support for scopes of protected
1376 types and bodies; fix for entries to return the scope of the
1377 enclosing concurrent type, which is consistent with what is
1378 returned for protected subprograms.
1379 * sem_intr.adb: Minor style fix in comment.
1381 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1383 * lib-xref.ads, lib-xref-spark_specific.adb, get_spark_xrefs.adb,
1384 put_spark_xrefs.adb: Minor reformatting.
1386 2016-05-02 Doug Rupp <rupp@adacore.com>
1388 * g-traceb.ads: Document traceback for ARM.
1390 2016-05-02 Javier Miranda <miranda@adacore.com>
1392 * exp_disp.adb (Make_Tags): Do not generate the
1393 external name of interface tags adding the suffix counter since
1394 it causes problems at link time when the IP routines are inlined
1395 across units with optimization.
1397 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1399 * einfo.ads, einfo.adb (Predicates_Ignared): new flag to indicate
1400 that predicate checking is disabled for predicated subtypes in
1401 the context of an Assertion_Policy pragma.
1402 * checks.adb (Apply_Predicate_Check): Do nothing if
1403 Predicates_Ignored is true.
1404 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): If
1405 Predicates_Ignores is true, the function Rep_To_Pos does raise
1406 an exception for invalid data.
1407 * exp_ch4.adb (Expand_N_Type_Conversion): IF target is a predicated
1408 type do not apply check if Predicates_Ignored is true.
1409 * exp_ch5.adb (Expand_N_Case_Statement): If Predicates_Ignored
1410 is true, sem_prag.adb:
1411 * sem_ch3.adb (Analyze_Object_Declaration): If Predicates_Ignored
1412 is true do not emit predicate check on initializing expression.
1414 2016-05-02 Arnaud Charlet <charlet@adacore.com>
1416 * get_spark_xrefs.adb (Get_Nat, Get_Name): Initialize variables when
1417 they are declared; refine type of a counter from Integer to Natural.
1418 * sem_ch5.adb, gnatcmd.adb, s-intman-posix.adb, eval_fat.adb,
1419 prj.adb, sem_util.adb, s-intman-android.adb, prj-nmsc.adb, sem_ch8.adb,
1420 exp_ch3.adb: Minor editing.
1422 2016-05-02 Yannick Moy <moy@adacore.com>
1424 * a-tigeli.adb (Get_Line): Always set Last prior to returning.
1426 2016-05-02 Yannick Moy <moy@adacore.com>
1428 * lib-xref.adb: Minor style fix in whitespace of declarations.
1429 * put_spark_xrefs.adb (Put_SPARK_Xrefs): printing of strings
1430 refactored without loops.
1431 * put_spark_xrefs.ads (Write_Info_Str): new formal argument of
1433 * spark_xrefs.adb (Write_Info_Str): new actual in instantiation
1434 of generic procedure.
1436 2016-05-02 Arnaud Charlet <charlet@adacore.com>
1438 * lib-xref-spark_specific.adb (Add_SPARK_Scope): add task type scope.
1439 (Detect_And_Add_SPARK_Scope): detect and add task type scope.
1440 (Enclosing_Subprogram_Or_Package): Respect boundaries of task
1441 and entry declarations.
1442 * spark_xrefs.ads: minor typo in comment.
1444 2016-05-02 Arnaud Charlet <charlet@adacore.com>
1446 * make.adb: Minor: avoid an exception when calling gnatmake with
1447 no argument and gnatmake is built with checks on.
1448 * lib-xref-spark_specific.adb: Minor code cleanup.
1450 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1452 * sem_util.adb (Normalize_Actuals): Take into account extra
1453 actuals that may have been introduced previously. Normally extra
1454 actuals are introduced when a call is expanded, but a validity
1455 check may copy and reanalyze a call that carries an extra actual
1456 (e.g. an accessibility parameter) before the call itself is
1457 marked Analzyed, and the analysis of the copy has to be able to
1458 cope with the added actual.
1460 2016-05-02 Bob Duff <duff@adacore.com>
1462 * sem_ch10.adb (Analyze_Compilation_Unit): Preserve
1463 treeishness. Previous version had Context_Items shared between
1466 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1468 * sem_aggr.adb (Resolve_Aggr_Expression): For both array and
1469 record cases, apply predicate check on component for expression
1470 only if expression has been analyzed already. For expressions
1471 that need to be duplicated when they cover multiple components,
1472 resolution and predicate checking take place later.
1474 2016-05-02 Olivier Hainque <hainque@adacore.com>
1476 * a-direct.adb (Delete_Tree): Use full names to designate subdirs
1477 and files therein, instead of local names after a change of
1480 2016-05-02 Thomas Quinot <quinot@adacore.com>
1482 * freeze.adb (Check_Component_Storage_Order): Get full view of
1485 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1487 * checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
1490 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
1492 * sem_ch4.adb (Find_Indexing_Operations): Use the underlying type
1493 of the container base type in case the container is a subtype.
1494 * sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
1495 the selector has an entity when checking for a component of a
1498 2016-05-02 Arnaud Charlet <charlet@adacore.com>
1501 * opt.ads (Latest_Ada_Only): New flag.
1502 * sem_prag.adb, par-prag.adb: Ignore pragma Ada_xx under this flag.
1503 * usage.adb, switch-c.adb: Disable support for -gnatxx under this flag.
1504 * einfo.ads (Has_Predicates, Predicate_Function):
1505 Clarify that Has_Predicates does not imply that Predicate_Function
1506 will return a non-empty entity.
1508 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1510 * sem_res.adb (Resolve_Qualified_Expression): Generate a predicate
1511 check if type requires it.
1512 * checks.adb (Apply_Predicate_Check): Disable checks in the
1513 object declaration created for an expression with side-effects
1514 that requires a predicate check to prevent infinite recursion
1517 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1519 * sem_ch6.adb (Process_Formals): Check properly the type of a
1520 formal to determine whether a given convention applies to it.
1522 2016-05-02 Doug Rupp <rupp@adacore.com>
1524 * tracebak.c: Add incantations for arm-vxworks[67] traceback.
1526 2016-05-02 Thomas Quinot <quinot@adacore.com>
1528 * freeze.adb (Check_Component_Storage_Order): Make it a warning, not an
1529 error, to have a component with implicit SSO within a composite type
1530 that has explicit SSO.
1532 2016-05-02 Bob Duff <duff@adacore.com>
1534 * s-stposu.adb (Allocate_Any_Controlled): Don't lock/unlock twice.
1536 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1538 * repinfo.adb (List_Entities): Make procedure recursive, to
1539 provide representation information for subprograms declared
1540 within subprogram bodies.
1542 2016-05-02 Arnaud Charlet <charlet@adacore.com>
1544 * exp_ch5.adb, layout.adb, gnatcmd.adb exp_attr.adb, make.adb,
1545 bindgen.adb, debug.adb, exp_pakd.adb, freeze.adb, sem_util.adb,
1546 gnatlink.adb, switch-m.adb, exp_ch4.adb, repinfo.adb, adabkend.adb,
1547 osint.adb: Remove dead code.
1549 2016-05-02 Yannick Moy <moy@adacore.com>
1551 * a-tigeli.adb (Get_Line): Fix bound for test to
1552 decide when to compensate for character 0 added by call to fgets.
1554 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1556 * sem_ch4.adb (Analyze_Allocator): If the expression does not
1557 have a subtype indication and the type is an unconstrained tagged
1558 type with defaulted discriminants, create an explicit constraint
1559 for it during analysis to prevent out-of-order freezing actions
1560 on generated classwide types.
1562 2016-05-02 Javier Miranda <miranda@adacore.com>
1564 * exp_ch5.adb (Expand_N_Assignment_Statement):
1565 In the runtime check that ensures that the tags of source an
1566 target match, add missing displacement of the pointer to the
1567 objects if they cover interface types.
1569 2016-05-02 Ed Schonberg <schonberg@adacore.com>
1571 * sem_attr.adb (Analyze_Attribute, case 'Old): Do not use
1572 base type for attribute when type is discrete: transformation
1573 is not needed for such types, and leads to spurious errors if
1574 the context is a case construct.
1576 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
1578 * gcc-interface/decl.c (elaborate_reference_1): Do not bother about
1579 operand #2 for COMPONENT_REF.
1580 * gcc-interface/utils2.c (gnat_save_expr): Likewise.
1581 (gnat_protect_expr): Likewise.
1582 (gnat_stabilize_reference_1): Likewise.
1583 (gnat_rewrite_reference): Do not bother about operand #3 for ARRAY_REF.
1584 (get_inner_constant_reference): Likewise.
1585 (gnat_invariant_expr): Likewise.
1586 * gcc-interface/trans.c (fold_constant_decl_in_expr): Likewise.
1588 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
1590 * gcc-interface/trans.c (Range_to_gnu): New static function.
1591 (Raise_Error_to_gnu) <N_In>: Call it to translate the range.
1592 (gnat_to_gnu) <N_In>: Likewise.
1594 2016-04-30 Eric Botcazou <ebotcazou@adacore.com>
1596 * gcc-interface/Make-lang.in (ACATSCMD): New variable.
1597 (check-acats): Use it.
1598 (check_acats_targets): Likewise.
1600 2016-04-28 Eric Botcazou <ebotcazou@adacore.com>
1603 * a-textio.adb (Get_Immediate): Add missing 'not' in expression.
1605 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
1607 * sem_aux.adb (Is_By_Reference_Type): Also return true for a tagged
1608 incomplete type without full view.
1609 * sem_ch6.adb (Exchange_Limited_Views): Change into a function and
1610 return the list of changes.
1611 (Restore_Limited_Views): New procedure to undo the transformation made
1612 by Exchange_Limited_Views.
1613 (Analyze_Subprogram_Body_Helper): Adjust call to Exchange_Limited_Views
1614 and call Restore_Limited_Views at the end, if need be.
1615 (Possible_Freeze): Do not delay freezing because of incomplete types.
1616 (Process_Formals): Remove kludges for class-wide types.
1617 * types.h (By_Copy_Return): Delete.
1618 * gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): Move around.
1619 (TYPE_DUMMY_IN_PROFILE_P): New macro.
1620 * gcc-interface/gigi.h (update_profiles_with): Declare.
1621 (finish_subprog_decl): Likewise.
1622 (get_minimal_subprog_decl): Delete.
1623 (create_subprog_type): Likewise.
1624 (create_param_decl): Adjust prototype.
1625 (create_subprog_decl): Likewise.
1626 * gcc-interface/decl.c (defer_limited_with): Rename into...
1627 (defer_limited_with_list): ...this.
1628 (gnat_to_gnu_entity): Adjust to above renaming.
1629 (finalize_from_limited_with): Likewise.
1630 (tree_entity_vec_map): New structure.
1631 (gt_pch_nx): New helpers.
1632 (dummy_to_subprog_map): New hash table.
1633 (gnat_to_gnu_param): Set the SLOC here. Remove MECH parameter and
1634 add FIRST parameter. Deal with the mechanism here instead of...
1635 Do not make read-only variant of types. Simplify expressions.
1636 In the by-ref case, test the mechanism before must_pass_by_ref
1637 and also TYPE_IS_BY_REFERENCE_P before building the reference type.
1638 (gnat_to_gnu_subprog_type): New static function extracted from...
1639 Do not special-case the type_annotate_only mode. Call
1640 gnat_to_gnu_profile_type instead of gnat_to_gnu_type on return type.
1641 Deal with dummy return types. Likewise for parameter types. Deal
1642 with by-reference types explicitly and add a kludge for null procedures
1643 with untagged incomplete types. Remove assertion on the types and be
1644 prepared for multiple elaboration of the declarations. Skip the whole
1645 CICO processing if the profile is incomplete. Handle the completion of
1646 a previously incomplete profile.
1647 (gnat_to_gnu_entity) <E_Variable>: Rename local variable.
1648 Adjust couple of calls to create_param_decl.
1649 <E_Access_Subprogram_Type, E_Anonymous_Access_Subprogram_Type>:
1650 Remove specific deferring code.
1651 <E_Access_Type>: Also deal with E_Subprogram_Type designated type.
1652 Simplify handling of dummy types and remove obsolete comment.
1653 Constify a couple of variables. Do not set TYPE_UNIVERSAL_ALIASING_P
1655 <E_Access_Subtype>: Tweak comment and simplify condition.
1656 <E_Subprogram_Type>: ...here. Call it and clean up handling. Remove
1657 obsolete comment and adjust call to gnat_to_gnu_param. Adjust call to
1658 create_subprog_decl.
1659 <E_Incomplete_Type>: Add a couple of 'const' qualifiers and get rid of
1660 inner break statements. Tidy up condition guarding direct use of the
1662 (get_minimal_subprog_decl): Delete.
1663 (finalize_from_limited_with): Call update_profiles_with on dummy types
1664 with TYPE_DUMMY_IN_PROFILE_P set.
1665 (is_from_limited_with_of_main): Delete.
1666 (associate_subprog_with_dummy_type): New function.
1667 (update_profile): Likewise.
1668 (update_profiles_with): Likewise.
1669 (gnat_to_gnu_profile_type): Likewise.
1670 (init_gnat_decl): Initialize dummy_to_subprog_map.
1671 (destroy_gnat_decl): Destroy dummy_to_subprog_map.
1672 * gcc-interface/misc.c (gnat_get_alias_set): Add guard for accessing
1673 TYPE_UNIVERSAL_ALIASING_P.
1674 (gnat_get_array_descr_info): Minor tweak.
1675 * gcc-interface/trans.c (gigi): Adjust calls to create_subprog_decl.
1676 (build_raise_check): Likewise.
1677 (Compilation_Unit_to_gnu): Likewise.
1678 (Identifier_to_gnu): Accept mismatches coming from a limited context.
1679 (Attribute_to_gnu): Remove kludge for dispatch table entities.
1680 (process_freeze_entity): Do not retrieve old definition if there is an
1681 address clause on the entity. Call update_profiles_with on dummy types
1682 with TYPE_DUMMY_IN_PROFILE_P set.
1683 * gcc-interface/utils.c (build_dummy_unc_pointer_types): Also set
1684 TYPE_REFERENCE_TO to the fat pointer type.
1685 (create_subprog_type): Delete.
1686 (create_param_decl): Remove READONLY parameter.
1687 (finish_subprog_decl): New function extracted from...
1688 (create_subprog_decl): ...here. Call it. Remove CONST_FLAG and
1689 VOLATILE_FLAG parameters and adjust.
1690 (update_pointer_to): Also clear TYPE_REFERENCE_TO in the unconstrained
1693 2016-04-27 Arnaud Charlet <charlet@adacore.com>
1695 * aa_util.adb, aa_util.ads: Removed, no longer used.
1697 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1699 * sem_prag.adb (Analyze_Pragma): An object
1700 renaming declaration resulting from the expansion of an object
1701 declaration is a suitable context for pragma Ghost.
1703 2016-04-27 Doug Rupp <rupp@adacore.com>
1705 * init.c: Refine last checkin so the only requirement is the
1706 signaling compilation unit is compiled with the same mode as
1707 the compilation unit containing the initial landing pad.
1709 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1711 * sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal
1712 specifications for Default_Iterator, including overloaded cases
1713 where no interpretations are legal, and return types that are
1716 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1718 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not install
1719 an accessibility check when the left hand side of the assignment
1720 denotes a container cursor.
1721 * exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed.
1722 * sem_ch4.adb (Find_Indexing_Operations): New routine.
1723 (Try_Container_Indexing): Code cleanup.
1725 2016-04-27 Arnaud Charlet <charlet@adacore.com>
1727 * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
1729 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1731 * errout.adb, errutil.adb: Minor reformatting.
1733 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1735 * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
1736 Check that the classwide version is illegal when the prefix is
1737 an operation of an untagged synchronized type.
1739 2016-04-27 Arnaud Charlet <charleT@adacore.com>
1741 * sinput-l.ads, sem_ch13.adb: Minor editing.
1743 2016-04-27 Doug Rupp <rupp@adacore.com>
1745 * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
1746 Bump the pc so the lower order bit is set.
1748 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1750 * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
1751 enabled, report an empty range in a case construct.
1753 2016-04-27 Arnaud Charlet <charlet@adacore.com>
1755 * sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
1756 a-rbtgbo.adb, a-crdlli.adb, a-chtgbo.adb: Minor editing.
1758 2016-04-27 Bob Duff <duff@adacore.com>
1760 * a-chtgop.adb (Adjust): Zero the tampering counts on assignment,
1761 as is done for the other containers.
1763 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1765 * ghost.adb (In_Subprogram_Body_Profile): New routine.
1766 (Is_OK_Declaration): Treat an unanalyzed expression
1767 function as an OK context. Treat a reference to a Ghost entity
1768 as OK when it appears within the profile of a subprogram body.
1770 2016-04-27 Bob Duff <duff@adacore.com>
1772 * errout.ads: Document the fact that informational messages
1773 don't have to be warnings.
1774 * errout.adb (Error_Msg_Internal): In statistics counts, deal
1775 correctly with informational messages that are not warnings.
1776 (Error_Msg_NEL): Remove useless 'if' aroung Set_Posted, because
1777 Set_Posted already checks for errors and ignores others.
1778 * erroutc.adb (Prescan_Message): Set Is_Serious_Error to False
1779 if Is_Info_Msg; the previous code was assuming that Is_Info_Msg
1780 implies Is_Warning_Msg.
1781 * errutil.adb (Error_Msg): In statistics counts, deal correctly
1782 with informational messages that are not warnings.
1784 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1786 * sem_util.ads, sem_util.adb (Is_Null_Record_Type): New predicate
1787 to determine whether a record type is a null record.
1788 * sem_ch3.adb (Analyze_Object_Declaration): If the type is a
1789 null record and there is no expression in the declaration,
1790 no predicate check applies to the object.
1792 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1794 * sem_ch7.adb (Analyze_Package_Body_Helper): The body of an
1795 instantiated package should not cause freezing of previous contracts.
1797 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1799 * sem_dim.adb (Analyze_Dimension): Handle subtype declarations
1800 that do not come from source.
1801 (Analyze_Dimension_Subtype_Declaration): Allow confirming
1802 dimensions on subtype entity, either inherited from base type
1803 or provided by aspect specification.
1805 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1807 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1808 Add scalar formal object Zero, to allow detection and report
1809 when the matrix is singular.
1810 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1811 Raise Constraint_Error if the Forward_Eliminate pass has
1812 determined that determinant is Zero.o
1813 * s-ngrear.adb (Solve): Add actual for Zero in corresponding
1815 * s-ngcoar.adb (Solve): Ditto.
1817 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1819 * sem_ch3.adb: Minor reformatting.
1821 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1823 * sem_dim.adb (Analyze_Dimension, case N_Identifier): Check
1824 that identifier has a usable type before analysis, to handle
1825 properly identifiers introduced after some lexical/syntactic
1826 recovery that created new identifiers.
1828 2016-04-27 Bob Duff <duff@adacore.com>
1830 * a-coinve.adb, a-comutr.adb, a-conhel.adb, a-convec.adb,
1831 exp_util.adb: Remove assertions that can fail in obscure cases when
1832 assertions are turned on but tampering checks are turned off.
1834 2016-04-27 Javier Miranda <miranda@adacore.com>
1836 * exp_ch6.adb (Add_Call_By_Copy_Code,
1837 Add_Simple_Call_By_Copy_Code, Expand_Actuals): Handle formals
1838 whose type comes from the limited view.
1840 2016-04-27 Yannick Moy <moy@adacore.com>
1842 * a-textio.adb: Complete previous patch.
1844 2016-04-27 Yannick Moy <moy@adacore.com>
1846 * inline.adb (Expand_Inlined_Call): Use Cannot_Inline instead of
1847 Error_Msg_N to issue message about impossibility to inline call,
1848 with slight change of message.
1850 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1852 * exp_spark.adb (Expand_Potential_Renaming): Removed.
1853 (Expand_SPARK): Update the call to expand a potential renaming.
1854 (Expand_SPARK_Potential_Renaming): New routine.
1855 * exp_spark.ads (Expand_SPARK_Potential_Renaming): New routine.
1856 * sem.adb Add with and use clauses for Exp_SPARK.
1857 (Analyze): Expand a non-overloaded potential renaming for SPARK.
1859 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1861 * sem_ch3.adb (Constrain_Discriminated_Type): In an instance,
1862 check full view for the presence of defaulted discriminants,
1863 even when the partial view of a private type has no visible and
1864 no unknown discriminants.
1866 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1868 * lib-xref.adb, exp_ch3.adb: Minor reformatting.
1870 2016-04-27 Nicolas Roche <roche@adacore.com>
1872 * rtinit.c: Add weak symbol __gnat_do_argv_expansion.
1874 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1876 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
1877 cleanup. Check the original node when trying to determine the node kind
1878 of pragma Volatile's argument to account for untagged derivations
1879 where the type is transformed into a constrained subtype.
1881 2016-04-27 Olivier Hainque <hainque@adacore.com>
1883 * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
1884 consistent posix interface on the caller side.
1886 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1888 * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
1889 is a limited view of a type, initialize the Limited_Dependents
1890 field to catch misuses of the type in a client unit.
1892 2016-04-27 Thomas Quinot <quinot@adacore.com>
1894 * a-strunb-shared.adb (Finalize): add missing Reference call.
1895 * s-strhas.adb: minor grammar fix and extension of comment
1896 * sem_ch8.adb: minor whitespace fixes
1898 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1900 * lib-xref.adb (Get_Type_Reference): Handle properly the case
1901 of an object declaration whose type definition is a class-wide
1902 subtype and whose expression is a function call that returns a
1905 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1907 * sem_util.ads, sem_util.adb (Output_Entity): New routine.
1908 (Output_Name): New routine.
1910 2016-04-27 Bob Duff <duff@adacore.com>
1912 * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
1914 2016-04-27 Vincent Celier <celier@adacore.com>
1916 * gnatcmd.adb: For "gnat ls -V -P", recognize switch
1917 --unchecked-shared-lib-imports and set the flag
1918 Opt.Unchecked_Shared_Lib_Imports accordingly.
1920 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1922 * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
1923 A generic subprogram is never a primitive operation, and thus
1924 a classwide condition for it is not legal.
1926 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1928 * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
1931 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1933 * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
1934 (Resolve_Actuals): Flag effectively volatile objects with enabled
1935 property Async_Writers or Effective_Reads as illegal.
1936 * sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
1938 2016-04-27 Javier Miranda <miranda@adacore.com>
1940 * exp_ch3.adb (Make_Predefined_Primitive_Specs):
1941 Do not generate the profile of the equality operator if it has
1942 been explicitly defined as abstract in the parent type. Required
1943 to avoid reporting an spurious error.
1945 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1947 * sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
1948 procedure to compute the dimension vector of a scalar expression
1949 and compare it with the dimensions if its expected subtype. Used
1950 for the ultimate components of a multidimensional aggregate,
1951 whose components typically are themselves aggregates that are
1952 expanded separately. Previous to this patch, dimensionality
1953 checking on such aggregates generated spurious errors.
1954 * sem_aggr.adb (Resolve_Array_Aggregate): Use
1955 Check_Expression_Dimensions when needed.
1957 2016-04-27 Javier Miranda <miranda@adacore.com>
1959 * einfo.ads, einfo.adb (Corresponding_Function): New attribute
1960 (applicable to E_Procedure).
1961 (Corresponding_Procedure): New attribute (applicable to E_Function).
1962 * exp_util.adb (Build_Procedure_Form): Link the function with
1963 its internally built proc and viceversa.
1964 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
1965 attribute Rewritten_For_C and Corresponding_Procedure to the body.
1966 * exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
1967 (Rewritten_For_C_Proc_Id): Removed.
1968 * exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
1969 locate the corresponding procedure.
1971 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1973 * sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
1974 corresponding pragma.
1976 2016-04-27 Bob Duff <duff@adacore.com>
1978 * exp_ch3.adb: Minor comment improvement.
1980 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1982 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
1983 return type is an untagged limited record with only access
1984 discriminants and no controlled components, the return value does not
1985 need to use the secondary stack.
1987 2016-04-27 Javier Miranda <miranda@adacore.com>
1989 * exp_util.adb (Remove_Side_Effects): When
1990 generating C code handle object declarations that have
1991 discriminants and are initialized by means of a call to a
1994 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1996 * a-textio.adb (Get_Line function): Handle properly the case of
1997 a line that has the same length as the buffer (or a multiple
1998 thereof) and there is no line terminator.
1999 * a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
2000 in the string when there is no previous line terminator and we
2001 need at most one additional character.
2003 2016-04-27 Arnaud Charlet <charlet@adacore.com>
2005 * s-rident.ads: Make No_Implicit_Loops non partition wide.
2007 2016-04-27 Arnaud Charlet <charlet@adacore.com>
2009 * sem_ch11.adb (Analyze_Handled_Statements): check useless
2010 assignments also in entries and task bodies, not only in
2011 procedures and declaration blocks.
2012 * sem_ch5.adb (Analyze_Block_Statement): check useless
2013 assignements in declaration blocks as part of processing their
2014 handled statement sequence, just like it was done for procedures
2015 and now is also done for entries and task bodies.
2016 * sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
2017 of entries and task bodies just like of procedures.
2019 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2021 * sem_util.adb (Is_Volatile_Function): Recognize
2022 a function declared within a protected type as well as the
2023 protected/unprotected version of a function.
2025 2016-04-27 Bob Duff <duff@adacore.com>
2027 * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
2028 declaration of the form "X : T := Func (...);", where T is
2029 controlled, as a renaming.
2030 * a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
2031 to be an empty string, instead of null-ing out the Reference.
2032 * exp_util.adb (Needs_Finalization): Remove redundant code.
2034 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2036 * aspects.ads Aspects Export and Import do not require delay. They
2037 were classified as delayed aspects, but treated as non-delayed
2038 by the analysis of aspects.
2039 * freeze.adb (Copy_Import_Pragma): New routine.
2040 (Wrap_Imported_Subprogram): Copy the import pragma by first
2041 resetting all semantic fields to avoid an infinite loop when
2042 performing the copy.
2043 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
2044 comment on the processing of aspects Export and Import
2045 at the freeze point.
2046 (Analyze_Aspect_Convention: New routine.
2047 (Analyze_Aspect_Export_Import): New routine.
2048 (Analyze_Aspect_External_Link_Name): New routine.
2049 (Analyze_Aspect_External_Or_Link_Name): Removed.
2050 (Analyze_Aspect_Specifications): Factor out the analysis of
2051 aspects Convention, Export, External_Name, Import, and Link_Name
2052 in their respective routines. Aspects Export and Import should
2053 not generate a Boolean pragma because their corresponding pragmas
2054 have a very different syntax.
2055 (Build_Export_Import_Pragma): New routine.
2056 (Get_Interfacing_Aspects): New routine.
2058 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
2060 * inline.adb (Add_Inlined_Body): Overhaul implementation,
2061 robustify handling of -gnatn1, add special treatment for
2062 expression functions.
2064 2016-04-27 Doug Rupp <rupp@adacore.com>
2066 * g-traceb.ads: Update comment.
2067 * exp_ch2.adb: minor style fix in object declaration
2069 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2071 * sem_elab.adb (Check_Internal_Call): Do not
2072 consider a call when it appears within pragma Initial_Condition
2073 since the pragma is part of the elaboration statements of a
2074 package body and may only call external subprograms or subprograms
2075 whose body is already available.
2076 (Within_Initial_Condition): New routine.
2078 2016-04-27 Ed Schonberg <schonberg@adacore.com>
2080 * exp_util.adb (Build_Procedure_Form): Prevent double generation
2081 of the procedure form when dealing with an expression function
2082 whose return type is an array.
2083 * sem_ch3.adb: Fix out-of order Has_Predicates setting.
2084 * exp_ch6.adb: Proper conversion for inherited operation in C.
2085 * sem_ch6.adb: Code cleanup.
2087 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2089 * lib-xref.ads, sem_ch10.adb: minor style fix in comment
2090 * g-socket.adb: Minor reformatting.
2091 * sinfo.ads: Minor comment correction.
2092 * sem_warn.ads: minor grammar fix in comment
2094 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
2096 * gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
2097 (maybe_pad_type): Adjust comment.
2098 (finish_record_type): Likewise.
2099 (rest_of_record_type_compilation): Likewise.
2100 * gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
2101 parameter from integer to boolean. Adjust recursive calls.
2102 <E_Subprogram_Type>: Use copy_type and remove redundant assignments.
2103 <E_Signed_Integer_Subtype>: Adjust comment. Remove call to
2104 rest_of_record_type_compilation. Set TYPE_PADDING_P flag earlier.
2105 Pass false to finish_record_type. Set the debug type later.
2106 <E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
2107 (gnat_to_gnu_component_type): Fix formatting.
2108 (gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
2109 (gnat_to_gnu_type): Likewise.
2110 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
2111 (Loop_Statement_to_gnu): Likewise.
2112 (Subprogram_Body_to_gnu): Likewise.
2113 (Exception_Handler_to_gnu_fe_sjlj): Likewise.
2114 (Exception_Handler_to_gnu_gcc): Likewise.
2115 (Compilation_Unit_to_gnu): Likewise.
2116 (gnat_to_gnu): Likewise.
2117 (push_exception_label_stack): Likewise.
2118 (elaborate_all_entities_for_package): Likewise.
2119 (process_freeze_entity): Likewise.
2120 (process_decls): Likewise.
2121 (process_type): Likewise.
2122 * gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
2123 (maybe_pad_type): Adjust comments. Set the debug type later. Remove
2124 call to rest_of_record_type_compilation.
2125 (rest_of_record_type_compilation): Use copy_type.
2126 (copy_type): Use correctly typed constants.
2127 (gnat_signed_or_unsigned_type_for): Use copy_type.
2128 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
2129 (build_goto_raise): Adjust call tognat_to_gnu_entity.
2131 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
2133 * gcc-interface/misc.c (gnat_init): Do not call
2134 internal_reference_types.
2136 2016-04-27 Svante Signell <svante.signell@gmail.com>
2138 * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
2139 * s-osinte-gnu.ads: Small tweaks.
2140 * s-osinte-gnu.adb: New file.
2142 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2144 * sem_prag.adb (Match_Constituent): Treat a constant as a legal
2145 constituent even if it is not to prevent spurious errors.
2147 2016-04-21 Gary Dismukes <dismukes@adacore.com>
2149 * sem_ch4.adb: Minor typo fixes and reformatting.
2151 2016-04-21 Dmitriy Anisimkov <anisimko@adacore.com>
2153 * g-calend.ads (No_Time): The same value in any timezone.
2154 * g-socket.adb (Raise_Host_Error): Remove ending
2155 dot from original error message before append colon delimited
2158 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2160 * sem_ch3.adb: Code cleanup.
2161 * sem_ch6.adb: Code cleanup.
2162 (Is_Matching_Limited_View): New routine.
2163 (Matches_Limited_With_View): Reimplemented.
2164 * sem_ch10.adb (Decorate_Type): Code cleanup.
2166 2016-04-21 Doug Rupp <rupp@adacore.com>
2168 * tracebak.c (PPC ELF): Add macro defs for lynxos178e.
2170 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2172 * sem_ch4.adb (Try_Container_Indexing): If there are overloaded
2173 indexing functions, collect all overloadings of the call firts,
2174 and then transfer them to indexing node, to prevent interleaving
2175 of the set of interpretations of the nodes involved.
2176 * sem_res.adb (Resolve): Suppress cascaded errors that report
2177 ambiguities when one of the actuals in an overloaded generatlized
2178 indexing operation is illegal and has type Any_Type, as is done
2179 for similar cascaded errors in subprogram calls.
2180 (Valid_Tagged_Conversion): Cleanup conversion checks when one
2181 of the types involved is a class-wide subtype.
2183 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2185 * sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
2186 subprogram declaration within a wrapper package, skip pragmas
2187 that may have been generated by aspect specifications on the
2190 2016-04-21 Javier Miranda <miranda@adacore.com>
2192 * exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
2193 code return True for array identifiers since the backend needs
2194 to initialize such component by means of memcpy().
2196 2016-04-21 Arnaud Charlet <charlet@adacore.com>
2198 * a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
2199 potentially uninitialized memory.
2200 * sem_ch3.adb: Minor style fix in comment.
2202 2016-04-21 Arnaud Charlet <charlet@adacore.com>
2204 * gnat_rm.texi, gnat_ugn.texi,
2205 doc/gnat_ugn/gnat_project_manager.rst,
2206 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2207 doc/gnat_ugn/gnat_and_program_execution.rst,
2208 doc/gnat_ugn/gnat_utility_programs.rst,
2209 doc/gnat_ugn/the_gnat_compilation_model.rst,
2210 doc/gnat_rm/implementation_defined_attributes.rst,
2211 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
2212 doc/gnat_rm/implementation_defined_pragmas.rst,
2213 doc/gnat_rm/the_gnat_library.rst,
2214 doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
2215 * doc/Makefile: Cleanups.
2217 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2219 * exp_pakd.adb, sem_ch13.adb: Minor reformatting.
2221 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2223 * exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
2224 disambiguate local variables that may be hidden from inner visibility
2225 by nested block declarations or loop variables.
2227 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
2229 * s-soflin.adb: Initialize the Stack_Limit global variable.
2231 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2233 * lib-writ.adb: Minor reformatting.
2235 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2237 * exp_pakd.adb (Compute_Number_Components): New function to
2238 build an expression that computes the number of a components of
2239 an array that may be multidimensional.
2240 (Expan_Packed_Eq): Use it.
2242 2016-04-21 Arnaud Charlet <charlet@adacore.com>
2244 * g-traceb.ads: Update list of supported platforms.
2246 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2248 * sem_ch13.adb (Add_Predicates): if the type is declared in
2249 an inner package it may be frozen outside of the package, and
2250 the generated pragma has not been analyzed yet, the expression
2251 for the predicate must be captured and added to the predicate
2252 function at this point.
2254 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2256 * contracts.adb (Analyze_Package_Body_Contract): Do not check
2257 for a missing package refinement because 1) packages do not have
2258 "refinement" and 2) the check for proper state refinement is
2259 performed in a different place.
2260 * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
2261 (Has_Null_Visible_Refinement): Reimplemented.
2262 * sem_ch3.adb (Analyze_Declarations): Determine whether all
2263 abstract states have received a refinement and if not, emit
2265 * sem_ch7.adb (Analyze_Package_Declaration): Code
2266 cleanup. Determine whether all abstract states of the
2267 package and any nested packages have received a refinement
2268 and if not, emit errors.
2269 (Requires_Completion_In_Body): Add new formal parameter
2270 Do_Abstract_States. Update the comment on usage. Propagate the
2271 Do_Abstract_States flag to all Unit_Requires_Body calls.
2272 (Unit_Requires_Body): Remove formal
2273 parameter Ignore_Abstract_States. Add new formal paramter
2274 Do_Abstract_States. Propagate the Do_Abstract_States flag to
2275 all Requires_Completion_In calls.
2276 * sem_ch7.ads (Unit_Requires_Body): Remove formal
2277 parameter Ignore_Abstract_States. Add new formal paramter
2278 Do_Abstract_States. Update the comment on usage.
2279 * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
2280 not initialize the constituent list as this is now done on a
2281 need-to-add-element basis.
2282 (Analyze_Single_Task_Declaration):
2283 Do not initialize the constituent list as this is now done on
2284 a need-to-add-element basis.
2285 * sem_ch10.adb (Decorate_State): Do not initialize the constituent
2286 lists as this is now done on a need-to-add-element basis.
2287 * sem_prag.adb (Analyze_Constituent): Set the
2288 refinement constituents when adding a new element.
2289 (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
2290 adding a new element.
2291 (Analyze_Part_Of_Option): Set the Part_Of
2292 constituents when adding a new element.
2293 (Analyze_Pragma): Set the Part_Of constituents when adding a new
2295 (Check_Constituent_Usage (all versions)): Reimplemented.
2296 (Collect_Constituent): Set the refinement constituents when adding
2298 (Create_Abstract_State): Do not initialize the
2299 constituent lists as this is now done on a need-to-add-element basis.
2300 (Propagate_Part_Of): Set the Part_Of constituents when
2301 adding a new element.
2302 * sem_util.adb (Check_State_Refinements): New routine.
2303 (Has_Non_Null_Refinement): Reimplemented.
2304 (Has_Null_Refinement): Reimplemented.
2305 (Requires_State_Refinement): Removed.
2306 * sem_util.ads (Check_State_Refinements): New routine.
2307 (Requires_State_Refinement): Removed.
2309 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2311 * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
2312 * sem.adb: Fix comment.
2314 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2316 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
2317 declaration with no aspects, whose subtype_mark is a subtype
2318 with predicates, inherits the list of subprograms for the type.
2320 2016-04-21 Arnaud Charlet <charlet@adacore.com>
2322 * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
2325 2016-04-21 Thomas Quinot <quinot@adacore.com>
2327 * g-socket.adb (Raise_Host_Error): Include additional Name parameter.
2329 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2331 * lib-writ.adb (Write_ALI): Do not record in ali file units
2332 that are present in the files table but not analyzed. These
2333 units are present because they appear in the context of units
2334 named in limited_with clauses, and the unit being compiled does
2335 not depend semantically on them.
2337 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2339 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
2340 create the procedure body for an function returning an array type,
2341 when generating C code. Reuse the subprogram body rather than
2342 creating a new one, both as an efficiency measure and because
2343 in an instance the body may contain global references that must
2346 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2348 * sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
2351 2016-04-21 Javier Miranda <miranda@adacore.com>
2353 * exp_aggr.adb (Component_Check): Extend
2354 the check that verifies that the aggregate has no function
2355 calls to handle transformations performed by the frontend.
2356 (Ultimate_Original_Expression): New subprogram.
2358 2016-04-21 Philippe Gil <gil@adacore.com>
2360 * krunch.adb (Krunch): Fix krunching of i-java.
2362 2016-04-21 Arnaud Charlet <charlet@adacore.com>
2364 * exp_ch8.adb (Evaluation_Required): Always return
2365 True when Modify_Tree_For_C.
2367 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
2369 * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
2370 * alloc.ads: Minor comment fixes.
2371 * einfo.ads: Fix typo.
2373 2016-04-21 Arnaud Charlet <charlet@adacore.com>
2375 * exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
2376 changes to handle all cases of components depending on the
2377 discriminant, not just string literals.
2379 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2381 * sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
2382 declaration is the generated declaration for a generic actual,
2383 inherit predicates from the actual if it is a predicated subtype.
2385 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2387 * exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
2388 inherited and its result is controlling, introduce a conversion
2389 on the actual for the corresponding procedure call, to avoid
2390 spurious type errors.
2392 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
2394 * krunch.adb (Krunch): Fix krunching of i-vxworks.
2396 2016-04-21 Gary Dismukes <dismukes@adacore.com>
2398 * exp_aggr.adb: Minor reformatting and code cleanup.
2400 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2402 * sem_ch13.adb (Resolve_Name): Omit quantified expressions from
2403 resolution, because they introduce local names. Full resolution
2404 will take place when predicate function is constructed.
2406 2016-04-21 Arnaud Charlet <charlet@adacore.com>
2408 * exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
2409 change to take into account Per_Object_Constraint field rather
2410 than special casing strings.
2411 * exp_ch6.adb: Fix typo in Replace_Returns.
2413 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2415 * sem_ch5.adb: Minor reformatting.
2417 2016-04-21 Arnaud Charlet <charlet@adacore.com>
2419 * exp_aggr.adb (Backend_Processing_Possible): Return False
2420 when generating C and aggregate contains function calls.
2422 2016-04-21 Tristan Gingold <gingold@adacore.com>
2424 * krunch.adb (Krunch): Only partially krunch children of
2425 Interfaces that aren't known.
2427 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2429 * sem_prag.adb (Make_Inline): Handle properly the instantiation
2430 of a generic subpprogram that carries an Inline aspect. Place
2431 inline info on the anonymous subprogram that is constructed in
2432 the wrapper package.
2433 (Analyze_Pragma, case Pure): Do not check placement if pragma
2434 appears within an instantiation, which can be nested at any level.
2435 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
2436 node from anonymous subprogram to its visible renaming. The
2437 freeze node will be constructed if the subprogram carries
2439 (Set_Global): Preserve dimension information if present (from
2442 2016-04-21 Vasiliy Fofanov <fofanov@adacore.com>
2444 * gnatlink.adb: Change wording of the warning message on
2445 problematic filenames to be more neutral. Add a new substring
2446 "patch" introduced on Windows 10.
2448 2016-04-21 Philippe Gil <gil@adacore.com>
2450 * tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
2452 2016-04-21 Javier Miranda <miranda@adacore.com>
2454 * exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
2457 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2459 * einfo.adb (Has_Non_Null_Abstract_State): New routine.
2460 * einfo.ads New synthesized attribute
2461 Has_Non_Null_Abstract_State along with occurrences in entities.
2462 (Has_Non_Null_Abstract_State): New routine.
2463 * sem_ch7.adb (Unit_Requires_Body): Add local variable
2464 Requires_Body. A package declaring an abstract state requires
2465 a body only when the state is non-null and the package contains
2466 at least one other construct that requires completion in a body.
2467 * sem_util.adb (Mode_Is_Off): Removed.
2468 (Requires_State_Refinement): Remove an obsolete check. Code
2471 2016-04-21 Bob Duff <duff@adacore.com>
2473 * sem_attr.adb (Analyze_Attribute): In processing
2474 the 'Old attribute, a warning is given for infinite recursion. Fix
2475 the code to not crash when the prefix of 'Old denotes a protected
2477 * sem_ch5.adb (Analyze_Iterator_Specification):
2478 Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
2479 where the parameter would not be an object.
2481 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
2483 * sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
2484 Etype or Underlying_Type of the operands.
2486 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
2488 * atree.adb (Print_Statistics): Protect against overflows and
2489 print the memory consumption in bytes.
2490 * table.adb (Reallocate): Do the intermediate calculation of the new
2491 size using the Memory.size_t type.
2493 2016-04-21 Gary Dismukes <dismukes@adacore.com>
2495 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
2496 expansion of Attribute_Machine and Attribute_Model for AAMP.
2498 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2500 * freeze.adb: Disable previous change for now.
2502 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2504 * sem_ch8.adb (Find_Selected_Component): If prefix has an
2505 access type and designated type is a limited view, introduce
2506 an explicit dereference before continuing the analysis, and
2507 set its type to the non-limited view of the designated type,
2508 if we are in context where it is available.
2510 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2512 * freeze.adb: Freeze profile in ASIS mode.
2514 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2516 * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
2517 * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
2519 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2521 * exp_ch6.adb: Minor reformatting.
2523 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2525 * sem_ch13.adb: Minor comment update.
2527 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2529 * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
2530 boolean parameter to determine whether freezing an overloadable
2531 entity freezes its profile as well. This is required by
2532 AI05-019. The call to Freeze_Profile within Freeze_Entity is
2533 conditioned by the value of this flag, whose default is True.
2534 * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
2535 reference freezes the prefix, but it the prefix is a subprogram
2536 it does not freeze its profile.
2538 2016-04-21 Javier Miranda <miranda@adacore.com>
2540 * exp_util.adb (Build_Procedure_Form): No action needed for
2541 subprogram renamings since the backend can generate the call
2542 using the renamed subprogram. This leaves the tree more clean
2544 * exp_ch6.adb (Expand_Call): Extend previous patch for
2545 rewritten-for-c entities to handle subprogram renamings.
2546 (Rewrite_Function_Call_For_C): Handle subprogram renamings.
2548 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2550 * sem_ch13.adb: Code cleanup.
2552 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2554 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
2555 created for SPARK_To_C, the entity must remain invisible so it
2556 does not overload subsequent references to the original function.
2557 * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
2558 Handle Extended_Return_Statements by replacing it with a block
2559 with assignments and a simple return statement.
2560 * exp_util.adb (Build_Procedure_Form): Make procedure entity
2561 invisible after analyzing declaration, to prevent improper
2564 2016-04-21 Javier Miranda <miranda@adacore.com>
2566 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
2567 attribute Rewritten_For_C to the body since since the expander
2568 may generate calls using that entity.
2569 * exp_ch6.adb (Expand_Call): For internally generated
2570 calls ensure that they reference the entity of the spec
2571 of the called function.
2572 (Rewritten_For_C_Func_Id): New subprogram.
2573 (Rewritten_For_C_Proc_Id): New subprogram.
2574 (Rewrite_Function_Call_For_C): Invoke the new subprogram to
2575 ensure that we skip freezing entities.
2576 * exp_util.adb (Build_Procedure_Form): No action needed if the
2577 procedure was already built.
2579 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
2581 * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
2584 2016-04-21 Ed Schonberg <schonberg@adacore.com>
2586 * sem_util.adb (Denotes_Iterator): Use root type to determine
2587 whether the ultimate ancestor is the predefined iterator
2589 * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
2590 and avoid reuse of Pack local variable.
2592 2016-04-21 Olivier Hainque <hainque@adacore.com>
2594 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2595 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2596 system-vxworks-mips.ads, system-vxworks-x86.ads: Define
2597 Executable_Extension to ".out".
2599 2016-04-21 Javier Miranda <miranda@adacore.com>
2601 * frontend.adb: Update call to Unnest_Subprograms.
2602 * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
2603 (Unnest_Subprograms): Moved to package exp_unst.
2604 * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
2606 * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
2607 enumeration literals when generating C code.
2609 2016-04-21 Javier Miranda <miranda@adacore.com>
2611 * frontend.adb: Remove call to initialize Exp_Ch6.
2612 * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
2613 (Unest_Entry/Unest_Bodies): Removed.
2614 (Unnest_Subprograms): Code cleanup.
2616 2016-04-21 Arnaud Charlet <charlet@adacore.com>
2618 * set_targ.adb (Read_Target_Dependent_Values):
2619 close target description file once its contents is read.
2620 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
2621 and Stderr_File): Close local file descriptors before spawning
2623 * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
2624 local variables to make the code easier to understand and avoid
2625 duplicated calls to Parent and Generic_Parent.
2627 2016-04-20 Bob Duff <duff@adacore.com>
2629 * s-os_lib.ads: Minor comment fix.
2631 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2633 * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
2634 a discriminant check for a type whose partial view has unknown
2635 discriminants when the full view has discriminants with defaults.
2637 2016-04-20 Javier Miranda <miranda@adacore.com>
2639 * exp_util.adb (Remove_Side_Effects): When generating C code
2640 remove side effect of type conversion of access to unconstrained
2642 (Side_Effect_Free): Return false for the type
2643 conversion of access to unconstrained array type when generating
2645 * sem_res.adb (Resolved_Type_Conversion): Remove side effects
2646 of access to unconstrained array type conversion when generating
2649 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2651 * sem_ch13.adb (Build_Predicate_Function_Declaration): New
2652 function, to construct the declaration of a predicate function
2653 at the end of the current declarative part rather than at the
2654 (possibly later) freeze point of the type. This also allows uses
2655 of a type with predicates in instantiations elsewhere.
2656 (Resolve_Aspect_Expression): New procedure to detect visiblity
2657 errors in aspect expressions, at the end of the declarative part
2658 that includes the type declaration.
2659 * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
2660 predicate function from private to full view.
2661 * einfo.adb (Predicate_Function): Refine search for predicate
2662 function when type has a full view and predicate function may
2663 be defined on either view.
2665 2016-04-20 Javier Miranda <miranda@adacore.com>
2667 * frontend.adb: Passing the root of the tree to
2668 Unnest_Subprograms().
2669 * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
2670 took care of adding subprograms to the Unest_Bodies table since
2671 performing such action too early disables the ability to process
2672 generic instantiations.
2673 (Unnest_Subprograms): Adding parameter.
2674 (Search_Unnesting_Subprograms): New subprogram.
2675 * exp_ch6.ads (Unnest_Subrograms): Update documentation.
2677 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2679 * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
2681 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2683 * exp_unst.adb (Check_Static_Type): For a private type, check
2686 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2688 * sem_attr.adb (Check_Type): Reject an attribute reference in
2689 an aspect expression, when the prefix of the reference is the
2690 current instance of the type to which the aspect applies.
2692 2016-04-20 Bob Duff <duff@adacore.com>
2694 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
2695 hiding unless we're actually hiding something. The previous
2696 code would (for example) warn about a "<" on a record type
2697 because it incorrectly thought it was hiding the "<" on Boolean
2698 in Standard. We need to check that the homonym S is in fact a
2699 homograph of a predefined operator.
2701 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2703 * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
2704 from exp_ch6.adb, for use in SPARK_To_C mode when creating the
2705 procedure equivalent to a function returning an array, when this
2706 construction is deferred to the freeze point of the function.
2707 * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
2708 function that renames an instance of Unchecked_Conversion.
2709 * freeze.adb (Freeze_Subprogram): Generate the proper procedure
2710 declaration for a function returning an array.
2711 * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
2713 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2715 * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
2716 New predicate to determine that in a context with full run-time,
2717 a function call is an expansion of a reference to attribute
2719 * sem_ch5.adb (Analyze_Function_Call): use it.
2720 * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
2722 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2724 * einfo.adb Flag286 is now used as Is_Exception_Handler.
2725 (Is_Exception_Handler): New routine.
2726 (Set_Is_Exception_Handler): New routine.
2727 (Write_Entity_Flags): Output the status of Is_Exception_Handler.
2728 * einfo.ads New attribute Is_Exception_Handler along with
2729 occurrences in entities.
2730 (Is_Exception_Handler): New routine along with pragma Inline.
2731 (Set_Is_Exception_Handler): New routine along with pragma Inline.
2732 * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
2733 for exception handlers with a choice parameter.
2734 * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
2735 generated for a choice parameter as an exception handler.
2737 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2739 * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
2740 (Constrain_Discriminated_Type): In an instance, if the type has
2741 unknown discriminants, use its full view.
2742 (Process_Subtype): Check that the base type is private before
2743 adding subtype to Private_Dependents list.
2745 2016-04-20 Bob Duff <duff@adacore.com>
2747 * sem_ch13.adb: Minor comment fix.
2749 2016-04-20 Yannick Moy <moy@adacore.com>
2751 * sem_ch4.adb: Fix typos in comments.
2752 * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
2754 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2756 * sem_ch4.adb (Analyze_Selected_Component): A reference to the
2757 current instance of a task type is legal if the prefix is an
2758 expression of that task type and the selector is an entry or
2761 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2763 * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
2764 varsize field at the end for efficiency.
2766 2016-04-20 Vincent Celier <celier@adacore.com>
2768 * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
2769 ls" includes the switch -V.
2770 * clean.adb: "<target>-gnatclean -P" now calls "gprclean
2772 * make.adb: "<target>-gnatmake -P" now calls "gprbuild
2775 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2777 * sem_ch12.adb (Qualify_Type): Do not perform
2778 partial qualification when the immediate scope is a generic unit.
2780 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2782 * exp_unst.adb: Minor reformatting.
2784 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2786 * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
2787 tag assignment and adjustment preceed the accessibility check.
2788 * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
2790 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2792 * exp_prag.adb (Expand_Attributes): Ensure that
2793 the temporary used to capture the value of attribute 'Old's
2794 prefix is properly initialized.
2796 2016-04-20 Javier Miranda <miranda@adacore.com>
2798 * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
2801 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2803 * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
2806 2016-04-20 Vincent Celier <celier@adacore.com>
2808 * make.adb: Code cleanup.
2810 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2812 * exp_ch4.adb (Expand_Allocator_Expression): Help C code
2815 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2817 * sem_ch12.adb (Copy_Generic_Node): Handle the special
2818 qualification installed for universal literals that act as
2819 operands in binary or unary operators. (Qualify_Operand): Mark
2820 the qualification to signal the instantiation mechanism how to
2821 handle global reference propagation.
2822 * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
2823 (Set_Is_Qualified_Universal_Literal): New routine.
2824 * sinfo.ads New attribute Is_Qualified_Universal_Literal along
2825 with occurrences in nodes.
2826 (Is_Qualified_Universal_Literal):
2827 New routine along with pragma Inline.
2828 (Set_Is_Qualified_Universal_Literal): New routine along with
2831 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2833 * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
2834 so that the corresponding checks are preserved across compilations
2835 that include System.Constants in their context.
2837 2016-04-20 Gary Dismukes <dismukes@adacore.com>
2839 * sem_type.adb: Minor typo fix and reformatting.
2840 * a-conhel.ads: Update comment.
2842 2016-04-20 Bob Duff <duff@adacore.com>
2844 * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
2845 code so it doesn't trigger an "uninit var" warning.
2847 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2849 * sem_attr.ads Add new table Universal_Type_Attribute.
2850 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
2851 checking attributes.
2853 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2855 * exp_aggr.adb (Init_Stored_Discriminants,
2856 Init_Visible_Discriminants): New procedures, subsidiary of
2857 Build_Record_Aggr_Code, to handle properly the construction
2858 of aggregates for a derived type that constrains some parent
2859 discriminants and renames others.
2861 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2863 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
2864 (Save_References_In_Operator): Add explicit qualifications in
2865 the generic template for all operands of universal type.
2866 * sem_type.adb (Disambiguate): Update the call to Matches.
2867 (Matches): Reimplemented.
2868 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
2870 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2872 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
2873 an illegal aspect that freezes the entity to which it applies.
2875 2016-04-20 Bob Duff <duff@adacore.com>
2877 * a-stwibo.ads, a-stzbou.ads
2878 ("="): Add overriding keyword before function to avoid crash when
2879 compiler is called with -gnatyO (check overriding indicators).
2881 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2883 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
2884 is a configuration pragma and it uses the ARG syntax, insert
2885 the rewritten pragma after the current one rather than using
2888 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2890 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
2893 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2895 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
2896 s-imglli.adb: Minor reformatting.
2898 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2900 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
2901 renamed operator when the associated node appears within a
2903 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
2905 2016-04-20 Yannick Moy <moy@adacore.com>
2907 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
2908 * einfo.adb (Set_Overridden_Operation): Add assertion.
2909 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
2912 2016-04-20 Javier Miranda <miranda@adacore.com>
2914 * exp_unst.adb (Append_Unique_Call): New subprogram.
2915 (Unnest_Subprogram): Replace the unique occurrence
2916 of Call.Append() by Append_Unique_Call() which protects us from
2917 adding to the Calls table duplicated entries.
2919 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2921 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
2922 * xref_lib.ads (Dependencies_Tables): instantiate
2923 Table package with types that guarantee its safe use.
2924 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
2927 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2929 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
2930 Disable expansion when generating C code.
2931 * sinfo.ads, inline.ads: Minor editing.
2933 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2935 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
2938 2016-04-20 Javier Miranda <miranda@adacore.com>
2940 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
2941 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
2942 declaration of the internally built _postcondition procedure.
2944 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2946 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
2948 * sem_util.adb (Is_Unchecked_Conversion_Instance):
2949 defense against library-level renamings of other functions,
2950 which are never instances of Unchecked_Conversion.
2951 * einfo.ads: minor fix of casing in comment
2953 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2955 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
2956 that has been analyzed and expanded already. Qualify the names
2957 in the proper body for use in the generation of C code.
2959 2016-04-20 Javier Miranda <miranda@adacore.com>
2961 * contracts.adb (Build_Postconditions_Procedure): Force its
2962 inlining when generating C code.
2963 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
2964 _postconditions when generating C code.
2965 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
2966 _postconditions when generating C code.
2967 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
2968 types of return value and argument changed from Node_Id to
2971 2016-04-20 Vincent Celier <celier@adacore.com>
2973 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
2975 2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
2977 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
2978 the Has_Delayed_Freeze flag on the anonymous instance node.
2980 2016-04-20 Javier Miranda <miranda@adacore.com>
2982 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
2983 scope associated with the renaming object declaration.
2984 * exp_util.adb (Insert_Actions): Remove handling of iterator
2985 loop marked as requiring the secondary stack.
2987 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2989 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
2990 AI12-0124, which extends the functionality of the attribute so it
2991 reflects the semantics of GNAT 'Img when applied to scalar types.
2992 * lib-xref.adb: minor whitespace layout fix.
2994 2016-04-20 Vincent Celier <celier@adacore.com>
2996 * clean.adb (Gnatclean): Fail if project file specified and
2997 gprclean is not available.
2998 * gnatname.adb: Fail is -P is used and gprname is not available.
2999 * make.adb (Initialize): Fail if project file specified and
3000 gprbuild is not available.
3002 2016-04-20 Bob Duff <duff@adacore.com>
3004 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
3005 stack when possible.
3007 2016-04-20 Gary Dismukes <dismukes@adacore.com>
3009 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
3012 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3014 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
3015 If the pragma comes from an aspect specification, verify that
3016 the aspect applies to an entity with a declarative part.
3017 * exp_ch5.adb: Code cleanup.
3019 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3021 * sem_res.adb (Resolve_If_Expression): If first expression is
3022 universal, resolve subsequent ones with the corresponding class
3023 type (Any_Integer or Any_Real).
3025 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3027 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
3028 disabled, complete the analysis of the iterator name to ensure
3029 that reference for entities within are properly generated.
3031 2016-04-20 Arnaud Charlet <charlet@adacore.com>
3033 * a-dispat.ads (Yield): add Global contract.
3034 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
3035 * a-taside.adb: Added Initializes => Tasking_State.
3037 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3039 * sem_ch13.adb (Build_Invariant_Procedure):
3040 Reimplement the invariant procedure spec and body insertion.
3042 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
3044 * sem_ch13.adb (Add_Invariant): Do not replace
3045 the saved expression of an invariatn aspect when inheriting
3046 a class-wide type invariant as this clobbers the existing
3047 expression. Do not use New_Copy_List as it is unnecessary
3048 and leaves the parent pointers referencing the wrong part of
3049 the tree. Do not replace the type references for ASIS when
3050 inheriting a class-wide type invariant as this clobbers the
3051 existing replacement.
3053 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3055 * sem_util.adb (Build_Explicit_Dereference): If the designated
3056 expression is an entity name, generate reference to the entity
3057 because it will not be resolved again.
3059 2016-04-19 Arnaud Charlet <charlet@adacore.com>
3061 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3062 gnat_rm.texi: Update documentation.
3064 2016-04-19 Olivier Hainque <hainque@adacore.com>
3066 * par_sco.adb (Traverse_One, case N_Case_Statement):
3067 Skip pragmas before the first alternative.
3068 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
3070 2016-04-19 Tristan Gingold <gingold@adacore.com>
3072 * adaint.c (__gnat_lwp_self): New function (for darwin).
3073 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
3076 2016-04-19 Olivier Hainque <hainque@adacore.com>
3078 * sem_util.adb (Build_Elaboration_Entity): Always request an
3079 elab counter when preserving control-flow.
3081 2016-04-19 Olivier Hainque <hainque@adacore.com>
3083 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
3084 Needs_Debug_Info when producing SCOs.
3085 * par_sco.adb (Traverse_Aspects): Fix categorization of
3086 Type_Invariant to match actual processing as activated depending
3087 on pragma Assertion_Policy.
3088 * sem_prag.adb (Analyze_Pragma): Remove special case for
3089 Name_Invariant regarding SCO generation, which completely disabled
3090 the production of SCOs for Invariant pragmas and aspects.
3092 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
3094 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
3097 2016-04-19 Ed Schonberg <schonberg@adacore.com>
3099 * freeze.adb (Freeze_Profile): Refine predicate that checks
3100 whether a function that returns a limited view is declared in
3101 another unit and cannot be frozen at this point.
3103 2016-04-19 Ed Schonberg <schonberg@adacore.com>
3105 * exp_aggr.adb (Component_Count): Handle properly superflat
3106 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
3107 return value of the function is Natural, rather than leaving
3108 the handling of such arrays to the caller of this function.
3110 2016-04-19 Arnaud Charlet <charlet@adacore.com>
3112 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
3113 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
3114 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
3115 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
3116 to publicly visible routine in Sem_Util.
3118 2016-04-19 Ed Schonberg <schonberg@adacore.com>
3120 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
3121 the check if the type of the actual is By_Reference.
3123 2016-04-19 Arnaud Charlet <charlet@adacore.com>
3125 * sem_res.adb (Within_Subprogram_Call): Detect
3126 also nodes that appear in entry calls.
3127 (Resolve_Actuals, Insert_Default): Propagate
3128 dimension information if any, from default expression to the
3129 copy that appears in the list of actuals.
3130 * uintp.ads: minor whitespace fix in comment.
3131 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
3133 * set_targ.adb (Set_Targ): convert directly from
3134 Natural to Pos, without intermediate conversion to Int.
3136 2016-04-19 Arnaud Charlet <charlet@adacore.com>
3138 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
3139 SPARK RM in comment.
3140 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
3142 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
3143 to SPARK RM in both comment and error message.
3145 2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
3147 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
3148 CW type, then the subprogram must have a delayed freeze. This
3149 ensures that the backend can properly recover the full view when
3150 elaborating the access subprogram declaration.
3152 2016-04-19 Ed Schonberg <schonberg@adacore.com>
3154 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
3155 overloadable entity if originally overloaded.
3157 2016-04-19 Arnaud Charlet <charlet@adacore.com>
3159 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
3160 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
3161 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
3162 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
3165 2016-04-19 Arnaud Charlet <charlet@adacore.com>
3167 * sem_util.adb (Copy_Node_With_Replacement):
3168 use Set_Comes_From_Source instead of directly manipulating
3169 internals of the node table.
3170 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
3171 * sem_aux.adb (Get_Rep_Pragma,
3172 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
3173 do not change as constants and initialize them in the declaration.
3174 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
3175 variables that do not change as constants and initialize them
3178 2016-04-19 Ed Schonberg <schonberg@adacore.com>
3180 * sem_res.adb (Resolve_Entry_Call): If the entry has
3181 preconditions it is rewritten by means of a wrapper that
3182 incorporates the original call. Before rewriting generate a
3183 reference to the entry being called to prevent spurious warnings
3184 and provide correct cross-reference information.
3186 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
3188 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
3189 local constant Scop. Ignore any internally generated loops when
3190 performing the check concerning an abstract subprogram call
3191 without a controlling argument.
3192 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
3194 2016-04-19 Bob Duff <duff@adacore.com>
3196 * sem_elab.adb (Check_A_Call): There are cases where we have No
3197 (Ent) after the Alias loop, even when there was no previous error,
3198 so we can't assert that there was an error.
3200 2016-04-19 Ed Schonberg <schonberg@adacore.com>
3202 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
3203 Reject use of type name as a prefix to 'access within an aggregate
3204 in a context that is not the declarative region of a type.
3206 2016-04-19 Vincent Celier <celier@adacore.com>
3208 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
3209 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
3210 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
3211 Remove anything related to project files
3212 * g-mbdira.adb: minor whitespace cleanup
3213 * g-spipat.adb: minor removal of extra spaces after closing paren
3215 2016-04-19 Ed Schonberg <schonberg@adacore.com>
3217 * exp_ch6.adb (Expand_Actuals): If post-statements are present
3218 and the enclosing context is a function call or indexing, build
3219 an Expression_With_Actions for the call.
3221 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
3223 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
3224 a with line for an ignored Ghost unit.
3225 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
3226 Par. A child package is Ghost when its parent is Ghost.
3227 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
3228 a subprogram declaration that acts as a compilation unit.
3230 2016-04-18 Michael Matz <matz@suse.de>
3232 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
3233 (gnat_to_gnu_field): Ditto.
3234 (components_to_record): Ditto.
3235 (create_variant_part_from): Ditto.
3236 (copy_and_substitute_in_size): Ditto.
3237 (substitute_in_type): Ditto.
3238 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
3239 (make_packable_type): Ditto.
3240 (maybe_pad_type): Ditto.
3241 (finish_fat_pointer_type): Ditto.
3242 (finish_record_type): Ditto and use SET_DECL_ALIGN.
3243 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
3244 (create_field_decl): Use SET_DECL_ALIGN.
3246 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3248 * einfo.adb (Overridden_Operation): assert that
3249 function is called for valid arguments.
3250 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
3251 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
3252 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
3253 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
3254 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
3255 No space after closing parenthesis except where required for
3257 * sem_res.adb: Minor reformatting.
3259 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3261 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
3262 statement when relevant.
3264 2016-04-18 Bob Duff <duff@adacore.com>
3266 * a-cuprqu.adb (Enqueue): Properly handle the
3267 case where the new element has a unique priority.
3269 2016-04-18 Tristan Gingold <gingold@adacore.com>
3271 * adaint.h: Define stat structures and functions for iOS
3274 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3276 * sem_res.adb (Resolve_Entry_Call): reset
3277 Is_Overloaded flag after resolving calls to overloaded protected
3279 * exp_spark.adb (Expand_SPARK): call
3280 Qualify_Entity_Names for tasking nodes, i.e. protected types,
3281 task types and entries.
3282 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
3283 in case of an unconstrained type.
3285 2016-04-18 Yannick Moy <moy@adacore.com>
3287 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
3288 comment to document usage of subprogram in GNATprove.
3290 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3292 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
3293 message for wrong placement of aspect Test_Case.
3295 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3297 * einfo.ads: Update the documentation of attribute Renamed_Object.
3298 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
3300 2016-04-18 Gary Dismukes <dismukes@adacore.com>
3302 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
3303 in the case of AAMP (same as for use of the -gnatd.P switch) to
3304 suppress this optimization, which avoids creating a dependence
3305 on the 64-bit arithmetic package.
3307 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3309 * exp_ch4.adb: Update comment.
3311 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3313 * exp_ch6.adb (Expand_Call): Make sure instantiations are
3314 registered only once as pending here.
3316 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3318 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
3319 (Minimize_Expression_With_Actions): New flag.
3320 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
3322 (Resolve_Short_Circuit): Redo previous change
3323 using Minimize_Expression_With_Actions.
3324 (Expand_N_If_Expression,
3325 Expand_Short_Circuit_Operator): Restore old code to avoid
3326 Expression_With_Actions when Minimize_Expression_With_Actions
3329 2016-04-18 Vincent Celier <celier@adacore.com>
3331 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
3332 Stderr_File): Close local file descriptors when no longer needed.
3334 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3336 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
3337 mode check that the type of the cursor in an iteration over
3338 a formal container is not volatile. The proper check on the
3339 element type is done elsewhere.
3341 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3343 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
3344 a subprogram that returns a class-wide type, if the subprogram
3345 is a compilation unit, because otherwise gigi will treat the
3346 subprogram as external, leading to link errors.
3348 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3350 * sem_res.adb (Resolve_Short_Circuit): Do not use
3351 expression-with-actions when generating C.
3353 2016-04-18 Yannick Moy <moy@adacore.com>
3355 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
3356 raise node in GNATprove mode.
3358 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3360 * s-fileio.adb: Minor reformatting.
3361 * sem_prag.adb (Analyze_Input_Item): Add local
3362 variable Input_OK. Do not consider mappings of generic formal
3363 parameters to actuals.
3365 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3367 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
3368 type, the cursor is declared in the scope of the parent type.
3369 (Analyze_Parameter_Specification): A qualified expression with an
3370 iterator type indicates an iteration over a container (explicit
3373 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3375 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
3376 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
3377 * debug.adb: Reserve -gnatd.4 to force generation of C files.
3379 2016-04-18 Yannick Moy <moy@adacore.com>
3381 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
3382 division by zero, instead possibly issue a warning.
3383 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
3384 static division by zero, instead add check flag on original
3386 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
3387 Only issue error when both SPARK_Mode is On and Warn is False.
3389 2016-04-18 Yannick Moy <moy@adacore.com>
3391 * checks.adb (Apply_Scalar_Range_Check): Force
3392 warning instead of error when SPARK_Mode is On, on index out of
3393 bounds, and set check flag for GNATprove.
3395 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3397 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
3398 Update the comment on usage. Reimplemented.
3399 (Check_Input_States.Check_Constituent_Usage): Update the comment
3400 on usage. A Proof_In constituent can now refine an Input state
3401 as long as there is at least one Input constituent present.
3403 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3405 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
3406 body id as the sloc of the entity in the generated subprogram
3407 declaration, to avoid spurious conformance errors when style
3410 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3412 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
3413 Refine check on illegal calls to entities within a task body,
3414 when the entity is declared in an object of the same type. In
3415 a generic context there might be no explicit dereference but if
3416 the prefix includes an access type the construct is legal.
3418 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3420 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
3421 RE_Default_Priority.
3423 2016-04-18 Bob Duff <duff@adacore.com>
3425 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
3426 if the pragma came from an aspect specification.
3428 2016-04-18 Gary Dismukes <dismukes@adacore.com>
3430 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
3432 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3434 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
3435 superfluous conformance check on an inlined body with a previous
3436 spec, use the fact that the generated declaration does not come
3437 from source. We must treat the entity as coming from source to
3438 enable some back-end inlining when pragma appears after the body.
3440 2016-04-18 Gary Dismukes <dismukes@adacore.com>
3442 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
3443 exp_intr.adb: Minor reformatting and typo corrections.
3445 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3447 * sem_ch6.adb: Code cleanup.
3449 2016-04-18 Thomas Quinot <quinot@adacore.com>
3451 * sem_ch13.adb: Minor reformatting and error message tweaking
3452 (remove extraneous spaces).
3454 2016-04-18 Johannes Kanig <kanig@adacore.com>
3456 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
3458 2016-04-18 Bob Duff <duff@adacore.com>
3460 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
3461 exists, and it's a fifo, we use "w" as the open string instead of
3462 "r+". This is necessary to make a write to the fifo block until
3465 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3467 * sem_attr.adb (Denote_Same_Function): Account
3468 for a special case where a primitive of a tagged type inherits
3469 a class-wide postcondition from a parent type.
3471 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3473 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
3474 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
3475 of reserved words is OK.
3476 (Scan_Pragma_Argument_Association):
3477 Add new formal Reserved_Words_OK and update the comment on
3478 usage. Code cleanup. Parse an expression or a reserved word in
3479 identifier form for pragmas Restriction_Warnings and Restrictions
3480 No_Use_Of_Attribute.
3481 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
3482 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
3483 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
3485 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
3486 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
3487 Update the parameter profile.
3488 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
3490 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
3491 the comment on usage.
3492 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
3493 * sem_attr.adb (Analyze_Attribute): Check restriction
3494 No_Use_Of_Attribute.
3495 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
3496 restriction No_Use_Of_Attribute before any rewritings have
3498 * sem_prag.adb (Analyze_Pragma): Check restriction
3499 No_Use_Of_Pragma before any rewritings have taken place.
3501 2016-04-18 Bob Duff <duff@adacore.com>
3503 * sem_ch6.adb (Is_Inline_Pragma): The pragma
3504 argument can be a selected component, which has no Chars field,
3505 so we need to deal with that case (use the Selector_Name).
3506 (Check_Inline_Pragma): We need to test Is_List_Member before
3507 calling In_Same_List, because in case of a library unit, they're
3508 not in lists, so In_Same_List fails an assertion.
3510 2016-04-18 Bob Duff <duff@adacore.com>
3512 * namet.ads, namet.adb: Add an Append that appends a
3513 Bounded_String onto a Bounded_String. Probably a little more
3514 efficient than "Append(X, +Y);". Also minor cleanup.
3515 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
3516 Append_Unqualified_Decoded): Make sure these work with non-empty
3518 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
3519 parameter, defaulting to Global_Name_Buffer.
3520 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
3521 Bounded_String parameter, no default.
3522 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
3523 Bounded_String instead of Global_Name_Buffer.
3524 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
3525 to Append_Entity_Name, and pass a Bounded_String parameter,
3526 instead of using globals.
3527 (Add_Source_Info): Pass a Bounded_String parameter, instead of
3529 (Expand_Source_Info): Use local instead of globals.
3530 * stringt.ads, stringt.adb (Append): Add an Append procedure
3531 for appending a String_Id onto a Bounded_String.
3532 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
3534 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
3535 Adjust_Name_Case parameter.
3536 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
3537 Set_Casing; that's the default.
3538 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
3539 protected subprograms are entry calls; otherwise it is not possible to
3540 distinguish them from regular subprogram calls.
3542 2016-04-18 Gary Dismukes <dismukes@adacore.com>
3544 * sem_ch13.adb (Has_Good_Profile): Improvement
3545 of error message. Now indicates subtype_mark of formal parameter
3546 rather than the formal's name, plus minor rewording.
3548 2016-04-18 Pascal Obry <obry@adacore.com>
3550 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
3552 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3554 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
3556 2016-04-18 Gary Dismukes <dismukes@adacore.com>
3558 * par-ch4.adb, sem_prag.adb: Minor reformatting.
3560 2016-04-18 Bob Duff <duff@adacore.com>
3562 * sinput.ads, sinput.adb (Build_Location_String): Take a
3563 parameter instead of using a global variable. The function
3564 version no longer destroys the Name_Buffer.
3565 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
3566 parameter, which defaults to the Global_Name_Buffer, so some
3567 calls can avoid the global.
3568 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
3569 to avoid using globals. All but one call to Build_Location_String
3570 avoids the global. Only one call to String_From_Name_Buffer
3573 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3575 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
3577 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3579 * sem_eval.adb (Choice_Matches): Check the expression
3580 against the predicate values when the choice denotes a
3581 subtype with a static predicate.
3582 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
3583 tests for predicates.
3584 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
3585 is not static. (Is_Static_Subtype): A subtype with a dynamic
3586 predicate is not static.
3587 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
3588 (Is_Static_Subtype): Update the comment on usage.
3590 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3592 * sem_prag.adb (Analyze_Input_Item): Allow
3593 generic formals to appear as initialization items.
3595 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3597 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
3598 Has_Good_Profile): Additional error message to indicate that
3599 the second parameter of the subprogram must be a first subtype.
3601 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3603 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
3604 Use the pragma lookahead that determines whether a subprogram
3605 is to be inlined, when some level of backend optimization is
3607 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
3608 code used to create an instance body when needed for inlining.
3609 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
3610 call appears within an instantiation that is not a compilation
3611 unit, add a pending instantiation for the enclosing instance,
3612 so the backend can inline in turn the calls contained in the
3615 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3617 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
3618 that relates operations of the parent type to the operations of
3619 the derived type has three distinct sources:
3620 a) explicit operations of the derived type carry an
3621 Overridden_Operation that designates the operation in the
3623 b) Implicit operations that are inherited by the derived type
3624 carry an alias that may be an explicit subprogram (in which case
3625 it may have an Overridden_ Operation indicator) or may also be
3626 inherited and carry its own alias.
3627 c) If the parent type is an interface, the operation of the
3628 derived type does not override, but the interface operation
3629 indicates the operation that implements it.
3630 * sem_prag.adb: Minor reformatting.
3631 * sem_prag.adb (Check_External_Property): Update
3632 the comment on usage. Reimplement.
3634 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3636 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
3637 profiles such as ZFP, ceiling priority is not available.
3639 2016-04-18 Bob Duff <duff@adacore.com>
3641 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
3643 2016-04-18 Bob Duff <duff@adacore.com>
3645 * sem_elab.adb (Output_Calls): Use
3646 Get_Name_String, to clearly indicate that the global Name_Buffer
3647 is being used. The previous code used Is_Internal_Name, which
3648 returns a Boolean, but also has a side effect of setting the
3649 Name_Buffer. Then it called the other Is_Internal_Name, which uses
3650 the Name_Buffer for its input. And then it called Error_Msg_N,
3651 again using the Name_Buffer. We haven't eliminated the global
3652 usage here, but we've made it a bit clearer.
3653 This also allows us to have a side-effect-free version of
3655 * namet.ads, namet.adb: Provide a type Bounded_String, along with
3656 routines that can be used without using global variables. Provide
3657 Global_Name_Buffer so existing code can continue to use the
3658 global. Mark the routines that use globals as obsolete. New code
3659 shouldn't call the obsolete ones, and we should clean up existing
3660 code from time to time.
3661 Name_Find_Str is renamed as Name_Find.
3662 * namet.h: Changed as necessary to interface to the new version
3664 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
3667 2016-04-18 Yannick Moy <moy@adacore.com>
3669 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
3670 outside of GNATprove, hence it should not be removed.
3672 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3674 * sem_prag.adb (Analyze_Refinement_Clause):
3675 The refinement of an external abstract state can now mention
3676 non-external constituents.
3677 (Check_External_Property): Update all SPARK RM references.
3679 2016-04-18 Bob Duff <duff@adacore.com>
3681 * exp_intr.adb: Remove some duplicated code.
3683 2016-04-18 Yannick Moy <moy@adacore.com>
3685 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
3686 package spec and body out of SPARK.
3688 2016-04-18 Johannes Kanig <kanig@adacore.com>
3690 * spark_xrefs.ads: Minor comment update.
3692 2016-04-18 Johannes Kanig <kanig@adacore.com>
3694 * gnat1drv.adb (Gnat1drv): Force loading of System
3697 2016-04-18 Bob Duff <duff@adacore.com>
3699 * a-cuprqu.adb: Correction to previous change. If a new node
3700 is inserted at the front of the queue (because it is higher
3701 priority than the previous front node), we need to update
3702 Header.Next_Unequal -- not just in the case where the queue was
3705 2016-04-18 Bob Duff <duff@adacore.com>
3707 * a-cuprqu.ads: Change the representation of List_Type from a
3708 singly-linked list to a doubly-linked list. In addition, add a
3709 pointer Next_Unequal, which points past a possibly-long chain
3710 of equal-priority items. This increases efficiency, especially
3711 in the case of many equal-priority items.
3712 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
3713 advantage of new data structure.
3714 (Finalize): Rewrite in terms of Dequeue, for simplicity.
3716 2016-04-18 Yannick Moy <moy@adacore.com>
3718 * contracts.adb (Analyze_Object_Contract,
3719 Analyze_Protected_Contract): Remove tests performed in GNATprove.
3720 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
3721 Remove query for tests performed in GNATprove.
3723 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3725 * sem_aggr.adb (Resolve_Record_Aggregate): If
3726 Warn_On_Redundant_Constructs is enabled, report a redundant box
3727 association that does not cover any components, as it done for
3728 redundant others associations in case statements.
3730 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3732 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
3733 Analyze the generated Check pragma for an inherited condition so
3734 that it does not freeze the dispatching type of the primitive
3735 operation, because it is pre-analyzed at the point of the
3736 subprogram declaration (and not in the subprogram body, as is
3737 done during regular expansion).
3739 2016-04-18 Vincent Celier <celier@adacore.com>
3741 * ali.ads: Increase the range of all _Id types to 100 millions.
3743 2016-04-18 Gary Dismukes <dismukes@adacore.com>
3745 * sem_warn.adb (Check_References): Change warning to suggest
3746 using pragma Export rather than saying "volatile has no effect".
3748 2016-04-18 Bob Duff <duff@adacore.com>
3750 * g-souinf.ads (Compilation_ISO_Date): New function to return
3751 the current date in ISO form.
3752 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
3753 a call to Compilation_ISO_Date into a string literal containing
3754 the current date in ISO form.
3755 * exp_intr.ads (Add_Source_Info): Improve documentation.
3756 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
3757 Compilation_ISO_Date.
3758 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
3760 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3762 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
3763 to subtypes that are not first subtypes.
3765 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3767 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
3769 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
3770 generated pragmas after subprogram declaration, rather than in
3771 the corresponding subprogram body.
3772 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
3773 mode, if the operation is overridding, call
3774 Collect_Inherited_Class_Wide_Conditions to generate the
3775 corresponding pragmas immediately after the corresponding
3776 subprogram declaration.
3778 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3780 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
3781 type to natural numbers.
3782 (Stype): document code characters for concurrent entities.
3784 2016-04-18 Olivier Hainque <hainque@adacore.com>
3786 * targparm.ads: Update the Frontend_Exceptions default internal
3788 (Frontend_Exceptions_On_Target): Change default value to True.
3790 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3792 * sem_ch4.adb (Analyze_Selected_Component): Refine error
3793 detection when a selected component in the body of a synchronized
3794 type is a reference to an object of the same type declared
3795 elsewhere. The construct is legal if the prefix of the selected
3796 component includes an explicit dereference at any point.
3798 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3800 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
3801 internally generated expressions when trying to determine whether
3802 a formal parameter of a tagged type subject to Extensions_Visible
3803 False is used to initialize an object.
3804 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
3805 internally generated expressions when trying to determine whether
3806 a formal parameter of a tagged type subject to Extensions_Visible
3807 False is used in a type conversion.
3809 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3811 * sem_res.adb (Is_Protected_Operation_Call):
3812 Add guards to account for a non-decorated selected component.
3814 2016-04-18 Yannick Moy <moy@adacore.com>
3816 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
3817 implementation of Body_Has_SPARK_Mode_On.
3818 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
3819 New function replacing previous Get_SPARK_Mode_From_Pragma, that
3820 deals also with aspects.
3821 (Get_SPARK_Mode_Type): Make function internal again.
3822 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
3823 Get_SPARK_Mode_From_Annotation.
3825 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3827 * contracts.adb (Analyze_Object_Contract): Update references to
3829 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
3830 * ghost.adb Add with and use clauses for Sem_Disp.
3831 (Check_Ghost_Derivation): Removed.
3832 (Check_Ghost_Overriding):
3833 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
3834 (Check_Ghost_Primitive): New routine.
3835 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
3836 Update references to SPARK RM. (Is_OK_Pragma): Update references
3837 to SPARK RM. Predicates are now a valid context for references
3839 * ghost.ads (Check_Ghost_Derivation): Removed.
3840 (Check_Ghost_Overriding): Update the comment on usage.
3841 (Check_Ghost_Primitive): New routine.
3842 (Check_Ghost_Refinement): New routine.
3843 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
3844 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
3845 related to Ghost derivations
3846 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
3847 related to the convention-like behavior of pragma Ghost.
3848 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
3849 of a tagged type and its primitive agree.
3850 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
3851 RM. Move the verification of pragma Assertion_Policy Ghost
3852 to the proper place. Remove the now obsolete check related
3853 to Ghost derivations.
3854 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
3855 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
3857 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3859 * layout.adb: Fix more minor typos in comments.
3861 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3863 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
3865 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3867 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
3868 mode, collect inherited class-wide conditions to generate the
3869 corresponding pragmas.
3870 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
3871 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
3872 procedure for overriding subprograms, used to generate the pragmas
3873 corresponding to an inherited class- wide pre- or postcondition.
3874 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
3875 from contracts.adb (Replace_Condition_Entities): Subsidiary
3876 Build_Pragma_Check_Equivalent, to implement the proper semantics
3877 of inherited class-wide conditions, as given in AI12-0113.
3878 (Process_Class_Wide_Condition): Removed.
3879 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
3880 in contract of subprogram, to collect inherited class-wide
3882 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
3884 2016-04-18 Yannick Moy <moy@adacore.com>
3886 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
3887 * a-calend.ads (Ada.Calendar): Mark package spec as
3888 SPARK_Mode and add synchronous external abstract state Clock_Time.
3890 2016-04-18 Yannick Moy <moy@adacore.com>
3892 * sem_res.adb (Resolve_Call): Prevent inlining of
3893 calls inside expression functions. Factor previous code issuing
3894 errors to call Cannot_Inline instead, which does appropriate
3895 processing of message for GNATprove.
3897 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3899 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
3900 osint-b.adb: Cleanups.
3902 2016-04-18 Yannick Moy <moy@adacore.com>
3904 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
3905 body to inline in GNATprove mode when SPARK_Mode On applies to
3907 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
3910 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3912 * layout.adb: Fix minor typo in comment.
3913 * inline.adb: Fix minor pasto.
3914 * sem_ch12.ads: Fix minor typos in comments.
3916 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3918 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
3919 handle some complex cases of tag indeterminate calls that are
3920 actuals in other dispatching calls that are themselves tag
3922 (Check_Dispatching_Context): Add parameter to support recursive
3923 check for an enclosing construct that may provide a tag for a
3924 tag-indeterminate call.
3926 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3928 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
3929 Add global variables Task_Input_Seen and Task_Output_Seen.
3930 (Analyze_Global_Item): Detect an illegal use of the current
3931 instance of a single protected/task type in a global annotation.
3932 (Analyze_Input_Output): Inputs and output related to the current
3933 instance of a task unit are now tracked.
3934 (Check_Usage): Require
3935 the presence of the current instance of a task unit only when
3936 one input/output is available. (Current_Task_Instance_Seen):
3938 (Is_CCT_Instance): New parameter profile. Update
3939 the comment on usage. The routine now properly recognizes several
3940 cases related to single protected/task types.
3942 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3944 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
3945 to create a brand new freeze node. This handles a case where an
3946 ignored Ghost context is freezing something which is not ignored
3947 Ghost and whose freeze node should not be removed from the tree.
3948 (New_Freeze_Node): New routine.
3950 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
3952 * sigtramp.h (__gnat_set_is_vxsim) New function to
3953 tell sigtramp-vxworks to handle vxsim signal contexts. *
3954 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
3955 differences in the sigcontext structure between the expected
3956 regular x86 or x86_64 ones and the ones received in case of
3957 exexution on the vxworks simulator.
3958 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
3959 this information to sigtramp-vxworks.c. Remove the old mechanism for
3961 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
3963 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3965 * exp_ch3.adb (Inline_Init_Proc): New function returning
3966 whether the initialization procedure of a type should be
3967 inlined. Return again True for controlled type themselves.
3968 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
3969 (Build_Record_Init_Proc): Likewise.
3971 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3973 * gnatvsn.ads (Library_Version): Bump to 7.
3975 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3977 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
3978 on the entity of a subprogram declaration that is completed by
3979 an expression function.
3981 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3983 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
3984 declaration can appear in an aspect specification for a dynamic
3985 predicate, and a pragma for aspect Predicate_Failure.
3986 * exp_util.adb (Replace_Subtype_References): Replace current
3987 occurrences of the subtype to which a dynamic predicate applies,
3988 byt the expression that triggers a predicate check. Needed to
3989 implement new aspect Predicate_Failure.
3991 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3993 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
3994 * Makefile.rtl: update accordingly.
3996 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3998 * sem_type.adb (Disambiguate): Call Covers only when necessary
3999 for standard operators.
4001 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
4003 * atree.ads (Num_Extension_Nodes): Add couple of figures
4005 * atree.adb: Add GNAT.Heap_Sort_G dependency.
4006 (Print_Statistics): New exported procedure to print statistics.
4008 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
4010 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
4011 as to be inlined if the type needs finalization.
4013 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
4015 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
4016 alignment for x86_64.
4017 * init.c: Better fix for guard page reset on x86_64-vx7.
4018 Do not try to retrieve the page that actually raised
4019 the signal as the probing mechanism used on x86_64 do not allow
4020 such retrieval. We thus just test if the guard page is active,
4021 and re-activate it if not.
4023 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4025 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
4028 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
4030 * affinity.c: Use the proper type for task id.
4031 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
4033 2016-04-18 Arnaud Charlet <charlet@adacore.com>
4035 * sem_prag.adb (Process_Convention): Relax rule on exporting
4036 Intrinsic types if Relaxed_RM_Semantics is True.
4038 2016-04-18 Vincent Celier <celier@adacore.com>
4040 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
4041 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
4042 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
4043 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
4044 exp_ch3.ads, exp_unst.adb: Change "descendent" to
4045 "descendant" in comments, error messages and identifiers.
4046 * gcc-interface/decl.c: Ditto.
4048 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
4050 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
4051 New_S only once at the beginning of the function.
4053 2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
4055 * gcc-interface/decl.c (components_to_record): Restrict the previous
4056 change to fields with variable size.
4058 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
4060 * gcc-interface/decl.c (components_to_record): Add special case for
4061 single field with representation clause at offset 0.
4063 2016-03-16 Svante Signell <svante.signell@gmail.com>
4065 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
4066 * s-osinte-gnu.ads: New file.
4068 2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
4070 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
4071 (Stack_Check_Limits): Set to False.
4072 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
4073 (Stack_Check_Limits): Set to False.
4074 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
4075 (Stack_Check_Limits): Set to False.
4076 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
4077 (Stack_Check_Limits): Set to False.
4078 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
4079 (Stack_Check_Limits): Set to False.
4081 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
4083 * gcc-interface/trans.c (statement_node_p): New predicate.
4084 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
4085 not return dummy results for expressions attached to packed array
4086 implementation types.
4088 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
4090 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
4091 the expression of a renaming manually in case #3.
4093 2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
4095 * system-linux-s390.ads: Enable Stack_Check_Probes.
4096 * system-linux-s390.ads: Likewise.
4098 2016-02-29 Martin Liska <mliska@suse.cz>
4100 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
4101 Replace ENABLE_CHECKING macro with flag_checking.
4103 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
4105 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
4106 handling of unconstrained array types as designated types into common
4107 processing. Also handle array types as incomplete designated types.
4109 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
4111 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
4112 ASIS mode, fully lay out the minimal record type.
4114 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
4116 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
4117 (build_return_expr): Likewise.
4118 (Call_to_gnu): If this is a function call and there is no target,
4119 create a temporary for the return value for all aggregate types,
4120 but never create it for a return statement. Push a binding level
4121 around the call in more cases. Remove obsolete code.
4123 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
4125 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
4126 * gcc-interface/gigi.h (gigi): Remove useless attribute.
4127 (gnat_gimplify_expr): Likewise.
4128 (gnat_to_gnu_external): Declare.
4129 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
4130 code dealing with the expression of external constants into...
4131 Invoke gnat_to_gnu_external instead.
4132 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
4133 when not for a definition. Deal with COMPOUND_EXPR and variables with
4134 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
4135 'reference to a function call in a renaming. Remove obsolete test and
4136 adjust associated comment.
4137 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
4138 temporaries created to hold the return value, if any.
4139 (gnat_to_gnu_external): ...this. New function.
4140 * gcc-interface/utils.c (create_var_decl): Detect a constant created
4141 to hold 'reference to function call.
4142 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
4143 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
4145 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
4147 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
4148 the prefix denotes an entity which Has_Atomic_Components.
4149 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
4150 denotes an entity which Has_Atomic_Components.
4152 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
4154 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
4155 for fat pointer or scalar types.
4157 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
4159 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
4160 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
4161 Call maybe_character_value on the array bounds. Get to the base type
4162 of the index type and call maybe_debug_type on it.
4163 * gcc-interface/utils.c (finish_character_type): Add special treatment
4166 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
4168 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
4169 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
4171 2016-02-12 Jakub Jelinek <jakub@redhat.com>
4173 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
4174 neighbour -> neighbor.
4175 * prep.adb: Likewise.
4176 * prj.ads: Likewise.
4177 * prepcomp.adb: Likewise.
4178 * g-socket.ads: Likewise.
4179 * s-imgrea.adb: Likewise.
4180 * a-calend.adb: Likewise.
4181 * exp_disp.adb: Likewise.
4182 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
4183 * g-socket.adb: Likewise.
4184 * sem_ch12.adb: Likewise.
4185 * terminals.c: Likewise.
4187 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4189 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
4190 build_common_tree_nodes.
4192 2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
4194 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
4195 DECL_IGNORED_P last.
4197 2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
4199 * gcc-interface/gigi.h (enum attr_type): Rename into...
4200 (enum attrib_type): ...this.
4201 (struct attrib): Adjust.
4202 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
4204 2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
4206 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
4207 literal if the entity is of a character type.
4208 * gcc-interface/lang.opt (fsigned-char): New option.
4209 * gcc-interface/misc.c (gnat_handle_option): Accept it.
4210 (gnat_init): Adjust comment.
4211 * gcc-interface/gigi.h (finish_character_type): New prototype.
4212 (maybe_character_type): New inline function.
4213 (maybe_character_value): Likewise.
4214 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
4215 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
4216 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
4217 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
4218 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
4219 Copy TYPE_STRING_FLAG from type to subtype.
4220 <E_Array_Type>: Deal with character index types.
4221 <E_Array_Subtype>: Likewise.
4222 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
4223 char_type_node throughout.
4224 (build_raise_check): Likewise.
4225 (get_type_length): Deal with character types.
4226 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
4228 <Attr_Pred>: Likewise.
4229 (Loop_Statement_to_gnu): Likewise.
4230 (Raise_Error_to_gnu): Likewise.
4231 <N_Indexed_Component>: Deal with character index types. Remove
4233 <N_Slice>: Likewise.
4234 <N_Type_Conversion>: Deal with character types. Minor tweak.
4235 <N_Unchecked_Type_Conversion>: Likewise.
4237 <N_Op_Eq>: Likewise.
4238 (emit_index_check): Delete.
4239 * gcc-interface/utils.c (finish_character_type): New function.
4240 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
4241 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
4242 with char_type_node.
4243 (build_call_raise): Likewise.
4244 (build_call_raise_column): Likewise.
4245 (build_call_raise_range): Likewise.
4247 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
4249 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
4250 (build_call_raise_range): Likewise.
4251 (gnat_unsigned_type): Delete.
4252 (gnat_signed_type): Likewise.
4253 (gnat_signed_or_unsigned_type_for): New prototype.
4254 (gnat_unsigned_type_for): New inline function.
4255 (gnat_signed_type_for): Likewise.
4256 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
4257 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
4258 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
4259 and compute their base type from that.
4260 <E_Array_Subtype>: Remove duplicate declaration.
4261 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
4262 * gcc-interface/trans.c (get_type_length): Likewise.
4263 (Attribute_to_gnu): Likewise.
4264 (Loop_Statement_to_gnu): Likewise.
4265 (Call_to_gnu): Likewise.
4266 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
4267 and gnat_signed_type_for. Minor tweaks.
4268 (build_binary_op_trapv): Likewise.
4269 (emit_check): Likewise.
4270 (convert_with_check): Likewise.
4271 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
4272 functions. Minor tweaks.
4273 (Case_Statement_to_gnu): Remove dead code.
4274 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
4275 (init_code_table): Minor reordering.
4276 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
4277 (gnat_signed_type): Likewise.
4278 (gnat_signed_or_unsigned_type_for): New function.
4279 (unchecked_convert): Use directly the size in the test for precision
4280 vs size adjustments.
4281 (install_builtin_elementary_types): Call gnat_signed_type_for.
4282 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
4284 (build_goto_raise): New function taken from...
4285 (build_call_raise): ...here. Call it.
4286 (build_call_raise_column): Add KIND parameter and call it.
4287 (build_call_raise_range): Likewise.
4289 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
4291 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
4292 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
4293 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
4294 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
4295 and tweak gnat_encodings tests throughout.
4296 (initial_value_needs_conversion): Likewise.
4297 (intrin_arglists_compatible_p): Likewise.
4298 * gcc-interface/misc.c (gnat_print_type): Likewise.
4299 (gnat_get_debug_type): Likewise.
4300 (gnat_get_fixed_point_type_info): Likewise.
4301 (gnat_get_array_descr_info): Likewise.
4302 (get_array_bit_stride): Likewise.
4303 (gnat_get_type_bias): Fix formatting.
4304 (enumerate_modes): Likewise.
4305 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
4306 (add_decl_expr): Simplify NULL_TREE test.
4307 (end_stmt_group): Likewise.
4308 (build_binary_op_trapv): Fix formatting.
4309 (get_exception_label): Use switch statement.
4310 (init_code_table): Move around.
4311 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
4312 (gnat_poplevel): Likewise.
4313 (gnat_set_type_context): Likewise.
4314 (defer_or_set_type_context): Fix formatting.
4315 (gnat_pushdecl): Simplify NULL_TREE test.
4316 (maybe_pad_type): Likewise.
4317 (add_parallel_type): Likewise.
4318 (create_range_type): Likewise.
4319 (process_deferred_decl_context): Likewise.
4320 (convert): Likewise.
4321 (def_builtin_1): Likewise.
4322 * gcc-interface/utils2.c (find_common_type): Likewise.
4323 (build_binary_op): Likewise.
4324 (gnat_rewrite_reference): Likewise.
4325 (get_inner_constant_reference): Likewise.
4327 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
4330 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
4331 the parent function instead of the current function in order to issue
4332 the warning or the error. Add guard for ignored functions.
4334 2016-01-17 Jakub Jelinek <jakub@redhat.com>
4336 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
4338 2016-01-15 Jakub Jelinek <jakub@redhat.com>
4340 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
4341 of char * for path_val to avoid warnings.
4343 2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
4345 * gcc-interface/utils.c: Bump copyright year.
4346 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
4347 the current lexical scope.
4349 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4351 * gnat_ugn.texi: Bump @copying's copyright year.
4352 * gnat_rm.texi: Likewise.
4354 2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
4356 * gnatvsn.ads: Bump copyright year.
4359 Copyright (C) 2016 Free Software Foundation, Inc.
4361 Copying and distribution of this file, with or without modification,
4362 are permitted in any medium without royalty provided the copyright
4363 notice and this notice are preserved.