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