4c3620f9cedc20782beaba40e4d53d209b7e0ab9
[gcc.git] / gcc / ada / ChangeLog
1 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2
3 * sem_disp.adb (Check_Controlling_Type): Handle properly the
4 case of an incomplete type whose full view is tagged, when a
5 primitive operation of the type is declared between the two views.
6
7 2015-10-26 Bob Duff <duff@adacore.com>
8
9 * adaint.c (__gnat_locate_exec_on_path): If the PATH environment
10 variable is not set, do not return NULL, because we can still find
11 the executable if it includes a directory name.
12
13 2015-10-26 Ed Schonberg <schonberg@adacore.com>
14
15 * sem_elab.adb (Elab_Warning): Under dynamic elaboration, when
16 elaboration warnings are enabled, emit proper warning header
17 when triggered by an access attribute.
18
19 2015-10-26 Steve Baird <baird@adacore.com>
20
21 * exp_ch11.adb: If CodePeer_Mode is true, generate simplified
22 SCIL for exception declarations.
23 * exp_ch11.adb (Expand_N_Exception_Declaration) If CodePeer_Mode
24 is True, initialize the Full_Name component of the exception
25 record to null instead of to the result of an unchecked
26 conversion.
27
28 2015-10-26 Ed Schonberg <schonberg@adacore.com>
29
30 * exp_unst.adb (Note_Uplevel_Ref) : Handle properly a reference
31 that denotes a function returning a constrained array, that has
32 been rewritten as a procedure.
33 * makeutl.ads: Minor edit.
34
35 2015-10-26 Yannick Moy <moy@adacore.com>
36
37 * lib-xref-spark_specific.adb (Traverse_Protected_Declaration): New
38 procedure for traversal.
39 (Add_SPARK_Xrefs): Remove debugging code.
40 (Traverse_Declaration_Or_Statement): Call the new traversal
41 procedure.
42
43 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
44
45 * sem_prag.adb (Analyze_Pragma): Pragma
46 Extensions_Visible can now appear on an abstract subprogram
47 declaration.
48
49 2015-10-26 Yannick Moy <moy@adacore.com>
50
51 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Use character 'r' to
52 denote a reference to a constant which may have variable input, and
53 thus may be treated as a variable in GNATprove, instead of the
54 character 'c' used for constants.
55
56 2015-10-26 Ed Schonberg <schonberg@adacore.com>
57
58 * sem_util.adb (Object_Access_Level): Only aliased formals of
59 functions have the accessibility level of the point of call;
60 aliased formals of procedures have the same level as unaliased
61 formals.
62 (New_Copy_Tree): Add guard on copying itypes. From code reading.
63
64 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
65
66 * inline.adb: Minor reformatting.
67
68 2015-10-26 Yannick Moy <moy@adacore.com>
69
70 * get_spark_xrefs.adb (get_SPARK_Xrefs): Remove obsolete
71 assertion.
72 * lib-xref-spark_specific.adb (Traverse_Declaration_Or_Statement):
73 New procedure to factor duplicated code and add
74 treatment of protected entries.
75 (Add_SPARK_Scope, Traverse_Declarations_Or_Statements): Call the new
76 procedure Traverse_Declaration_Or_Statement. Use same character used in
77 normal xrefs for SPARK xrefs, for a given entity used as scope.
78 * spark_xrefs.ads Document character used for entries.
79 * sem_prag.adb (Check_Loop_Pragma_Placement): Account for possible
80 introduction of declarations and statements by the expansion, between
81 two otherwise consecutive loop pragmas.
82 * sem_util.ads, sem_util.adb (Is_Suspension_Object): Lifted from nested
83 function.
84 (Is_Descendant_Of_Suspension_Object): nested function lifted.
85
86 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
87
88 * sem_attr.adb (Eval_Attribute): Attribute 'Enum_Rep can be folded
89 when its prefix denotes a constant, an enumeration literal or
90 an enumeration type. Use the expression of the attribute in the
91 enumeration type form, otherwise use the prefix to fold.
92
93 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
94
95 * aspects.adb Add an entry for entry bodies in table
96 Has_Aspect_Specifications_Flag.
97 (Aspects_On_Body_Or_Stub_OK): Entry bodies now allow for certain
98 aspects.
99 * contracts.adb (Add_Contract_Items): Code cleanup. Add
100 processing for entry bodies, entry declarations and task units.
101 (Analyze_Subprogram_Body_Contract): Renamed
102 to Analyze_Entry_Or_Subprogram_Body_Contract. Do not
103 analyze the contract of an entry body unless annotating the
104 original tree.
105 (Analyze_Subprogram_Contract): Renamed to
106 Analyze_Entry_Or_Subprogram_Contract. Do not analyze the contract
107 of an entry declaration unless annotating the original tree.
108 (Analyze_Task_Contract): New routine.
109 * contracts.ads (Add_Contract_Item): Update the comment on usage.
110 (Analyze_Package_Body_Contract): Update comment on usage.
111 (Analyze_Package_Contract): Update the comment on usage.
112 (Analyze_Subprogram_Body_Contract): Renamed to
113 Analyze_Entry_Or_Subprogram_Body_Contract.
114 (Analyze_Subprogram_Body_Stub_Contract): Update the comment on usage.
115 (Analyze_Subprogram_Contract): Renamed to
116 Analyze_Entry_Or_Subprogram_Contract.
117 (Analyze_Task_Contract): New routine.
118 * einfo.adb (Contract): Restructure the assertion to include
119 entries and task units.
120 (SPARK_Pragma): This attribute now applies to operators.
121 (SPARK_Pragma_Inherited): This flag now applies to operators.
122 (Set_Contract): Restructure the assertion to include entries and task
123 units.
124 (Set_SPARK_Pragma): This attribute now applies to operators.
125 (Set_SPARK_Pragma_Inherited): This flag now applies to operators.
126 (Write_Field34_Name): Write out all Ekinds that have a contract.
127 (Write_Field40_Name): SPARK_Pragma now applies to operators.
128 * einfo.ads: Update the documentation of attribute Contract along
129 with usage in nodes. Update the documentation of attributes
130 SPARK_Pragma and SPARK_Pragma_Inherited.
131 * exp_ch6.adb (Freeze_Subprogram): Update the call to
132 Analyze_Subprogram_Contract.
133 * par-ch9.adb (P_Entry_Barrier): Do not parse keyword "is" as it
134 is not part of the entry barrier production.
135 (P_Entry_Body): Parse the optional aspect specifications. Diagnose
136 misplaced aspects.
137 * sem_attr.adb (Analyze_Attribute_Old_Result): Update the call
138 to Find_Related_Subprogram_Or_Body.
139 * sem_aux.adb (Unit_Declaration_Node) Add an entry for entry
140 declarations and bodies.
141 * sem_ch3.adb (Analyze_Declarations): Analyze the contracts of
142 entry declarations, entry bodies and task units.
143 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
144 Update the call to Analyze_Subprogram_Body_Contract.
145 (Analyze_Subprogram_Body_Helper): Update the call to
146 Analyze_Subprogram_Body_Contract.
147 * sem_ch9.adb (Analyze_Entry_Body): Analyze the aspect
148 specifications and the contract.
149 * sem_ch10.adb (Analyze_Compilation_Unit): Update the call to
150 Analyze_Subprogram_Contract.
151 * sem_ch12.adb (Save_References_In_Pragma): Update the call to
152 Find_Related_Subprogram_Or_Body.
153 * sem_ch13.adb (Analyze_Aspects_On_Body_Or_Stub): Use
154 Unique_Defining_Entity rather than rummaging around in nodes.
155 (Diagnose_Misplaced_Aspects): Update comment on usage. Update the
156 error messages to accomondate the increasing number of contexts.
157 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
158 Update the call to Find_Related_Subprogram_Or_Body.
159 (Analyze_Depends_Global): Update the call to
160 Find_Related_Subprogram_Or_Body. Add processing for entry
161 declarations.
162 (Analyze_Depends_In_Decl_Part): Update the call
163 to Find_Related_Subprogram_Or_Body. Task units have no formal
164 parameters to install. (Analyze_Global_In_Decl_Part): Update
165 the call to Find_Related_Subprogram_Or_Body. Task units have no
166 formal parameters to install.
167 (Analyze_Global_Item): Use Fix_Msg to handle the increasing number of
168 contexts.
169 (Analyze_Pragma): Update the call to Find_Related_Subprogram_Or_Body.
170 Perform full analysis when various pragmas appear in an entry body.
171 (Analyze_Pre_Post_Condition): Update the call to
172 Find_Related_Subprogram_Or_Body. Perform full analysis when the pragma
173 appears in an entry body.
174 (Analyze_Pre_Post_Condition_In_Decl_Part): Update the call to
175 Find_Related_Subprogram_Or_Body.
176 (Analyze_Refined_Depends_Global_Post): Update
177 the call to Find_Related_Subprogram_Or_Body. Use
178 Fix_Msg to handle the increasing number of contexts.
179 (Analyze_Refined_Depends_In_Decl_Part): Update
180 the call to Find_Related_Subprogram_Or_Body. Use
181 Unique_Defining_Entity to obtain the entity of the
182 spec. Use Fix_Msg to handle the increasing number of contexts.
183 (Analyze_Refined_Global_In_Decl_Part): Update the call to
184 Find_Related_Subprogram_Or_Body. Use Unique_Defining_Entity to obtain
185 the entity of the spec. Use Fix_Msg to handle the increasing number of
186 contexts.
187 (Analyze_Test_Case_In_Decl_Part): Update the call to
188 Find_Related_Subprogram_Or_Body.
189 (Check_Dependency_Clause): Use Fix_Msg to handle the increasing number
190 of contexts.
191 (Check_Mode_Restriction_In_Enclosing_Context): Use
192 Fix_Msg to handle the increasing number of contexts.
193 (Collect_Subprogram_Inputs_Outputs): Use the refined
194 versions of the pragmas when the context is an entry body or
195 a task body.
196 (Find_Related_Subprogram_Or_Body): Renamed to
197 Find_Related_Declaration_Or_Body. Add processing for entries
198 and task units.
199 (Fix_Msg): New routine.
200 (Role_Error): Use Fix_Msg to handle the increasing number of contexts.
201 * sem_prag.ads (Find_Related_Subprogram_Or_Body): Renamed to
202 Find_Related_Declaration_Or_Body. Update the comment on usage.
203 * sem_util.adb (Is_Entry_Body): New routine.
204 (Is_Entry_Declaration): New routine.
205 * sem_util.ads (Is_Entry_Body): New routine.
206 (Is_Entry_Declaration): New routine.
207
208 2015-10-26 Ed Schonberg <schonberg@adacore.com>
209
210 * inline.adb (Has_Excluded_Declaration): A subtype declaration
211 with a predicate aspect generates a subprogram, and therefore
212 prevents the inlining of the enclosing subprogram.
213 * osint.ads: Fix typo.
214
215
216 2015-10-26 Ed Schonberg <schonberg@adacore.com>
217
218 * sem_case.adb (Check_Choice_Set): Choose initial choice range
219 below low bound of type, to prevent spurious errors on case
220 statements whose expressions have an integer subtype with a
221 static predicate.
222 * sem_util.ads: Fix typo.
223
224 2015-10-26 Ed Schonberg <schonberg@adacore.com>
225
226 * exp_ch4.adb (Expand_N_Case_Expression): In the scope of a
227 predicate function, delay the expansion of the expression only
228 if the target type has a specified Static_ Predicate aspect,
229 because the expression is processed later. A dynamic predicate
230 must be expanded in standard fashion.
231
232 2015-10-26 Claire Dross <dross@adacore.com>
233
234 * a-nudira.ads: Remove SPARK_Mode as it currently causes an error.
235
236 2015-10-26 Arnaud Charlet <charlet@adacore.com>
237
238 * sem_aggr.adb, sem_type.adb, sem_ch12.adb, sem_res.adb, sem_ch4.adb,
239 sem_ch8.adb, exp_aggr.adb, sem_eval.adb, s-fatgen.adb, a-tienio.adb:
240 Fix typos.
241
242 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
243
244 * sem_ch13.adb (Analyze_Aspect_Specifications): The processing
245 for aspects Abstract_State, Ghost, Initial_Condition, Initializes
246 and Refined_State no longer have to take SPARK_Mode into account.
247 (Insert_After_SPARK_Mode): Removed.
248 (Insert_Pragma): Update profile and comment on usage. The routine can
249 now insert a pragma after the "header" of an instance.
250 * sem_prag.adb (Analyze_If_Available): New routine.
251 (Analyze_Pragma): Do not reset the Analyzed flag of various
252 SPARK pragmas as they use the Is_Analyzed_Pragma attribute to
253 avoid reanalysis. Various pragmas now trigger the analysis
254 of related pragmas that depend on or are dependent on the
255 current pragma. Remove the declaration order checks related
256 to pragmas Abstract_State, Initial_Condition and Initializes.
257 (Analyze_Pre_Post_Condition): Analyze pragmas SPARK_Mode and
258 Volatile_Function prior to analyzing the pre/postcondition.
259 (Check_Declaration_Order): Removed.
260 (Check_Distinct_Name): Ensure that a potentially duplicated pragma
261 Test_Case is not the pragma being analyzed.
262 (Is_Followed_By_Pragma): Removed.
263
264 2015-10-26 Ed Schonberg <schonberg@adacore.com>
265
266 * sem_ch6.adb: Handle subprogram bodies without previous specs.
267
268 2015-10-26 Claire Dross <dross@adacore.com>
269
270 * a-nudira.ads: Specify appropriate SPARK_Mode so that the unit
271 can be used in SPARK code.
272
273 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
274
275 * contracts.adb (Analyze_Subprogram_Body_Contract): Do not analyze
276 pragmas Refined_Global and Refined_Depends because these pragmas
277 are now fully analyzed when encountered.
278 (Inherit_Pragma): Update the call to attribute Is_Inherited.
279 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Add a guard
280 to prevent reanalysis. Mark the pragma as analyzed at the end of
281 the processing.
282 (Analyze_Depends_Global): New parameter profile
283 and comment on usage. Do not fully analyze the pragma, this is
284 now done at the outer level.
285 (Analyze_Depends_In_Decl_Part): Add a guard to prevent reanalysis.
286 Mark the pragma as analyzed at the end of the processing.
287 (Analyze_External_Property_In_Decl_Part): Add a guard to prevent
288 reanalysis. Mark the pragma as analyzed at the end of the processing.
289 (Analyze_Global_In_Decl_Part): Add a guard to prevent reanalysis. Mark
290 the pragma as analyzed at the end of the processing.
291 (Analyze_Initial_Condition_In_Decl_Part): Add a guard to prevent
292 reanalysis. Mark the pragma as analyzed at the end of the processing.
293 (Analyze_Initializes_In_Decl_Part): Add a guard to prevent reanalysis.
294 Mark the pragma as analyzed at the end of the processing.
295 (Analyze_Pragma): Reset the Analyzed flag on various pragmas that
296 require delayed full analysis. Contract_Cases is now analyzed
297 immediately when it applies to a subprogram body stub. Pragmas Depends,
298 Global, Refined_Depends and Refined_Global are now analyzed
299 in pairs when they appear in a subprogram body [stub].
300 (Analyze_Pre_Post_Condition_In_Decl_Part): Add a guard to
301 prevent reanalysis. Mark the pragma as analyzed at the end of
302 the processing.
303 (Analyze_Refined_Depends_Global_Post): Update the comment on usage.
304 (Analyze_Refined_Depends_In_Decl_Part): Add a guard to prevent
305 reanalysis. Mark the pragma as analyzed at the end of the processing.
306 (Analyze_Refined_Global_In_Decl_Part): Add a guard to prevent
307 reanalysis. Mark the pragma as analyzed at the end of the processing.
308 (Analyze_Refined_State_In_Decl_Part): Add a guard to prevent
309 reanalysis. Mark the pragma as analyzed at the end of the processing.
310 (Analyze_Test_Case_In_Decl_Part): Add a guard to prevent reanalysis.
311 Mark the pragma as analyzed at the end of the processing.
312 (Is_Followed_By_Pragma): New routine.
313 * sinfo.adb (Is_Analyzed_Pragma): New routine.
314 (Is_Inherited): Renamed to Is_Inherited_Pragma.
315 (Set_Is_Analyzed_Pragma): New routine.
316 (Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma.
317 * sinfo.ads Rename attribute Is_Inherited to Is_Inherited_Pragma
318 and update occurrences in nodes.
319 (Is_Analyzed_Pragma): New routine along with pragma Inline.
320 (Is_Inherited): Renamed to Is_Inherited_Pragma along with pragma Inline.
321 (Set_Is_Analyzed_Pragma): New routine along with pragma Inline.
322 (Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma along
323 with pragma Inline.
324
325 2015-10-26 Ed Schonberg <schonberg@adacore.com>
326
327 * par-ch3.adb (P_Component_Items): When style checks are enabled,
328 apply them to component declarations in a record type declaration
329 or extension.
330
331 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
332
333 * sem_util.adb (Is_Suspension_Object): Ensure that the scope of "Ada"
334 is Standard_Standard.
335
336 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
337
338 * sem_res.adb (Is_OK_Volatile_Context): A subprogram call is an OK
339 context for a reference to an effectively volatile object.
340 (Resolve_Actuals): Add references to SPARK RM.
341 (Within_Procedure_Call): Removed.
342 (Within_Subprogram_Call): New routine.
343
344 2015-10-26 Ed Schonberg <schonberg@adacore.com>
345
346 * sem_ch6.adb (Check_Aggregate_Accessibility): A reference to a
347 formal parameter in an aggregate does not need an accesibility
348 check only if the formal is aliased.
349
350 2015-10-26 Claire Dross <dross@adacore.com>
351
352 * sem_aux.ads (Number_Components): Can return 0 when called on
353 an empty record.
354
355 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
356
357 * contracts.adb (Analyze_Subprogram_Body_Contract): Use
358 Unique_Defining_Entity instead of Corresponding_Spec_Of.
359 * einfo.adb SPARK_Pragma and SPARK_Aux_Pragma are now Node40 and
360 Node41 respectively.
361 (SPARK_Aux_Pragma): Update the assertion and node querry.
362 (SPARK_Aux_Pragma_Inherited): Update the assertion and node query.
363 (SPARK_Pragma): Update the assertion and node query.
364 (SPARK_Pragma_Inherited): Update the assertion and node query.
365 (Set_SPARK_Aux_Pragma): Update the assertion and node setting.
366 (Set_SPARK_Aux_Pragma_Inherited): Update the assertion and node setting.
367 (Set_SPARK_Pragma): Update the assertion and node setting.
368 (Set_SPARK_Pragma_Inherited): Update the assertion and node setting.
369 (Write_Field32_Name): Remove the output for SPARK_Pragma.
370 (Write_Field33_Name): Remove the output for SPARK_Aux_Pragma.
371 (Write_Field40_Name): Add output for SPARK_Pragma.
372 (Write_Field41_Name): Add output for SPARK_Aux_Pragma.
373 * einfo.ads Rewrite the documentation on attributes
374 SPARK_Pragma, SPARK_Aux_Pragma, SPARK_Pragma_Inherited and
375 SPARK_Aux_Pragma_Inherited. Update their uses in nodes.
376 * exp_ch4.adb (Create_Anonymous_Master): Use
377 Unique_Defining_Entity instead of Corresponding_Spec_Of.
378 * exp_ch9.adb (Expand_Entry_Declaration): Mark the barrier
379 function as such.
380 (Expand_N_Task_Body): Mark the task body as such.
381 (Expand_N_Task_Type_Declaration): Mark the task body as such.
382 * exp_unst.adb (Visit_Node): Use Unique_Defining_Entity instead
383 of Corresponding_Spec_Of.
384 * sem_attr.adb (Analyze_Attribute_Old_Result): Use
385 Unique_Defining_Entity instead of Corresponding_Spec_Of.
386 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Entry barrier
387 functions do not inherit the SPARK_Mode from the context.
388 (Build_Subprogram_Declaration): The matching spec is now marked
389 as a source construct to mimic the original stand alone body.
390 * sem_ch7.adb (Analyze_Package_Body_Helper): Code cleanup.
391 * sem_ch9.adb Add with and use clauses for Contracts.
392 (Analyze_Entry_Body): An entry body freezes the contract of
393 the nearest enclosing package body. The entry body now inherits
394 the SPARK_Mode from the context.
395 (Analyze_Entry_Declaration): A protected entry declaration now inherits
396 the SPARK_Mode from the context.
397 (Analyze_Protected_Body): A protected body freezes
398 the contract of the nearest enclosing package body. Set the
399 Etype of a protected body as this is neede for proper aspect
400 analysis. Protected bodies can now carry meaningful aspects and
401 those are now analyzed.
402 (Analyze_Protected_Type_Declaration): A protected type now inherits the
403 SPARK_Mode from the context.
404 (Analyze_Task_Body): A task body freezes the contract of the
405 nearest enclosing package body. Set the Etype of a task body
406 as this is needed for proper aspect analysis. A task body
407 now inherits the SPARK_Mode from the context. Task bodies
408 can now carry meaningful aspects and those are now analyzed.
409 (Analyze_Task_Type_Declaration): A task type declaration now
410 inherits the SPARK_Mode of from the context.
411 * sem_ch10.adb (Analyze_Protected_Body_Stub): Protected body
412 stubs can now carry meaningful aspects.
413 (Analyze_Task_Body_Stub): Task body stubs can now carry meaningful
414 aspects.
415 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspects SPARK_Mode
416 Warnings now use routine Insert_Pragma as means of insertion into
417 the tree.
418 (Insert_After_SPARK_Mode): Clean up documentation.
419 (Insert_Pragma): Clean up documentation. The routine is now
420 capable of operating on synchronized units.
421 * sem_prag.adb (Add_Entity_To_Name_Buffer): New routine.
422 (Analyze_Contract_Cases_In_Decl_Part): Use
423 Unique_Defining_Entity instead of Corresponding_Spec_Of.
424 (Analyze_Depends_Global): Use Unique_Defining_Entity instead
425 of Corresponding_Spec_Of.
426 (Analyze_Depends_In_Decl_Part): Use Unique_Defining_Entity instead of
427 Corresponding_Spec_Of.
428 (Analyze_Global_In_Decl_Part): Use Unique_Defining_Entity instead of
429 Corresponding_Spec_Of.
430 (Analyze_Pragma): Use Unique_Defining_Entity instead of
431 Corresponding_Spec_Of.
432 Update the detection of an illegal pragma Ghost when it applies
433 to a task or protected unit. Reimplement the handling of
434 pragma SPARK_Mode.
435 (Analyze_Pre_Post_Condition_In_Decl_Part): Use Unique_Defining_Entity
436 instead of Corresponding_Spec_Of.
437 (Analyze_Test_Case_In_Decl_Part): Use Unique_Defining_Entity instead of
438 Corresponding_Spec_Of.
439 (Check_Library_Level_Entity): Update the comment on usage.
440 Reimplemented to offer a more specialized errror context.
441 (Check_Pragma_Conformance): Update profile and comment on usage.
442 Handle error message output on single protected or task units.
443 (Collect_Subprogram_Inputs_Outputs): Use Unique_Defining_Entity
444 instead of Corresponding_Spec_Of.
445 (Process_Body): New routine.
446 (Process_Overloadable): New routine.
447 (Process_Private_Part): New routine.
448 (Process_Statement_Part): New routine.
449 (Process_Visible_Part): New routine.
450 (Set_SPARK_Context): New routine.
451 (Set_SPARK_Flags): Removed.
452 * sem_util.adb (Corresponding_Spec_Of): Removed.
453 (Unique_Entity): Reimplemented to handle many more cases.
454 * sem_util.ads (Corresponding_Spec_Of): Removed.
455 (Unique_Defining_Entity): Update the comment on usage.
456 * sinfo.ads (Is_Entry_Barrier_Function): Update the assertion.
457 (Is_Task_Body_Procedure): New routine.
458 (Set_Is_Entry_Barrier_Function): Update the assertion.
459 (Set_Is_Task_Body_Procedure): New routine.
460 * sinfo.adb Update the documentation of attribute
461 Is_Entry_Barrier_Function along with use in nodes. Add new
462 attribute Is_Task_Body_Procedure along with use in nodes.
463 (Is_Task_Body_Procedure): New routine along with pragma Inline.
464 (Set_Is_Task_Body_Procedure): New routine along with pragma Inline.
465
466 2015-10-26 Gary Dismukes <dismukes@adacore.com>
467
468 * sem_ch13.adb: Minor reformatting.
469
470 2015-10-26 Steve Baird <baird@adacore.com>
471
472 * exp_disp.adb: Omit most dispatch table initialization code
473 if Generate_SCIL is true.
474
475 2015-10-26 Arnaud Charlet <charlet@adacore.com>
476
477 * sinfo.ads, exp_ch3.adb: Revert previous change.
478 (Build_Record_Init_Proc): Do not build an aggregate if
479 Modify_Tree_For_C.
480
481 2015-10-26 Ed Schonberg <schonberg@adacore.com>
482
483 * sem_ch6.adb (Find_Corresponding_Spec): Reject a subprogram
484 body whose signature is type conformant with a previous expression
485 function.
486
487 2015-10-26 Bob Duff <duff@adacore.com>
488
489 * treepr.adb: Code clean up.
490
491 2015-10-26 Eric Botcazou <ebotcazou@adacore.com>
492
493 * freeze.adb (Check_Component_Storage_Order): Skip a record
494 component if it has Complex_Representation.
495 (Freeze_Record_Type): If the type has Complex_Representation, skip the
496 regular treatment of Scalar_Storage_Order attribute and instead issue
497 a warning if it is present.
498
499 2015-10-26 Bob Duff <duff@adacore.com>
500
501 * sem_ch13.adb (Check_Iterator_Functions): For a Default_Iterator
502 aspect, make sure an implicitly declared interpretation is
503 overridden by an explicit one.
504 * sem_util.ads: Update comment.
505
506 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
507
508 * sem_ch7.adb, sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only source
509 bodies should "freeze" the contract of the nearest enclosing
510 package body.
511
512 2015-10-26 Joel Brobecker <brobecker@adacore.com brobecker>
513
514 * adaint.c (__gnat_lwp_self): Replace current implementation re-using
515 the Linux one, which uses an __NR_gettid syscall rather than
516 pthread_self.
517
518 2015-10-26 Arnaud Charlet <charlet@adacore.com>
519
520 * sinfo.ads, exp_ch3.adb (Build_Array_Init_Proc,
521 Build_Record_Init_Proc): Do not inline init procs when
522 Modify_Tree_For_C is True.
523
524 2015-10-26 Bob Duff <duff@adacore.com>
525
526 * errout.ads: Minor comment fix.
527 * einfo.ads: Minor style fix.
528
529 2015-10-26 Bob Duff <duff@adacore.com>
530
531 * sem_ch3.adb (Derive_Interface_Subprogram): Fix
532 Is_Abstract_Subprogram, which might have been calculated
533 incorrectly, because we're passing Ultimate_Alias (Subp) (and
534 its dispatching type) to Derive_Subprogram, instead of the true
535 parent subprogram and type.
536
537 2015-10-26 Bob Duff <duff@adacore.com>
538
539 * sem_ch13.adb (Check_Iterator_Functions): When
540 printing the "default iterator must be unique" error message,
541 also print references to the places where the duplicates are
542 declared. This makes the message clearer.
543
544 2015-10-26 Ed Schonberg <schonberg@adacore.com>
545
546 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Do not set
547 Box_Present when the formal part is (others => <>) even though
548 it is equivalent to a formal part (<>), because ASIS tools depend
549 on the syntactic setting of this flag.
550
551 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
552
553 * sem_ch13.adb: Minor reformatting.
554 * einfo.ads: Minor typo.
555
556 2015-10-26 Joel Brobecker <brobecker@adacore.com brobecker>
557
558 * adaint.c (__gnat_open_new_temp): Use mkstemp on Android.
559
560 2015-10-26 Ed Schonberg <schonberg@adacore.com>
561
562 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up.
563 * sem_ch13.adb (Check_Inherited_Indexing): New inner procedure
564 of Check_Indexing_Functions, to verify that a derived type with an
565 Indexing aspect is not inheriting such an aspect from an ancestor.
566 (Check_Indexing_Functions): Call Check_Inherited_Indexing within
567 an instance.
568
569 2015-10-26 Gary Dismukes <dismukes@adacore.com>
570
571 * a-reatim.adb, contracts.adb, contracts.ads: Minor reformatting and
572 typo corrections.
573
574 2015-10-26 Ed Schonberg <schonberg@adacore.com>
575
576 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
577 recheck the consistency betwen the freeze point and the end of
578 declarations for the expression in an aspect specification,
579 because it was done already in the analysis of the generic.
580 Furthermore, the delayed analysis of an aspect of the instance
581 may produce spurious errors when the generic is a child unit
582 that references entities in the parent (which might not be in
583 scope at the freeze point of the instance).
584
585 2015-10-26 Yannick Moy <moy@adacore.com>
586
587 * sem_res.adb (Resolve_Call): Issue info message
588 instead of warning when call cannot be inlined in GNATprove mode.
589
590 2015-10-26 Arnaud Charlet <charlet@adacore.com>
591
592 * exp_ch6.adb (Build_Procedure_Form): Use _result as the
593 name of the extra parameter, cleaner than a random temp name.
594 * gnat1drv.adb (Gnat1drv): Code clean up.
595
596 2015-10-24 Eric Botcazou <ebotcazou@adacore.com>
597
598 * gcc-interface/utils2.c (build_binary_op): Tweak formatting.
599 (build_unary_op): Likewise.
600
601 2015-10-23 Arnaud Charlet <charlet@adacore.com>
602
603 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
604 * doc/share/ada_pygments.py, doc/gnat_ugn/gnat_project_manager.rst,
605 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
606 doc/gnat_ugn/gnat_and_program_execution.rst,
607 doc/gnat_rm/implementation_defined_attributes.rst,
608 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
609 doc/gnat_rm/representation_clauses_and_pragmas.rst,
610 doc/gnat_rm/implementation_defined_pragmas.rst,
611 doc/gnat_rm/about_this_guide.rst,
612 doc/gnat_rm/implementation_of_ada_2012_features.rst,
613 doc/gnat_rm/implementation_of_specific_ada_features.rst,
614 doc/gnat_rm/implementation_defined_aspects.rst,
615 doc/gnat_rm/implementation_advice.rst: Update documentation.
616
617 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
618
619 * contracts.ads, contracts.adb: New unit.
620 * exp_ch6.adb Add with and use clauses for Contracts.
621 (Expand_Subprogram_Contract): Moved to Contracts.
622 * exp_ch6.ads (Expand_Subprogram_Contract): Moved to Contracts.
623 * sem_ch3.adb Add with and use clauses for Contracts.
624 (Analyze_Object_Contract): Moved to Contracts.
625 (Analyze_Declarations): Remove local variable Pack_Decl. Do not
626 capture global references in contracts. Check the hidden states
627 of a package body.
628 * sem_ch6.adb Add with and use clauses in Contracts.
629 (Analyze_Generic_Subprogram_Body): Do not capture global
630 references in contracts.
631 (Analyze_Subprogram_Body_Contract):
632 Moved to Contracts.
633 (Analyze_Subprogram_Body_Helper): Freeze the
634 contract of the nearest enclosing package body. Always analyze
635 the subprogram body contract. Do not expand the subprogram
636 body contract.
637 (Analyze_Subprogram_Contract): Moved to Contracts.
638 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Moved to Contracts.
639 (Analyze_Subprogram_Contract): Moved to Contracts.
640 * sem_ch7.adb Add with and use clauses for Contracts.
641 (Analyze_Package_Body_Contract): Moved to Contracts.
642 (Analyze_Package_Body_Helper): Freeze the contract of the
643 nearest enclosing package body.
644 (Analyze_Package_Contract): Moved to Contracts.
645 * sem_ch7.ads (Analyze_Package_Body_Contract): Moved to Contracts.
646 (Analyze_Package_Contract): Moved to Contracts.
647 * sem_ch10.adb Add with and use clauses for Contracts.
648 (Analyze_Compilation_Unit): Do not capture global references
649 in contracts.
650 (Analyze_Subprogram_Body_Stub_Contract): Moved to Contracts.
651 * sem_ch10.ads (Analyze_Subprogram_Body_Stub_Contract): Moved
652 to Contracts.
653 * sem_ch12.adb Add with and use clauses for Contracts.
654 (Analyze_Subprogram_Instantiation): Update the call to
655 Instantiate_Subprogram_Contract.
656 (Instantiate_Package_Body):
657 Do not copy the entity of the spec when creating an entity
658 for the body. Construct a brand new defining identifier for
659 the body and inherit the Comes_From_Source flag from the spec.
660 (Instantiate_Subprogram_Body): Remove Anon_Id to Act_Decl_Id
661 and update all occurrences. Construct a brand new defining
662 identifier for the body and inherit the Comes_From_Source
663 flag from the spec.
664 (Instantiate_Subprogram_Contract): Moved
665 to Contracts.
666 (Save_Global_References_In_Aspects): Moved to
667 the spec of Sem_Ch12.
668 (Save_Global_References_In_Contract):
669 Moved to Contracts.
670 * sem_ch12.ads (Save_Global_References_In_Aspects): Moved from
671 the body of Sem_Ch12.
672 (Save_Global_References_In_Contract):
673 Moved to Contracts.
674 * sem_prag.adb Add with and use clauses for Contracts.
675 (Add_Item): Removed. All references to this routine have been
676 replaced with calls to Append_New_Elmt.
677 (Analyze_Constituent):
678 Add special diagnostics for errors caused by freezing of
679 contracts.
680 (Analyze_Refined_State_In_Decl_Part): Add formal
681 parameter Freeze_Id. Add new global variable Freeze_Posted.
682 (Collect_Body_States): Removed.
683 (Report_Unused_States): Removed.
684 * sem_prag.ads (Analyze_Defined_State_In_Decl_Part): Add formal
685 parameter Freeze_Id and update comment on usage.
686 * sem_util.adb Remove with and use clauses for
687 Sem_Ch12.
688 (Add_Contract_Item): Moved to Contracts.
689 (Check_Unused_Body_States): New routine.
690 (Collect_Body_States):
691 New routine.
692 (Create_Generic_Contract): Moved to Contracts.
693 (Inherit_Subprogram_Contract): Moved to Contracts.
694 (Report_Unused_Body_States): New routine.
695 * sem_util.ads (Add_Contract_Item): Moved to Contracts.
696 (Check_Unused_Body_States): New routine.
697 (Collect_Body_States): New routine.
698 (Create_Generic_Contract): Moved to Contracts.
699 (Inherit_Subprogram_Contract): Moved to Contracts.
700 (Report_Unused_Body_States): New routine.
701 * sinfo.adb (Is_Expanded_Contract): New routine.
702 (Set_Is_Expanded_Contract): New routine.
703 * sinfo.ads New attribute Is_Expanded_Contract along with
704 placement in nodes.
705 (Is_Expanded_Contract): New routine along
706 with pragma Inline.
707 (Set_Is_Expanded_Contract): New routine
708 along with pragma Inline.
709 * gcc-interface/Make-lang.in: Add entry for contracts.o
710
711 2015-10-23 Bob Duff <duff@adacore.com>
712
713 * bindgen.adb, init.c, opt.ads, switch-b.adb: Implement new -Ea and
714 -Es switches.
715 * switch-b.ads: Minor comment fix.
716 * bindusg.adb: Document new -Ea and -Es switches.
717 * s-exctra.ads: Use -Es instead of -E.
718
719 2015-10-23 Tristan Gingold <gingold@adacore.com>
720
721 * gcc-interface/utils2.c (build_call_alloc_dealloc): Check no implicit
722 task and protected object restrictions.
723
724 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
725
726 * sem_ch12.adb, exp_ch6.adb: Minor reformatting.
727
728 2015-10-23 Gary Dismukes <dismukes@adacore.com>
729
730 * exp_ch6.adb: Minor reformatting.
731
732 2015-10-23 Ed Schonberg <schonberg@adacore.com>
733
734 * sem_ch12.adb (Check_Formal_Packages): A formal package whose
735 actual part is (others => <>) os identical to a formal package
736 with an actual part written as (<>).
737
738 2015-10-23 Arnaud Charlet <charlet@adacore.com>
739
740 * a-reatim.adb ("/"): For Time_Span division convert the operands
741 to integers and then use integer division, which conforms to
742 the rounding required by Ada RM.
743
744 2015-10-23 Ed Schonberg <schonberg@adacore.com>
745
746 * sem_ch6.adb (Check_Missing_Return): Do not report a missing
747 return statement on a function body constructed to complete a
748 package body for a premature instantiation.
749
750 2015-10-23 Ed Schonberg <schonberg@adacore.com>
751
752 * exp_ch6.adb (Build_Procedure_Body_Form): Replace body of
753 original function with that of generated procedure, to simplify
754 processing and avoid scoping problems with local declarations.
755 (Rewrite_Function_Call_For_C): Handle properly the case of a
756 parameterless function.
757
758 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
759
760 * a-exextr.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
761
762 2015-10-23 Arnaud Charlet <charlet@adacore.com>
763
764 * s-taskin.ads: Minor code clean up.
765 (Ada_Task_Control_Block): Move fixed size field before variable sized
766 ones.
767 * einfo.ads: Minor editing.
768
769 2015-10-23 Ed Schonberg <schonberg@adacore.com>
770
771 * sem_ch6.adb (Check_Aggregate_Accessibility): Apply rule in RM
772 6.5 (8.3) to verify that access discriminants in an aggregate
773 in a return statement have the proper accessibility, i.e. do
774 not lead to dangling references.
775
776 2015-10-23 Eric Botcazou <ebotcazou@adacore.com>
777
778 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Add missing
779 test on Address_Clause_Overlay_Warnings to the "constant overlays
780 variable" warning. For the reverse case, also issue a warning if
781 the modification is potentially made through the initialization
782 of the variable.
783
784 2015-10-23 Jose Ruiz <ruiz@adacore.com>
785
786 * a-exetim-posix.adb (Clock): Use the pthread_getcpuclockid
787 function to have access to CPU clocks for tasks other than the
788 calling task.
789
790 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
791
792 * debug.adb: Switch -gnatd.5 is no longer in use, remove the
793 associated documentation.
794 * exp_dbug.adb (Get_External_Name): Do not add a special prefix
795 for ignored Ghost entities or when switch -gnatd.5 is enabled.
796 * exp_dbug.ads Remove the documentation concerning the encoding
797 of ignored Ghost entities.
798
799 2015-10-23 Bob Duff <duff@adacore.com>
800
801 * a-exextr.adb (Notify_Exception): For Unhandled_Raise_In_Main,
802 mimic the output from Ada.Exceptions.Last_Chance_Handler; don't
803 print "Exception raised".
804 * s-stalib.ads, s-exctra.ads, s-exctra.adb: Add
805 Unhandled_Raise_In_Main to types Exception_Trace_Kind/Trace_Kind.
806
807 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
808
809 * exp_attr.adb, freeze.adb, sem_attr.adb, exp_aggr.adb,
810 gnatname.adb: Minor reformatting.
811
812 2015-10-23 Steve Baird <baird@adacore.com>
813
814 * a-cbdlli.ads, a-cbhama.ads, a-cbhase.ads, a-cbmutr.ads,
815 a-cborma.ads, a-cborse.ads, a-cbprqu.ads, a-cbsyqu.ads,
816 a-cdlili.ads, a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads,
817 a-cfinve.ads, a-cforma.ads, a-cforse.ads, a-cidlli.ads,
818 a-cihama.ads, a-cihase.ads, a-cimutr.ads, a-ciorma.ads,
819 a-ciormu.ads, a-ciorse.ads, a-coboho.ads, a-cobove.ads,
820 a-cofove.ads, a-cohama.ads, a-cohase.ads, a-coinho.ads,
821 a-coinho-shared.ads, a-coinve.ads, a-comutr.ads, a-conhel.ads,
822 a-convec.ads, a-coorma.ads, a-coormu.ads, a-coorse.ads,
823 a-cuprqu.ads, a-cusyqu.ads, a-rbtgbo.ads: Add spec Annotate
824 pragmas.
825 * a-cbdlli.adb, a-cbhama.adb, a-cbhase.adb, a-cbmutr.adb,
826 a-cborma.adb, a-cborse.adb, a-cbprqu.adb, a-cbsyqu.adb,
827 a-cdlili.adb, a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb,
828 a-cfinve.adb, a-cforma.adb, a-cforse.adb, a-cidlli.adb,
829 a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb,
830 a-ciormu.adb, a-ciorse.adb, a-coboho.adb, a-cobove.adb,
831 a-cofove.adb, a-cohama.adb, a-cohase.adb, a-coinho.adb,
832 a-coinho-shared.adb, a-coinve.adb, a-comutr.adb, a-conhel.adb,
833 a-convec.adb, a-coorma.adb, a-coormu.adb, a-coorse.adb,
834 a-cuprqu.adb, a-cusyqu.adb, a-rbtgbo.adb: Remove body Annotate
835 pragmas.
836
837 2015-10-23 Vincent Celier <celier@adacore.com>
838
839 * gnatname.adb: When gnatname is invoked with a project file,
840 specified with switch -P, if gprname is available, gnatname will
841 invoke gprname, with the target if it is a cross gnatname.
842
843 2015-10-23 Arnaud Charlet <charlet@adacore.com>
844
845 * exp_ch4.adb: Fix typo.
846 * exp_ch6.adb: Update comment.
847 * exp_attr.adb (Expand_Min_Max_Attribute): Simplify expansion.
848 * exp_aggr.adb (Convert_To_Positional): Only convert to
849 positional when generating C in case of an object declaration.
850 (In_Object_Declaration): New.
851 (Late_Expansion): Adapt to trees generated by Modify_Tree_For_C.
852 * sinfo.ads: Update documentation.
853
854 2015-10-23 Joel Brobecker <brobecker@adacore.com brobecker>
855
856 * sigtramp.h (struct sigcontext, struct ucontext): Remove declarations,
857 and replace them by include of corresponding header file.
858
859 2015-10-23 Bob Duff <duff@adacore.com>
860
861 * a-convec.adb (Copy): Make sure C is initialized
862 on all paths, including when Checks is False.
863
864 2015-10-23 Eric Botcazou <ebotcazou@adacore.com>
865
866 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove
867 error as unreachable.
868
869 2015-10-23 Arnaud Charlet <charlet@adacore.com>
870
871 * gnat1drv.adb (Adjust_Global_Switches): Adjust.
872
873 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
874
875 * exp_dbug.ads, exp_dbug.adb (Get_External_Name): The special prefix for
876 ignored Ghost entities is now ___ghost_.
877
878 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
879
880 * ghost.adb (Is_Subject_To_Ghost): Check the
881 original node when searching for pragma Ghost to catch cases
882 where a source construct has been rewritten into something else.
883
884 2015-10-23 Ed Schonberg <schonberg@adacore.com>
885
886 * einfo.ads, einfo.adb (Rewritten_For_C): New flag on functions
887 that return a constrained array type. When generating C these
888 functions are rewritten as procedures with an out parameter,
889 and calls to such functions are rewritten accordingly.
890 * exp_ch6.adb (Expand_N_Subprogram_Declaration): When
891 Modify_Tree_For_C is set and the function returns a constrained
892 array type, generate a procedure declaration with an additional
893 out parameter. Mark original function as Rewritten_For_C.
894 The new declaration is inserted in tree immediately after
895 current declaration.
896 (Expand_Subprogram_Body): If entity is marked Rewritten_For_C,
897 generate body of corresponding procedure using declarations
898 and statements for function body. Replace return statements
899 with assignments to the out parameter, followed by a simple
900 return statement.
901 (Rewrite_Function_Call_For_C): New procedure to replace a function
902 call that returns an array by a procedure call.
903
904 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
905
906 * sem_util.adb (Denotes_Iterator): New routine.
907 (Is_Iterator): Code cleanup. Factor out the detection of a
908 predefined iterator. As a result this fixes a missing case
909 where a tagged type implements interface Reversible_Iterator.
910
911 2015-10-23 Ed Schonberg <schonberg@adacore.com>
912
913 * sem_attr.adb (Eval_Attribute): Constant-fold 'Enabled if
914 not within a generic unit, even if expander is not active, so
915 that instances of container packages remain preelaborable in
916 -gnatc mode.
917
918 2015-10-23 Tristan Gingold <gingold@adacore.com>
919
920 * init.c (__gnat_sigtramp): New assembly function for arm64-darwin.
921 (__gnat_error_handler): Use trampoline for arm64.
922
923 2015-10-23 Ed Schonberg <schonberg@adacore.com>
924
925 * exp_ch3.adb (Expand_N_Object_Declaration): if the type of the
926 object is a class-wide limited interface type, the expression
927 is not restricted to the forms specified for limited types.
928
929 2015-10-23 Vincent Celier <celier@adacore.com>
930
931 * gnatname.adb: Code clean up.
932 * s-taasde.ads: Fix comment.
933
934 2015-10-23 Ed Schonberg <schonberg@adacore.com>
935
936 * sem_util.adb (Is_Iterator, Is_Reversible_iterator): Use
937 root type to determine whether the type is a descendant of the
938 corresponding interface type, so take into account multiple
939 levels of subtypes and derivations.
940
941 2015-10-23 Olivier Hainque <hainque@adacore.com>
942
943 * tracebak.c: Refine selection of GCC/GENERIC_UNWINDER for
944 tracebacks on x86 & x86_64.
945 (x86 & x86_64): If !SJLJ, always pick the
946 GCC_UNWINDER for x86_64 (not only on linux).
947 * sem_util.ads: Minor fix in comment.
948
949 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
950
951 * sem_prag.adb (Analyze_Pragma): Pragma Volatile_Function should
952 not apply to a function instantiation.
953 * sem_util.adb (Has_Effectively_Volatile_Profile): New routine.
954 (Is_Volatile_Function): An instance of Ada.Unchecked_Conversion
955 is a volatile function when its profile contains an effectively
956 volatile type.
957 * sem_util.ads (Has_Effectively_Volatile_Profile): New routine.
958
959 2015-10-23 Arnaud Charlet <charlet@adacore.com>
960
961 * exp_unst.adb (Unnest_Subprogram): Complete previous
962 change and update comments.
963
964 2015-10-23 Ed Schonberg <schonberg@adacore.com>
965
966 * sem_util.ads, sem_util.adb (Check_Function_With_Address_Parameter):
967 A subprogram that has an Address parameter and is declared in a Pure
968 package is not considered Pure, because the parameter may be used as a
969 pointer and the referenced data may change even if the address value
970 itself does not.
971 * freeze.adb (Freeze_Subprogram): use it.
972 * exp_ch6.adb (Expand_N_Subprogram_Body): Use it.
973
974 2015-10-23 Olivier Hainque <hainque@adacore.com>
975
976 * tracebak.c: Fallback to generic unwinder for gcc-sjlj on x86 &
977 x86_64 linux
978 * tracebak.c: Rework x86 & x86_64 sections to resort to the
979 generic unwinder if __USING_SJLJ_EXCEPTIONS__.
980
981 2015-10-23 Javier Miranda <miranda@adacore.com>
982
983 * sem_util.adb (Check_Function_Writable_Actuals): For function
984 calls restrict the check to elementary types, as requested by
985 RM 6.4.1(6.15/3)
986
987 2015-10-23 Arnaud Charlet <charlet@adacore.com>
988
989 * exp_unst.adb (Unnest_Subprogram): Suppress initialization on
990 Decl_ARECnT since we are taking care of all initializations in
991 the generated code.
992
993 2015-10-23 Ed Schonberg <schonberg@adacore.com>
994
995 * sem_dim.adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
996 Handle properly a box-initialized aggregate component.
997
998 2015-10-23 Yannick Moy <moy@adacore.com>
999
1000 * sem_prag.adb (Analyze_Pragma): Reject Volatile_Function not placed
1001 on a function.
1002
1003 2015-10-23 Yannick Moy <moy@adacore.com>
1004
1005 * a-extiin.ads, a-reatim.ads, a-interr.ads, a-exetim-mingw.ads,
1006 a-exetim-default.ads, a-exetim.ads, a-taside.ads: Add "Global => null"
1007 contract on subprograms.
1008 * lib-xref-spark_specific.adb: collect scopes for stubs of
1009 protected objects
1010
1011 2015-10-23 Arnaud Charlet <charlet@adacore.com>
1012
1013 * gnat1drv.adb (Adjust_Global_Switches): Enable
1014 Back_Annotate_Rep_Info to get size information from gigi.
1015 (Gnat1drv): Code clean ups.
1016 * frontend.adb (Frontend): Ditto.
1017
1018 2015-10-23 Arnaud Charlet <charlet@adacore.com>
1019
1020 * gnat1drv.adb (Adjust_Global_Switches): Adjust settings.
1021 * sem.adb (Semantics): Remove special case.
1022
1023 2015-10-23 Gary Dismukes <dismukes@adacore.com>
1024
1025 * bindgen.adb, restrict.adb: Minor spelling/grammar fixes.
1026
1027 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
1028
1029 * sem_res.adb (Resolve_Entity_Name): Code cleanup. Check for possible
1030 elaboration issues in SPARK when the name denotes a source variable.
1031
1032 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
1033
1034 * exp_ch7.adb (Process_Transient_Objects): Reimplement to properly
1035 handle restriction No_Exception_Propagation.
1036 * exp_ch11.adb (Expand_At_End_Handler): Update the parameter
1037 profile and all references to Block.
1038 * exp_ch11.ads (Expand_At_End_Handler): Update the parameter
1039 profile and comment on usage.
1040 * exp_intr.adb (Expand_Unc_Deallocation): Reimplement to properly
1041 handle restriction No_Exception_Propagation.
1042 * gnat1drv.adb, restrict.adb: Update comment.
1043
1044 2015-10-23 Bob Duff <duff@adacore.com>
1045
1046 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Do not call
1047 SS_Release for a block statement enclosing the return statement in the
1048 case where a build-in-place function return is returning
1049 the result on the secondary stack. This is accomplished by
1050 setting the Sec_Stack_Needed_For_Return flag on such blocks.
1051 It was already being set for the function itself, and it was
1052 already set correctly for blocks in the non-build-in-place case
1053 (in Expand_Simple_Function_Return).
1054 (Set_Enclosing_Sec_Stack_Return): New procedure to perform
1055 the Set_Sec_Stack_Needed_For_Return calls. Called in the
1056 build-in-place and non-build-in-place cases.
1057 (Expand_Simple_Function_Return): Call
1058 Set_Enclosing_Sec_Stack_Return instead of performing the loop
1059 in line.
1060
1061 2015-10-23 Bob Duff <duff@adacore.com>
1062
1063 * scng.adb (Char_Literal_Case): If an apostrophe
1064 follows a reserved word, treat it as a lone apostrophe, rather
1065 than the start of a character literal. This was already done for
1066 "all", but it needs to be done also for (e.g.) "Delta".
1067
1068 2015-10-23 Bob Duff <duff@adacore.com>
1069
1070 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Use
1071 Underlying_Type for B_Typ, in case the Typ is a subtype of a type with
1072 unknown discriminants.
1073 * g-awk.ads: Minor style fix in comment
1074
1075 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
1076
1077 * debug.adb: Document the use of debug switch -gnatd.5.
1078 * einfo.adb: Code reformatting. (Is_Ghost_Entity): Moved from ghost.adb.
1079 * einfo.ads New synthesized attribute Is_Ghost_Enity along
1080 with usage in nodes and pragma Inline.
1081 (Is_Ghost_Entity: Moved from ghost.ads.
1082 * exp_ch3.adb Code reformatting.
1083 (Expand_Freeze_Array_Type): Capture, set and restore the Ghost mode.
1084 (Expand_Freeze_Class_Wide_Type): Capture, set and restore the
1085 Ghost mode.
1086 (Expand_Freeze_Enumeration_Type): Capture, set and
1087 restore the Ghost mode.
1088 (Expand_Freeze_Record_Type): Capture, set and restore the Ghost mode.
1089 * exp_ch6.adb (Expand_Subprogram_Contract): Do not expand the
1090 contract of an ignored Ghost subprogram.
1091 * exp_ch13.adb Add with and use clauses for Ghost.
1092 (Expand_N_Freeze_Entity): Capture, set and restore the Ghost mode.
1093 * exp_dbug.adb (Get_External_Name): Code reformatting. Add a
1094 special prefix for ignored Ghost entities or when requested by
1095 -gnatd.5 for any Ghost entity.
1096 * exp_dbug.ads Document the use of prefix "_ghost_" for ignored
1097 Ghost entities.
1098 * exp_prag.adb (Expand_Pragma_Check): Capture, set and restore the
1099 Ghost mode.
1100 (Expand_Pragma_Loop_Variant): Use In_Assertion_Expr
1101 to signal the original context.
1102 * ghost.adb (Check_Ghost_Overriding): Code cleanup.
1103 (Is_Ghost_Entity): Moved to einfo.adb. (Is_OK_Declaration):
1104 Move the assertion expression check to the outer level.
1105 (Is_OK_Ghost_Context): An assertion expression is a valid Ghost
1106 context.
1107 * ghost.ads (Is_Ghost_Entity): Moved to einfo.ads.
1108 * sem_ch3.adb (Analyze_Object_Contract): A source Ghost object
1109 cannot be imported or exported. Mark internally generated objects
1110 as Ghost when applicable.
1111 (Make_Class_Wide_Type): Inherit the ghostness of the root tagged type.
1112 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark
1113 a stand alone subprogram body as Ghost when applicable.
1114 (Analyze_Subprogram_Declaration): Mark internally generated
1115 subprograms as Ghost when applicable.
1116 * sem_ch7.adb: Code cleanup.
1117 * sem_ch13.adb (Add_Invariants): Add various formal
1118 parameters to break dependency on global variables.
1119 (Build_Invariant_Procedure): Code cleanup. Capture, set and
1120 restore the Ghost mode.
1121 * sem_res.adb (Resolve_Actuals): The actual parameter of a source
1122 Ghost subprogram whose formal is of mode IN OUT or OUT must be
1123 a Ghost variable.
1124
1125 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
1126
1127 * sem_ch8.adb Code cleanup.
1128 (Find_Expanded_Name): Replace
1129 the call to In_Pragmas_Depends_Or_Global with a call to
1130 In_Abstract_View_Pragma.
1131 (In_Abstract_View_Pragma): New routine.
1132 (In_Pragmas_Depends_Or_Global): Removed.
1133 * sem_prag.adb (Analyze_Part_Of): Catch a case where indicator
1134 Part_Of denotes the abstract view of a variable.
1135
1136 2015-10-23 Arnaud Charlet <charlet@adacore.com>
1137
1138 * sem_util.ads (Unique_Defining_Entity): Document the result
1139 for tasks and entries.
1140 * sem_util.adb (Unique_Entity): Return declaration entity for task and
1141 entry bodies
1142
1143 2015-10-22 Mikhail Maltsev <maltsevm@gmail.com>
1144
1145 * gcc-interface/decl.c (gnat_to_gnu_entity): Use gcc_checking_assert.
1146 * gcc-interface/trans.c (assoc_to_constructor): Use flag_checking.
1147 * gcc-interface/utils.c (relate_alias_sets): Likewise.
1148 * gcc-interface/utils2.c (build_binary_op, build_unary_op): Use
1149 gcc_checking_assert
1150
1151 2015-10-21 Martin Sebor <msebor@redhat.com>
1152
1153 PR driver/68043
1154 * gcc-interface/lang.opt: End each sentence that describes
1155 an option with a period.
1156
1157 2015-10-20 Yannick Moy <moy@adacore.com>
1158
1159 * fmap.adb, a-cihama.adb, sem_ch5.adb, make.adb, inline.adb,
1160 a-cfhase.adb, scng.adb, sem_ch12.adb, freeze.adb, tempdir.adb,
1161 sem_util.adb, sem_res.adb, s-regexp.adb, a-clrefi.adb: Fix coding
1162 style for marking start of processing of subprograms.
1163
1164 2015-10-20 Yannick Moy <moy@adacore.com>
1165
1166 * lib-xref-spark_specific.adb (Add_SPARK_File): Start traversal
1167 by requesting info from stubs. (Traverse_All_Compilation_Units):
1168 Remove unused procedure.
1169 (Traverse_Declarations_Or_Statements): Handle protected and task units.
1170 * lib-xref.ads (Traverse_All_Compilation_Units): Remove unused
1171 procedure.
1172 * restrict.adb (Check_Restriction): Do not ignore
1173 restrictions in GNATprove_Mode.
1174
1175 2015-10-20 Arnaud Charlet <charlet@adacore.com>
1176
1177 * s-valllu.adb, sem_ch3.adb, layout.adb, a-crbtgo.adb, exp_ch9.adb,
1178 make.adb, g-diopit.adb, s-valuns.adb, sem_ch9.adb, sem_ch10.adb,
1179 sem_ch12.adb, a-tifiio.adb, g-dynhta.adb, uintp.adb,
1180 sem_util.adb, sem_res.adb, s-htable.adb, exp_tss.adb, s-soflin.ads,
1181 exp_ch6.adb, sem_ch6.adb, a-rbtgbo.adb, par-ch12.adb, sem_ch8.adb,
1182 sem_eval.adb, mdll.adb, par-ch5.adb, s-poosiz.adb, sem_ch4.adb,
1183 a-ngelfu.adb, s-taspri-solaris.ads, a-cforse.adb: Fix typos.
1184
1185 2015-10-20 Arnaud Charlet <charlet@adacore.com>
1186
1187 * sem_aggr.adb, mlib-prj.adb, prep.adb, eval_fat.adb, rtsfind.adb,
1188 freeze.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnatlink.adb,
1189 par-ch6.adb, exp_tss.adb, exp_ch4.adb, s-shasto.adb, exp_fixd.adb,
1190 sem_ch6.adb, clean.adb, sem_ch8.adb, sem_eval.adb, sem_ch9.adb: Fix
1191 typos.
1192
1193 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1194
1195 * sem_ch11.adb (Analyze_Handled_Statements): If the scope is a
1196 postcondition subprogram, do not check for useless assignments
1197 because there are no source references in such a body, and the
1198 call will lose deferred references from the enclosing subprogram.
1199
1200 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1201
1202 * sem_ch13.adb: nalyze_Attribute_Definition_Clause, case
1203 'Address): If either object is controlled the overlay is
1204 erroneous, but analysis must be completed so that back-end sees
1205 address clause and completes code generation. Improve text
1206 of warning.
1207
1208 2015-10-20 Thomas Quinot <quinot@adacore.com>
1209
1210 * exp_ch4.adb: Minor reformatting.
1211
1212 2015-10-20 Bob Duff <duff@adacore.com>
1213
1214 * s-mudido-affinity.adb (Create): Correct subranges of slices of CPU
1215 arrays.
1216
1217 2015-10-20 Arnaud Charlet <charlet@adacore.com>
1218
1219 * sinfo.ads, g-pehage.adb, par-ch12.adb,
1220 layout.adb, exp_util.adb, sem_aux.adb, make.adb, checks.adb,
1221 sem_ch12.adb, sem_res.adb, sem_attr.adb, a-ngelfu.adb, sem_ch4.adb,
1222 switch-b.adb, sem_ch6.adb, prj-dect.adb, gnatxref.adb, sem_ch13.adb,
1223 lib-xref.adb: Fix typos.
1224
1225 2015-10-20 Tristan Gingold <gingold@adacore.com>
1226
1227 * exp_ch4.adb (Expand_Array_Comparison): Use
1228 generic code if runtime routine is not available.
1229
1230 2015-10-20 Yannick Moy <moy@adacore.com>
1231
1232 * a-sytaco.ads (Ada.Synchronous_Task_Control): Package
1233 now withs System.Task_Identification. The visible part
1234 of the spec has SPARK_Mode. The private part has pragma
1235 SPARK_Mode (Off).
1236 (Set_True): Added Global and Depends aspects
1237 (Set_False): Added Global and Depends aspects (Current_State):
1238 Added Volatile_Function aspect and added external state
1239 Ada.Task_Identification.Tasking_State as a Global input.
1240 (Suspend_Until_True): Added Global and Depends aspects
1241 * a-sytaco.adb (Ada.Synchronous_Task_Control):
1242 Package body has SPARK_Mode => Off
1243 * a-extiin.ads (Ada.Execution_Time.Interrupts):
1244 Package now withs Ada.Real_Time and has SPARK_Mode.
1245 (Clock): Added Volatile_Function aspect and added external state
1246 Ada.Real_Time.Clock_Time as a Global input.
1247 * a-reatim.ads (Ada.Real_Time): The visible part of the spec has
1248 SPARK_Mode. The private part has pragma SPARK_Mode (Off). The package
1249 declares external state Clock_Time with properties Async_Readers and
1250 Async_Writers.
1251 (Clock): Added Volatile_Function aspect and
1252 added external state Clock_Time as a Global input.
1253 * a-reatim.adb (Ada.Real_Time): Package body has SPARK_Mode => Off
1254 * a-exetim-default.ads, a-exetim-mingw.ads (Ada.Execution_Time):
1255 The visible part of the spec has SPARK_Mode. The private part
1256 has pragma SPARK_Mode (Off).
1257 (Clock): Added Volatile_Function
1258 aspect and added external state Clock_Time as a Global input.
1259 (Clock_For_Interrupts): Added Volatile_Function aspect and added
1260 external state Ada.Real_Time.Clock_Time as a Global input.
1261 * a-exetim-mingw.adb (Ada.Execution_Time): Package body has
1262 SPARK_Mode => Off
1263 * a-interr.ads (Ada.Interrupts): Package now
1264 withs Ada.Task_Identification (Is_Reserved): Added
1265 SPARK_Mode, Volatile_Function and external state
1266 Ada.Task_Identification.Tasking_State as a Global input.
1267 (Is_Attached): Added SPARK_Mode, Volatile_Function and external
1268 state Ada.Task_Identification.Tasking_State as a Global input.
1269 (Attach_Handler): Added SPARK_Mode => Off (Exchange_Handler):
1270 Added SPARK_Mode => Off (Detach_Handler): Added SPARK_Mode
1271 and external state Ada.Task_Identification.Tasking_State as a
1272 Global In_Out. (Reference): Added SPARK_Mode => Off
1273 * a-disedf.ads (Get_Deadline): Added SPARK_Mode, Volatile_Function
1274 and external state Ada.Task_Identification.Tasking_State as a
1275 Global input.
1276 * a-taside.ads (Ada.Task_Identification): The visible part of
1277 the spec has SPARK_Mode. The private part has pragma SPARK_Mode
1278 (Off). The package declares external state Tasking_State with
1279 properties Async_Readers and Async_Writers.
1280 (Current_Task): Added
1281 Volatile_Function aspect and added external state Tasking_State
1282 as a Global input.
1283 (Environment_Task): Added SPARK_Mode => Off
1284 (Is_Terminated): Added Volatile_Function aspect and added external
1285 state Tasking_State as a Global input. (Is_Callable): Added
1286 Volatile_Function aspect and added external state Tasking_State as
1287 a Global input.
1288 (Activation_Is_Complete): Added Volatile_Function
1289 aspect and added external state Tasking_State as a Global input.
1290 * a-taside.adb (Ada.Task_Identification): Package body has
1291 SPARK_Mode => Off.
1292
1293 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1294
1295 * atree.ads, atree.adb: Enable List38 and List39 on entities.
1296 * einfo.ads, einfo.adb (Class_Wide_Preconds) new attribute defined
1297 on subprograms. Holds the list of class-wide precondition
1298 functions inherited from ancestors. Each such function is an
1299 instantiation of the generic function generated from an explicit
1300 aspect specification for a class-wide precondition. A type is
1301 an ancestor of itself, and therefore a root type has such an
1302 instance on its own list.
1303 (Class_Wide_Postconds): ditto for postconditions.
1304
1305 2015-10-20 Vincent Celier <celier@adacore.com>
1306
1307 * prj-attr.adb: Add packages Prove and GnatTest.
1308
1309 2015-10-20 Steve Baird <baird@adacore.com>
1310
1311 * a-conhel.adb: Add an Annotate pragma to help suppress CodePeer's
1312 analysis of internals of container generic instances. This pragma
1313 has no other effect.
1314 * a-conhel.adb (Generic_Implementation) Add "pragma Annotate
1315 (CodePeer, Skip_Analysis);".
1316
1317 2015-10-20 Steve Baird <baird@adacore.com>
1318
1319 * pprint.adb: Code clean up.
1320
1321 2015-10-20 Bob Duff <duff@adacore.com>
1322
1323 * a-cfinve.ads, a-coboho.ads: Improve comments.
1324 * a-coboho.adb (Size_In_Storage_Elements): Improve error message
1325 in case of "Size is too big" exception.
1326
1327 2015-10-20 Bob Duff <duff@adacore.com>
1328
1329 * a-contai.ads: Remove check names (moved to snames.ads-tmpl).
1330 * snames.ads-tmpl: Add check names that were previously in
1331 a-contai.ads, so they are now visible in configuration files.
1332 * types.ads: Add checks corresponding to snames.ads-tmpl.
1333
1334 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1335
1336 * sem_ch5.adb (Analyze_Loop_Statement): Attach generated loop
1337 identifier to the tree, because it may be the root of a tree
1338 traversal in Pop_Scope when freeze actions are pending.
1339
1340 2015-10-20 Steve Baird <baird@adacore.com>
1341
1342 * pprint.ads (Expression_Image) Add new generic formal flag
1343 Hide_Parameter_Blocks.
1344 * pprint.adb (Expression_Image) If new flag is set, then display
1345 dereferences of parameter block components accordingly.
1346
1347 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1348
1349 * sem_prag.adb: Code clean up.
1350
1351 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1352
1353 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Code cleanup.
1354 (Make_Build_In_Place_Call_In_Object_Declaration): Update the
1355 parameter profile. Code cleanup. Request debug info for the
1356 object renaming declaration.
1357 (Move_Activation_Chain): Add new formal parameter and update the
1358 comment on usage.
1359 * exp_ch6.ads (Make_Build_In_Place_Call_In_Object_Declaration):
1360 Update the parameter profile and comment on usage.
1361 * sem_util.ads, sem_util.adb (Remove_Overloaded_Entity): New routine,
1362 currently unused.
1363
1364 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1365
1366 * sem_ch13.adb (Analyze_One_Aspect, case
1367 Aspect_Disable_Controlled): If expander is not active, pre-analyze
1368 expression anyway for ASIS and other tools use.
1369 * sem_prag.adb (Build_Generic_Class_Condition): Handle properly
1370 anonymous access types in parameter specifications. Make the
1371 formal type a formal derived type of the controlling type of
1372 the subprogram.
1373
1374 2015-10-20 Tristan Gingold <gingold@adacore.com>
1375
1376 * s-rident.ads: No_Task_At_Interrupt_Priority: New restriction.
1377 * sem_prag.adb (Analyze_Pragma): Check the restriction.
1378 * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
1379 Check the restriction (for aspects).
1380
1381 2015-10-20 Gary Dismukes <dismukes@adacore.com>
1382
1383 * sem_prag.adb: Minor reformatting.
1384
1385 2015-10-20 Tristan Gingold <gingold@adacore.com>
1386
1387 * sem_util.adb (Is_Protected_Self_Reference): Remove reference to
1388 UET_Address in comment.
1389 * sem_attr.adb (Check_Unit_Name): Adjust comment.
1390 (Analyze_Attribute): Remove handling of UET_Address.
1391 * sem_attr.ads (Attribute_Impl_Def): Remove Attribute_UET_Address.
1392 * snames.ads-tmpl Remove Name_UET_Address, Attribute_UET_Address.
1393 * exp_attr.adb (Expand_N_Attribute_Reference): Remove
1394 Attribute_UET_Address.
1395
1396 2015-10-20 Bob Duff <duff@adacore.com>
1397
1398 * a-cbdlli.adb, a-cdlili.adb, a-chtgop.adb, a-cidlli.adb,
1399 * a-cobove.adb, a-coinve.adb, a-convec.adb, a-crbtgo.adb ("="): Avoid
1400 modifying the tampering counts unnecessarily.
1401 (Adjust): Zero tampering counts unconditionally.
1402
1403 2015-10-20 Jerome Lambourg <lambourg@adacore.com>
1404
1405 * init.c: Fix build issue on arm-vx6 when building the RTP
1406 run-time.
1407
1408 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1409
1410 * sem_ch3.adb (Analyze_Object_Declaration): If the expression
1411 is an aggregate and compilation is in -gnatI mode (ignore rep
1412 clauses) do not delay resolution of aggregate, to prevent freeze
1413 actions out of order in the backend.
1414
1415 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1416
1417 * sem_prag.ads, sem_prag.adb (Build_Generic_Class_Condition):
1418 New procedure to construct a generic function for a class-wide
1419 precondition, to implement AI12-0113 concerning the new semantics
1420 of class-wide preconditions for overriding uperations.
1421
1422 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1423
1424 * sem_util.adb (Find_Actual): The routine is
1425 now capable of operating on entry calls.
1426
1427 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1428
1429 * sem_res.adb: Remove redundant check.
1430
1431 2015-10-20 Jerome Lambourg <lambourg@adacore.com>
1432
1433 * init.c (__gnat_vxsim_error_handler): Completely disable on
1434 VxWorks-7 as the VSBs used to build gcc do not support vxsim
1435 architecture.
1436
1437 2015-10-20 Claire Dross <dross@adacore.com>
1438
1439 * a-cfdlli.ads, a-cfinve.ads, a-cofove.ads (Generic_Sorting): Explicit
1440 SPARK_Mode.
1441 * a-cfhase.ads, a-cforse.ads (Generic_Keys): Explicit SPARK_Mode.
1442
1443 2015-10-20 Tristan Gingold <gingold@adacore.com>
1444
1445 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
1446 Check for No_Implicit_Protected_Object_Allocations.
1447 * fe.h (Check_No_Implicit_Task_Alloc,
1448 Check_No_Implicit_Protected_Alloc): Define and declare.
1449 * restrict.ads, restrict.adb (Check_No_Implicit_Task_Alloc,
1450 Check_No_Implicit_Protected_Alloc): New procedures to check the
1451 restrictions.
1452 * s-rident.ads (No_Implicit_Task_Allocations)
1453 (No_Implicit_Protected_Object_Allocations): Declare new
1454 restrictions.
1455
1456 2015-10-20 Yannick Moy <moy@adacore.com>
1457
1458 * sem_res.adb (Resolve_Selected_Component): Only set flag
1459 when component is defined in a variant part.
1460 * sem_util.adb,
1461 * sem_util.ads (Is_Declared_Within_Variant): Promote local query
1462 as publicy visible one for use in Resolve_Selected_Component.
1463
1464 2015-10-20 Philippe Gil <gil@adacore.com>
1465
1466 * g-debpoo.adb: allow instrumented System.Memory to use Debug_Pool
1467 from foreign threads.
1468 * g-debpoo.adb (Print_Traceback): NEW print traceback if available
1469 added to support Stack_Trace_Depth = 0.
1470 (Print_Address): NEW print System.Address without no secondary
1471 stack use (Address_Image uses secondary stack)
1472
1473 2015-10-20 Yannick Moy <moy@adacore.com>
1474
1475 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize local variable
1476 Func.
1477
1478 2015-10-20 Jerome Lambourg <lambourg@adacore.com>
1479
1480 * init.c (__gnat_error_handler for vxworks): Force
1481 SPE bit in the MSR when handling signals
1482
1483 2015-10-20 Arnaud Charlet <charlet@adacore.com>
1484
1485 * einfo.ads, sem_ch12.adb, sem_ch6.adb, table.ads, s-stposu.ads,
1486 g-table.ads, g-dyntab.ads, makeutl.ads, a-crdlli.ads: Fix typos.
1487
1488 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1489
1490 * sem_ch5.adb (Analyze_Loop_Statement): Element iterators
1491 over multidimensional arrays create additional loops during
1492 expansion. For such loops we create a label as a scope
1493 name. Attach this label properly to tree, for use in GNATProve
1494 over such element iterators.
1495 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): The loop to
1496 which the attribute applies comes from source, not from expansion
1497 of an element iterator or a quantified expression.
1498 * exp_attr.adb (Expand_N_Attribute_Reference): Ditto.
1499
1500 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1501
1502 * exp_ch6.adb (Expand_Call): Check for a call to a function
1503 declared in a Dimension I/O package, to handle the new Image
1504 function.
1505
1506 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1507
1508 * inline.ads: Minor comment fixes.
1509
1510 2015-10-20 Bob Duff <duff@adacore.com>
1511
1512 * a-comutr.ads (Tree_Node_Access): Add No_Strict_Aliasing, because
1513 we're doing unchecked conversions with this pointer.
1514
1515 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1516
1517 * exp_ch9.adb (Next_Protected_Operation): An expression function
1518 used as a completion can be the next protected operation in a
1519 protected body.
1520
1521 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1522
1523 * sem_res.adb (Is_OK_Volatile_Context): Add a guard when checking a
1524 possible call to an instance of Ada.Unchecked_Conversion to avoid
1525 testing protected function calls. Allow references to protected objects
1526 in prefixed protected calls.
1527 (Is_Protected_Operation_Call): New routine.
1528
1529 2015-10-20 Yannick Moy <moy@adacore.com>
1530
1531 * exp_ch5.adb, exp_ch5.ads (Expand_Iterator_Loop_Over_Array): Make
1532 query public. Remove code handling with iterator loop over array
1533 of the 'in' form, which is not allowed in Ada. * exp_spark.adb
1534 (Expand_SPARK): Expand loop statements that take the form of an
1535 iterator over an array.
1536 * sem_ch5.adb (Analyze_Loop_Statement): Do not analyze loop statements
1537 that take the form of an iterator over an array, so that the rewritten
1538 form gets analyzed instead.
1539 * sem_util.adb, sem_util.ads (Is_Iterator_Over_Array): New query
1540 to recognize iterators over arrays.
1541
1542 2015-10-20 Arnaud Charlet <charlet@adacore.com>
1543
1544 * s-excdeb.ads, s-excdeb.adb (Debug_Raise_Exception): Add
1545 parameter Message.
1546 * a-except.adb (Raise_Current_Excep): Update call to
1547 Debug_Raise_Exception.
1548 * a-except-2005.adb (Complete_Occurrence): Ditto.
1549 * sem_ch12.adb: Whitespace fix.
1550
1551 2015-10-20 Yannick Moy <moy@adacore.com>
1552
1553 * sem_warn.adb (Is_OK_Fully_Initialized): Consider types with DIC as
1554 fully default initialized.
1555 * sem_ch6.adb: minor style fix in comment
1556
1557 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1558
1559 * s-diflio.ads, s-diflio.adb (Image): New function for dimensioned
1560 quantities, to produce a string that includes the dimension
1561 synbol for the quantity, or the vector of dimensions in standard
1562 notation.
1563 * sem_dim.adb (Expand_Put_Call_With_Symbol): Process new function
1564 Image, to include dimension information in the generated string,
1565 identical to the string produced by the Put procedure on a string
1566 for a dimensioned quantity.
1567
1568 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1569
1570 * exp_ch7.adb (Process_Declarations): A loop
1571 parameter does not require finalization actions.
1572
1573 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1574
1575 * exp_ch6.adb (Expand_Simple_Function_Return): Do not create an
1576 actual subtype for a mutable record return type if the expression
1577 is itself a function call.
1578
1579 2015-10-20 Dmitriy Anisimkov <anisimko@adacore.com>
1580
1581 * s-atocou.adb, s-atocou-builtin.adb: Fix implementation description
1582 related to new type support.
1583
1584 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1585
1586 * sem_res.adb (Resolve_Explicit_Dererence): Call Analyze_Dimension
1587 to propagate dimension information from prefix.
1588 * sem_dim.adb (Analyze_Dimension): Handle Explicit_Dereference.
1589 * inline.ads: minor whitespace fix in comment
1590 * sem_ch6.adb: minor gramar fix in comment
1591
1592 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1593
1594 * sem_ch3.adb (Analyze_Object_Contract):
1595 A protected type or a protected object is allowed to have a
1596 discriminated part.
1597
1598 2015-10-20 Bob Duff <duff@adacore.com>
1599
1600 * sem_util.adb (Requires_Transient_Scope):
1601 Return true for mutable records if the maximum size is very large.
1602
1603 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1604
1605 * a-except-2005.adb (To_Stderr): Import Put_Char_Stderr with
1606 the same signature as in System.IO.Put.
1607
1608 2015-10-20 Bob Duff <duff@adacore.com>
1609
1610 * a-cobove.adb (Set_Length): Restore previous logic, but with "Checks
1611 and then" on the check.
1612
1613 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1614
1615 * par-ch3.adb (P_Known_Discriminant_Part_Opt): Handle properly
1616 a misplaced "constant" keyword in a discriminant specification.
1617
1618 2015-10-20 Steve Baird <baird@adacore.com>
1619
1620 * einfo.ads (Is_Param_Block_Component_Type): New function decl
1621 for querying the flag.
1622 (Set_Is_Param_Block_Component_Type): New procedure decl for setting
1623 the flag.
1624 * einfo.adb (Is_Param_Block_Component_Type): New function body.
1625 (Set_Is_Param_Block_Component_Type): New procedure body.
1626 (Write_Entity_Flags): Display the new flag.
1627 * exp_ch9.adb (Build_Parameter_Block): Set flag on parameter
1628 block component types.
1629 (Expand_N_Entry_Declaration): Set flag on parameter block component
1630 types.
1631
1632 2015-10-20 Steve Baird <baird@adacore.com>
1633
1634 * sem_elab.adb: Do not pass an N_Attribute_Reference node to
1635 Sinfo.Set_No_Elaboration_Check.
1636 * sem_elab.adb (Check_Elab_Call) Do not pass a non-call
1637 node (specifically, an N_Attribute_Reference node) to
1638 Sinfo.Set_No_Elaboration_Check.
1639
1640 2015-10-20 Tristan Gingold <gingold@adacore.com>
1641
1642 * adaint.c: File names are case sensitive on aarch64-ios.
1643
1644 2015-10-20 Bob Duff <duff@adacore.com>
1645
1646 * a-cbdlli.ads, a-cbhase.ads, a-cbmutr.ads, a-cborse.ads,
1647 * a-cdlili.ads, a-cidlli.ads, a-cihase.ads, a-cimutr.ads,
1648 * a-ciorse.ads, a-cobove.ads, a-cohase.ads, a-coinve.ads,
1649 * a-comutr.ads, a-convec.ads, a-coorse.ads: Use non-private with clause.
1650
1651 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1652
1653 * exp_util.adb (Requires_Cleanup_Actions): A loop parameter does not
1654 require finalization actions.
1655
1656 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1657
1658 * par-ch3.adb (P_Declarative_Items): In case of misplaced
1659 aspect specifications, ensure that flag Done is properly set to
1660 continue parse.
1661
1662 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1663
1664 * rtsfind.ads Remove the entries for Ada.Synchronous_Task_Control
1665 and Suspension_Object from tables RE_Id, RE_Unit_Table and RTU_Id.
1666 * sem_util.adb (Is_Descendant_Of_Suspension_Object): Update
1667 the comment on usage. Use routine Is_Suspension_Object to detect
1668 whether a type matches Suspension_Object.
1669 (Is_Suspension_Object): New routine.
1670 * snames.ads-tmpl: Add predefined names for Suspension_Object
1671 and Synchronous_Task_Control.
1672
1673 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1674
1675 * sem_smem.adb (Check_Shared_Var): Clean up code that handles
1676 type declarations with discriminants, remove obsolete check.
1677
1678 2015-10-20 Arnaud Charlet <charlet@adacore.com>
1679
1680 * par_sco.adb: Minor style fixes.
1681
1682 2015-10-20 Vincent Celier <celier@adacore.com>
1683
1684 * debug.adb: Update documentation of -gnatdu.
1685
1686 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1687
1688 * aspects.adb Add aspect Volatile_Function to table
1689 Canonical_Aspect.
1690 * aspect.ads Add aspect Volatile_Function to tables
1691 Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
1692 and Implementation_Defined_Aspect. Aspects Async_Readers,
1693 Async_Writers, Effective_Reads and Effective_Writes are no
1694 longer Boolean.
1695 * einfo.adb (Get_Pragma): Add an entry for pragma
1696 Volatile_Function.
1697 * par-prag.adb (Prag): Pragma Volatile_Function does not need
1698 special processing by the parser.
1699 * rtsfind.ads Add an entry for Ada.Synchronous_Task_Control in
1700 table RTU_Id. Add an entry for Suspension_Object in table RE_Id.
1701 * sem_ch3.adb Fix SPARK RM references.
1702 (Analyze_Object_Contract): Update the error guard.
1703 * sem_ch5.adb Fix SPARK RM references.
1704 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Ensure
1705 that a non-volatile function does not contain an effectively
1706 volatile parameter.
1707 (Analyze_Subprogram_Contract): Ensure
1708 that a non-volatile function does not contain an effectively
1709 volatile parameter.
1710 * sem_ch12.adb (Instantiate_Object): Remove the reference to
1711 the SPARK RM from the error message.
1712 * sem_ch13.adb (Analyze_Aspect_Specifications): Add
1713 processing for aspects Async_Readers, Async_Writers,
1714 Effective_Reads, Effective_Writes and Volatile_Function.
1715 (Check_Aspect_At_Freeze_Point): Aspects Async_Readers,
1716 Async_Writers, Effective_Reads, Effective_Writes and
1717 Volatile_Function do not need special processing at the freeze
1718 point.
1719 * sem_prag.adb Add an entry for pragma Volatile_Function in
1720 table Sig_Flags.
1721 (Analyze_External_Property_In_Decl_Part):
1722 Reimplemented as Async_Readers, Async_Writers, Effective_Reads
1723 and Effective_Writes are no longer Boolean pragmas.
1724 (Analyze_Global_Item): An external state or effectively
1725 volatile object cannot appear as an item in pragma
1726 [Refined_]Global.
1727 (Analyze_Pragma): Change the implementation
1728 of Async_Readers, Async_Writers, Effective_Reads and
1729 Effective_Writes as these are no longer Boolean pragmas.
1730 Use routine Check_Static_Boolean_Expression to verify the
1731 optional Boolean expression of Async_Readers, Async_Writers,
1732 Constant_After_Elaboration, Effective_Reads, Effective_Writes,
1733 Extensions_Visible and Volatile_Function. Add processing for
1734 pragma Volatile_Function.
1735 (Check_Static_Boolean_Expression): New routine.
1736 (Find_Related_Context): Update the comment on usage.
1737 (Is_Enabled_Pragma): New routine.
1738 * sem_prag.ads (Is_Enabled_Pragma): New routine.
1739 * sem_res.adb Fix SPARK RM references.
1740 (Is_OK_Volatile_Context): Add detection for return statements.
1741 (Resolve_Actuals): Remove the check concerning an effectively volatile
1742 OUT actual parameter as this is now done by the SPARK flow analyzer.
1743 (Resolve_Entity_Name): Remove the check concerning an effectively
1744 volatile OUT formal parameter as this is now done by the SPARK
1745 flow analyzer. (Within_Volatile_Function): New routine.
1746 * sem_util.adb (Add_Contract_Item): Add processing for pragma
1747 Volatile_Function.
1748 (Check_Nonvolatile_Function_Profile): New routine.
1749 (Is_Descendant_Of_Suspension_Object): New routine.
1750 (Is_Effectively_Volatile): Protected types and descendants of
1751 Suspension_Object are now treated as effectively volatile.
1752 (Is_Enabled): The optional Boolean expression of pragmas
1753 Async_Readers, Async_Writers, Effective_Reads and Effective_Writes
1754 now appears as the first argument.
1755 (Is_Volatile_Function): New routine.
1756 * sem_util.ads Add SPARK RM references.
1757 (Add_Contract_Item): Update the comment on usage.
1758 (Check_Nonvolatile_Function_Profile): New routine.
1759 (Is_Effectively_Volatile): Update the comment on usage.
1760 (Is_Volatile_Function): New routine.
1761 * snames.ads-tmpl Add a predefined name and pragma id for
1762 Volatile_Function.
1763
1764 2015-10-20 Arnaud Charlet <charlet@adacore.com>
1765
1766 * gnat_ugn.texi, gnat_rm.texi: Regenerate.
1767 * doc/gnat_ugn/gnat_project_manager.rst,
1768 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1769 doc/gnat_ugn/the_gnat_compilation_model.rst,
1770 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1771 doc/gnat_rm/implementation_defined_pragmas.rst,
1772 doc/gnat_rm/the_gnat_library.rst,
1773 doc/gnat_rm/implementation_defined_characteristics.rst: Update doc.
1774
1775 2015-10-20 Arnaud Charlet <charlet@adacore.com>
1776
1777 * gcc-interface/Makefile.in: Update targets.
1778
1779 2015-10-20 Bob Duff <duff@adacore.com>
1780
1781 * sem_ch13.adb (Analyze_One_Aspect): Avoid
1782 analyzing the expression in a 'Disable_Controlled attribute when
1783 Expander_Active is False, because otherwise, we get errors about
1784 nonstatic expressions in pragma-Preelaborate generic packages.
1785 * restrict.ads: minor whitespace cleanup in comment
1786
1787 2015-10-20 Bob Duff <duff@adacore.com>
1788
1789 * a-conhel.adb: Remove "use SAC;", because otherwise the compiler
1790 complains about use clauses in run-time units. Use "use type"
1791 instead.
1792 * a-btgbso.adb, a-btgbso.ads, a-cbdlli.adb, a-cbdlli.ads,
1793 * a-cbhama.adb, a-cbhama.ads, a-cbhase.adb, a-cbhase.ads,
1794 * a-cbmutr.adb, a-cbmutr.ads, a-cborma.adb, a-cborma.ads,
1795 * a-cborse.adb, a-cborse.ads, a-cdlili.adb, a-cdlili.ads,
1796 * a-chtgbk.adb, a-chtgbk.ads, a-chtgbo.adb, a-chtgbo.ads,
1797 * a-chtgke.adb, a-chtgke.ads, a-chtgop.adb, a-chtgop.ads,
1798 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
1799 * a-cihase.adb, a-cihase.ads, a-cimutr.adb, a-cimutr.ads,
1800 * a-ciorma.adb, a-ciorma.ads, a-ciormu.adb, a-ciormu.ads,
1801 * a-ciorse.adb, a-ciorse.ads, a-cobove.adb, a-cobove.ads,
1802 * a-cohama.adb, a-cohama.ads, a-cohase.adb, a-cohase.ads,
1803 * a-cohata.ads, a-coinve.adb, a-comutr.adb, a-comutr.ads,
1804 * a-convec.adb, a-coorma.adb, a-coorma.ads, a-coormu.adb,
1805 * a-coormu.ads, a-coorse.adb, a-coorse.ads, a-crbltr.ads,
1806 * a-crbtgk.adb, a-crbtgk.ads, a-crbtgo.adb, a-crbtgo.ads,
1807 * a-rbtgbk.adb, a-rbtgbk.ads, a-rbtgbo.adb, a-rbtgbo.ads,
1808 * a-rbtgso.adb, a-rbtgso.ads: Change all the predefined containers
1809 to share the tampering machinery in Ada.Containers.Helpers. This
1810 reduces the amount of duplicated code, and takes advantage of
1811 efficiency improvements in Helpers.
1812 Protect all run-time checks and supporting machinery with "if
1813 Checks" or "if T_Check", so this code can be suppressed with
1814 pragma Suppress or -gnatp.
1815 Add Pseudo_Reference and Get_Element_Access to remaining
1816 containers, so that the compiler can optimize "for ... of" loops.
1817
1818 2015-10-20 Bob Duff <duff@adacore.com>
1819
1820 * a-contai.adb, a-coinve.ads, a-contai.ads, a-conhel.adb, a-conhel.ads,
1821 Makefile.rtl, a-convec.ads: Move helper code from Ada.Containers to a
1822 new package Ada.Containers.Helpers, because otherwise it's not
1823 visible everywhere it needs to be (e.g. in the package
1824 Ada.Containers.Red_Black_Trees, Generic_Tree_Types wants to have
1825 a component of type Tamper_Counts).
1826
1827 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1828
1829 * sem_type.adb (Intersect_Types): Specialize error message when
1830 one operand is a limited view which is a priori incompatible
1831 with all other named types.
1832 * sem_prag.adb: minor fix in comment
1833 * sem_ch13.adb: Code clean up.
1834
1835 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1836
1837 * sem_ch12.adb (Need_Subprogram_Instance_Body): Also return true
1838 for a subprogram nested in an inlined subprogram.
1839
1840 2015-10-20 Bob Duff <duff@adacore.com>
1841
1842 * a-coinve.adb, a-contai.adb: Update comments.
1843 * pprint.ads: Minor reformatting.
1844
1845 2015-10-20 Tristan Gingold <gingold@adacore.com>
1846
1847 * env.c, init.c: Handle arm64-darwin like arm-darwin.
1848 * tracebak.c: Handle arm64-darwin.
1849
1850 2015-10-20 Bob Duff <duff@adacore.com>
1851
1852 * s-trasym.adb (Symbolic_Traceback): When giving the traceback
1853 as hexadecimal code addresses, separate by blanks instead of LF.
1854
1855 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1856
1857 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate freeze
1858 node for subprogram in Compile_Only mode.
1859
1860 2015-10-20 Dmitriy Anisimkov <anisimko@adacore.com>
1861
1862 * s-atocou.adb, s-atocou.ads, a-contai.adb, a-contai.ads,
1863 s-atocou-x86.adb, s-atocou-builtin.adb: Task safe over container
1864 iterations.
1865
1866 2015-10-20 Philippe Gil <gil@adacore.com>
1867
1868 * g-debpoo.ads (Dump): NEW print Debug_Pool statistics & main
1869 contributors.
1870 (Dump_Stdout): NEW print to stdout Debug_Pool statistics &
1871 main contributors.
1872 (Reset): NEW reset counters to 0.
1873 (Get_Size): NEW return size allocated at parameter.
1874 (High_Water_Mark): NEW.
1875 (Current_Water_Mark): NEW.
1876 (System_Memory_Debug_Pool): NEW tell Debug_Pools that
1877 System.Memory uses it.
1878 * g-debpoo.adb (Traceback_Htable_Elem): add Frees, Total_Frees
1879 components.
1880 (Find_Or_Create_Traceback): don't manage in System.Memory
1881 Debug_Pool Deallocate Traceback's.
1882 (Validity): add optional Handled table when System.Memory asked
1883 for Allow_Unhandled_Memory.
1884 (Allocate): handle Allocate reentrancy occuring when System.Memory
1885 uses Debug_Pools.
1886 (Deallocate): handle when Allow_Unhandled_Memory
1887 is set deallocation of unhandled memory. Dont't check
1888 Size_In_Storage_Elements if equal to Storage_Count'Last. update
1889 Frees, Total_Frees new components.
1890
1891 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1892
1893 * fe.h: Minor tweak.
1894
1895 2015-10-20 Vincent Celier <celier@adacore.com>
1896
1897 * sem_cat.adb (Check_Categorization_Dependencies): Do nothing
1898 when -gnatdu is specified.
1899
1900 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1901
1902 * sem_ch8.adb (analyze_Subprogram_Renaming): The actual for a
1903 formal abstract subprogram must have a controlling type.
1904 * stand.ads: Minor whitespace cleanup.
1905
1906 2015-10-20 Gary Dismukes <dismukes@adacore.com>
1907
1908 * sem_ch13.adb: Minor reference change (RM => AARM).
1909
1910 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1911
1912 * make.adb (Check): Skip multilib switches reinstated by the
1913 compiler only when counting the number of switches, since it is
1914 what really matters in the regular operating mode.
1915
1916 2015-10-20 Arnaud Charlet <charlet@adacore.com>
1917
1918 * einfo.adb: Add extra assertion for small clause.
1919 * cstand.adb: Minor style fix in comment.
1920 * debug.adb: Minor reformatting.
1921 * exp_util.adb: Fix minor typo.
1922
1923 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1924
1925 * sem_ch12.adb (Same_Instantiated_Function): New predicate in
1926 Check_Formal_Package_Instance, used to verify that the formal
1927 and the actual of an actual package match when both are functions
1928 given as attribute references.
1929
1930 2015-10-20 Bob Duff <duff@adacore.com>
1931
1932 * a-coinve.ads, a-coinve.adb: Do the same efficiency
1933 improvements that were already done in the definite case
1934 (Ada.Containers.Vectors, i.e. a-convec). This includes the
1935 ability to suppress checks, the fast path for Append, inlining
1936 as appropriate, and special-casing of "for ... of" loops. Reuse
1937 the tampering machinery that is now in Ada.Containers. Simplify
1938 many operations.
1939 * a-convec.ads, a-convec.adb: Change the code to be more similar
1940 to a-coinve.
1941 * a-finali.ads, a-finali.adb: Expose the "null"-ness of the
1942 operations. This may enable optimizations in the future, and
1943 seems cleaner anyway.
1944
1945 2015-10-20 Ed Schonberg <schonberg@adacore.com>
1946
1947 * sem_ch13.adb (Is_Operational_Item): Attributes related to
1948 Ada 2012 iterators are operational items, and can be specified
1949 on partial views.
1950
1951 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1952
1953 * sem_prag.adb (Check_Usage): Update the calls to Usage_Error.
1954 (Usage_Error): Remove formal parameter Item. Emit a clearer message
1955 concerning a missing dependency item and place it on the related pragma.
1956
1957 2015-10-20 Bob Duff <duff@adacore.com>
1958
1959 * debug.adb, expander.adb: Implement -gnatd.B switch, which
1960 triggers a bug box when an abort_statement is seen. This is
1961 useful for testing Comperr.Compiler_Abort.
1962 * gnat1drv.adb: Trigger bug box on all exceptions other than
1963 Unrecoverable_Error.
1964
1965 2015-10-20 Thomas Quinot <quinot@adacore.com>
1966
1967 * Makefile.rtl: add the following...
1968 * g-binenv.ads, g-binenv.adb: New unit providing runtime access
1969 to bind time captured values ("bind environment")
1970 * init.c: declare new global variable __gl_bind_env_addr.
1971 * bindgen.ads, bindgen.adb (Set_Bind_Env): record a bind
1972 environment key=value pair.
1973 (Gen_Bind_Env_String): helper to produce the bind environment data
1974 called in the binder generated file.
1975 (Gen_Output_File_Ada): Call the above (Gen_Adainit): Set
1976 __gl_bind_env_addr accordingly.
1977 * switch-b.adb: Support for command line switch -V (user interface
1978 to set a build environment key=value pair)
1979 * bindusg.adb: Document the above
1980
1981 2015-10-20 Vincent Celier <celier@adacore.com>
1982
1983 * sem_prag.adb (Analyse_Pragma: Pragma Pure): Do not set the
1984 entity as Pure if Debug_Flag_U is set.
1985
1986 2015-10-20 Bob Duff <duff@adacore.com>
1987
1988 * output.adb (Write_Int): Work with negative numbers in order to avoid
1989 negating Int'First and thereby causing overflow.
1990 * sem_util.adb: Minor comment fix.
1991
1992 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
1993
1994 * make.adb (Check): Skip multilib switches reinstated by the
1995 compiler when doing the comparison with switches passed to
1996 gnatmake.
1997
1998 2015-10-20 Yannick Moy <moy@adacore.com>
1999
2000 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Return
2001 False for procedures marked No_Return.
2002 * sem_util.ads (Enclosing_Declaration): Improve comment.
2003 * einfo.adb (Is_Completely_Hidden): Remove spurious assertion.
2004
2005 2015-10-20 Thomas Quinot <quinot@adacore.com>
2006
2007 * types.ads: Minor reformatting.
2008
2009 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
2010
2011 * einfo.adb (Get_Pragma): Minor reformatting. Rename local constant
2012 Is_CDG to Is_CLS. Add pragma Constant_After_Elaboration to the list of
2013 classification pragmas.
2014
2015 2015-10-20 Ed Schonberg <schonberg@adacore.com>
2016
2017 * sem_ch3.adb (Analyze_Declarations); At the of the visible part,
2018 perform name resolution on the expressions in aspects of visible
2019 entities.
2020 * sem_ch13.ads, sem_ch13.adb (Resolve_Aspect_Expressions): Resolve
2021 expressions in aspects independently of whether corresponding
2022 entity is frozen. Used to complete name resolution of aspect
2023 expressions for entities declared in the visible part of a
2024 package or generic package declaration.
2025
2026 2015-10-20 Vincent Celier <celier@adacore.com>
2027
2028 * prj-attr.adb: Add package Codepeer and its attributes.
2029
2030 2015-10-20 Thomas Quinot <quinot@adacore.com>
2031
2032 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
2033
2034 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
2035
2036 * gnatlink.adb (Gnatlink): Do not translate --RTS switch
2037 for the linker and instead pass the switches that were
2038 reinstated by the compiler.
2039
2040 2015-10-20 Bob Duff <duff@adacore.com>
2041
2042 * a-contai.ads, a-convec.ads: Move Count_Type_Last from
2043 a-convec.ads to a-contai.ads, so other containers can refer to it.
2044
2045 2015-10-20 Ed Schonberg <schonberg@adacore.com>
2046
2047 * sem_ch3.adb (Check_Nonoverridable_Aspects): New procedure within
2048 Analyze_Full_Type_ Declaration, used to apply legality rules in
2049 13,1,1 (18.3.3) concerning aspects that cannot be overridden in
2050 a type extension.
2051 (Check_Duplicate_Aspects): It is not legal to specify the
2052 Implicit_Dereference aspect on a full view if partial view has
2053 known discriminants.
2054 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Verify that
2055 the specification of the aspect on a derived type confirms the
2056 value of the inherited one.
2057 * sem_util.adb (Reference_Discriminant): Return empty if none
2058 specified.
2059
2060 2015-10-20 Thomas Quinot <quinot@adacore.com>
2061
2062 * exp_ch5.adb, sem_ch3.adb: Minor reformatting.
2063
2064 2015-10-20 Vincent Celier <celier@adacore.com>
2065
2066 * a-strsup.adb (Super_Trim): Remove statements that put NUL
2067 characters in unused portion of the Data string.
2068
2069 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
2070
2071 * aspects.adb Add an entry for Constant_After_Elaboration in
2072 table Canonical_Aspect.
2073 * aspects.ads Add entries for Constant_After_Elaboration in
2074 tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
2075 and Implementation_Defined_Aspect.
2076 * par-prag.adb Pragma Constant_After_Elaboration does not require
2077 special processing by the parser.
2078 * sem_ch13.adb Add an entry for Constant_After_Elaboration
2079 in table Sig_Flags.
2080 (Analyze_Aspect_Specifications):
2081 Add processing for aspect Constant_After_Elaboration.
2082 (Check_Aspect_At_Freeze_Point): Aspect Constant_After_Elaboration
2083 does not require special processing at freeze time.
2084 * sem_prag.adb (Analyze_Pragma): Add processing for pragma
2085 Constant_After_Elaboration. Use routine Find_Related_Context to
2086 retrieve the context of pragma Part_Of.
2087 (Duplication_Error): Update comment on usage.
2088 (Find_Related_Context): New routine.
2089 * sem_prag.ads Add an entry for Constant_After_Elaboration
2090 in table Aspect_Specifying_Pragma.
2091 (Analyze_Contract_Cases_In_Decl_Part): Update the comment on usage.
2092 * sem_util.adb (Add_Contract_Item): Add processing for pragma
2093 Constant_After_Elaboration.
2094 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
2095 * snames.ads-tmpl Add new predefined name and aspect id for
2096 Constant_After_Elaboration.
2097
2098 2015-10-16 Vincent Celier <celier@adacore.com>
2099
2100 * prj-pp.adb (Pretty_Print.Print): Correctly display extending
2101 packages, instead of making them renamed packages.
2102
2103 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
2104
2105 * sem_ch12.adb (Analyze_Package_Instantiation):
2106 Treat a missing SPARK_Mode annotation as having mode "Off".
2107 (Analyze_Subprogram_Instantiation): Treat a missing SPARK_Mode
2108 annotation as having mode "Off".
2109 (Instantiate_Package_Body): Code
2110 reformatting. Treat a missing SPARK_Mode annotation as having mode
2111 "Off".
2112 (Instantiate_Subprogram_Body): Code reformatting. Treat
2113 a missing SPARK_Mode annotation as having mode "Off".
2114
2115 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2116
2117 * exp_ch5.adb: Code clean up.
2118 * sem_ch13.adb: Minor fix in comment.
2119
2120 2015-10-16 Bob Duff <duff@adacore.com>
2121
2122 * a-exexda.adb: Change format of Exception_Information to be
2123 more like what we print for unhandled exceptions.
2124 * a-exstat.adb: Parse new format.
2125 * a-except-2005.adb, a-except.adb: Document new format.
2126
2127 2015-10-16 Javier Miranda <miranda@adacore.com>
2128
2129 * sem_ch5.adb (Analyze_Iterator_Specification): Associate a
2130 transient scope with the renaming object declararation.
2131 * exp_util.adb (Insert_Actions): if the enclosing interator
2132 loop is marked as requiring the secondary stack then attach the
2133 actions to the transient scope.
2134
2135 2015-10-16 Bob Duff <duff@adacore.com>
2136
2137 * exp_ch7.adb: Minor spelling fixes.
2138
2139 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2140
2141 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
2142 If anonymous type is component type of array type declaration,
2143 analyze its declaration in the current scope, not the enclosing
2144 one.
2145
2146 2015-10-16 Gary Dismukes <dismukes@adacore.com>
2147
2148 * prj.adb, sem_util.adb, exp_ch6.adb: Minor reformatting.
2149
2150 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2151
2152 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Modify
2153 expansion to allow element iteration over formal containers
2154 whose elements are indefinite types.
2155
2156 2015-10-16 Doug Rupp <rupp@adacore.com>
2157
2158 * s-taprop-linux.adb (Monotonic_Clock): Call clock_gettime
2159 instead of gettimeofday.
2160 * s-osinte-android.ads, s-osinte-android.adb, s-osinte-linux.ads
2161 (clock_gettime): New imported subprogram.
2162
2163 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
2164
2165 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2166 Indefinite or limited library level objects are now returned on
2167 the heap.
2168 * exp_ch7.adb (Build_Finalization_Master): Add formal
2169 parameter For_Lib_Level. Add context specific insertion for a
2170 finalization master created for an access result type related
2171 to a build-in-place function call used to initialize a library
2172 level object.
2173 * exp_ch7.ads (Build_Finalization_Master): Add formal parameter
2174 For_Lib_Level. Update the comment on usage.
2175 * sem_util.adb (Mark_Coextensions): Code cleanup.
2176
2177 2015-10-16 Emmanuel Briot <briot@adacore.com>
2178
2179 * prj.adb (For_Every_Project_Imported_Context): Fix handling
2180 of aggregated projects with duplicate names.
2181 * a-ngelfu.ads: Minor whitespace fix.
2182
2183 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2184
2185 * sem_ch13.adb (Build_Predicate_Functions): The expression for
2186 the predicate is side-effect free if it does not contain any
2187 variable references.
2188
2189 2015-10-16 Bob Duff <duff@adacore.com>
2190
2191 * a-convec.adb ("="): Previous version depended
2192 on "=" composing, but that doesn't quite work -- we want the "="
2193 operator passed in to the generic. So we need a loop after all.
2194
2195 2015-10-16 Yannick Moy <moy@adacore.com>
2196
2197 * sem_util.adb (Is_Object_Reference): Attribute 'Loop_Entry produces
2198 an object.
2199 * sem_ch6.adb: Minor fix in comment.
2200
2201 2015-10-16 Bob Duff <duff@adacore.com>
2202
2203 * a-contai.ads: Add two check names: Container_Checks and
2204 Tampering_Check. Move the tampering check machinery from
2205 Ada.Containers.Vectors to Ada.Containers. Later we can share it
2206 with other containers.
2207 Disable the tampering machinery in the presence of
2208 Suppress(Tampering_Check).
2209 Simplify the implementation of tampering checks. E.g. use RAII
2210 to make incrementing/decrementing of the counts more concise.
2211 * a-contai.adb: New package body, implementing the above.
2212 * a-convec.ads, a-convec.adb: Use tampering check machinery
2213 in Ada.Containers.
2214 Disable all checking code when checks are suppressed.
2215 Simplify many of the operations. Implement "&" in terms of Append,
2216 rather than "by hand".
2217 Remove: function "=" (L, R : Elements_Array) return Boolean is
2218 abstract; so we can call the predefined "=" on Elements_Array.
2219 For "=" on Vectors: Previously, we returned True immediately if
2220 Left'Address = Right'Address. That seems like a non-optimization
2221 ("if X = X" is unusual), so removed that. Simplify by using
2222 slice comparison ("=" on Element_Array will automatically call
2223 "=" on the components, even if user defined).
2224
2225 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2226
2227 * sem_ch13.adb (Chek_Record_Representation_Clause): When
2228 iterating over components, skip anonymous subtypes created for
2229 constrained array components.
2230
2231 2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
2232
2233 * a-tags.ads (Parent_Size): Remove obsolete pragma Export.
2234 * s-finmas.ads (Header_Offset): Delete.
2235 * s-finmas.adb (Header_Offset): Likewise.
2236 (Finalize): Call Header_Size instead of Header_Offset.
2237 * s-stposu.adb (Allocate_Any_Controlled): Likewise.
2238 (Deallocate_Any_Controlled): Likewise.
2239
2240 2015-10-16 Arnaud Charlet <charlet@adacore.com>
2241
2242 * a-exetim.ads, a-exetim-mingw.ads, a-exetim-default.ads: Whitespace
2243 cleanup.
2244 * s-osprim-mingw.adb, einfo.ads, sem_util.adb, sem_util.ads,
2245 sem_ch4.adb, sem_ch13.adb, s-trasym.adb, s-trasym.ads,
2246 s-taprop-posix.adb: Minor reformatting.
2247
2248 2015-10-16 Bob Duff <duff@adacore.com>
2249
2250 * adadecode.h, adadecode.c (ada_demangle): Remove
2251 ada_demangle, no longer used.
2252 * a-except-2005.adb: Bring System.Traceback.Symbolic into the
2253 closure.
2254
2255 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2256
2257 * sem_util.adb, sem_util.ads (Get_Reference_Discriminant): Utility to
2258 locate the access discriminant that supports implicit dereference on a
2259 record type.
2260 (Is_OK_Variable_For_Out_Parameter): Reject other illegal uses
2261 of Implicit_Dereference on an access_to_constant when actual
2262 parameter is a rewritten variable or function call.
2263
2264 2015-10-16 Bob Duff <duff@adacore.com>
2265
2266 * a-tags.adb, s-trasym.adb, s-trasym.ads: Make sure we don't get
2267 elaboration circularities when polling is turned on.
2268
2269 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2270
2271 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
2272 When creating a full declaration for a formal parameter, the
2273 entity is labelled as an Itype, so set Associated_Node_For_Itype
2274 accordingly.
2275 * einfo.ads: Clarify use of Associated_Node_For_Itype.
2276
2277 2015-10-16 Bob Duff <duff@adacore.com>
2278
2279 * bindgen: Move pragmas Warnings earlier, otherwise
2280 we can get warnings on with_clauses.
2281
2282 2015-10-16 Arnaud Charlet <charlet@adacore.com>
2283
2284 * s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb,
2285 s-taprop-posix.adb (Monotonic_Clock): Removed, not used.
2286 Remove remaining references to OS_Primitives.Monotonic_Clock.
2287 Keep it only on windows which is a special case.
2288
2289 2015-10-16 Javier Miranda <miranda@adacore.com>
2290
2291 * a-textio.adb (Get_Line): Fix documentation.
2292 * einfo.ads (Interface_Name): Fix documentation.
2293 * exp_aggr.adb (Backend_Processing_Possible): Fix documentation.
2294 * exp_ch4.adb (Expand_N_In): Fix documentation.
2295
2296 2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
2297
2298 * inline.adb (Subp_Info): Remove Listed component.
2299 (Add_Inlined_Subprogram): Take an entity instead of an index.
2300 Do not set Listed component to True.
2301 (New_Entry): Do not initialize Listed component to False.
2302 (Analyze_Inlined_Bodies): Do not test Listed component
2303 (Must_Inline): Add calls not in the main unit only
2304 if they are in a subprogram that can be inlined outside its unit.
2305 (Add_Inlined_Body): Move test around and add comment.
2306
2307 2015-10-16 Arnaud Charlet <charlet@adacore.com>
2308
2309 * sinfo.ads, einfo.ads: monir clean ups.
2310
2311 2015-10-16 Arnaud Charlet <charlet@adacore.com>
2312
2313 * usage.adb, debug.adb, a-except.adb, a-except.ads, a-except-2005.adb,
2314 a-except-2005.ads, s-imgrea.adb: Minor code clean ups related to
2315 jgnat/dotnet removal.
2316
2317 2015-10-16 Arnaud Charlet <charlet@adacore.com>
2318
2319 * s-osprim-vxworks.adb, s-osprim-darwin.adb, s-tadeca.adb,
2320 s-osprim-unix.adb, s-osprim-solaris.adb, s-osprim-posix.adb,
2321 s-osprim.ads (Monotonic_Clock): Removed, unused.
2322
2323 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2324
2325 * sem_ch4.adb (Try_Object_Operation, Try_One_Interpretation):
2326 Do not reset the Obj_Type of the prefix if an interpretation
2327 involves an untagged type, to prevent a crash when analyzing an
2328 illegal program in All_Errors mode.
2329
2330 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
2331
2332 * exp_ch4.adb (Expand_N_Expression_With_Actions):
2333 Force the evaluation of the expression when its type is Boolean.
2334 (Force_Boolean_Evaluation): New routine.
2335
2336 2015-10-16 Bob Duff <duff@adacore.com>
2337
2338 * sem_util.adb (Has_Discrim_Dep_Array): Remove
2339 this function, and the call. No longer needed now that the back
2340 end can handle such things. Should result in further speedups
2341 in some cases.
2342
2343 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2344
2345 * sem_ch13.adb (Build_Predicate_Functions): If expression for
2346 predicate is side-effect free, indicate that the predicate
2347 function is pure, to allow for optimization of redundant
2348 predicate checks.
2349
2350 2015-10-16 Arnaud Charlet <charlet@adacore.com>
2351
2352 * checks.adb: Fix typo.
2353 * s-osinte-linux.ads: Add header.
2354 * projects.texi: Removed, no longer used.
2355 * gcc-interface/Make-lang.in: Update dependencies
2356 * s-multip.adb: Minor: fix header.
2357 * sem_ch3.adb, exp_ch7.adb, g-dirope.ads, sinfo.ads, types.ads,
2358 a-textio.adb, s-exctra.adb, ali.adb, back_end.ads, exp_intr.adb,
2359 a-tigeli.adb, exp_ch3.adb, s-os_lib.ads: Remove further references to
2360 .NET.
2361 * gnatlink.adb, opt.ads, exp_aggr.adb, s-solita.adb: Minor comment
2362 updates.
2363
2364 2015-10-16 Gary Dismukes <dismukes@adacore.com>
2365
2366 * exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on
2367 the temporary object used for a by-copy entry parameter, to
2368 ensure that the object doesn't get its No_Initialization flag
2369 reset later in Default_Initialize_Object. Also, generate the
2370 assignment of the actual to the temporary in the additional case
2371 of a scalar out parameter whose type has a Default_Value aspect.
2372 * exp_ch3.adb: Fix minor typo in comment.
2373
2374 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
2375
2376 * exp_util.adb, sem_util.ads, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb:
2377 Minor reformatting.
2378 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Set the
2379 SPARK_Mode from the context.
2380
2381 2015-10-16 Bob Duff <duff@adacore.com>
2382
2383 * sem_util.adb (Requires_Transient_Scope):
2384 If Typ is a generic formal incomplete type, look at the actual
2385 type. Otherwise, we don't notice that the actual type is tagged,
2386 has a variant part, etc, causing a mismatch of calling conventions
2387 between caller and callee.
2388
2389 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
2390
2391 * einfo.ads: Move the declaration of enumeration
2392 literal E_Abstract_State above E_Entry. Update the upper bound
2393 of subtype Overloadable_Kind.
2394
2395 2015-10-16 Gary Dismukes <dismukes@adacore.com>
2396
2397 * exp_attr.adb: Minor editorial changes.
2398
2399 2015-10-16 Arnaud Charlet <charlet@adacore.com>
2400
2401 * exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
2402 sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
2403 exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
2404 lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
2405 einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
2406 rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
2407 gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
2408 exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
2409 exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
2410 sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
2411 exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
2412 Code clean up: remove special handling for .NET and JVM.
2413
2414 2015-10-16 Arnaud Charlet <charlet@adacore.com>
2415
2416 * sem_ch12.adb: Minor punctuation fix in comment
2417 * s-rident.ads: Minor consistency fix in comment
2418 * exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
2419 * restrict.ads: Style fix in comments.
2420 * sem_prag.adb: Minor grammar fix in comment
2421
2422 2015-10-16 Gary Dismukes <dismukes@adacore.com>
2423
2424 * sem_ch12.adb: Minor reformatting/rewording.
2425
2426 2015-10-16 Arnaud Charlet <charlet@adacore.com>
2427
2428 * einfo.ads: Minor fix of duplicate words
2429 * rident.ads: Minor style fix in comment
2430
2431 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
2432
2433 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
2434 set and restore the Ghost mode.
2435 (Expand_N_Object_Declaration): Do not capture, set and restore the
2436 Ghost mode.
2437 (Freeze_Type): Redo the capture and restore of the Ghost mode.
2438 (Restore_Globals): Removed.
2439 * exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
2440 and restore of the Ghost mode.
2441 (Restore_Globals): Removed.
2442 * exp_ch6.adb (Expand_N_Procedure_Call_Statement):
2443 Redo the capture and restore of the Ghost mode.
2444 (Expand_N_Subprogram_Body): Redo the capture, set and restore
2445 of the Ghost mode.
2446 (Expand_N_Subprogram_Declaration): Do not
2447 capture, set and restore the Ghost mode.
2448 (Restore_Globals): Removed.
2449 * exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
2450 and restore of the Ghost mode.
2451 (Expand_N_Package_Declaration): Do not capture, set and restore the
2452 Ghost mode.
2453 * exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
2454 Redo the capture and restore of the Ghost mode.
2455 (Expand_N_Object_Renaming_Declaration): Redo
2456 the capture and restore of the Ghost mode.
2457 (Expand_N_Package_Renaming_Declaration):
2458 Redo the capture and restore of the Ghost mode.
2459 (Expand_N_Subprogram_Renaming_Declaration): Redo the capture
2460 and restore of the Ghost mode.
2461 * exp_ch11.adb Remove with and use clauses for Ghost.
2462 (Expand_N_Exception_Declaration): Do not capture, set and restore
2463 the Ghost mode.
2464 * exp_disp.adb (Make_DT): Redo the capture and restore of the
2465 Ghost mode.
2466 (Restore_Globals): Removed.
2467 * exp_prag.adb (Expand_Pragma_Check): Do not capture, set
2468 and restore the Ghost mode.
2469 (Expand_Pragma_Contract_Cases):
2470 Redo the capture and restore of the Ghost mode. Preserve the
2471 original context of contract cases by setting / resetting the
2472 In_Assertion_Expr counter.
2473 (Expand_Pragma_Initial_Condition):
2474 Redo the capture and restore of the Ghost mode.
2475 (Expand_Pragma_Loop_Variant): Redo the capture and restore of
2476 the Ghost mode.
2477 (Restore_Globals): Removed.
2478 * exp_util.adb (Make_Predicate_Call): Redo the capture and
2479 restore of the Ghost mode.
2480 (Restore_Globals): Removed.
2481 * freeze.adb (Freeze_Entity): Redo the capture and restore of
2482 the Ghost mode.
2483 (Restore_Globals): Removed.
2484 * ghost.adb (Check_Ghost_Context): Remove the RM reference from
2485 the error message.
2486 (Is_OK_Statement): Account for statements
2487 that appear in assertion expressions.
2488 (Is_Subject_To_Ghost):
2489 Moved from spec.
2490 * ghost.ads (Is_Subject_To_Ghost): Moved to body.
2491 * rtsfind.ads (Load_RTU): Redo the capture and restore of the
2492 Ghost mode.
2493 * sem.adb Add with and use clauses for Ghost.
2494 (Analyze): Redo
2495 the capture and restore of the Ghost mode. Set the Ghost mode
2496 when analyzing a declaration.
2497 (Do_Analyze): Redo the capture
2498 and restore of the Ghost mode.
2499 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
2500 and restore the Ghost mode.
2501 (Analyze_Incomplete_Type_Decl):
2502 Do not capture, set and restore the Ghost mode.
2503 (Analyze_Number_Declaration): Do not capture, set and restore the
2504 Ghost mode.
2505 (Analyze_Object_Declaration): Do not capture, set and
2506 restore the Ghost mode.
2507 (Analyze_Private_Extension_Declaration):
2508 Do not capture, set and restore the Ghost mode.
2509 (Analyze_Subtype_Declaration): Do not capture, set and restore
2510 the Ghost mode.
2511 (Restore_Globals): Removed.
2512 * sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
2513 of the Ghost mode.
2514 (Restore_Globals): Removed.
2515 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
2516 Do not capture, set and restore the Ghost mode.
2517 (Analyze_Procedure_Call): Redo the capture and restore of the
2518 Ghost mode.
2519 (Analyze_Subprogram_Body_Helper): Redo the capture
2520 and restore of the Ghost mode. (Analyze_Subprogram_Declaration):
2521 Do not capture, set and restore the Ghost mode.
2522 (Restore_Globals): Removed.
2523 * sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
2524 restore of the Ghost mode.
2525 (Analyze_Package_Declaration):
2526 Do not capture, set and restore the Ghost mode.
2527 (Analyze_Private_Type_Declaration): Do not capture, set and
2528 restore the Ghost mode.
2529 (Restore_Globals): Removed.
2530 * sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
2531 set and restore the Ghost mode.
2532 (Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
2533 mode.
2534 (Analyze_Object_Renaming): Do not capture, set and restore the
2535 Ghost mode.
2536 (Analyze_Package_Renaming): Do not capture, set and restore the Ghost
2537 mode.
2538 (Analyze_Subprogram_Renaming): Do not capture, set and restore the
2539 Ghost mode.
2540 (Restore_Globals): Removed.
2541 * sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
2542 set and restore the Ghost mode.
2543 * sem_ch12.adb (Analyze_Generic_Package_Declaration):
2544 Do not capture, set and restore the Ghost mode.
2545 (Analyze_Generic_Subprogram_Declaration): Do not capture, set
2546 and restore the Ghost mode.
2547 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
2548 the capture and restore of the Ghost mode.
2549 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
2550 Redo the capture and restore of the Ghost mode.
2551 (Analyze_External_Property_In_Decl_Part):
2552 Redo the capture and restore of the Ghost mode.
2553 (Analyze_Initial_Condition_In_Decl_Part): Redo the
2554 capture and restore of the Ghost mode. (Analyze_Pragma):
2555 Do not capture, set and restore the Ghost mode for Assert.
2556 Redo the capture and restore of the Ghost mode for Check. Do
2557 not capture and restore the Ghost mode for Invariant.
2558 (Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
2559 restore of the Ghost mode.
2560 * sem_res.adb (Resolve): Capture, set and restore the Ghost mode
2561 when resolving a declaration.
2562 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
2563 Redo the capture and restore of the Ghost mode.
2564 (Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
2565 and restore of the Ghost mode.
2566
2567 2015-10-16 Bob Duff <duff@adacore.com>
2568
2569 * debug.adb: Document -gnatdQ switch.
2570
2571 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2572
2573 * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
2574 a formal abstract subprogram cannot have a null default: RM 12.6
2575 (4 1.2).
2576
2577 2015-10-16 Bob Duff <duff@adacore.com>
2578
2579 * sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
2580
2581 2015-10-16 Javier Miranda <miranda@adacore.com>
2582
2583 * inline.adb (Add_Inlined_Body): Ensure that
2584 Analyze_Inlined_Bodies will be invoked after completing the
2585 analysis of the current unit.
2586
2587 2015-10-16 Arnaud Charlet <charlet@adacore.com>
2588
2589 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
2590 message for bad last bit position.
2591 * sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
2592
2593 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2594
2595 * exp_ch5.adb (Expand_N_Case_Statement): If expression is
2596 compile-time known but does not obey a static predicate on
2597 its type, replace the case statement with a raise statement,
2598 as with other statically detected constraint violations.
2599
2600 2015-10-16 Bob Duff <duff@adacore.com>
2601
2602 * s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
2603 Reinstate code.
2604 * opt.ads: Minor typo.
2605
2606 2015-10-16 Ed Schonberg <schonberg@adacore.com>
2607
2608 * sem_util.adb (Gather_Components): When gathering components
2609 of a nested variant, the record type used in legality checks is
2610 the enclosing record type.
2611
2612 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2613
2614 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
2615 DEF_FUNCTION_TYPE_11): Define.
2616
2617 2015-10-09 Eric Botcazou <ebotcazou@adacore.com>
2618
2619 * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
2620 GNAT1_ADA_OBJS are compiled only after generated files are created.
2621
2622 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2623
2624 * gcc-interface/trans.c (convert_with_check): Use real_arithmetic
2625 instead of REAL_ARITHMETIC.
2626
2627 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2628
2629 * gcc-interface/trans.c (convert_with_check): Use real_less instead
2630 of REAL_VALUES_LESS.
2631
2632 2015-10-02 Doug Rupp <rupp@adacore.com>
2633 Olivier Hainque <hainque@adacore.com>
2634
2635 * gcc-interface/lang.opt (fbuiltin-printf): Accept.
2636 * gcc-interface/misc.c (gnat_handle_option): Ignore it.
2637 * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
2638 flags as -g* and -m* flags past -gnatez.
2639
2640 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
2641
2642 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
2643 linear search with call to find_opt and issue warnings if the -W
2644 switch is not appropriate.
2645
2646 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
2647
2648 * gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
2649 * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
2650 reference but whose type isn't by-ref and whose mechanism hasn't been
2651 forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
2652 them instead of changing their type.
2653 * gcc-interface/trans.c (scan_rhs_r): New helper function.
2654 (independent_iterations_p): New predicate.
2655 (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
2656 ivdep pragma if the iterations are independent.
2657
2658 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
2659
2660 * gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
2661 (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
2662 (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
2663 (build_stmt_group): Add blank lines.
2664
2665 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
2666
2667 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
2668
2669 2015-09-28 Tom de Vries <tom@codesourcery.com>
2670
2671 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define.
2672
2673 2015-09-17 Eric Botcazou <ebotcazou@adacore.com>
2674
2675 * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
2676
2677 2015-09-14 Pierre-Marie de Rodat <derodat@adacore.com>
2678
2679 * gcc-interface/misc.c (gnat_post_options): Issue a warning if
2680 generating STABS debugging information when not the default.
2681
2682 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
2683
2684 * gcc-interface/gigi.h (ref_filename): Delete.
2685 (Sloc_to_locus): Add clean_column parameter defaulting to false.
2686 (build_call_raise): Adjust comment.
2687 (build_call_raise_range): Move around.
2688 * gcc-interface/trans.c (ref_filename): Delete.
2689 (gigi): Fix formatting.
2690 (block_end_locus_sink): Delete.
2691 (Sloc_to_locus1): Tidy up and reformat. Rename into...
2692 (Sloc_to_locus): ...this. Add default for clean_colmun parameter.
2693 (set_expr_location_from_node1): Rename into...
2694 (set_expr_location_from_node): ...this.
2695 (set_end_locus_from_node): Move around. Adjust for renaming.
2696 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2697 (add_cleanup): Likewise.
2698 * gcc-interface/utils2.c (expand_sloc): New static function.
2699 (build_call_raise): Call it.
2700 (build_call_raise_column): Likewise.
2701 (build_call_raise_range): Likewise. Move around.
2702
2703 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
2704
2705 * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
2706 another acceptable pattern for the RHS.
2707
2708 2015-07-24 Micahel Darling <darlingm@gmail.com>
2709
2710 PR other/66259
2711 * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
2712 * gcc-interface/Makefile.in: Likewise
2713
2714 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
2715
2716 * gcc-interface/utils.c: Fix double word typos.
2717 * gnat_ugn.texi: Same.
2718 * init.c: Same.
2719 * par.adb: Same.
2720 * projects.texi: Same.
2721 * sem_ch4.adb: Same.
2722 * sem_ch6.adb: Same.
2723 * sem_dim.adb: Same.
2724 * sem_eval.adb: Same.
2725 * sem_prag.adb: Same.
2726 * sem_warn.adb: Same.
2727
2728 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
2729
2730 * gcc-interface/cuintp.c: Adjust includes.
2731 * gcc-interface/decl.c: Likewise.
2732 * gcc-interface/misc.c: Likewise.
2733 * gcc-interface/targtyps.c: Likewise.
2734 * gcc-interface/trans.c: Likewise.
2735 * gcc-interface/utils.c: Likewise.
2736 * gcc-interface/utils2.c: Likewise.
2737
2738 2015-07-06 John Marino <gnugcc@marino.st>
2739
2740 * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
2741
2742 2015-06-29 Eric Botcazou <ebotcazou@adacore.com>
2743
2744 PR ada/63310
2745 * gcc-interface/utils.c (gnat_write_global_declarations): Always
2746 build the dummy global variable if code was generated.
2747
2748 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2749
2750 PR fortran/66605
2751 * gcc-interface/misc.c (gnat_post_options): No need to disable
2752 warn_unused_parameter anymore.
2753
2754 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
2755
2756 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
2757 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
2758 at-end procedures.
2759
2760 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
2761
2762 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
2763 (gnat_write_global_declarations): New prototype.
2764 * gcc-interface/utils.c (type_decls): Rename back to...
2765 (global_decls): ...this.
2766 (gnat_pushdecls): Revert previous change.
2767 (create_var_decl): Do not output global variables.
2768 (note_types_used_by_globals): Rename back to...
2769 (gnat_write_global_declarations): ...this. Output variables on the
2770 global_decls vector.
2771 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
2772
2773 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
2774
2775 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
2776 (create_var_decl): ...this. Add default value for last parameter.
2777 (create_type_stub_decl): Adjust.
2778 (create_type_decl): Likewise.
2779 (create_field_decl): Likewise.
2780 (create_param_decl): Likewise.
2781 (create_label_decl): Likewise.
2782 (create_subprog_decl): Likewise.
2783 * gcc-interface/utils.c (create_var_decl_1): Rename into...
2784 (create_var_decl): ...this. Rename var_name into name and var_init
2785 into init, move const_decl_allowed_p last and adjust accordingly.
2786 (create_type_stub_decl): Rename type_name into name and adjust.
2787 (create_type_decl): Likewise.
2788 (create_field_decl): Likewise for field_name and field_type.
2789 (create_param_decl): Likewise for param_name and param_type.
2790 (create_label_decl): Likewise for label_name.
2791 (create_subprog_decl): Likewise for subprog_name and subprog_type.
2792 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
2793 to create_var_decl_1.
2794
2795 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
2796
2797 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
2798 artificial, has_checks and warned_aggressive_loop_optimizations.
2799 (gigi): Set warn_aggressive_loop_optimizations to 0.
2800 (inside_loop_p): New inline predicate.
2801 (push_range_check_info): Rename into...
2802 (find_loop_for): ...this and do not push range_check_info_d object.
2803 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
2804 fields of gnu_loop_info. Adjust detection of checks enabled by
2805 -funswitch-loops and adds one for -faggressive-loop-optimizations.
2806 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
2807 are enabled, warn for loops overrunning an array of size 1 not at the
2808 end of a record.
2809
2810 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
2811
2812 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
2813 list.
2814 * gcc-interface/utils.c: Likewise.
2815
2816 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2817
2818 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
2819 ggc_cache_ptr_hash rather than ggc_cache_hasher.
2820 * gcc-interface/utils.c (pad_type_hasher): Likewise.
2821
2822 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2823
2824 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
2825 Delete.
2826 (value_annotation_hasher::keep_cache_entry): New function.
2827 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
2828 Delete.
2829 (pad_type_hasher::keep_cache_entry): New function.
2830
2831 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
2832
2833 * gcc-interface/misc.c: Include calls.h not function.h.
2834
2835 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
2836
2837 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
2838 (tree create_type_decl): Likewise.
2839 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
2840 (create_var_decl): Likewise.
2841 (create_true_var_decl): Delete.
2842 (create_subprog_decl): Add debug_info_p parameter.
2843 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
2844 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
2845 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
2846 Remove DECL_IGNORED_P settings.
2847 <E_Enumeration_Type>: Likewise.
2848 <E_Record_Type>: Likewise.
2849 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
2850 Adjust call to create_subprog_decl.
2851 (get_minimal_subprog_decl): Likewise.
2852 (elaborate_expression_1): Adjust call to create_var_decl.
2853 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
2854 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
2855 * gcc-interface/utils.c (maybe_pad_type): Likewise.
2856 (record_builtin_type): Adjust comment.
2857 (create_type_stub_decl): Remove obsolete comment.
2858 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
2859 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
2860 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
2861 accordingly.
2862
2863 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
2864
2865 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
2866
2867 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
2868
2869 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
2870 the size of a padding type built around the return type is positive.
2871 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
2872 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
2873
2874 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2875
2876 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
2877 * gcc-interface/decl.c: Likewise.
2878 * gcc-interface/misc.c: Likewise.
2879 * gcc-interface/targtyps.c: Likewise.
2880 * gcc-interface/trans.c: Likewise.
2881 * gcc-interface/utils.c: Likewise.
2882 * gcc-interface/utils2.c: Likewise.
2883
2884 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2885
2886 * gcc-interface/utils.c (get_global_context): Register the main
2887 translation unit through the new debug hook.
2888
2889 2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
2890
2891 * gcc-interface/misc.c: Remove duplicate include directives.
2892 * gcc-interface/trans.c: Likewise.
2893 * gcc-interface/utils.c: Likewise.
2894
2895 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
2896
2897 * gcc-interface/cuintp.c : Adjust include files.
2898 * gcc-interface/decl.c : Likewise.
2899 * gcc-interface/misc.c : Likewise.
2900 * gcc-interface/targtyps.c : Likewise.
2901 * gcc-interface/trans.c : Likewise.
2902 * gcc-interface/utils.c : Likewise.
2903 * gcc-interface/utils2.c : Likewise.
2904
2905 2015-06-08 John Marino <gnugcc@marino.st>
2906
2907 * a-intnam-dragonfly.ads: New.
2908 * s-osinte-dragonfly.adb: Likewise.
2909 * s-osinte-dragonfly.ads: Likewise.
2910 * system-dragonfly-x86_64.ads: Likewise.
2911 * adaint.c: Add BSD macros.
2912 * cstreams.c: Likewise.
2913 * gsocket.h: Likewise.
2914 * link.c: Likewise.
2915 * socket.c: Likewise.
2916 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
2917 * init.c: Add __DragonFly__, change __gnat_install_handler
2918 prototype from empty to void.
2919 * initialize.c: Add __DragonFly__.
2920 * sysdep.c: Likewise.
2921 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
2922 * tracebak.c: Set unwinder for i386 BSD.
2923 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
2924 x86_64 FreeBSD and x86 FreeBSD.
2925
2926 2015-06-06 Eric Botcazou <ebotcazou@adacore.com>
2927
2928 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
2929 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
2930
2931 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
2932
2933 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
2934 gnat_write_global_declarations.
2935 * gcc-interface/misc.c (gnat_parse_file): Call
2936 note_types_used_by_globals.
2937 Remove LANG_HOOKS_WRITE_GLOBALS.
2938 * gcc-interface/utils.c: Rename global_decls to type_decls.
2939 (gnat_write_global_declarations): Rename
2940 to note_types_used_by_globals.
2941 Remove call to finalize_compilation_unit.
2942 Remove call to debug_hooks->global_decl for globals.
2943 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
2944
2945 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
2946
2947 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
2948 * gcc-interface/decl.c: Likewise.
2949 * gcc-interface/misc.c: Likewise.
2950 * gcc-interface/targtyps.c: Likewise.
2951 * gcc-interface/trans.c: Likewise.
2952 * gcc-interface/utils.c: Likewise.
2953 * gcc-interface/utils2.c: Likewise.
2954
2955 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
2956
2957 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
2958 processing a definition, create definitions for padding types
2959 around return types.
2960
2961 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
2962
2963 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
2964
2965 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
2966
2967 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
2968 typo in latest change.
2969
2970 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
2971
2972 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
2973
2974 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
2975
2976 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
2977 call expression, process the corresponding function body. Also handle
2978 potential addends.
2979
2980 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
2981
2982 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
2983 references ones for functions that return references.
2984
2985 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
2986
2987 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
2988 definition of a type coming from a limited_with, get to the full view
2989 if it is not in the main code unit.
2990
2991 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
2992
2993 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
2994 specified, let the target mangle it before settting.
2995 (create_subprog_decl): Likewise and move this treatment last.
2996
2997 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
2998
2999 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
3000 before first -gnatez switch. Simplify and add trailing space.
3001
3002 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
3003
3004 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
3005 record has a parent field and a representation clause, make sure that
3006 it is properly aligned.
3007
3008 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
3009
3010 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
3011 with character and enumeration literals as index values.
3012
3013 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
3014
3015 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
3016 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
3017 address clause on aliased object with unconstrained nominal subtype.
3018 Mark the aligning variable as artificial, do not convert the address
3019 expression immediately but mark it as constant instead.
3020 * gcc-interface/utils.c (convert): If the target type contains a
3021 template, be prepared for an empty array.
3022 (maybe_unconstrained_array): Likewise.
3023 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
3024 with the pattern built for aligning types.
3025 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
3026 (build_simple_component_ref): Make public.
3027 If the base object is a constructor that contains a template, fold the
3028 result field by field.
3029
3030 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
3031
3032 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
3033
3034 2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
3035
3036 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
3037 of sun. Add missing leading underscore to AIX. Remove #elif 0.
3038 * adaint.h: Likewise.
3039 * cio.c: Likewise.
3040 * cstreams.c: Likewise.
3041 * env.c: Likewise.
3042 * gsocket.h: Likewise.
3043 * init.c: Likewise. Test for __i386__ instead of i386.
3044 * link.c: Likewise.
3045 * s-oscons-tmplt.c: Likewise.
3046 * sysdep.c: Likewise.
3047 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
3048 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
3049
3050 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
3051
3052 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
3053 deal with the subtraction of a "negative" value in an unsigned type.
3054
3055 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
3056
3057 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
3058 not error out on a return type which has a size that overflows if the
3059 return is done by invisible reference.
3060
3061 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
3062
3063 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
3064 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
3065
3066 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
3067
3068 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
3069 (rewrite_fn): Remove third parameter.
3070 (type_is_padding_self_referential): New inline predicate.
3071 (return_type_with_variable_size_p): Likewise.
3072 * gcc-interface/decl.c (allocatable_size_p): More around.
3073 (cannot_be_superflat_p): Rename into...
3074 (cannot_be_superflat ): ...this.
3075 (initial_value_needs_conversion): New predicate.
3076 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
3077 initial_value_needs_conversion and adjust to above renaming.
3078 For a renaming, force the materialization if the inner expression
3079 is compound. Adjust calls to elaborate_reference and build a
3080 compound expression if needed.
3081 (struct er_dat): Add N field.
3082 (elaborate_reference_1): Remove N parameter and adjust.
3083 (elaborate_reference): Add INIT parameter and pass it in the call to
3084 gnat_rewrite_reference. Adjust initial expression.
3085 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
3086 regular object declarations when it comes to creating a temporary.
3087 Adjust call to gnat_stabilize_reference and build a compound expression
3088 if needed. Invoke return_type_with_variable_size_p.
3089 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
3090 return a call to a function unmodified if it returns with variable size
3091 and is also the initial expression in an object declaration.
3092 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
3093 type if it is a call to a function that returns with variable size.
3094 (build_unary_op): Invoke type_is_padding_self_referential.
3095 (gnat_stabilize_reference_1): Remove N parameter and adjust.
3096 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
3097 to gnat_rewrite_reference.
3098 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
3099 <COMPOUND_EXPR>: New case.
3100
3101 2015-05-28 Ed Schonberg <schonberg@adacore.com>
3102
3103 * sem_ch3.adb (Is_Visible_Component): Component is visible
3104 in a derived type if inherited through an ancestor that has a
3105 partial view of the original type holding the component, if the
3106 full view of that original type is in scope.
3107 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
3108
3109 2015-05-28 Bob Duff <duff@adacore.com>
3110
3111 * sem_util.adb (Requires_Transient_Scope): For definite untagged
3112 subtypes, we should never have to use the secondary stack. This moves
3113 toward that goal. But there are still cases that don't work.
3114 Here, we move the check for Is_Definite first, but add a
3115 special-purpose check for Has_Discrim_Dep_Array.
3116
3117 2015-05-28 Bob Duff <duff@adacore.com>
3118
3119 * sem_util.adb (Requires_Transient_Scope): Avoid returning
3120 function results on the secondary stack in so many cases.
3121
3122 2015-05-28 Ed Schonberg <schonberg@adacore.com>
3123
3124 * sem_util.adb (Wrong_Type): In any instance, do not emit error
3125 if type of expression is the partial view of the expected type.
3126
3127 2015-05-28 Ed Schonberg <schonberg@adacore.com>
3128
3129 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
3130 names in named associations only needs to be done within an
3131 instance, on a call to a primitive of a formal derived type,
3132 where the actual subprogram may have different formal names than
3133 those of the primitive operation of the formal type.
3134 b) Defaulted parameters must be taken into account when obtaining
3135 the names of the formals of the actual subprogram being called.
3136
3137 2015-05-28 Robert Dewar <dewar@adacore.com>
3138
3139 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
3140
3141 2015-05-28 Ed Schonberg <schonberg@adacore.com>
3142
3143 * sem_util.adb (Set_Debug_Info_Needed): For a private type
3144 whose full view is itself a derived private type, set flag on
3145 underlying full view as well, for proper gdb display.
3146
3147 2015-05-28 Bob Duff <duff@adacore.com>
3148
3149 * exp_tss.ads: Minor comment fix.
3150 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
3151 Inline init_procs when the type has controlled parts. Remove
3152 obsolete comments about those init_procs -- init_procs for
3153 such types are no longer complex. A typical init_proc just
3154 initializes the 'Tag field, and calls the parent init_proc
3155 (e.g. for Limited_Controlled), which calls the grandparent
3156 (for Root_Controlled), which does nothing. This all boils down
3157 to one instruction when inlined.
3158 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
3159
3160 2015-05-28 Ed Schonberg <schonberg@adacore.com>
3161
3162 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
3163 is a derived type and is a generic actual, the selected component
3164 appears within an instance body, and the check over the type
3165 has failed, examine ancestor types for the desired component.
3166 (Find_Component_In_Instance): If record type is a derived type,
3167 examine all ancestors in order to locate desired component.
3168
3169 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
3170
3171 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
3172
3173 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
3174
3175 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
3176 incomplete type coming from a limited_with and whose non-limited view
3177 comes from the main unit.
3178
3179 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
3180
3181 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
3182 code applying atomic checks to the object.
3183
3184 2015-05-27 Robert Dewar <dewar@adacore.com>
3185
3186 * sem_aux.adb: Minor rewording.
3187
3188 2015-05-27 Bob Duff <duff@adacore.com>
3189
3190 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
3191 pragma Abort_Defer do nothing if Abort_Allowed is False.
3192
3193 2015-05-27 Arnaud Charlet <charlet@adacore.com>
3194
3195 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
3196 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
3197 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
3198 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
3199
3200 2015-05-27 Doug Rupp <rupp@adacore.com>
3201
3202 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
3203 well as kernel.
3204
3205 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
3206
3207 * par_sco.adb (Process_Decision): Store sloc to
3208 condition/pragmas SCOs associations into a temporary table before
3209 moving them to the SCO_Raw_Hash_Table so that we can back them
3210 out just like we do for SCO entries that are simple decisions
3211 in an expression context.
3212
3213 2015-05-27 Ed Schonberg <schonberg@adacore.com>
3214
3215 * sem_ch6.adb (Process_Formals): A non-private formal type that
3216 is a limited view does not have a list of private dependents.
3217
3218 2015-05-27 Ed Schonberg <schonberg@adacore.com>
3219
3220 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
3221 the case statement is a compile-time known value, we look for a
3222 corresponding alternative to optimize the case statement into a
3223 single case. If the type has a static predicate and the expression
3224 does not satisfy the predicate, there is no legal alternative and
3225 this optimization is not applicable. Excecution is erroneous,
3226 or else if assertions are enabled, an exception will be raised
3227 earlier, at the point the expression is elaborated.
3228
3229 2015-05-27 Robert Dewar <dewar@adacore.com>
3230
3231 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
3232 warning on Finalize, Adjust, or Initialize if type involved has
3233 Warnings_Off set.
3234
3235 2015-05-27 Ed Schonberg <schonberg@adacore.com>
3236
3237 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
3238 applied to a type with no known discriminants.
3239
3240 2015-05-26 Robert Dewar <dewar@adacore.com>
3241
3242 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
3243
3244 2015-05-26 Bob Duff <duff@adacore.com>
3245
3246 * sem_elab.adb (Check_A_Call): In the case where we're
3247 calling something in an instance of a generic package that is
3248 within this same unit (as the call), make sure we treat it
3249 as a call to an entity within the same unit. That is, call
3250 Check_Internal_Call, rather than putting "Elaborate_All(X)"
3251 on X, which would necessarily result in an elaboration cycle in
3252 static-elaboration mode.
3253
3254 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3255
3256 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
3257 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
3258 parameter into Node parameter and remove Type parameter.
3259 Look at Is_Atomic_Or_VFA both on the type and on the object.
3260 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
3261 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
3262 (Process_Atomic_Independent_Shared_Volatile): Remove code
3263 propagating Atomic or VFA from object to locally-defined type.
3264
3265 2015-05-26 Bob Duff <duff@adacore.com>
3266
3267 * exp_ch7.adb: Minor comment fix.
3268
3269 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3270
3271 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
3272 bother about NaN's if Machine_Overflows is true.
3273
3274 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3275
3276 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
3277 force evaluation of the expression, if any, when the object has its
3278 elaboration delayed. Do not create a variable at global level.
3279
3280 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3281
3282 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
3283 extra-precision trick to literals. Build SAVE_EXPR manually.
3284
3285 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
3286
3287 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3288
3289 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
3290 (DECL_RENAMED_OBJECT): Adjust comment.
3291 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
3292 (invalidate_global_nonconstant_renamings): Likewise.
3293 (gnat_constant_reference_p): Likewise.
3294 (rewrite_fn): New function type.
3295 (gnat_rewrite_reference): Declare.
3296 (call_is_atomic_load): New inline predicate.
3297 * gcc-interface/decl.c (elaborate_reference_1): New function.
3298 (elaborate_reference): Likewise.
3299 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
3300 and simplify associated code. Set const_flag to true consistently in
3301 conjunction with used_by_ref.
3302 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
3303 pointers by renamed objects.
3304 (outer_atomic_access_required_p): Deal with renamings.
3305 (Compilation_Unit_to_gnu): Do not call
3306 invalidate_global_nonconstant_renamings.
3307 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
3308 (gnat_gimplify_expr): Deal with atomic loads.
3309 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
3310 (destroy_gnat_utils): Do not call
3311 invalidate_global_nonconstant_renamings.
3312 (record_global_nonconstant_renaming): Delete.
3313 (invalidate_global_nonconstant_renamings): Likewise.
3314 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
3315 (build_load_modify_store): Build a copy of the destination.
3316 (gnat_stabilize_reference_1): Adjust.
3317 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
3318 gnat_rewrite_reference and move bulk of code to...
3319 (gnat_rewrite_reference): ...here. New global function.
3320 (gnat_constant_reference_p): Delete.
3321
3322 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3323
3324 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
3325 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
3326 to detect constant renamings. Be prepared for specific pattern of
3327 renamed object based on function calls. Create a constant object
3328 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
3329 to gnat_stabilize_reference and tidy up. Remove redundant tests.
3330 (elaborate_expression_1): Remove obsolete test and tidy up.
3331 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
3332 parameters passed by reference.
3333 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
3334 side-effects.
3335 Use gnat_protect_expr instead of gnat_stabilize_reference for general
3336 protection against side-effects.
3337 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
3338 (gnat_save_expr): Invoke it.
3339 (gnat_protect_expr): Likewise.
3340 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
3341 of TREE_THIS_NOTRAP.
3342 (gnat_stabilize_reference): Remove parameter and adjust throughout.
3343 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
3344 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
3345
3346 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3347
3348 * sinfo.ads: Minor reformatting.
3349 * sem_aux.ads: Clarify use of First_Discriminant.
3350 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
3351 view is replaced with the non-limited view in an instance body,
3352 where the enclosing unit must have a regular with_clause on the
3353 relevant unit.
3354 * sem_ch12.adb (Install_Body): Freeze instantation after its
3355 body. Remove useless freeze nodes for incomplete actuals to
3356 prevent multiple generation of internal operations.
3357 (Instantiate_Package_Body): Set sloc of body appropriately when
3358 there are incomplete actuals and the instance body is placed in
3359 the body of the enclosing unit.
3360 * errout.ads: Consistent punctuation, better alignment and trivial
3361 typos in comments.
3362 * err_vars.ads: Fix typo.
3363
3364 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3365
3366 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
3367 components of Volatile_Full_Access objects.
3368
3369 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3370
3371 * sem_ch6.adb (Is_Non_Overriding_Operation,
3372 Get_Generic_Parent_Type): Handle properly the case of a derived
3373 scalar type by using the first subtype rather than its generated
3374 anonymous base type.
3375
3376 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3377
3378 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
3379 case to...
3380 (Write_Field19_Name): ...here.
3381
3382 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3383
3384 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
3385 of original expression in ASIS mode: does not solve the ASIS
3386 problem of a usable type information, and crashes the back-end
3387 when performing type annotations.
3388
3389 2015-05-26 Robert Dewar <dewar@adacore.com>
3390
3391 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
3392 (Is_Overriding_Subprogram): Use One_Only_Parameter.
3393 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
3394
3395 2015-05-26 Robert Dewar <dewar@adacore.com>
3396
3397 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
3398 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
3399 exp_ch3.adb: Minor reformatting.
3400
3401 2015-05-26 Bob Duff <duff@adacore.com>
3402
3403 * treepr.adb: Minor improvement to debugging routines (pp, pn)
3404 robustness. Rearrange the code so passing a nonexistent Node_Id
3405 prints "No such node" rather than crashing, and causing gdb to
3406 generate confusing messages.
3407
3408 2015-05-26 Gary Dismukes <dismukes@adacore.com>
3409
3410 * sem_util.adb: Minor typo fix.
3411
3412 2015-05-26 Yannick Moy <moy@adacore.com>
3413
3414 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
3415
3416 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
3417
3418 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
3419 restore the Ghost mode.
3420 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
3421 (Freeze_Type): Update the call to Set_Ghost_Mode.
3422 (Restore_Globals): New routine.
3423 * exp_ch5.adb Add with and use clauses for Ghost.
3424 (Expand_N_Assignment_Statement): Capture, set and restore the
3425 Ghost mode.
3426 (Restore_Globals): New routine.
3427 * exp_ch6.adb Add with and use clauses for Ghost.
3428 (Expand_N_Procedure_Call_Statement): Capture, set and
3429 restore the Ghost mode.
3430 (Expand_N_Subprogram_Body):
3431 Code cleanup. Capture, set and restore the Ghost mode.
3432 (Expand_N_Subprogram_Declaration): Capture, set and restore the
3433 Ghost mode.
3434 (Restore_Globals): New routine.
3435 * exp_ch7.adb Add with and use clauses for Ghost.
3436 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
3437 (Expand_N_Package_Declaration): Capture, set and restore the
3438 Ghost mode.
3439 (Wrap_HSS_In_Block): Create a proper identifier for the block.
3440 * exp_ch8.adb Add with and use clauses for Ghost.
3441 (Expand_N_Exception_Renaming_Declaration): Code
3442 cleanup. Capture, set and restore the Ghost mode.
3443 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
3444 the Ghost mode.
3445 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
3446 Ghost mode.
3447 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
3448 restore the Ghost mode.
3449 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
3450 cleanup. Capture, set and restore the Ghost mode.
3451 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
3452 not initialize the dispatch table slot of a Ghost subprogram.
3453 * exp_prag.adb Add with and use clauses for Ghost.
3454 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
3455 (Expand_Pragma_Contract_Cases): Capture, set and restore the
3456 Ghost mode.
3457 (Expand_Pragma_Initial_Condition): Capture, set and
3458 restore the Ghost mode.
3459 (Expand_Pragma_Loop_Variant): Capture,
3460 set and restore the Ghost mode.
3461 (Restore_Globals): New routine.
3462 * exp_util.adb Add with and use clauses for Ghost.
3463 (Make_Predicate_Call): Code cleanup. Capture, set and restore
3464 the Ghost mode.
3465 (Restore_Globals): New routine.
3466 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
3467 to Set_Ghost_Mode.
3468 * ghost.adb Add with and use clause for Sem_Prag.
3469 (Check_Ghost_Completion): Code cleanup.
3470 (Check_Ghost_Overriding): New routine.
3471 (Check_Ghost_Policy): Code cleanup.
3472 (Ghost_Entity): New routine.
3473 (Is_Ghost_Declaration): Removed.
3474 (Is_Ghost_Statement_Or_Pragma): Removed.
3475 (Is_OK_Context): Reimplemented.
3476 (Is_OK_Declaration): New routine.
3477 (Is_OK_Pragma): New routine.
3478 (Is_OK_Statement): New routine.
3479 (Mark_Full_View_As_Ghost): New routine.
3480 (Mark_Pragma_As_Ghost): New routine.
3481 (Mark_Renaming_As_Ghost): New routine.
3482 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
3483 (Set_From_Entity): New routine.
3484 (Set_From_Policy): New routine.
3485 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
3486 (Set_Ghost_Mode_For_Freeze): Removed.
3487 (Set_Ghost_Mode_From_Entity): New routine.
3488 (Set_Ghost_Mode_From_Policy): Removed.
3489 * ghost.ads (Check_Ghost_Overriding): New routine.
3490 (Mark_Full_View_As_Ghost): New routine.
3491 (Mark_Pragma_As_Ghost): New routine.
3492 (Mark_Renaming_As_Ghost): New routine.
3493 (Set_Ghost_Mode): Update the parameter profile. Update the
3494 comment on usage.
3495 (Set_Ghost_Mode_For_Freeze): Removed.
3496 (Set_Ghost_Mode_From_Entity): New routine.
3497 * sem_ch3.adb (Analyze_Full_Type_Declaration):
3498 Capture and restore the Ghost mode. Mark a type
3499 as Ghost regardless of whether it comes from source.
3500 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
3501 Ghost mode.
3502 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
3503 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
3504 (Analyze_Private_Extension_Declaration): Capture and
3505 restore the Ghost mode.
3506 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
3507 (Process_Full_View): The full view inherits all Ghost-related
3508 attributes from the private view.
3509 (Restore_Globals): New routine.
3510 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
3511 Ghost mode.
3512 (Restore_Globals): New routine.
3513 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
3514 Code cleanup. Capture and restore the Ghost mode. Mark a
3515 subprogram as Ghost regarless of whether it comes from source.
3516 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
3517 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
3518 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
3519 (New_Overloaded_Entity): Ensure that a
3520 parent subprogram and an overriding subprogram have compatible
3521 Ghost policies.
3522 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
3523 the Ghost mode.
3524 (Analyze_Package_Declaration): Capture and
3525 restore the Ghost mode. Mark a package as Ghost when it is
3526 declared in a Ghost region.
3527 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
3528 (Restore_Globals): New routine.
3529 * sem_ch8.adb (Analyze_Exception_Renaming): Code
3530 reformatting. Capture and restore the Ghost mode. A renaming
3531 becomes Ghost when its name references a Ghost entity.
3532 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
3533 renaming becomes Ghost when its name references a Ghost entity.
3534 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
3535 renaming becomes Ghost when its name references a Ghost entity.
3536 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
3537 renaming becomes Ghost when its name references a Ghost entity.
3538 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
3539 mode. A renaming becomes Ghost when its name references a
3540 Ghost entity.
3541 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
3542 and restore the Ghost mode.
3543 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
3544 restore the Ghost mode.
3545 (Analyze_Generic_Subprogram_Declaration):
3546 Capture and restore the Ghost mode.
3547 * sem_ch13.adb Add with and use clauses for Ghost.
3548 (Add_Invariant): New routine.
3549 (Add_Invariants): Factor out code.
3550 (Add_Predicate): New routine.
3551 (Add_Predicates): Factor out code.
3552 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
3553 set and restore the Ghost mode.
3554 (Build_Invariant_Procedure): Code cleanup.
3555 (Build_Predicate_Functions): Capture, set and
3556 restore the Ghost mode. Mark the generated functions as Ghost.
3557 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
3558 Capture, set and restore the Ghost mode.
3559 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
3560 the Ghost mode.
3561 (Analyze_Initial_Condition_In_Decl_Part):
3562 Capture, set and restore the Ghost mode.
3563 (Analyze_Pragma):
3564 Code cleanup. Capture, set and restore the Ghost mode. Flag
3565 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
3566 Unreferenced_Objects as illegal when it applies to both Ghost
3567 and living arguments. Pragma Ghost cannot apply to synchronized
3568 objects.
3569 (Check_Kind): Moved to the spec of Sem_Prag.
3570 (Process_Inline): Flag the pragma as illegal when it applies to
3571 both Ghost and living arguments.
3572 (Restore_Globals): New routine.
3573 * sem_prag.ads Add pragma Default_Initial_Condition
3574 to table Assertion_Expression_Pragma. Add new table
3575 Is_Aspect_Specifying_Pragma.
3576 (Check_Kind): Moved from body of Sem_Prag.
3577 * sem_util.adb Add with and use clauses for Ghost.
3578 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
3579 the Ghost mode.
3580 (Build_Default_Init_Cond_Procedure_Declaration):
3581 Capture, set and restore the Ghost mode. Mark the default
3582 initial condition procedure as Ghost when it is declared
3583 in a Ghost region.
3584 (Is_Renaming_Declaration): New routine.
3585 (Policy_In_List): Account for the single argument version of
3586 Check_Pragma.
3587 * sem_util.ads (Is_Renaming_Declaration): New routine.
3588 * sinfo.adb (Is_Ghost_Pragma): New routine.
3589 (Set_Is_Ghost_Pragma): New routine.
3590 * sinfo.ads New attribute Is_Ghost_Pragma.
3591 (Is_Ghost_Pragma): New routine along with pragma Inline.
3592 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
3593
3594 2015-05-26 Robert Dewar <dewar@adacore.com>
3595
3596 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
3597 Minor reformatting.
3598
3599 2015-05-26 Gary Dismukes <dismukes@adacore.com>
3600
3601 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
3602 reformatting and typo fixes in comments.
3603
3604 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3605
3606 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
3607 the two views of a private dependent in two separate steps,
3608 to ensure proper visibility in parent units analyzed for inlining.
3609
3610 2015-05-26 Yannick Moy <moy@adacore.com>
3611
3612 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
3613 (Package_Body, Package_Spec): New queries moved
3614 here from GNATprove.
3615 (Package_Specification): Simplify query to remove use of loop.
3616 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
3617 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
3618 queries moved here from GNATprove.
3619
3620 2015-05-26 Bob Duff <duff@adacore.com>
3621
3622 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
3623 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
3624 redundant assertions.
3625
3626 2015-05-26 Gary Dismukes <dismukes@adacore.com>
3627
3628 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
3629
3630 2015-05-26 Doug Rupp <rupp@adacore.com>
3631
3632 * init.c [vxworks]: Refine previous checkin.
3633
3634 2015-05-26 Robert Dewar <dewar@adacore.com>
3635
3636 * exp_ch4.adb (Wrap_MA): New function.
3637 (Expand_N_Op_Expon): Use Wrap_MA.
3638
3639 2015-05-26 Bob Duff <duff@adacore.com>
3640
3641 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3642 Do not use secondary stack to return limited records with
3643 defaulted discriminants. This is an efficiency improvement.
3644 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
3645 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
3646 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
3647 Is_Definite_Subtype. This is an improvement to readability (the double
3648 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
3649 disallow passing non-[sub]type entities, an unnecessary and slightly
3650 bug-prone flexibility.
3651
3652 2015-05-26 Robert Dewar <dewar@adacore.com>
3653
3654 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
3655 bad bounds.
3656 * debug.adb: Document -gnatd.k.
3657 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
3658
3659 2015-05-26 Robert Dewar <dewar@adacore.com>
3660
3661 * gnat1drv.adb (Gnat1drv): Provide new arguments for
3662 Get_Target_Parameters.
3663 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
3664 new procedure.
3665 (Set_Restriction_No_Use_Of_Attribute): new procedure.
3666 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
3667 new procedure.
3668 (Set_Restriction_No_Use_Of_Attribute): new procedure.
3669 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
3670 * targparm.adb (Get_Target_Parameters): Allow new restriction
3671 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
3672 No_Use_Of_Pragma.
3673 * targparm.ads: New parameters for Get_Target_Parameters.
3674 * tbuild.adb (Set_NOD): New name for Set_RND.
3675 (Set_NSA): New procedure.
3676 (Set_NUA): New procedure.
3677 (Set_NUP): New procedure.
3678 * tbuild.ads (Make_SC): Minor reformatting.
3679 (Set_NOD): New name for Set_RND.
3680 (Set_NSA, Set_NUA, Set_NUP): New procedure.
3681
3682 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3683
3684 * a-stwise.adb (Find_Token): If source'first is not positive,
3685 an exception must be raised, as specified by RM 2005 A.4.3
3686 (68/1). This must be checked explicitly, given that run-time
3687 files are normally compiled without constraint checks.
3688 * a-stzsea.adb (Find_Token): Ditto.
3689
3690 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3691
3692 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
3693 to fully implement RM 8.6 (17/3). which earlier only applied
3694 to synchronized types. Used to preanalyze aspects that include
3695 current instances of types, such as Predicate and Invariant.
3696 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
3697 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
3698 expression of aspect and analyze it to provide proper type
3699 information.
3700
3701 2015-05-26 Robert Dewar <dewar@adacore.com>
3702
3703 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
3704 * s-exnllf.adb (Exn_Float): New function.
3705 (Exn_Long_Float): New function.
3706 (Exn_Long_Long_Float): Rewritten interface.
3707 (Exp): New name for what used to be Exn_Long_Long_Float.
3708 * s-exnllf.ads (Exn_Float): New function.
3709 (Exn_Long_Float): New function.
3710
3711 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3712
3713 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
3714 on a selected component when the prefix is a type name that is
3715 a Current_Instance.
3716 * einfo.ads: Minor grammar fix.
3717
3718 2015-05-26 Doug Rupp <rupp@adacore.com>
3719
3720 * init.c [vxworks] (sysLib.h): Only for x86.
3721
3722 2015-05-26 Doug Rupp <rupp@adacore.com>
3723
3724 * init-vxsim.c (CPU): define as __VXSIM_CPU__
3725 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
3726 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
3727 * sigtramp.h: Likewise.
3728
3729 2015-05-26 Robert Dewar <dewar@adacore.com>
3730
3731 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
3732 * sem_util.adb: Minor reformatting
3733
3734 2015-05-26 Yannick Moy <moy@adacore.com>
3735
3736 * inline.adb (Has_Initialized_Type): Adapt to new names.
3737 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
3738 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
3739 Subprogram_Specification): New query functions used in GNATprove.
3740 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
3741 query functions used in GNATprove.
3742 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
3743 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
3744 Is_Double_Precision_Floating_Point_Type,
3745 Is_Single_Precision_Floating_Point_Type): New query functions
3746 used in GNATprove.
3747
3748 2015-05-26 Bob Duff <duff@adacore.com>
3749
3750 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
3751 some huge number.
3752 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
3753 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
3754
3755 2015-05-26 Robert Dewar <dewar@adacore.com>
3756
3757 * sinfo.adb: Minor comment addition.
3758 * einfo.adb: Minor whitespace and punctuation fix.
3759 * sem_util.adb: Minor editing of comments.
3760
3761 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3762
3763 * sem_ch7.adb (Install_Private_Declarations,
3764 Swap_Private_Dependents): Ensure that both views of the dependent
3765 subtype are immediately visible if we are within their scope. This
3766 may be needed when a procedure body is both the parent of an
3767 instantiated child unit, and is itself used to inline a local
3768 function.
3769
3770 2015-05-26 Gary Dismukes <dismukes@adacore.com>
3771
3772 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
3773
3774 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3775
3776 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
3777 detecting exceptions to the rewriting, deal with implicit
3778 dereferences in the selected component case.
3779
3780 2015-05-26 Bob Duff <duff@adacore.com>
3781
3782 * sem_ch13.adb (Analyze_One_Aspect): Do not
3783 require the expression of the Disable_Controlled aspect to be
3784 static in a generic template, because 'Enabled is not known
3785 until the instance.
3786
3787 2015-05-26 Doug Rupp <rupp@adacore.com>
3788
3789 * init-vxsim.c: New file for vxsim ZCX
3790 * sigtramp-vxworks-vxsim.c: Likewise.
3791 * sigtramp-vxworks.c: Factor out target dependent bits into ...
3792 * sigtramp-vxworks-target.inc: ... here.
3793 * sigtramp.h: Add vxsim zcx protos.
3794 * init.c [vxworks...] (sysLib.h): Include.
3795 (__gnat_map_signal): Make global.
3796 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
3797 on vxsim.
3798 [...i386] (__gnat_install_handler): Test if on vxsim.
3799
3800 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3801
3802 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
3803 iterator over an array, if the component is aliased, the loop
3804 variable is aliased as well.
3805
3806 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3807
3808 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
3809 parameters that is rewritten as an expression_with_actions,
3810 we preserve the original function call node for further use by
3811 the caller (typically Expand_Call). In the presence of validity
3812 checks, that function call, though it is labelled Analyzed to
3813 prevent an infinite recursion, may be rewritten as a temporary
3814 by Remove_Side_Effects. Ensure that the caller has access to
3815 the original function call to continue expansion.
3816 * atree.ads: Minor typo in comment.
3817
3818 2015-05-26 Javier Miranda <miranda@adacore.com>
3819
3820 * sem_util.adb (Check_Function_Writable_Actuals):
3821 Add missing support to check the violation of writable actuals
3822 in array aggregates that have a nonstatic range.
3823
3824 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
3825
3826 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
3827 Expand_Pragma_Contract_Cases.
3828 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
3829 Expand_Pragma_Contract_Cases.
3830 * sem_ch13.adb (Add_Invariants): Use the original aspect name
3831 when creating the arguments of pragma Check. This ensures that
3832 'Class is properly recognized and handled.
3833
3834 2015-05-26 Arnaud Charlet <charlet@adacore.com>
3835
3836 * gnat1drv.adb: Minor adjustments.
3837 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
3838 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
3839 Stop_Subtree_Climbind): Code cleanup.
3840 * einfo.ads: Minor comment change.
3841
3842 2015-05-26 Javier Miranda <miranda@adacore.com>
3843
3844 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
3845 Code cleanup.
3846 * sem_ch3.adb (Build_Derived_Record_Type,
3847 Record_Type_Declaration): Code cleanup.
3848 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
3849 Stop_Subtree_Climbind): Tables which speed up the identification
3850 of dangerous calls to Ada 2012 functions with writable actuals
3851 (AI05-0144).
3852 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
3853 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
3854 Analyze_Range): Code cleanup.
3855 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
3856 (Check_Writable_Actuals): Code cleanup using the added tables.
3857 * sem_util.adb (Check_Function_Writable_Actuals): Return
3858 immediately if the node does not have the flag Check_Actuals
3859 set to True.
3860
3861 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3862
3863 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
3864 condition in the detection of the effects of Remove_Side_Effects.
3865 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
3866 * exp_util.adb (Is_Name_Reference): New predicate.
3867 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
3868 in order to decide whether to use the renaming to capture the
3869 side effects of the subexpression.
3870 (Side_Effect_Free): Remove obsolete test.
3871
3872 2015-05-26 Robert Dewar <dewar@adacore.com>
3873
3874 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
3875 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
3876 (Is_Controlled_Active): New function.
3877 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
3878 Is_Controlled_Active.
3879 * exp_util.adb (Needs_Finalization): Finalization not needed
3880 if Disable_Controlled set.
3881 * freeze.adb (Freeze_Array_Type): Do not set
3882 Has_Controlled_Component if the component has Disable_Controlled.
3883 (Freeze_Record_Type): ditto.
3884 * sem_ch13.adb (Decorate): Minor reformatting.
3885 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
3886 * sem_ch3.adb (Analyze_Object_Declaration): Handle
3887 Disable_Controlled.
3888 (Array_Type_Declaration): ditto.
3889 (Build_Derived_Private_Type): ditto.
3890 (Build_Derived_Type): ditto.
3891 (Record_Type_Definition): ditto.
3892 * snames.ads-tmpl: Add Name_Disable_Controlled.
3893
3894 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
3895
3896 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
3897 of a renaming to capture the return value of a function call.
3898 (Expand_Simple_Function_Return): Call Remove_Side_Effects
3899 instead of removing side effects manually before the call to
3900 _Postconditions.
3901
3902 2015-05-26 Robert Dewar <dewar@adacore.com>
3903
3904 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
3905 order in calling Duplicate_Subexpr.
3906 * einfo.ads: Fix documentation of Object/Value size for scalar types.
3907
3908 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3909
3910 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
3911 If a component is default-initialized and its type has an
3912 invariant procedure, insert an invariant test after code for
3913 default-initialization of the component.
3914
3915 2015-05-26 Gary Dismukes <dismukes@adacore.com>
3916
3917 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
3918
3919 2015-05-26 Robert Dewar <dewar@adacore.com>
3920
3921 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
3922 making AREC entity names unique.
3923
3924 2015-05-26 Ed Schonberg <schonberg@adacore.com>
3925
3926 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
3927 has aspect specifications, examine the corresponding list of
3928 representation items to determine whether there is a visible
3929 stream operation. The attribute definition clause generated from
3930 the aspect will be inserted at the freeze point of the type,
3931 which may be in the private part and not directly visible,
3932 but the aspect makes the operation available to a client.
3933
3934 2015-05-26 Robert Dewar <dewar@adacore.com>
3935
3936 * sem_util.adb: Minor code reorganization.
3937 * sem_ch6.adb: Minor reformatting.
3938
3939 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
3940
3941 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
3942 original size for elementary types before issuing the size warning.
3943
3944 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
3945
3946 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
3947 (C_Get_Words_BE): Likewise.
3948 (C_Get_Bytes_BE): Likewise.
3949 (C_Get_Bits_BE): Likewise.
3950 (Width_From_Size): Remove superfluous space.
3951 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
3952 (get_target_float_words_be): ...this.
3953 (get_words_be): Rename into...
3954 (get_target_words_be): ...this.
3955 (get_bytes_be): Rename into...
3956 (get_target_bytes_be): ...this.
3957 (get_bits_be): Rename into...
3958 (get_target_bits_be): ...this.
3959 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
3960 (ptr_void_type_node): Delete.
3961 (get_target_float_size): Likewise.
3962 (get_target_double_size): Likewise.
3963 (get_target_long_double_size): Likewise.
3964 (get_float_words_be): Likewise.
3965 (get_words_be): Likewise.
3966 (get_bytes_be): Likewise.
3967 (get_bits_be): Likewise.
3968 (get_target_float_words_be): Declare.
3969 (get_target_words_be): Likewise.
3970 (get_target_bytes_be): Likewise.
3971 (get_target_bits_be): Likewise.
3972 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
3973 with ptr_type_node.
3974 (intrin_return_compatible_p): Likewise.
3975 * gcc-interface/trans.c (gigi): Likewise.
3976 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
3977 (maybe_wrap_free): Likewise.
3978 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
3979 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
3980
3981 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
3982
3983 * gcc-interface/decl.c (elaborate_expression): Take a const string
3984 suffix instead of a tree.
3985 (elaborate_expression_1): Likewise.
3986 (elaborate_expression_2): Likewise.
3987 (gnat_to_gnu_entity): Adjust to above changes.
3988 (build_subst_list): Likewise.
3989 (get_entity_char): New static function.
3990
3991 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
3992
3993 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
3994 <E_Exception>: Merge with E_Variable case.
3995 <E_Variable>: Remove 'object' label.
3996
3997 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
3998
3999 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
4000 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
4001 * gcc-interface/utils.c (convert): Likewise and simplify.
4002 (remove_conversions): Likewise.
4003 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
4004 (build_unary_op): Likewise and simplify.
4005
4006 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
4007
4008 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
4009 (build_atomic_store): Likewise.
4010 (build_load_modify_store): Declare.
4011 (VECTOR_TYPE_P): Delete.
4012 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
4013 Is_Atomic_Or_VFA throughout.
4014 <E_Array_Type>: Build a variant of the XUA type instead of forcing
4015 TYPE_VOLATILE on it.
4016 <E_Array_Subtype>: Use the main variant of the base type.
4017 Do not force TYPE_VOLATILE on the type being built.
4018 <E_Record_Type>: Likewise.
4019 <E_Array_Subtype>: Likewise.
4020 <E_Subprogram_Type>: Rename local variable.
4021 Add Atomic qualifier in conjunction with Volatile on types if needed.
4022 Force BLKmode for by-ref types only at the end of the processing.
4023 Change qualifiers only after changing the mode of the type. Set
4024 TYPE_UNIVERSAL_ALIASING_P on the type directly.
4025 (check_ok_for_atomic_type): Issue specific error message for VFA.
4026 (gnat_to_gnu_component_type): Replace Is_Atomic with
4027 Is_Atomic_Or_VFA throughout.
4028 * gcc-interface/misc.c (gnat_get_alias_set): Test
4029 TYPE_UNIVERSAL_ALIASING_P on the type directly.
4030 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
4031 Is_Atomic_Or_VFA throughout. Add missing guard.
4032 (node_is_atomic): New predicate.
4033 (node_has_volatile_full_access): Likewise.
4034 (gnat_strip_type_conversion): New function.
4035 (outer_atomic_access_required_p): New predicate.
4036 (atomic_sync_required_p): Rename into...
4037 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
4038 parent node first and then look for the atomic setting. Add support
4039 for Volatile_Full_Access.
4040 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
4041 and adjusts calls to above functions. Use load-modify-store sequence
4042 for updates of In/Out and Out parameters if required, as well as for
4043 moving the result to the target if required. Add couple of missing
4044 guards.
4045 (gnat_to_gnu): Adjust calls to above functions.
4046 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
4047 evaluate only its address.
4048 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
4049 store sequence if required.
4050 <N_Function_Call>: Adjust call to Call_to_gnu.
4051 (extract_values): Adjust comment.
4052 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
4053 use relaxed memory model if it is not set.
4054 (build_atomic_store): Likewise.
4055 (call_is_atomic_load): New predicate.
4056 (build_load_modify_store): New function.
4057 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
4058 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
4059
4060 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
4061
4062 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
4063 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
4064 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
4065 (invalidate_global_renaming_pointers): Likewise.
4066 (record_global_nonconstant_renaming): New.
4067 (invalidate_global_nonconstant_renamings): Likewise.
4068 (get_inner_constant_reference): Likewise.
4069 (gnat_constant_reference_p): Likewise.
4070 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
4071 and register the renaming pointer only if the object is non-constant.
4072 (elaborate_expression_1): Call get_inner_constant_reference instead
4073 of get_inner_reference.
4074 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
4075 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
4076 object before substituting it.
4077 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
4078 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
4079 result at the global level.
4080 (N_Exception_Renaming_Declaration): Likewise.
4081 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
4082 (global_nonconstant_renamings): ...this.
4083 (destroy_gnat_utils): Adjust to above renaming.
4084 (record_global_renaming_pointer): Rename into...
4085 (record_global_nonconstant_renaming): ...this.
4086 (invalidate_global_renaming_pointers): Rename into...
4087 (invalidate_global_nonconstant_renamings): ...this and do not recheck
4088 the renamed object before invalidating.
4089 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
4090 (get_inner_constant_reference): New public function.
4091 (gnat_constant_reference_p): New predicate.
4092
4093 2015-05-25 Javier Miranda <miranda@adacore.com>
4094
4095 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
4096 is now present in subprograms, generic subprograms, entries and
4097 entry families.
4098 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
4099 on entries, entry families, subprograms and generic subprograms.
4100 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
4101 Minor code reorganization to ensure that the Ekind attribute
4102 of the subprogram entity is set before its formals are
4103 processed. Required to allow the use of the attribute
4104 Has_Out_Or_In_Out_Parameter on the subprogram entity.
4105 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
4106 Perform the check on writable actuals only if the value of some
4107 component of the aggregate involves calling a function with
4108 out-mode parameters.
4109 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
4110 internally built aggregate.
4111 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
4112 Perform the check on writable actuals only if the initialization of
4113 some component involves calling a function with out-mode parameters.
4114 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
4115 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
4116 Analyze_Range): Check writable actuals only if the
4117 subtrees have a call to a function with out-mode parameters
4118 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
4119 has out or in-out parameters then mark its outermost enclosing
4120 construct as a node on which the writable actuals check must
4121 be performed.
4122 (Analyze_Call): Check if the flag must be set and if the outermost
4123 enclosing construct.
4124 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
4125 and reorganization. We skip processing aggregate discriminants
4126 since their precise analysis involves two phases traversal.
4127 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
4128 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
4129 check_writable_actuals.
4130
4131 2015-05-22 Ed Schonberg <schonberg@adacore.com>
4132
4133 * sem_ch3.adb (Constrain_Concurrent): If the context is a
4134 type declaration, generate an Itype_Reference for the anonymous
4135 subtype, to force elaboration at this point in gigi.
4136
4137 2015-05-22 Gary Dismukes <dismukes@adacore.com>
4138
4139 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
4140 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
4141
4142 2015-05-22 Ed Schonberg <schonberg@adacore.com>
4143
4144 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
4145 operation, replace the names of the actuals in named associations
4146 with the names of the actuals of the subprogram that is eventually
4147 executed. The names of the formals and the defaults can differ
4148 between the two operations when they are operations of a formal
4149 derived type.
4150
4151 2015-05-22 Bob Duff <duff@adacore.com>
4152
4153 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
4154 out slow path into separate procedure. Inline Append. Fast path
4155 now avoids calling Insert.
4156 (Finalize): Do the busy checking last, so the container gets emptied.
4157 (Insert, Insert_Space): Remove redundancy.
4158
4159 2015-05-22 Robert Dewar <dewar@adacore.com>
4160
4161 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
4162 for -gnatd.V.
4163
4164 2015-05-22 Arnaud Charlet <charlet@adacore.com>
4165
4166 * gnatvsn.ads: Minor code reorg to remember more easily to update
4167 variables.
4168
4169 2015-05-22 Ed Schonberg <schonberg@adacore.com>
4170
4171 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
4172 limited_with clause on a predefined unit is not transformed into
4173 a regular with_clause, to preserve the original tree structure.
4174 * sinfo.ads (N_With_Clause): Add comment on handling of
4175 Limited_With.
4176 * sem_ch10.adb: Minor reformatting.
4177
4178 2015-05-22 Ed Schonberg <schonberg@adacore.com>
4179
4180 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
4181 the profile of a subprogram renaming does not require freezing,
4182 because it is declared in a different unit.
4183
4184 2015-05-22 Ed Schonberg <schonberg@adacore.com>
4185
4186 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
4187 composite type) is private, go to full view. This was previously
4188 done only in an instance context, but is happen whenever a chain
4189 of private extensions includes one inherited discriminant.
4190
4191 2015-05-22 Robert Dewar <dewar@adacore.com>
4192
4193 * einfo.ads: Minor comment updates.
4194 * exp_unst.adb: Move Subps table to spec Don't remove old entries
4195 from table Add Last field to record last entry used.
4196 * exp_unst.ads: Move Subps table here from body So that Cprint
4197 can access saved values.
4198
4199 2015-05-22 Bob Duff <duff@adacore.com>
4200
4201 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
4202 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
4203 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
4204 (Pseudo_Reference, Element_Access, Get_Element_Access): New
4205 declarations added for use by performance improvements in exp_ch5.adb.
4206 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
4207 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
4208 Instead of doing literally what the RM calls for, we do something
4209 equivalent that avoids expensive operations inside the loop. If the
4210 container package has appropriate Next, Pseudo_Reference,
4211 Element_Access, Get_Element_Access declarations, we invoke the
4212 optimization.
4213 * snames.ads-tmpl: Note speed improvement.
4214
4215 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
4216
4217 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
4218 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
4219 Add pattern to translate "or else" into "||".
4220
4221 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
4222
4223 * einfo.ads (Has_Volatile_Full_Access): Rename into...
4224 (Is_Volatile_Full_Access): ...this.
4225 (Set_Has_Volatile_Full_Access): Rename into...
4226 (Set_Is_Volatile_Full_Access): ...this.
4227 * einfo.adb (Has_Volatile_Full_Access): Rename into...
4228 (Is_Volatile_Full_Access): ...this.
4229 (Set_Has_Volatile_Full_Access): Rename into...
4230 (Set_Is_Volatile_Full_Access): ...this.
4231 (Is_Atomic_Or_VFA): Adjust to above renaming.
4232 * errout.adb (Special_Msg_Delete): Likewise.
4233 * exp_pakd.adb (Install_PAT): Likewise.
4234 * freeze.adb (Freeze_Array_Type): Likewise.
4235 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
4236 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
4237 (Inherit_Aspects_At_Freeze_Point): Likewise.
4238 * sem_prag.adb (Set_Atomic_VFA): Likewise.
4239 (Process_Atomic_Independent_Shared_Volatile): Likewise.
4240 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
4241
4242 2015-05-22 Robert Dewar <dewar@adacore.com>
4243
4244 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
4245 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
4246 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
4247 change that deals with the fact that most of the special coding for
4248 Atomic should also apply to the case of Volatile_Full_Access.
4249 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
4250 references to Is_Atomic now use this new attribute.
4251
4252 2015-05-22 Robert Dewar <dewar@adacore.com>
4253
4254 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
4255 comparison.
4256
4257 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
4258
4259 * sprint.adb (Source_Dump): When generating debug files, deal
4260 with the case of a stand-alone package instantiation by dumping
4261 together the spec and the body in the common debug file.
4262
4263 2015-05-22 Robert Dewar <dewar@adacore.com>
4264
4265 * sem_ch13.adb (Minimum_Size): Size is zero for null range
4266 discrete subtype.
4267
4268 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
4269
4270 * einfo.adb (Anonymous_Master): This attribute now applies
4271 to package and subprogram bodies.
4272 (Set_Anonymous_Master): This attribute now applies to package and
4273 subprogram bodies.
4274 (Write_Field36_Name): Add output for package and subprogram bodies.
4275 * einfo.ads Update the documentation on attribute Anonymous_Master
4276 along with occurrences in entities.
4277 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
4278 handle spec and body anonymous masters of the same unit.
4279 (Current_Anonymous_Master): Reimplemented. Handle a
4280 package instantiation that acts as a compilation unit.
4281 (Insert_And_Analyze): Reimplemented.
4282
4283 2015-05-22 Ed Schonberg <schonberg@adacore.com>
4284
4285 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
4286 predefined unit is treated as a regular with_clause.
4287
4288 2015-05-22 Robert Dewar <dewar@adacore.com>
4289
4290 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
4291 prj-conf.adb, sem_disp.adb: Minor reformatting.
4292
4293 2015-05-22 Vincent Celier <celier@adacore.com>
4294
4295 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
4296 for switch -P and, if found and gprclean is available, invoke
4297 silently gprclean.
4298 * make.adb (Initialize): For native gnatmake, check for switch -P
4299 and, if found and gprbuild is available, invoke silently gprbuild.
4300
4301 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
4302
4303 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
4304 specific warning for discrete types when the source is larger
4305 than the target.
4306
4307 2015-05-22 Ed Schonberg <schonberg@adacore.com>
4308
4309 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
4310 package instantiations. Holds the list of actuals in the instance
4311 that are incomplete types, to determine where the corresponding
4312 instance body must be placed.
4313 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
4314 actual in an instance matches an incomplete formal.
4315 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
4316 explicit dereference.
4317 (Inherited_Subprograms): In the presence of a limited view there
4318 are no subprograms to inherit.
4319 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
4320 actuals of instance, for later placement of instance body and
4321 freeze nodes for actuals.
4322 (Install_Body): In the presence of actuals that incomplete types
4323 from a limited view, the instance body cannot be placed after
4324 the declaration because full views have not been seen yet. Any
4325 use of the non-limited views in the instance body requires
4326 the presence of a regular with_clause in the enclosing unit,
4327 and will fail if this with_clause is missing. We place the
4328 instance body at the beginning of the enclosing body, which is
4329 the unit being compiled, and ensure that freeze nodes for the
4330 full views of the incomplete types appear before the instance.
4331
4332 2015-05-22 Pascal Obry <obry@adacore.com>
4333
4334 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
4335 (In_Place_Option): Removed.
4336 (Relocate_Build_Tree_Option): New constant.
4337 (Root_Dir_Option): New constant.
4338 (Obj_Root_Dir): Removed.
4339 (Build_Tree_Dir): New variable.
4340 (Root_Src_Tree): Removed.
4341 (Root_Dir): New variable.
4342 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
4343 for improper relocation.
4344 * prj-nmsc.adb (Locate_Directory): Add check for improper
4345 relocation.
4346
4347 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
4348
4349 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
4350 attribute now applies to the base type.
4351 (Has_Default_Init_Cond): Now applies to the base type.
4352 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
4353 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
4354 applies to the base type.
4355 (Set_Has_Default_Init_Cond): Now applies to the base type.
4356 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
4357 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
4358 base type when adding a call to the Default_Initial_Condition.
4359
4360 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
4361
4362 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
4363 is now unused.
4364 (Anonymous_Master): New routine.
4365 (Has_Anonymous_Master): Removed.
4366 (Set_Anonymous_Master): New routine.
4367 (Set_Has_Anonymous_Master): Removed.
4368 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
4369 (Write_Field36_Name): Add output for Anonymous_Master.
4370 * einfo.ads Add new attribute Anonymous_Master along with
4371 occurrences in nodes. Remove attribute Has_Anonymous_Master along
4372 with occurrences in nodes.
4373 (Anonymous_Master): New routine along with pragma Inline.
4374 (Has_Anonymous_Master): Removed along with pragma Inline.
4375 (Set_Anonymous_Master): New routine along with pragma Inline.
4376 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
4377 * exp_ch4.adb (Create_Anonymous_Master): New routine.
4378 (Current_Anonymous_Master): Reimplemented.
4379
4380 2015-05-22 Bob Duff <duff@adacore.com>
4381
4382 * freeze.adb (Freeze_Profile): Suppress warning if imported
4383 subprogram is not at library level.
4384
4385 2015-05-22 Robert Dewar <dewar@adacore.com>
4386
4387 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
4388 component of an object to which Volatile_Full_Access applies.
4389
4390 2015-05-22 Jerome Guitton <guitton@adacore.com>
4391
4392 * exp_dbug.ads: Add note about non bit-packed arrays.
4393
4394 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
4395
4396 * sem_prag.adb: Fix typo.
4397 * einfo.ads: Grammar fixes in comments.
4398
4399 2015-05-22 Bob Duff <duff@adacore.com>
4400
4401 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
4402 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4403 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
4404 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
4405 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
4406 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
4407 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
4408 Add an initialization expression "raise Program_Error". See,
4409 for example, RM-A.18.2(148.4).
4410
4411 2015-05-22 Robert Dewar <dewar@adacore.com>
4412
4413 * debug.adb: Update documentation.
4414 * einfo.ads, einfo.adb (Needs_Typedef): New flag
4415 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
4416 typedef's in C.
4417 * frontend.adb: Update comments.
4418 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
4419 for -gnatd.V
4420 * opt.ads (Generate_C_Code): New switch.
4421 * osint-c.adb (Write_C_File_Info): Removed, not used
4422 (Write_H_File_Info): Removed, not used
4423 * osint-c.ads (Write_C_File_Info): Removed, not used
4424 (Write_H_File_Info): Removed, not used
4425 * osint.ads (Write_Info): Minor comment updates.
4426 (Output_FD): Moved from private part to public part of spec.
4427 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
4428 mode.
4429 * atree.ads: minor typo in comment.
4430 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
4431 Do not allow VFA on composite object with aliased component.
4432
4433 2015-05-22 Arnaud Charlet <charlet@adacore.com>
4434
4435 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
4436
4437 2015-05-22 Pascal Obry <obry@adacore.com>
4438
4439 * prj-util.adb: Minor comment editing.
4440
4441 2015-05-22 Pascal Obry <obry@adacore.com>
4442
4443 * makeutl.ads (In_Place_Option): New constant.
4444 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
4445 objects).
4446 (Root_Src_Tree): New variable (absolute path of root source tree).
4447 * prj-conf.adb (Do_Autoconf): Take into account the object root
4448 directory (if defined) to generate configuration project.
4449 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
4450 is defined.
4451 (Locate_Directory): Likewise.
4452
4453 2015-05-22 Pascal Obry <obry@adacore.com>
4454
4455 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
4456
4457 2015-05-22 Bob Duff <duff@adacore.com>
4458
4459 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
4460 interface to return Empty when not found, so we can avoid handling
4461 Program_Error in that case.
4462 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
4463 primitives.
4464 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
4465 code is expecting Empty.
4466 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
4467 Program_Error.
4468
4469 2015-05-22 Robert Dewar <dewar@adacore.com>
4470
4471 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
4472 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
4473 non-binary.
4474 * exp_util.adb: Add comment.
4475 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
4476 body.
4477 (Set_File_Name): New name for the above.
4478 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
4479 Close_C_File, Close_H_File): New procedure.
4480 * osint.adb: Minor reformatting.
4481 * osint.ads: Minor comment updates.
4482
4483 2015-05-22 Robert Dewar <dewar@adacore.com>
4484
4485 * exp_ch4.adb: Minor rewording.
4486 * exp_util.ads: Clarify that Find_Prim_Op is only for
4487 tagged types.
4488
4489 2015-05-22 Robert Dewar <dewar@adacore.com>
4490
4491 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
4492 Check_Actuals.
4493 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
4494 and overflow cases.
4495
4496 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
4497
4498 * exp_pakd.adb (Install_PAT): Propagate representation aspects
4499 from the original array type to the PAT.
4500
4501 2015-05-22 Robert Dewar <dewar@adacore.com>
4502
4503 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
4504
4505 2015-05-22 Robert Dewar <dewar@adacore.com>
4506
4507 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
4508
4509 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
4510
4511 * sem_prag.adb (Analyze_Pragma): Remove the detection
4512 of a useless Part_Of indicator when the related item is a constant.
4513 (Check_Matching_Constituent): Do not emit an error on a constant.
4514 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
4515 when the related item is a constant.
4516 (Collect_Body_States): Code cleanup.
4517 (Collect_Visible_States): Code cleanup.
4518 (Report_Unused_States): Do not emit an error on a constant.
4519 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
4520
4521 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
4522
4523 * sem_ch8.adb (Analyze_Object_Renaming): Copy
4524 Has_Volatile_Full_Access from renamed to renaming entities.
4525 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
4526 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
4527
4528 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
4529
4530 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
4531 RM 6.9 rules.
4532 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
4533 * sem_ch3.adb (Analyze_Object_Declaration): Update references
4534 to SPARK RM 6.9 rules.
4535 (Check_Completion): Ghost entities do not require a special form of
4536 completion.
4537 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
4538 to SPARK RM 6.9 rules.
4539 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
4540 rules.
4541 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
4542 to SPARK RM 6.9 rules.
4543 (Requires_Completion_In_Body): Ghost entities do not require a special
4544 form of completion.
4545
4546 2015-05-22 Robert Dewar <dewar@adacore.com>
4547
4548 * a-csquin.ads: Use Ada 2012 notation.
4549 * sem_ch8.adb: Minor reformatting.
4550
4551 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
4552
4553 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
4554 acts as a completion.
4555
4556 2015-05-22 Ed Schonberg <schonberg@adacore.com>
4557
4558 * sem_ch13.adb: Minor reformatting.
4559
4560 2015-05-22 Jose Ruiz <ruiz@adacore.com>
4561
4562 * a-reatim.adb: Minor change, fix typo.
4563
4564 2015-05-22 Robert Dewar <dewar@adacore.com>
4565
4566 * sem_util.ads: Minor addition of ??? comment.
4567 * sem_prag.adb, sem_util.adb: Minor reformatting.
4568 * sem_ch13.adb: minor reformatting.
4569
4570 2015-05-22 Robert Dewar <dewar@adacore.com>
4571
4572 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
4573 is 64-bits.
4574 * sem_ch13.adb: Improve error message.
4575 * exp_ch4.adb: Minor reformatting.
4576
4577 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
4578
4579 * sem_prag.adb (Analyze_Pragma): Constants without variable
4580 input do not require indicator Part_Of.
4581 (Check_Missing_Part_Of): Constants without variable input do not
4582 requrie indicator Part_Of.
4583 (Collect_Visible_States): Constants without variable input are
4584 not part of the hidden state of a package.
4585 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
4586
4587 2015-05-22 Robert Dewar <dewar@adacore.com>
4588
4589 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
4590 Atomic_Sync_Required for an object renaming declaration.
4591 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
4592 Is_Independent to renaming object.
4593
4594 2015-05-22 Ed Schonberg <schonberg@adacore.com>
4595
4596 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
4597 various illegalities in iterators over arrays and containers:
4598 a) New function Get_Cursor_Type, to verify that the cursor is
4599 not a limited type at the point of iteration.
4600 b) If the container is a constant, an element_iterator is illegal
4601 if the container type does not have a Constant_Indexing aspect.
4602 c) If the iterate function has an in-out controlling parameter,
4603 the container cannot be a constant object.
4604 d) Reject additional cases of iterators over a
4605 discriminant-dependent component of a mutable object.
4606
4607 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4608
4609 * einfo.adb (Contract): This attribute now applies to constants.
4610 (Set_Contract): This attribute now applies to constants.
4611 (Write_Field34_Name): Add output for constants.
4612 * einfo.ads Attribute Contract now applies to constants.
4613 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
4614 their Part_Of indicator verified.
4615 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
4616 constituent.
4617 (Analyze_Global_Item): A constant cannot act as an output.
4618 (Analyze_Initialization_Item): Constants are now a valid
4619 initialization item.
4620 (Analyze_Initializes_In_Decl_Part): Rename
4621 global variable States_And_Vars to States_And_Objs and update
4622 all its occurrences.
4623 (Analyze_Input_Item): Constants are now a
4624 valid initialization item. Remove SPARM RM references from error
4625 messages.
4626 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
4627 (Collect_Body_States): Collect both source constants
4628 and variables.
4629 (Collect_States_And_Objects): Collect both source constants and
4630 variables.
4631 (Collect_States_And_Variables): Rename
4632 to Collect_States_And_Objects and update all its occurrences.
4633 (Collect_Visible_States): Do not collect constants and variables
4634 used to map generic formals to actuals.
4635 (Find_Role): The role of a constant is that of an input. Separate the
4636 role of a variable from that of a constant.
4637 (Report_Unused_Constituents): Add specialized wording for constants.
4638 (Report_Unused_States): Add specialized wording for constants.
4639 * sem_util.adb (Add_Contract_Item): Add processing for constants.
4640 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
4641 (Find_Placement_In_State_Space): Update the comment on usage.
4642
4643 2015-05-21 Ed Schonberg <schonberg@adacore.com>
4644
4645 * sem_ch5.adb: minor reformatting.
4646
4647 2015-05-21 Robert Dewar <dewar@adacore.com>
4648
4649 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
4650
4651 2015-05-21 Robert Dewar <dewar@adacore.com>
4652
4653 * freeze.adb: Minor reformatting.
4654 * cstand.adb (Print_Standard): Fix bad printing of Duration
4655 low bound.
4656 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
4657 out of range args.
4658
4659 2015-05-21 Ed Schonberg <schonberg@adacore.com>
4660
4661 * sem_ch5.adb: add (useless) initial value.
4662 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
4663 Check whether the procedure has parameters before processing
4664 formals in ASIS mode.
4665
4666 2015-05-21 Ed Schonberg <schonberg@adacore.com>
4667
4668 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
4669 aspect as well when indexing function is illegal.
4670 (Valid_Default_Iterator): Handle properly somme illegal cases
4671 to prevent compilation abandoned messages.
4672 (Check_Primitive_Function): Verify that type and indexing function
4673 are in the same scope.
4674 * freeze.adb (Freeze_Record): Extend patch on the presence of
4675 indexing aspects to aspect Default_Iterator.
4676
4677 2015-05-19 David Malcolm <dmalcolm@redhat.com>
4678
4679 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
4680 from line_map * to line_map_ordinary *.
4681
4682 2015-05-12 Jason Merrill <jason@redhat.com>
4683
4684 * sigtramp-vxworks.c: Add space between string literal and macro
4685 name.
4686
4687 2015-05-12 Arnaud Charlet <charlet@adacore.com>
4688
4689 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
4690
4691 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4692
4693 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
4694 legality checks for array and container iterators:
4695 a) The domain of iteration cannot be a component that depends
4696 on discriminants of a mutable object. The check was recently
4697 added for element iterators.
4698 b) The cursor type cannot be a limited type at the point of the
4699 iteration, because the cursor will be assigned to in the body
4700 of the loop.
4701
4702 2015-05-12 Robert Dewar <dewar@adacore.com>
4703
4704 * freeze.adb (Freeze_Record_Type): Make sure that if we have
4705 aspect Iterator_Element, then we have either Constant_Indexing
4706 or Variable_Indexing.
4707
4708 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4709
4710 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
4711 and Reference_Control_Type to support element iterators over
4712 ordered multisets.
4713 * a-ciormu.ads, a-ciormu.adb: Ditto for
4714 indefinite_ordered_multisets.
4715
4716 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
4717
4718 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
4719 the evaluation of the EWA expression. Code cleanup.
4720 (Process_Transient_Object): Code cleanup.
4721 * exp_util.adb (Is_Aliased): Controlled transient objects found
4722 within EWA nodes are not aliased.
4723 (Is_Finalizable_Transient): Iterators are not finalizable transients.
4724
4725 2015-05-12 Robert Dewar <dewar@adacore.com>
4726
4727 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
4728 Don't allow Atomic and Volatile_Full_Access for the same entity.
4729
4730 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4731
4732 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
4733 semantics and safety checks specified in AI12-0151.
4734
4735 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
4736
4737 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
4738 for subunit in generic units.
4739
4740 2015-05-12 Robert Dewar <dewar@adacore.com>
4741
4742 * sem_elab.adb (Check_A_Call): Avoid checking internal call
4743 from Valid_Scalars
4744
4745 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4746
4747 * sem_ch6.adb (Process_Formals): An untagged incomplete type
4748 is legal in the profile of a null procedure.
4749
4750 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4751
4752 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
4753 the checks on a derived formal whose parent type is a previous
4754 formal that is not a derived type.
4755
4756 2015-05-12 Robert Dewar <dewar@adacore.com>
4757
4758 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
4759 * einfo.adb (Has_Volatile_Full_Access): New flag.
4760 (Has_Volatile_Full_Access): New flag.
4761 * einfo.ads (Has_Volatile_Full_Access): New flag.
4762 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
4763 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
4764 Implement new pragma.
4765 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
4766
4767 2015-05-12 Robert Dewar <dewar@adacore.com>
4768
4769 * targparm.ads: Minor reformatting.
4770
4771 2015-05-12 Robert Dewar <dewar@adacore.com>
4772
4773 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
4774 * a-reatim.ads: Minor reformatting.
4775
4776 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
4777
4778 * einfo.ads: Update the documentation of flags
4779 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
4780
4781 2015-05-12 Robert Dewar <dewar@adacore.com>
4782
4783 * impunit.adb: Add entry for a-dhfina.ads
4784 * a-dhfina.ads: New file.
4785
4786 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4787
4788 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
4789 type has convention Fortran, a multidimensional iterator varies
4790 the first dimension fastest.
4791
4792 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
4793
4794 * einfo.adb: Node32 is now used as Encapsulating_State.
4795 Node37 is now used as Associated_Entity.
4796 (Associated_Entity): New routine.
4797 (Encapsulating_State): Update the assertion guard to include constants.
4798 (Set_Associated_Entity): New routine.
4799 (Set_Encapsulating_State): Update the assertion guard to
4800 include constants.
4801 (Write_Field10_Name): Remove the output for Encapsulating_State.
4802 (Write_Field32_Name): Add output for Encapsulating_State.
4803 (Write_Field37_Name): Add output for Associated_Entity.
4804 * einfo.ads New attribute Associated_Entity along with placement
4805 in entities. Attribute Encapsulating_State now uses Node32.
4806 (Associated_Entity): New routine along with pragma Inline.
4807 (Set_Associated_Entity): New routine along with pragma Inline.
4808 * inline.ads Code reformatting.
4809 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
4810 attribute 'Result when the context is a generic instantiation.
4811 (Analyze_Attribute_Old_Result): Pragmas Depends and
4812 Refined_Depends are a valid context for attribute 'Result.
4813 (Denote_Same_Function): Allow attribute 'Result to denote
4814 generic functions.
4815 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
4816 (Analyze_Declarations): Capture global references within the
4817 contracts of packages, subprograms and their respective bodies.
4818 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
4819 (Analyze_Completion_Contract): Removed.
4820 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
4821 creating the generic copy. Create a generic contract for the
4822 template. Analyze the aspects of the generic body. Analyze the
4823 contract of the generic body when it is a compilation unit and
4824 capture global references.
4825 (Analyze_Subprogram_Body_Contract): Code cleanup.
4826 (Analyze_Subprogram_Contract): Do not save global references here.
4827 (Save_Global_References_In_List): Removed.
4828 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
4829 (Analyze_Package_Body_Helper): Create a generic contract for
4830 the template.
4831 (Analyze_Package_Contract): Code cleanup.
4832 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
4833 (Analyze_Compilation_Unit): Capture global references in a
4834 generic subprogram declaration that acts as a compilation unit.
4835 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
4836 the implementation of generic contracts. Alphabetize various
4837 subprograms.
4838 (Analyze_Generic_Package_Declaration):
4839 Create a generic contract for the template.
4840 (Analyze_Generic_Subprogram_Declaration): Create a generic
4841 contract for the template.
4842 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
4843 subprogram.
4844 (Copy_Generic_Node): Link defining entities of the generic template
4845 with the corresponding defining entities of the generic copy. Update
4846 the processing of pragmas.
4847 (Instantiate_Contract): Removed.
4848 (Instantiate_Subprogram_Contract): New routine.
4849 (Requires_Delayed_Save): New routine.
4850 (Save_Global_References): Rename formal parameter N to Templ. Various
4851 cleanups.
4852 (Save_Global_References_In_Aspects): Moved from the spec.
4853 (Save_Global_References_In_Contract): New routine.
4854 (Save_References_In_Aggregate): New routine.
4855 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
4856 (Save_References_In_Descendants): New routine.
4857 (Save_References_In_Identifier): New routine.
4858 (Save_References_In_Operator): New routine.
4859 (Save_References_In_Pragma): New routine.
4860 * sem_ch12.ads (Save_Global_References): Rename formal
4861 parameter N to Templ. Update the comment on usage.
4862 (Save_Global_References_In_Aspects): Moved to the body.
4863 (Save_Global_References_In_Contract): New routine.
4864 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
4865 New routine.
4866 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
4867 New routine.
4868 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
4869 generic parameters.
4870 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
4871 (Analyze_Depends_Global): New routine.
4872 (Analyze_Depends_In_Decl_Part): Code cleanup.
4873 (Analyze_Global_In_Decl_Part): Code cleanup.
4874 (Analyze_Global_Item): Constants are now valid global items. Do
4875 not perform state-related checks in an instance. Change the way
4876 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
4877 Code cleanup.
4878 (Analyze_Initializes_In_Decl_Part): Code cleanup.
4879 (Analyze_Input_Output): The analysis of attribute 'Result in
4880 the context of pragmas Depends or Refined_Depends now reuses
4881 the existing attribute analysis machinery. Constants and
4882 generic parameters are now valid dependency items. Do not
4883 perform state-related checks in an instance. Change the way
4884 renamings are handled. (Analyze_Pragma): Add a "characteristics"
4885 section for pragmas Abstract_State, Contract_Cases, Depends,
4886 Extensions_Visible, Global, Initial_Condition, Initializes,
4887 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
4888 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
4889 (Analyze_Pre_Post_Condition): Do not create a generic
4890 template here.
4891 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
4892 (Analyze_Refined_Depends_Global_Post): New routine.
4893 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
4894 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
4895 (Analyze_Refined_Pragma): Removed.
4896 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
4897 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
4898 (Check_Dependency_Clause): Do not perform this check in an instance.
4899 (Check_Function_Return): Add support for generic functions.
4900 (Check_In_Out_States): Do not perform this check in an instance.
4901 (Check_Input_States): Do not perform this check in an instance.
4902 (Check_Mode_Restriction_In_Function): Add support for generic functions.
4903 (Check_Output_States): Do not perform this check in an instance.
4904 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
4905 parameter Subp_Id to Spec_Id and update comment on usage.
4906 (Check_Proof_In_States): Do not perform this check in an instance.
4907 (Check_Refined_Global_Item): Add support for constants.
4908 (Check_Refined_Global_List): Do not perform this check in an instance.
4909 (Collect_Global_Items): Reimplemented.
4910 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
4911 (Create_Generic_Template): Removed.
4912 (Find_Related_Package_Or_Body): Moved to spec.
4913 (Find_Role): Add support for generic parameters and constants.
4914 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
4915 (Match_Item): Add support for constants.
4916 (Preanalyze_Test_Case_Arg): Reimplemented.
4917 (Report_Extra_Clauses): Do not perform this check in an instance.
4918 (Report_Extra_Constituents): Do not perform this check in an instance.
4919 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
4920 the comment on usage.
4921 (Find_Related_Package_Or_Body): Moved from body.
4922 (Get_Argument): Moved from body.
4923 * sem_util.adb Add with and use clauses for Sem_Ch12.
4924 (Corresponding_Spec_Of): Add support for packages and package bodies.
4925 (Create_Generic_Contract): New routine.
4926 (Is_Contract_Annotation): Reimplemented.
4927 (Is_Generic_Declaration_Or_Body): New routine.
4928 (Is_Package_Contract_Annotation): New routine.
4929 (Is_Subprogram_Contract_Annotation): New routine.
4930 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
4931 (Create_Generic_Contract): New routine.
4932 (Is_Generic_Declaration_Or_Body): New routine.
4933 (Is_Package_Contract_Annotation): New routine.
4934 (Is_Subprogram_Contract_Annotation): New routine.
4935 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
4936 (Set_Is_Generic_Contract_Pragma): New routine.
4937 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
4938 with occurrences in nodes.
4939 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
4940 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
4941 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
4942
4943 2015-05-12 Robert Dewar <dewar@adacore.com>
4944
4945 * a-taster.ads: Minor comment fix: fix bad header, this is a
4946 pure RM unit.
4947
4948 2015-05-12 Robert Dewar <dewar@adacore.com>
4949
4950 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
4951
4952 2015-05-12 Robert Dewar <dewar@adacore.com>
4953
4954 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
4955 Alignment_Checks on non-strict alignment machine.
4956 * sem_ch13.adb (Validate_Address_Clauses): Don't give
4957 compile-time alignment warnings if run time Alignment_Check
4958 is suppressed.
4959
4960 2015-05-12 Thomas Quinot <quinot@adacore.com>
4961
4962 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
4963 Data_Rate): New literals B75, B110, B150, B300, B600.
4964
4965 2015-05-12 Doug Rupp <rupp@adacore.com>
4966
4967 * init.c (__gnat_init_float) [vxworks]: For e500v2,
4968 do nothing and leave the responsibility to install the handler
4969 and enable the exceptions to the BSP.
4970
4971 2015-05-12 Robert Dewar <dewar@adacore.com>
4972
4973 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
4974 * sem_disp.adb: Minor code reorganization (remove junk redundant
4975 null statement).
4976 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
4977 references to bounds of types coming from original type reference.
4978 * checks.ads: Minor reformatting.
4979 * checks.adb: Minor reformatting.
4980 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
4981 assertion, then make sure we do not drag in bignum stuff.
4982
4983 2015-05-12 Ed Schonberg <schonberg@adacore.com>
4984
4985 * sem_ch9.adb (Collect_Interfaces): Initialize
4986 Direct_Primitive_Operations for a tagged synchronized type,
4987 so it can used in ASIS mode.
4988 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
4989 disabled, attach subprogram to list of Direct_Primitive_Operations
4990 of synchronized type itself, for ASIS use, because in this case
4991 Corresponding_Record_Type is not built.
4992 * einfo.ads: Indicate use of Direct_Primitive_Operations on
4993 synchronized type.
4994
4995 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
4996
4997 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
4998 ___XP suffixes.
4999
5000 2015-05-12 Robert Dewar <dewar@adacore.com>
5001
5002 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
5003
5004 2015-05-12 Robert Dewar <dewar@adacore.com>
5005
5006 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
5007
5008 2015-05-12 Ed Schonberg <schonberg@adacore.com>
5009
5010 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
5011 tag to be retrieved for the generated call is the first entry
5012 in the dispatch table for the return type of the instantiated
5013 constructor.
5014
5015 2015-05-12 Bob Duff <duff@adacore.com>
5016
5017 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
5018 exp_util.ads: Update comments.
5019
5020 2015-05-12 Ed Schonberg <schonberg@adacore.com>
5021
5022 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
5023 freeze nodes for these in ASIS mode, because they lead to
5024 elaoration order issues in gigi.
5025
5026 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
5027
5028 * sem_ch6.adb (Analyze_Expression_Function): Code
5029 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
5030 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
5031 prepare a stand alone body for inlining in GNATprove mode
5032 when inside a generic. (Body_Has_Contract): Reimplemented.
5033 (Build_Subprogram_Declaration): New routine.
5034 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
5035 references within generic bodies by loading them.
5036 * sem_util.adb (Copy_Parameter_List): Code cleanup.
5037 (Copy_Subprogram_Spec): New routine.
5038 (Is_Contract_Annotation): New routine.
5039 * sem_util.ads (Copy_Subprogram_Spec): New routine.
5040 (Is_Contract_Annotation): New routine.
5041
5042 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
5043
5044 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
5045 body of an expression function when the prefix of attribute
5046 'Access is the body.
5047
5048 2015-05-12 Ed Schonberg <schonberg@adacore.com>
5049
5050 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
5051 created for a derived enumeration type is not a first subtype,
5052 even though it is defined through a full type declaration.
5053 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
5054 aspects for the anonymous base type constructed for a derived
5055 scalar type, because they will be set when the first subtype
5056 is frozen.
5057 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
5058 Default_Value and Default_Component_Value, that prevented the
5059 proper inheritance of these aspects.
5060
5061 2015-05-12 Gary Dismukes <dismukes@adacore.com>
5062
5063 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
5064
5065 2015-05-12 Robert Dewar <dewar@adacore.com>
5066
5067 * sem_ch3.adb: Minor reformatting.
5068
5069 2015-05-12 Vincent Celier <celier@adacore.com>
5070
5071 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
5072 -P, then check if gprbuild (gprclean) is available; if it is,
5073 use gprbuild (gprclean) instead of gnatmake (gnatclean).
5074
5075 2015-05-12 Robert Dewar <dewar@adacore.com>
5076
5077 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
5078 Exp_Unst.
5079 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
5080 Exp_Unst.
5081 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
5082 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
5083 for later call instead of calling Unnest_Subprogram directly
5084 (Initialize): New procedure (Unnest_Subprograms): New procedure
5085 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
5086 alpha order.
5087 (Initialize): New procedure.
5088 (Unnest_Subprograms): New procedure.
5089 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
5090 all processing to this routine which is now called late
5091 after instantiating bodies. Fully handles the case of generic
5092 instantiations now.
5093 * exp_unst.ads: Major rewrite, moving all processing to
5094 Unnest_Subprogram.
5095 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
5096 (Frontend): Add call to Unnest_Subprograms.
5097 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
5098 for Check_Nested_Access.
5099 * sem_util.adb (Build_Default_Subtype): Minor reformatting
5100 (Check_Nested_Access): Back to original VM-only form (we
5101 now do all the processing for Unnest_Subprogram at the time
5102 it is called.
5103 (Denotes_Same_Object): Minor reformatting
5104 (Note_Possible_Modification): Old calling sequence for
5105 Check_Nested_Access.
5106 * sem_util.ads (Check_Nested_Access): Back to original VM-only
5107 form (we now do all the processing for Unnest_Subprogram at the
5108 time it is called.
5109
5110 2015-05-12 Robert Dewar <dewar@adacore.com>
5111
5112 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
5113
5114 2015-05-12 Ed Schonberg <schonberg@adacore.com>
5115
5116 * sem_ch3.adb (Analyze_Object_Declaration): New function
5117 Has_Delayed_Aspect, used to defer resolution of an aggregate
5118 expression when the object declaration carries aspects Address
5119 and/or Alignment.
5120 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
5121 to Freeze_Entity. In addition to the previous processing steps
5122 at the freeze point of an object, this procedure also handles
5123 aggregates in object declarations, when the declaration carries
5124 delayed aspects that require that the initialization of the
5125 object be attached to its freeze actions.
5126
5127 2015-05-12 Ed Schonberg <schonberg@adacore.com>
5128
5129 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
5130 AI12-0147, null procedures and expression functions are allowed
5131 in protected bodies.
5132
5133 2015-05-12 Tristan Gingold <gingold@adacore.com>
5134
5135 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
5136
5137 2015-05-12 Ed Schonberg <schonberg@adacore.com>
5138
5139 * sem_ch3.adb (Complete_Private_Subtype): Propagate
5140 Has_Delayed_Aspects flag from private to full view, to ensure
5141 that predicate functions are constructed.
5142
5143 2015-05-12 Ed Schonberg <schonberg@adacore.com>
5144
5145 * sem_ch6.adb (Process_Formals): If a tagged formal is an
5146 incomplete class-wide type, the subprogram must have a delayed
5147 freeze even though the opertation is not a primitive of the
5148 type. THis ensures that the backend can recover the full view
5149 when elaborating the subprogram declaration.
5150
5151 2015-05-12 Ed Schonberg <schonberg@adacore.com>
5152
5153 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
5154 done if an elsif part has been rewritten so that it is not part
5155 of an enclosing if_statement.
5156
5157 2015-05-12 Robert Dewar <dewar@adacore.com>
5158
5159 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
5160 Minor reformatting.
5161
5162 2015-05-12 Bob Duff <duff@adacore.com>
5163
5164 * exp_attr.adb (Size): Remove unnecessary check for types with
5165 unknown discriminants. That was causing the compiler to build
5166 a function call _size(T), where T is a type, not an object.
5167
5168 2015-05-12 Ed Schonberg <schonberg@adacore.com>
5169
5170 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
5171 primitive operations of a type extension declared in the package
5172 body, to prevent duplicates in extended list.
5173
5174 2015-05-12 Ed Schonberg <schonberg@adacore.com>
5175
5176 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
5177 an unconstrained synchronized type with discriminants, create a
5178 constrained default subtype for it, so that the enclosing record
5179 can be given the proper size.
5180 * sem_util.adb (Build_Default_Subtype): If the subtype is created
5181 for a record discriminant, do not analyze the declarztion at
5182 once because it is added to the freezing actions of the enclosing
5183 record type.
5184
5185 2015-05-12 Robert Dewar <dewar@adacore.com>
5186
5187 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
5188 Null statements.
5189 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
5190 * par-prag.adb (Prag): Implement Ignore_Pragma.
5191 * sem_prag.adb: Implement Ignore_Pragma.
5192 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
5193
5194 2015-05-12 Javier Miranda <miranda@adacore.com>
5195
5196 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
5197 entity with its corresponding real entity.
5198 (Decorate_Type): Unconditionally build the class-wide shadow entity of
5199 tagged types.
5200 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
5201 attribute.
5202 (Non_Limited_View): Moved from field 17 to field 19 be available
5203 in class-wide entities.
5204 * exp_attr.adb (Access_Cases): Code cleanup.
5205 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
5206 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
5207 * freeze.adb (Build_Renamed_Bdody): Ditto.
5208 * sem_aux.adb (Available_View): Ditto.
5209 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
5210 (Try_One_Prefix_Interpretation): Ditto.
5211 * sem_ch5.adb (Analyze_Assignment): Ditto.
5212 * sem_ch6.adb (Detect_And_Exchange): Ditto.
5213 * sem_ch8.adb (Find_Expanded_Name): Ditto.
5214 * sem_disp.adb (Check_Controlling_Type): Ditto.
5215 * sem_res.adb (Resolve_Type_Conversion): Ditto.
5216 (Full_Designated_Type): Ditto.
5217 * sem_type.adb (Covers): Ditto.
5218 * sem_util.adb: Fix typo in comment.
5219
5220 2015-05-12 Robert Dewar <dewar@adacore.com>
5221
5222 * exp_unst.adb (Get_Real_Subp): New subprogram.
5223 (Unnest_Subprogram): Use Get_Real_Subp.
5224 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
5225 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
5226
5227 2015-05-12 Robert Dewar <dewar@adacore.com>
5228
5229 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
5230
5231 2015-05-12 Ed Schonberg <schonberg@adacore.com>
5232
5233 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
5234 auxiliary to Try_Primitive_Operation to handle properly prefixed
5235 calls where the operation is not a primitive of the type, but
5236 is declared in the package body that is in the immediate scope
5237 of the type.
5238
5239 2015-05-12 Robert Dewar <dewar@adacore.com>
5240
5241 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
5242
5243 2015-05-12 Ed Schonberg <schonberg@adacore.com>
5244
5245 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
5246 qualified name for an instance of a generic grand-child unit in
5247 the body its parent.
5248
5249 2015-05-12 Robert Dewar <dewar@adacore.com>
5250
5251 * exp_unst.adb (Upref_Name): New subprogram.
5252 (Unnest_Subprogram): Use Upref_Name.
5253 (Unnest_Subprogram): Use new Deref attribute.
5254 * exp_unst.ads: Doc updates.
5255
5256 2015-05-12 Thomas Quinot <quinot@adacore.com>
5257
5258 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
5259 can access files on filesystems mounted from servers that use large
5260 NFS file handles.
5261
5262 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
5263
5264 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
5265 method instead of global_decl for TYPE_DECLs.
5266
5267 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
5268
5269 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
5270 and gnat1.
5271
5272 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
5273
5274 * gnatvsn.ads (Library_Version): Bump to 6.
5275
5276 2015-04-09 Iain Sandoe <iain@codesourcery.com>
5277
5278 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
5279
5280 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
5281
5282 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
5283 a function returning an unconstrained type 'const' for the middle-end.
5284
5285 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
5286 exact condition to detect Reason => "..." pattern.
5287
5288 2015-03-31 Tom de Vries <tom@codesourcery.com>
5289
5290 PR ada/65490
5291 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
5292 bzero call is the same expression as the destination'.
5293
5294 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
5295
5296 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
5297
5298 2015-03-24 Gary Dismukes <dismukes@adacore.com>
5299
5300 * sem_ch3.adb: Minor typo fix (missing paren).
5301
5302 2015-03-24 Robert Dewar <dewar@adacore.com>
5303
5304 * sinfo.ads: Update comment.
5305
5306 2015-03-24 Robert Dewar <dewar@adacore.com>
5307
5308 * exp_attr.adb: Add entry for typ'Deref.
5309 * sem_attr.adb (Deref): New GNAT attribute.
5310 * sem_attr.ads: Add entry for new GNAT attribute Deref.
5311 * snames.ads-tmpl: Add entries for new attribute Deref.
5312
5313 2015-03-24 Ed Schonberg <schonberg@adacore.com>
5314
5315 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
5316 on generic type.
5317
5318 2015-03-24 Gary Dismukes <dismukes@adacore.com>
5319
5320 * inline.adb: Minor typo fix.
5321
5322 2015-03-24 Arnaud Charlet <charlet@adacore.com>
5323
5324 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
5325 doc/gnat_ugn/gnat_utility_programs.rst
5326 doc/gnat_rm/implementation_defined_attributes.rst
5327 doc/gnat_rm/implementation_defined_pragmas.rst
5328 doc/gnat_rm/representation_clauses_and_pragmas.rst
5329 doc/gnat_rm/about_this_guide.rst
5330 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
5331 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
5332
5333 2015-03-23 Jakub Jelinek <jakub@redhat.com>
5334
5335 PR bootstrap/65522
5336 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
5337
5338 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
5339
5340 PR ada/65451
5341 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
5342 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
5343
5344 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
5345
5346 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
5347
5348 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
5349 of the expression ends up being composite.
5350
5351 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
5352
5353 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
5354 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
5355 parameter types to detect circularities in ASIS mode.
5356 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
5357
5358 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
5359
5360 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
5361 short-circuit the regular handling.
5362
5363 2015-03-13 Robert Dewar <dewar@adacore.com>
5364
5365 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
5366 references.
5367 (Actual_Ref): New function.
5368 (AREC_String): Minor reformatting.
5369 (Unnest_Subprogram): Use Actual_Ref.
5370 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
5371 before call to Instantiate_Bodies.
5372
5373 2015-03-13 Ed Schonberg <schonberg@adacore.com>
5374
5375 * freeze.adb (Freeze_Profile): If the return type of a function
5376 being frozen is an untagged limited view and the function is
5377 abstract, mark the type as frozen because there is no later
5378 point at which the profile of the subprogram will be elaborated.
5379
5380 2015-03-13 Robert Dewar <dewar@adacore.com>
5381
5382 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
5383 component to entities. Add new fields Field36-41 and Node36-41.
5384
5385 2015-03-13 Claire Dross <dross@adacore.com>
5386
5387 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
5388
5389 2015-03-13 Robert Dewar <dewar@adacore.com>
5390
5391 * exp_util.adb (Is_Volatile_Reference): Compile time known
5392 value is never considered to be a volatile reference.
5393
5394 2015-03-13 Robert Dewar <dewar@adacore.com>
5395
5396 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
5397 cannot be volatile" for internally generated object (such as
5398 FIRST and LAST constants).
5399
5400 2015-03-13 Ed Schonberg <schonberg@adacore.com>
5401
5402 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
5403 convention is specified for the formal parameter, verify that
5404 the actual has the same convention.
5405 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
5406 pragma to be set on a generic formal type.
5407 * sem_util.adb (Set_Convention): Ignore within an instance,
5408 as it has already been verified in the generic unit.
5409
5410 2015-03-13 Claire Dross <dross@adacore.com>
5411
5412 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
5413 subprograms with unconstrained record parameters containing
5414 Itype declarations.
5415 * sinfo.ads Document GNATprove assumption that type should match
5416 in the AST.
5417 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
5418 Do not check for Refined_Depends and Refined_Globals contracts
5419 as they are optional.
5420
5421 2015-03-13 Ed Schonberg <schonberg@adacore.com>
5422
5423 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
5424 capture dimension info if any, because the generated subtype
5425 declaration does not come from source and will not process dimensions.
5426 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
5427 Do not analyze expressions with an initialization procedure
5428 because aggregates will have been checked at the point of record
5429 declaration.
5430
5431 2015-03-13 Robert Dewar <dewar@adacore.com>
5432
5433 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
5434 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
5435 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
5436 * snames.ads-tmpl: Add entry for Name_Unimplemented.
5437
5438 2015-03-13 Gary Dismukes <dismukes@adacore.com>
5439
5440 * style.adb (Missing_Overriding): Apply the
5441 Comes_From_Source test to the Original_Node of the subprogram
5442 node, to handle the case of a null procedure declaration that
5443 has been rewritten as an empty procedure body.
5444
5445 2015-03-13 Robert Dewar <dewar@adacore.com>
5446
5447 * exp_util.ads: Minor fix to comment.
5448 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
5449 change.
5450
5451 2015-03-13 Robert Dewar <dewar@adacore.com>
5452
5453 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
5454 Is_Low/High_Bound params.
5455 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
5456 sequence to simplify generation of FIRST/LAST temps for bounds.
5457
5458 2015-03-12 Olivier Hainque <hainque@adacore.com>
5459
5460 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
5461 On targets where a function symbol designates a function descriptor,
5462 fetch the function code address from the descriptor.
5463 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
5464
5465 2015-03-04 Robert Dewar <dewar@adacore.com>
5466
5467 * sem_warn.adb: Minor reformatting.
5468 * init.c: Minor tweaks.
5469
5470 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
5471
5472 * a-coinho-shared.adb: Fix clear of already empty holder.
5473
5474 2015-03-04 Robert Dewar <dewar@adacore.com>
5475
5476 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
5477 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
5478 (Note_Uplevel_Reference): Ignore call inside generic.
5479 (Note_Uplevel_Reference): Fix check for no entity field.
5480 (Unnest_Subprogram): Ignore call inside generic.
5481 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
5482 (Visit_Node): Ignore calls to Imported subprograms.
5483 (Visit_Node): Fix problem in finding subprogram body in some cases.
5484 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
5485
5486 2015-03-04 Robert Dewar <dewar@adacore.com>
5487
5488 * einfo.adb (Is_ARECnF_Entity): Removed.
5489 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
5490 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
5491 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
5492 (Number_Entries): Minor reformatting.
5493 * einfo.ads (Is_ARECnF_Entity): Removed.
5494 * exp_unst.adb (Unnest_Subprogram): Remove setting of
5495 Is_ARECnF_Entity.
5496 (Add_Extra_Formal): Use normal Extra_Formal circuit.
5497 * sprint.adb (Write_Param_Specs): Properly handle case where
5498 there are no source formals, but we have at least one Extra_Formal
5499 present.
5500
5501 2015-03-04 Ed Schonberg <schonberg@adacore.com>
5502
5503 * sem_aggr.adb (Resolve_Record_Aggregate,
5504 Add_Discriminant_Values): If the value is a reference to the
5505 current instance of an enclosing type, use its base type to check
5506 against prefix of attribute reference, because the target type
5507 may be otherwise constrained.
5508
5509 2015-03-04 Robert Dewar <dewar@adacore.com>
5510
5511 * atree.h: Add entries for Flag287-Flag309.
5512 * einfo.adb: Add (unused) flags Flag287-Flag309.
5513
5514 2015-03-04 Ed Schonberg <schonberg@adacore.com>
5515
5516 * sem_util.adb (Collect_Interfaces, Collect): When gathering
5517 interfaces of ancestors, handle properly a subtype of a private
5518 extension.
5519
5520 2015-03-04 Robert Dewar <dewar@adacore.com>
5521
5522 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
5523 (Next_Formal): Don't return ARECnF formal.
5524 (Last_Formal): Don't consider ARECnF formal.
5525 (Next_Formal_With_Extras): Do consider ARECnF formal.
5526 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
5527 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
5528
5529 2015-03-04 Javier Miranda <miranda@adacore.com>
5530
5531 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
5532 object is a class-wide interface object and we generate the
5533 accessibility described in RM 6.5(8/3) then displace the pointer
5534 to the object to reference the base of the object (to get access
5535 to the TSD of the object).
5536
5537 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
5538
5539 * sem_prag.adb (Analyze_Abstract_State): Use routine
5540 Malformed_State_Error to issue general errors.
5541 (Analyze_Pragma): Diagnose a syntax error related to a state
5542 declaration with a simple option.
5543 (Malformed_State_Error): New routine.
5544
5545 2015-03-04 Robert Dewar <dewar@adacore.com>
5546
5547 * a-strsup.adb (Super_Slice): Deal with super flat case.
5548 * einfo.ads: Minor reformatting.
5549 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
5550 redundant code.
5551
5552 2015-03-04 Claire Dross <dross@adacore.com>
5553
5554 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5555 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
5556 containers.
5557
5558 2015-03-04 Ed Schonberg <schonberg@adacore.com>
5559
5560 * sem_warn.adb (Check_References): When checking for an unused
5561 in-out parameter of a class- wide type, use its type to determine
5562 whether it is private, in order to avoid a spurious warning when
5563 subprogram spec and body are in different units.
5564
5565 2015-03-04 Yannick Moy <moy@adacore.com>
5566
5567 * sem_attr.adb: Improve warning messages.
5568
5569 2015-03-04 Robert Dewar <dewar@adacore.com>
5570
5571 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
5572 generic subprograms.
5573 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
5574 (Note_Uplevel_Reference): Ignore uplevel references to non-types
5575 (Get_Level): Consider only subprograms, not blocks.
5576 (Visit_Node): Set proper condition for generating ARECnF entity.
5577 Ignore indirect calls. Ignore calls to subprograms
5578 outside our nest.
5579 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
5580 (Add_Form_To_Spec): Properly set Last_Entity field.
5581 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
5582 Handle case of no uplevel refs in outer subprogram
5583 Don't mark uplevel entities as aliased.
5584 Don't deal with calls with no ARECnF requirement.
5585
5586 2015-03-04 Robert Dewar <dewar@adacore.com>
5587
5588 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
5589 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
5590 operation in computing LZ.
5591 * sem_attr.adb: Minor typo fix
5592
5593 2015-03-04 Robert Dewar <dewar@adacore.com>
5594
5595 * exp_ch7.adb: Minor reformatting.
5596 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
5597 spec case.
5598 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
5599
5600 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
5601
5602 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
5603 references to formal parameters subject to pragma Unreferenced.
5604 (Suppress_Reference): New routine.
5605 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
5606 of attribute 'Old. Attributes 'Old and 'Result now share
5607 common processing.
5608 (Analyze_Old_Result_Attribute): New routine.
5609 (Check_Placement_In_Check): Removed.
5610 (Check_Placement_In_Contract_Cases): Removed.
5611 (Check_Placement_In_Test_Case): Removed.
5612 (Check_Use_In_Contract_Cases): Removed.
5613 (Check_Use_In_Test_Case): Removed.
5614 (In_Refined_Post): Removed.
5615 (Is_Within): Removed.
5616 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
5617 (Check_Low_Bound_Tested_For): New routine.
5618
5619 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
5620
5621 * exp_ch3.adb (Expand_N_Object_Declaration):
5622 Generate a runtime check to test the expression of pragma
5623 Default_Initial_Condition when the object is default initialized.
5624
5625 2015-03-02 Robert Dewar <dewar@adacore.com>
5626
5627 * scng.adb (Scan): Ignore illegal character in relaxed
5628 semantics mode.
5629
5630 2015-03-02 Ed Schonberg <schonberg@adacore.com>
5631
5632 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
5633 on left operand, so it can be properly resolved with type of
5634 alternatives of right operand.
5635 * sem_res.adb (Resolve_Set_Membership): Handle properly an
5636 overloaded left-hand side when the alternatives on the right
5637 hand side are literals of some universal type. Use first
5638 non-overloaded alternative to find expected type.
5639
5640 2015-03-02 Ed Schonberg <schonberg@adacore.com>
5641
5642 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
5643 type to retrieve designated type, because the purported access
5644 type may be a partial (private) view, when it is declared in
5645 the private part of a nested package, and finalization actions
5646 are generated when completing compilation of enclosing unit.
5647
5648 2015-03-02 Robert Dewar <dewar@adacore.com>
5649
5650 * back_end.adb (Call_Back_End): Remove previous patch,
5651 the back end now gets to see the result of -gnatd.1
5652 (Unnest_Subprogram_Mode) processing.
5653 * elists.ads, elists.adb (List_Length): New function.
5654 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
5655 * sem_util.adb (Check_Nested_Access): Handle formals in
5656 Unnest_Subprogram_Mode.
5657 (Adjust_Named_Associations): Minor reformatting.
5658 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
5659 for parameters.
5660
5661 2015-03-02 Robert Dewar <dewar@adacore.com>
5662
5663 * atree.ads, atree.adb (Uint24): New function
5664 (Set_Uint24): New procedure.
5665 * atree.h (Uint24): New macro for field access.
5666 * back_end.adb (Call_Back_End): For now, don't call back end
5667 if unnesting subprogs.
5668 * einfo.adb (Activation_Record_Component): New field
5669 (Subps_Index): New field.
5670 * einfo.ads (Activation_Record_Component): New field
5671 (Subps_Index): New field Minor reordering of comments into alpha order.
5672 * exp_unst.ads, exp_unst.adb: Continued development.
5673
5674 2015-03-02 Gary Dismukes <dismukes@adacore.com>
5675
5676 * exp_disp.ads: Minor reformatting.
5677
5678 2015-03-02 Ed Schonberg <schonberg@adacore.com>
5679
5680 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
5681 ancestor to list of use clauses active in descendant unit if we
5682 are within the private part of an intervening parent, to prevent
5683 circularities in use clause list.
5684
5685 2015-03-02 Javier Miranda <miranda@adacore.com>
5686
5687 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
5688 invariants to the corresponding record type.
5689 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
5690 which sets the value of the DTC_Entity associated with a given
5691 primitive of a tagged type and propagates the value to the
5692 wrapped subprogram.
5693 (Set_DTC_Entity_Value): Propagate the DTC
5694 value to the wrapped entity.
5695 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
5696 associated with invariants of progenitors.
5697 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
5698 of parents and progenitors.
5699 (Process_Full_View): Check hidden inheritance of class-wide type
5700 invariants.
5701 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
5702 the invariant procedure for interface types; build the invariant
5703 procedure for tagged types inheriting invariants from their
5704 progenitors.
5705 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
5706 types but do not build their invariant procedure since their
5707 invariants will be propagated to the invariant procedure of
5708 types covering the interface.
5709 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
5710 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
5711 by calls to Set_DT_Position_Value.
5712
5713 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
5714
5715 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
5716 code in Denote_Same_Function. Do not analyze attribute 'Result
5717 when it is inside procedure _Postconditions. Remove a misplaced
5718 warning diagnostic. Code cleanup.
5719 (Denote_Same_Function): New routine.
5720 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
5721 cleanup. Warn on pre/postconditions on an inlined subprogram.
5722 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
5723 an inlined subprogram.
5724 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
5725 pre/post condition on an inlined subprogram.
5726 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
5727 pre/postconditions on an inlined subprogram.
5728 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
5729
5730 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
5731
5732 * sem_prag.adb (Ensure_Aggregate_Form):
5733 Ensure that the name denoted by the Chars of a pragma argument
5734 association has the proper Sloc when converted into an aggregate.
5735
5736 2015-03-02 Bob Duff <duff@adacore.com>
5737
5738 * sem_ch6.adb (Check_Private_Overriding): Capture
5739 Incomplete_Or_Partial_View in a constant. This is cleaner and
5740 more efficient.
5741
5742 2015-03-02 Gary Dismukes <dismukes@adacore.com>
5743
5744 * einfo.ads, exp_unst.ads: Minor reformatting.
5745
5746 2015-03-02 Ed Schonberg <schonberg@adacore.com>
5747
5748 * a-strsea.adb (Find_Token): Ensure that the range of iteration
5749 does not perform any improper character access. This prevents
5750 erroneous access in the unusual case of an empty string target
5751 and a From parameter less than Source'First.
5752
5753 2015-03-02 Robert Dewar <dewar@adacore.com>
5754
5755 * elists.adb (List_Length): Fix incorrect result.
5756
5757 2015-03-02 Bob Duff <duff@adacore.com>
5758
5759 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
5760 checks here. It used to check that the function is merely
5761 overriding SOMEthing. Now it checks that the function is
5762 overriding a corresponding public operation. This is a correction
5763 to the implementation of the rule in RM-3.9.3(10).
5764
5765 2015-03-02 Robert Dewar <dewar@adacore.com>
5766
5767 * debug.adb: Document new debug flag -gnatd.1.
5768 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
5769 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
5770 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
5771 * elists.ads elists.adb (List_Length): New function.
5772 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
5773 when appropriate (Process_Preconditions): Minor code
5774 reorganization and reformatting
5775 * exp_unst.ads, exp_unst.adb: New files.
5776 * gnat1drv.adb (Adjust_Global_Switches): Set
5777 Unnest_Subprogram_Mode if -gnatd.1
5778 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
5779 string argument.
5780 * opt.ads (Unnest_Subprogram_Mode): New flag.
5781 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
5782 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
5783 Has_Nested_Subprogram flag.
5784 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
5785 Check_Nested_Access.
5786 (Find_Selected_Component): Minor comment addition.
5787 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
5788 (Note_Possible_Modification): New calling sequence for
5789 Check_Nested_Access.
5790 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
5791 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
5792
5793 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
5794
5795 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
5796 types, preserve the original type and create copies just like the C
5797 front-end does. For artificial ones, do not define a name for
5798 the original type.
5799 (create_type_decl): When gnat_pushdecl made the input type the
5800 original type for the new declaration, do not define a stub
5801 declaration for it.
5802 * gcc-interface/utils2.c (build_binary_op): Accept two different
5803 pointer types when they point to the same type.
5804
5805 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
5806
5807 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
5808 an unanalyzed node.
5809 * sem_util.adb (Kill_Current_Values): Do not invalidate and
5810 de-null a constant.
5811
5812 2015-03-02 Robert Dewar <dewar@adacore.com>
5813
5814 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
5815 reformatting.
5816
5817 2015-03-02 Ed Schonberg <schonberg@adacore.com>
5818
5819 * sem_ch8.adb: extend use of Available_Subtype.
5820
5821 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
5822
5823 * sem_prag.adb (Duplication_Error): Remove the special handling
5824 of 'Class or _Class in the context of pre/postconditions.
5825 (Process_Class_Wide_Condition): Remove the special handling of
5826 'Class or _Class in the context of pre/postconditions.
5827 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
5828 and Post_Class no longer need to be converted to _Pre and _Post.
5829 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
5830 on usage.
5831
5832 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
5833
5834 * exp_ch6.adb (Process_Preconditions): Modify the
5835 mechanism that find the first source declaration to correct exit
5836 the loop once it has been found.
5837
5838 2015-03-02 Gary Dismukes <dismukes@adacore.com>
5839
5840 * a-strsea.adb: Minor typo fix.
5841
5842 2015-03-02 Bob Duff <duff@adacore.com>
5843
5844 * einfo.ads: Minor comment fixes.
5845
5846 2015-03-02 Gary Dismukes <dismukes@adacore.com>
5847
5848 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
5849
5850 2015-03-02 Ed Schonberg <schonberg@adacore.com>
5851
5852 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
5853 is defined for the array type, use it instead of a Default_Value
5854 specified for the component type itself.
5855
5856 2015-03-02 Thomas Quinot <quinot@adacore.com>
5857
5858 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
5859 expanding a 'Input attribute reference for a class-wide type,
5860 do not generate a separate object declaration for the controlling
5861 tag dummy object; instead, generate the expression inline in the
5862 dispatching call. Otherwise, the declaration (which involves a
5863 call to String'Input, returning a dynamically sized value on the
5864 secondary stack) will be expanded outside of proper secondary
5865 stack mark/release operations, and will thus cause a secondary
5866 stack leak.
5867
5868 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
5869
5870 * checks.adb (Add_Validity_Check): Change the names of all
5871 formal parameters to better illustrate their purpose. Update
5872 the subprogram documentation. Update all occurrences of the
5873 formal parameters. Generate a pre/postcondition pragma by
5874 calling Build_Pre_Post_Condition.
5875 (Build_PPC_Pragma): Removed.
5876 (Build_Pre_Post_Condition): New routine.
5877 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
5878 is now used as Postconditions_Proc. Flag240 is now renamed to
5879 Has_Expanded_Contract. (First_Formal): The routine can now
5880 operate on generic subprograms.
5881 (First_Formal_With_Extras): The routine can now operate on generic
5882 subprograms.
5883 (Has_Expanded_Contract): New routine.
5884 (Has_Postconditions): Removed.
5885 (Postcondition_Proc): Removed.
5886 (Postconditions_Proc): New routine.
5887 (Set_Has_Expanded_Contract): New routine.
5888 (Set_Has_Postconditions): Removed.
5889 (Set_Postcondition_Proc): Removed.
5890 (Set_Postconditions_Proc): New routine.
5891 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
5892 the output of Has_Expanded_Contract.
5893 (Write_Field8_Name): Remove the output of Postcondition_Proc.
5894 (Write_Field14_Name): Add the output of Postconditions_Proc.
5895 * einfo.ads New attributes Has_Expanded_Contract and
5896 Postconditions_Proc along with occurrences in entities.
5897 Remove attributes Has_Postconditions and Postcondition_Proc
5898 along with occurrences in entities.
5899 (Has_Expanded_Contract): New routine along with pragma Inline.
5900 (Has_Postconditions): Removed along with pragma Inline.
5901 (Postcondition_Proc): Removed along with pragma Inline.
5902 (Postconditions_Proc): New routine along with pragma Inline.
5903 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
5904 (Set_Has_Postconditions): Removed along with pragma Inline.
5905 (Set_Postcondition_Proc): Removed along with pragma Inline.
5906 (Set_Postconditions_Proc): New routine along with pragma Inline.
5907 * exp_ch6.adb (Add_Return): Code cleanup. Update the
5908 generation of the call to the _Postconditions routine of
5909 the procedure. (Expand_Non_Function_Return): Reformat the
5910 comment on usage. Code cleanup. Update the generation of
5911 the call to the _Postconditions routine of the procedure or
5912 entry [family].
5913 (Expand_Simple_Function_Return): Update the
5914 generation of the _Postconditions routine of the function.
5915 (Expand_Subprogram_Contract): Reimplemented.
5916 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
5917 profile along the comment on usage.
5918 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
5919 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
5920 wrapper when the entry [family] has a contract with
5921 pre/postconditions.
5922 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
5923 (Expand_Contract_Cases): This routine and its subsidiaries now
5924 analyze all generated code.
5925 (Expand_Old_In_Consequence): Removed.
5926 * sem_attr.adb Add with and use clause for Sem_Prag.
5927 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
5928 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
5929 "Ensures".
5930 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
5931 a generic subprogram.
5932 (Analyze_Object_Declaration): Do not create a contract node.
5933 (Derive_Subprogram): Do not create a contract node.
5934 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
5935 not create a contract node.
5936 (Analyze_Completion_Contract): New routine.
5937 (Analyze_Function_Return): Alphabetize.
5938 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
5939 contract node. Do not copy pre/postconditions to the original
5940 generic template.
5941 (Analyze_Null_Procedure): Do not create a contract node.
5942 (Analyze_Subprogram_Body_Contract): Reimplemented.
5943 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
5944 as having postconditions. Do not create a contract node. Analyze
5945 the subprogram body contract of a body that acts as a compilation
5946 unit. Expand the subprogram contract after the declarations have
5947 been analyzed.
5948 (Analyze_Subprogram_Contract): Reimplemented.
5949 (Analyze_Subprogram_Specification): Do not create a contract node.
5950 (List_Inherited_Pre_Post_Aspects): Code cleanup.
5951 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
5952 comment on usage.
5953 (Analyze_Subprogram_Contract): Update the
5954 parameter profile and the comment on usage.
5955 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
5956 contract node.
5957 (Analyze_Package_Declaration): Do not create a
5958 contract node.
5959 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
5960 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
5961 contract node.
5962 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
5963 contract node.
5964 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
5965 their proper section and alphabetize them. Analyze the contract of
5966 a [generic] subprogram after all Pragmas_After have been analyzed.
5967 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
5968 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
5969 create a contract node.
5970 (Analyze_Generic_Subprogram_Declaration):
5971 Alphabetize local variables. Do not create a contract
5972 node. Do not generate aspects out of pragmas for ASIS.
5973 (Analyze_Subprogram_Instantiation): Instantiate
5974 the contract of the subprogram. Do not create a
5975 contract node. (Instantiate_Contract): New routine.
5976 (Instantiate_Subprogram_Body): Alphabetize local variables.
5977 (Save_Global_References_In_Aspects): New routine.
5978 (Save_References): Do not save the global references found within
5979 the aspects of a generic subprogram.
5980 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
5981 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
5982 Original_Node for establishing linkages.
5983 (Insert_Pragma): Insertion in a subprogram body takes precedence over
5984 the case where the subprogram body is also a compilation unit.
5985 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
5986 Get_Argument to obtain the proper expression. Install the generic
5987 formals when the related context is a generic subprogram.
5988 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
5989 the proper expression. Use Corresponding_Spec_Of to obtain
5990 the spec. Install the generic formal when the related context
5991 is a generic subprogram.
5992 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
5993 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
5994 generic formal when the related context is a generic subprogram.
5995 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
5996 to obtain the proper expression. Remove the call to
5997 Check_SPARK_Aspect_For_ASIS as the analysis is now done
5998 automatically.
5999 (Analyze_Pragma): Update all occurrences
6000 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
6001 Extensions_Visible, Global, Postcondition, Precondition and
6002 Test_Case now carry generic templates when the related context
6003 is a generic subprogram. The same pragmas are no longer
6004 forcefully fully analyzed when the context is a subprogram
6005 that acts as a compilation unit. Pragmas Abstract_State,
6006 Initial_Condition, Initializes and Refined_State have been clean
6007 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
6008 and Precondition now use the same routine for analysis. Pragma
6009 Refined_Post does not need to check the use of 'Result or
6010 the lack of a post-state in its expression. Reimplement the
6011 analysis of pragma Test_Case.
6012 (Analyze_Pre_Post_Condition): New routine.
6013 (Analyze_Pre_Post_Condition_In_Decl_Part):
6014 Reimplemented.
6015 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
6016 proper expression.
6017 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
6018 the proper expression.
6019 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
6020 (Check_Pre_Post): Removed.
6021 (Check_Precondition_Postcondition): Removed.
6022 (Check_SPARK_Aspect_For_ASIS): Removed.
6023 (Check_Test_Case): Removed.
6024 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
6025 to obtain the proper expression. Use Corresponding_Spec_Of to
6026 find the proper spec.
6027 (Create_Generic_Template): New routine.
6028 (Duplication_Error): New routine.
6029 (Expression_Function_Error): New routine.
6030 (Find_Related_Subprogram_Or_Body): Moved to the spec
6031 of Sem_Prag. Emit precise error messages. Account for cases of
6032 rewritten expression functions, generic instantiations, handled
6033 sequence of statements and pragmas from aspects.
6034 (Get_Argument): New routine.
6035 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
6036 (Preanalyze_CTC_Args): Removed.
6037 (Process_Class_Wide_Condition): New routine.
6038 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
6039 the parameter profile along with the comment on usage.
6040 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
6041 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
6042 (Test_Case_Arg): New routine.
6043 * sem_util.adb Add with and use clauses for Sem_Ch6.
6044 (Add_Contract_Item): This routine now creates a contract
6045 node the first time an item is added. Remove the duplicate
6046 aspect/pragma checks.
6047 (Check_Result_And_Post_State): Reimplemented.
6048 (Corresponding_Spec_Of): New routine.
6049 (Get_Ensures_From_CTC_Pragma): Removed.
6050 (Get_Requires_From_CTC_Pragma): Removed.
6051 (Has_Significant_Contract): New routine.
6052 (Inherit_Subprogram_Contract): Inherit only if the source
6053 has a contract.
6054 (Install_Generic_Formals): New routine.
6055 (Original_Aspect_Name): Removed.
6056 (Original_Aspect_Pragma_Name): New routine.
6057 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
6058 (Corresponding_Spec_Of): New routine.
6059 (Get_Ensures_From_CTC_Pragma): Removed.
6060 (Get_Requires_From_CTC_Pragma): Removed.
6061 (Has_Significant_Contract): New routine.
6062 (Install_Generic_Formals): New routine.
6063 (Original_Aspect_Name): Removed.
6064 (Original_Aspect_Pragma_Name): New routine.
6065 * sem_warn.adb Add with and use clauses for Sem_Prag.
6066 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
6067
6068 2015-03-02 Ed Schonberg <schonberg@adacore.com>
6069
6070 * sem_ch8.adb (Available_Subtype): Optimization in
6071 Find_Selected_Component: when safe, use existing subtype of
6072 array component, possibly discriminant-dependent, rather than
6073 creating new subtype declaration for it. In this fashion different
6074 occurrences of the component have the same subtype, rather than
6075 just equivalent ones. Simplifies value tracing in GNATProve.
6076
6077 2015-03-01 Arnaud Charlet <charlet@adacore.com>
6078
6079 PR ada/65259
6080
6081 * doc/gnat_ugn/gnat_project_manager.rst,
6082 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
6083 image, too troublesome with texi format.
6084 * gnat_ugn.texi: Regenerate.
6085
6086 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6087
6088 PR libgomp/64625
6089 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
6090 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
6091 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6092
6093 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
6094
6095 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
6096 arguments parameter.
6097 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
6098
6099 2015-02-22 Arnaud Charlet <charlet@adacore.com>
6100
6101 * doc/Makefile: postprocess texinfo files to update @dircategory
6102 and update texi files under gcc/ada.
6103 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
6104
6105 2015-02-22 Arnaud Charlet <charlet@adacore.com>
6106
6107 * doc/gnat_ugn/project-manager-figure.png,
6108 doc/gnat_ugn/rtlibrary-structure.png: New.
6109
6110 2015-02-22 Tom de Vries <tom@codesourcery.com>
6111
6112 PR ada/65100
6113 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
6114 @item, and fix warning '@itemize has text but no @item'.
6115
6116 2015-02-20 Ed Schonberg <schonberg@adacore.com>
6117
6118 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
6119 legally applies to an abstract subprogram declaration.
6120 * freeze.adb: Minor comment addition.
6121
6122 2015-02-20 Robert Dewar <dewar@adacore.com>
6123
6124 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
6125 * erroutc.adb (Set_Msg_Str): Replace _xxx.
6126 (Pre/Post/Type_Invariant) by xxx'Class.
6127 * erroutc.ads (Set_Msg_Str): Replace _xxx.
6128 (Pre/Post/Type_Invariant) by xxx'Class.
6129 * sem_prag.adb (Fix_Error): Remove special casing of
6130 Name_uType_Invariant.
6131 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
6132 Name_uPre and Name_uPost in aspect case (done in Errout now).
6133
6134 2015-02-20 Robert Dewar <dewar@adacore.com>
6135
6136 * g-alveop.adb: Minor style fixes.
6137
6138 2015-02-20 Robert Dewar <dewar@adacore.com>
6139
6140 * freeze.adb (Warn_Overlay): Guard against blow up with address
6141 clause.
6142
6143 2015-02-20 Bob Duff <duff@adacore.com>
6144
6145 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
6146 for the compiler to guess whether the call is internal or external --
6147 it is always external.
6148 (Expand_Access_To_Protected_Op): For P'Access, where P
6149 is a protected subprogram, always create a pointer to the
6150 External_Subprogram.
6151
6152 2015-02-20 Robert Dewar <dewar@adacore.com>
6153
6154 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
6155
6156 2015-02-20 Robert Dewar <dewar@adacore.com>
6157
6158 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
6159 predicate for non-static subtype.
6160 (Build_Predicate_Functions): Do not assume subtype associated with a
6161 static predicate must be static.
6162
6163 2015-02-20 Robert Dewar <dewar@adacore.com>
6164
6165 * errout.adb (Set_Msg_Node): Better handling of internal names
6166 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
6167 * errout.ads: Document additional case of message deletion.
6168 * namet.adb (Is_Internal_Name): Refined to consider wide
6169 strings in brackets notation and character literals not to be
6170 internal names.
6171 * sem_ch8.adb (Find_Selected_Component): Give additional error
6172 when selector name is a subprogram whose first parameter has
6173 the same type as the prefix, but that type is untagged.
6174
6175 2015-02-20 Robert Dewar <dewar@adacore.com>
6176
6177 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
6178
6179 2015-02-20 Tristan Gingold <gingold@adacore.com>
6180
6181 * opt.ads (GNAT_Mode_Config): New variable.
6182 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
6183 to set Assertions_Enabled.
6184 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
6185 for -gnatg.
6186
6187 2015-02-20 Robert Dewar <dewar@adacore.com>
6188
6189 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
6190 comment regarding the handling of unterminated fixed-point
6191 constants.
6192 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
6193 corresponding to those previously added for
6194 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
6195
6196 2015-02-20 Olivier Hainque <hainque@adacore.com>
6197
6198 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
6199
6200 2015-02-20 Robert Dewar <dewar@adacore.com>
6201
6202 * sem_prag.adb: Minor comment clarification.
6203
6204 2015-02-20 Olivier Hainque <hainque@adacore.com>
6205
6206 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
6207 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
6208 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
6209 (vec_ctf): Now renamings as well.
6210
6211 2015-02-20 Robert Dewar <dewar@adacore.com>
6212
6213 * switch-c.adb, bindgen.adb: Minor reformatting.
6214
6215 2015-02-20 Ed Schonberg <schonberg@adacore.com>
6216
6217 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
6218 Invariant'class is allowed on an abstract type.
6219
6220 2015-02-20 Ed Schonberg <schonberg@adacore.com>
6221
6222 * sem_ch3.adb (Access_Definition): If the access definition is
6223 for a protected component and defines an access to protected
6224 subprogram, do not create an itype reference for it because a
6225 full type declaration will be built in order to generate the
6226 proper equivalent type.
6227 (Analyze_Subtype_Declaration): Add information of incomplete
6228 subtypes, for Ada 2012 extended uses of incomplete types.
6229
6230 2015-02-20 Gary Dismukes <dismukes@adacore.com>
6231
6232 * sem_res.adb: Minor reformatting.
6233
6234 2015-02-20 Vincent Celier <celier@adacore.com>
6235
6236 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
6237 path name for several switches --RTS, use the normalized path
6238 names.
6239
6240 2015-02-20 Vincent Celier <celier@adacore.com>
6241
6242 * bindgen.adb: Minor reformatting and code reorganization.
6243
6244 2015-02-20 Jose Ruiz <ruiz@adacore.com>
6245
6246 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
6247 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
6248 defined by Ada 2012.
6249
6250 2015-02-20 Arnaud Charlet <charlet@adacore.com>
6251
6252 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
6253 obsolete references to RTX, nucleus, VMS.
6254
6255 2015-02-20 Ed Schonberg <schonberg@adacore.com>
6256
6257 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
6258 aspect, use name that mentions Class explicitly, rather than
6259 compiler-internal name.
6260
6261 2015-02-20 Robert Dewar <dewar@adacore.com>
6262
6263 * debug.adb: Add documentation for -gnatd.2 (allow statements
6264 in decl sequences).
6265 * par-ch3.adb (P_Identifier_Declarations): Handle
6266 statement appearing where declaration expected more cleanly.
6267 (Statement_When_Declaration_Expected): Implement debug flag
6268 -gnatd.2.
6269
6270 2015-02-20 Jose Ruiz <ruiz@adacore.com>
6271
6272 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
6273 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
6274 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
6275 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
6276 defined by Ada 2005.
6277 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
6278 This is the correct name for the dispatching policy (FIFO was
6279 missing).
6280
6281 2015-02-20 Javier Miranda <miranda@adacore.com>
6282
6283 * sem_res.adb (Resolve_Type_Conversion): If the type of the
6284 operand is the limited-view of a class-wide type then recover
6285 the class-wide type of the non-limited view.
6286
6287 2015-02-20 Arnaud Charlet <charlet@adacore.com>
6288
6289 * gcc-interface/Makefile.in: Remove references to nucleus.
6290 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
6291 extern_flag to true for Inline_Always subprograms with
6292 Intrinsic convention.
6293
6294 2015-02-20 Yannick Moy <moy@adacore.com>
6295
6296 * sem_prag.ads: Minor typo in comment.
6297
6298 2015-02-20 Pascal Obry <obry@adacore.com>
6299
6300 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
6301
6302 2015-02-20 Vincent Celier <celier@adacore.com>
6303
6304 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
6305 if it exists.
6306
6307 2015-02-20 Robert Dewar <dewar@adacore.com>
6308
6309 * sem_eval.ads: Minor reformatting.
6310
6311 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
6312
6313 * freeze.adb (Size_Known): Do not set the packed size for
6314 independent type or component.
6315 (Freeze_Array_Type): Check for Independent[_Components] with packing
6316 or explicit component size clause.
6317 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
6318 of independence pragmas only for non-GCC back-ends.
6319 * sem_ch13.adb (Initialize): Likewise for the initialization.
6320 * sem_prag.adb (Record_Independence_Check): New procedure to record an
6321 independence check in the table.
6322 (Analyze_Pragma): Use it throughout instead of doing it manually.
6323 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
6324 independent type or component.
6325
6326 2015-02-20 Thomas Quinot <quinot@adacore.com>
6327
6328 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
6329 struct direct and readdir. This is required for NFS filesystems
6330 mounted from servers that use 64-bit cookies.
6331
6332 2015-02-20 Ed Schonberg <schonberg@adacore.com>
6333
6334 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
6335 Build_Subprogram_Renaming, to create renaming of subprogram
6336 instance in the the declaration of the wrapper package rather
6337 than in its body, so that it is available for analysis of aspects
6338 propagated from generic to instantiation.
6339 (Check_Mismatch): An actual for a formal package that is an
6340 incomplete type matches a formal type that is incomplete.
6341 (Instantiate_Package_Body): Move code that builds subprogram
6342 renaming to Analyze_Subprogram_Instantiation.
6343 (Instantiate_Type): The generated subtype is a limited view if
6344 the actual is a limited view.
6345 (Load_Parent_Of_Generic): Retrieve instance declaration from
6346 its new position within wrapper package.
6347
6348 2015-02-20 Arnaud Charlet <charlet@adacore.com>
6349
6350 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
6351
6352 2015-02-20 Robert Dewar <dewar@adacore.com>
6353
6354 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
6355 issue of negative arguments.
6356
6357 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
6358
6359 * gnat1drv.adb: Minor consistency fix.
6360
6361 2015-02-20 Pascal Obry <obry@adacore.com>
6362
6363 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
6364 paths.
6365
6366 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
6367
6368 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
6369 renamings.
6370 * exp_ch6.adb (Expand_Call): Use back-end inlining
6371 instead of expansion for simple subprogram renamings.
6372
6373 2015-02-20 Robert Dewar <dewar@adacore.com>
6374
6375 * exp_util.adb: Minor reformatting.
6376
6377 2015-02-20 Vincent Celier <celier@adacore.com>
6378
6379 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
6380 is specified several times with different values that indicates
6381 the same runtime directory.
6382
6383 2015-02-20 Ed Schonberg <schonberg@adacore.com>
6384
6385 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
6386 handle properly illegal uses of attributes on prefixes on an
6387 incomplete type, both when the type of the prefix is locally
6388 incomplete, and when it is a limited view of a type whose
6389 non-limited view is not available.
6390 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
6391 'Address and others.
6392
6393 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
6394
6395 * exp_ch6.adb: Fix minor typo in comment.
6396
6397 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
6398
6399 * sinfo.ads: Add comment.
6400
6401 2015-02-20 Olivier Hainque <hainque@adacore.com>
6402
6403 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
6404 flags controlling the actual FE inlining out of pragma Inline
6405 and pragma Inline_Always.
6406 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
6407 on -fno-inline, which disables all inlining in compilers with
6408 an Ada back-end and without back-end inlining support.
6409 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
6410 flag to True on -fno-inline and leave Inline_Always alone for
6411 gcc back-ends.
6412 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
6413 names of the Opt flags it sets.
6414 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
6415 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
6416 * sem_prag.adb (Make_Inline): Remove early return conditioned
6417 on Opt.Suppress_All_Inlining.
6418 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
6419 disable the calls to Build_Body_To_Inline otherwise triggered
6420 by pragma Inline or Inline_Always. This will prevent actual
6421 front-end inlining of the subprogram on calls.
6422
6423 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
6424
6425 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
6426 Abort_Undefer_Direct function.
6427 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
6428 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
6429 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
6430 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
6431 Add_Inlined_Body.
6432 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
6433 Remove call to Register_Backend_Call and move code resetting
6434 Needs_Debug_Info on inlined subprograms to...
6435 * inline.ads (Add_Inlined_Body): Add N parameter.
6436 (Register_Backend_Call): Delete.
6437 * inline.adb (Add_Inlined_Body): ...here and simplify.
6438 Register the call with Backend_Calls directly.
6439 (Register_Backend_Call): Delete.
6440 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
6441
6442 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
6443
6444 * s-stalib.ads: Fix typo.
6445
6446 2015-02-20 Ed Schonberg <schonberg@adacore.com>
6447
6448 * exp_ch3.adb (Default_Initialize_Object): If the object has a
6449 delayed freeze, the actions associated with default initialization
6450 must be part of the freeze actions, rather that being inserted
6451 directly after the object declaration.
6452
6453 2015-02-20 Robert Dewar <dewar@adacore.com>
6454
6455 * lib-load.adb: Minor comment update.
6456
6457 2015-02-20 Vincent Celier <celier@adacore.com>
6458
6459 * prj-proc.adb (Process_Case_Construction): When there are
6460 incomplete withed projects and the case variable is unknown,
6461 skip the case construction.
6462
6463 2015-02-20 Ed Schonberg <schonberg@adacore.com>
6464
6465 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
6466 when an actual is a view conversion, either because the call is
6467 to an inherited operation, or because the actual is an explicit
6468 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
6469
6470 2015-02-20 Robert Dewar <dewar@adacore.com>
6471
6472 * einfo.ads: Minor comment updates Fix missing pragma Inline
6473 for Set_Partial_View_Has_Unknown_Discr.
6474 * einfo.adb (Write_Entity_Flags): Add missing entry for
6475 Partial_View_Has_Unknown_Discr.
6476 * sem_ch3.adb: Minor reformatting.
6477
6478 2015-02-20 Vincent Celier <celier@adacore.com>
6479
6480 * opt.ads: Minor cleanup: remove mention of gprmake.
6481 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
6482 * s-tataat.adb: Do not call System.Tasking.Self but directly
6483 System.Task_Primitives.Operations.Self.
6484
6485 2015-02-20 Arnaud Charlet <charlet@adacore.com>
6486
6487 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
6488 sphinx in the doc directory.
6489 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
6490
6491 2015-02-20 Robert Dewar <dewar@adacore.com>
6492
6493 * sem_res.adb: Minor reformatting.
6494 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
6495 building spec.
6496 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
6497 aspects from circuitry setting delay required to false if the
6498 argument is an integer literal.
6499
6500 2015-02-20 Ed Schonberg <schonberg@adacore.com>
6501
6502 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
6503 on type entities, to enforce AI12-0133: default initialization
6504 of types whose partial view has unknown discriminants does not
6505 get an invariant check, because clients of the unit can never
6506 declare objects of such types.
6507 * sem_ch3.adb (Find_Type_Name); Set new flag
6508 Partial_View_Has_Unknown_Discr when needed.
6509 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
6510 generation of invariant call on default-initialized object.
6511
6512 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
6513
6514 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
6515 if the parameter either is passed by reference or if the alignment
6516 would be lowered.
6517
6518 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
6519
6520 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
6521 detect primitive operations of tagged and untagged types.
6522
6523 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
6524
6525 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
6526 sets in presence of derivation for subprogram types.
6527
6528 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
6529
6530 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
6531 present in the same context as the declaration.
6532
6533 2015-02-07 Jakub Jelinek <jakub@redhat.com>
6534
6535 PR middle-end/64340
6536 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
6537 and optimization_current_node after tweaking global_options.
6538
6539 2015-02-05 Robert Dewar <dewar@adacore.com>
6540
6541 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
6542 prj-nmsc.adb: Minor reformatting.
6543
6544 2015-02-05 Ed Schonberg <schonberg@adacore.com>
6545
6546 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
6547 of a protected type may not be available, so to check conformance
6548 with an interface type, examine the interface list in the type
6549 declaration directly.
6550 (Write_Overloads): Improve information for indirect calls,
6551 for debugger use.
6552
6553 2015-02-05 Ed Schonberg <schonberg@adacore.com>
6554
6555 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
6556 expansion activity in ASIS mode.
6557
6558 2015-02-05 Javier Miranda <miranda@adacore.com>
6559
6560 * errout.adb (Error_Msg_PT): Add missing error.
6561 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
6562 RM rule. Code cleanup.
6563 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
6564 anonymous access types. Found working on the tests. Code cleanup.
6565
6566 2015-02-05 Vincent Celier <celier@adacore.com>
6567
6568 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
6569 when there are incomplete withs.
6570 * prj-nmsc.adb (Process_Naming): Do not try to get the value
6571 of an element when it is nil.
6572 (Check_Naming): Do not check a nil suffix for illegality
6573 * prj-proc.adb (Expression): Do not process an empty term.
6574 * prj-strt.adb (Attribute_Reference): If attribute cannot be
6575 found, parse a possible index to avoid cascading errors.
6576
6577 2015-02-05 Ed Schonberg <schonberg@adacore.com>
6578
6579 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
6580 for an access_to_subprogram declaration is not a derived type.
6581
6582 2015-02-05 Robert Dewar <dewar@adacore.com>
6583
6584 * errout.adb (Error_Msg_Internal): For non-serious error set
6585 Fatal_Error to Ignored.
6586 * lib-load.adb (Load_Unit): Minor comment updates.
6587 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
6588 setting from with'ed unit to with'ing unit.
6589 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
6590 of ambiguity.
6591
6592 2015-02-05 Yannick Moy <moy@adacore.com>
6593
6594 * sem_prag.adb, par-prag.adb: Minor code clean up.
6595
6596 2015-02-05 Yannick Moy <moy@adacore.com>
6597
6598 * par-prag.adb (Pragma_Warnings): Update for extended form
6599 of pragma Warnings. The "one" argument case may now have 2 or
6600 3 arguments.
6601 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
6602 extended form of pragma Warnings. Pragma with tool name is either
6603 rewritten as null or as an equivalent form without tool name,
6604 before reanalysis.
6605 * snames.ads-tmpl (Name_Gnatprove): New name.
6606
6607 2015-02-05 Robert Dewar <dewar@adacore.com>
6608
6609 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
6610 standard Boolean.
6611 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
6612 condition is standard Boolean, it can be non-standard derived
6613 Boolean.
6614
6615 2015-02-05 Robert Dewar <dewar@adacore.com>
6616
6617 * checks.adb (Enable_Range_Check): Disconnect attempted
6618 optimization for the case of range check for subscript of
6619 unconstrained array.
6620
6621 2015-02-05 Robert Dewar <dewar@adacore.com>
6622
6623 * par-ch13.adb (With_Present): New function
6624 (Aspect_Specifications_Present): Handle WHEN in place of WITH
6625 (Get_Aspect_Specifications): Comment update.
6626 * par.adb: Comment updates.
6627
6628 2015-02-05 Robert Dewar <dewar@adacore.com>
6629
6630 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
6631 * frontend.adb (Frontend): New setting of Fatal_Error.
6632 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
6633 Fatal_Error.
6634 (Load_Main_Source): New setting of Fatal_Error
6635 (Load_Unit): New setting of Fatal_Error.
6636 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
6637 Fatal_Error.
6638 (Ensure_System_Dependency): New setting of Fatal_Error.
6639 * lib.adb (Fatal_Error): New setting of Fatal_Error
6640 (Set_Fatal_Error): New setting of Fatal_Error.
6641 * lib.ads: New definition of Fatal_Error and associated routines.
6642 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
6643 * par-load.adb (Load): New setting of Fatal_Error.
6644 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
6645 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
6646 Fatal_Error.
6647 (Optional_Subunit): New setting of Fatal_Error.
6648 (Analyze_Proper_Body): New setting of Fatal_Error.
6649 (Load_Needed_Body): New setting of Fatal_Error.
6650
6651 2015-02-05 Ed Schonberg <schonberg@adacore.com>
6652
6653 * sem_res.adb (Resolve_Call): If the function being called has
6654 out parameters do not check for language version if the function
6655 comes from a predefined unit, as those are always compiled in
6656 Ada 2012 mode.
6657
6658 2015-02-05 Ed Schonberg <schonberg@adacore.com>
6659
6660 * sem_ch3.adb (Process_Full_View): Verify that the full view
6661 of a type extension must carry an explicit limited keyword if
6662 the partial view does (RM 7.3 (10.1)).
6663
6664 2015-02-05 Robert Dewar <dewar@adacore.com>
6665
6666 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
6667 sem_warn.ads: Minor reformatting.
6668 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
6669 deleted by -gnatI.
6670 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
6671 error for abstract type.
6672
6673 2015-02-05 Yannick Moy <moy@adacore.com>
6674
6675 * opt.ads (Warn_On_Suspicious_Contract): Update comment
6676 describing use.
6677 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
6678 suspicious uses of 'Update.
6679 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
6680 function issues warning on suspicious uses of 'Update.
6681 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
6682 package spec and body as SPARK_Mode Off.
6683
6684 2015-02-05 Robert Dewar <dewar@adacore.com>
6685
6686 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
6687 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
6688 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
6689 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
6690 for exported entity.
6691
6692 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
6693
6694 * sem_prag.adb (Check_Pragma_Conformance): Add
6695 local variable Arg. Ensure that all errors are associated with
6696 the pragma if it appears without an argument. Add comments on
6697 various cases.
6698
6699 2015-02-05 Robert Dewar <dewar@adacore.com>
6700
6701 * lib-xref.adb: Minor reformatting.
6702
6703 2015-02-05 Tristan Gingold <gingold@adacore.com>
6704
6705 PR ada/64349
6706 * env.c: Fix thinko: handle Darwin case before default one.
6707
6708 2015-01-30 Robert Dewar <dewar@adacore.com>
6709
6710 * a-assert.adb: Minor reformatting.
6711 * sem_ch13.adb: Minor comment clarification.
6712 * types.ads: Minor comment update.
6713 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
6714 when we have a predicate that is nothing but an inherited dynamic
6715 predicate.
6716
6717 2015-01-30 Jerome Guitton <guitton@adacore.com>
6718
6719 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
6720 include cert link spec.
6721
6722 2015-01-30 Robert Dewar <dewar@adacore.com>
6723
6724 * einfo.ads: Minor comment fix.
6725 * freeze.adb (Freeze_Profile): Add test for suspicious import
6726 in pure unit.
6727 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
6728 use in Pure unit is now moved to Freeze (to properly catch
6729 Pure_Function exemption).
6730
6731 2015-01-30 Bob Duff <duff@adacore.com>
6732
6733 * sem_res.ads: Minor comment fix.
6734 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
6735 check both operands of an operator.
6736
6737 2015-01-30 Yannick Moy <moy@adacore.com>
6738
6739 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
6740 policy for Pre to Ignore.
6741 (Assert): Add precondition.
6742
6743 2015-01-30 Robert Dewar <dewar@adacore.com>
6744
6745 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
6746 Pure unit.
6747 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
6748 documentation for some special cases of invalid attempts at
6749 based integers.
6750
6751 2015-01-30 Gary Dismukes <dismukes@adacore.com>
6752
6753 * errout.ads: Minor reformatting.
6754
6755 2015-01-30 Yannick Moy <moy@adacore.com>
6756
6757 * inline.adb (Process_Formals): Use the sloc of
6758 the inlined node instead of the sloc of the actual parameter,
6759 when replacing formal parameters by the actual one.
6760
6761 2015-01-30 Arnaud Charlet <charlet@adacore.com>
6762
6763 * g-expect.adb (Get_Command_Output): Use infinite timeout when
6764 calling Expect.
6765
6766 2015-01-30 Ed Schonberg <schonberg@adacore.com>
6767
6768 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
6769 defaulted in an instantiation, add an entry in the list of actuals
6770 to indicate the default value of the formal (as is already done
6771 for defaulted subprograms).
6772
6773 2015-01-30 Javier Miranda <miranda@adacore.com>
6774
6775 * errout.adb (Error_Msg_PT): Minor error phrasing update.
6776
6777 2015-01-30 Robert Dewar <dewar@adacore.com>
6778
6779 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
6780 for object case.
6781
6782 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
6783
6784 * exp_dbug.adb (Get_Encoded_Name): When
6785 -fgnat-encodings=minimal, do not generate names for biased types.
6786
6787 2015-01-30 Tristan Gingold <gingold@adacore.com>
6788
6789 PR ada/64349
6790 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
6791
6792 2015-01-30 Gary Dismukes <dismukes@adacore.com>
6793
6794 * freeze.adb: Minor reformatting.
6795
6796 2015-01-30 Javier Miranda <miranda@adacore.com>
6797
6798 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
6799 improve its documentation.
6800 * errout.adb (Error_Msg_PT): Improve the error message.
6801 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
6802 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
6803 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
6804
6805 2015-01-30 Robert Dewar <dewar@adacore.com>
6806
6807 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
6808 message for False case.
6809
6810 2015-01-30 Doug Rupp <rupp@adacore.com>
6811
6812 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
6813 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
6814 kernel.
6815
6816 2015-01-30 Gary Dismukes <dismukes@adacore.com>
6817
6818 * sem_attr.adb (Declared_Within_Generic_Unit):
6819 New function to test whether an entity is declared within the
6820 declarative region of a given generic unit.
6821 (Resolve_Attribute): For checking legality of subprogram'Access within
6822 a generic unit, call new Boolean function Declared_Within_Generic_Unit
6823 instead of simply comparing the results of Enclosing_Generic_Unit on
6824 the prefix and access type. Correct minor comment typos.
6825
6826 2015-01-30 Robert Dewar <dewar@adacore.com>
6827
6828 * freeze.adb, exp_util.ads: Update comment.
6829 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
6830 * sem_util.adb: Minor: fix typo.
6831
6832 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
6833
6834 * sem_attr.adb (Analyze_Attribute): Ensure that
6835 the check concerning Refined_Post takes precedence over the
6836 other cases.
6837
6838 2015-01-30 Gary Dismukes <dismukes@adacore.com>
6839
6840 * sem_prag.adb: Minor typo fixes and reformatting.
6841
6842 2015-01-30 Yannick Moy <moy@adacore.com>
6843
6844 * sem_attr.adb: Code clean up.
6845
6846 2015-01-30 Robert Dewar <dewar@adacore.com>
6847
6848 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
6849 * ali.ads (Unit_Record): Add new field Serious_Errors.
6850 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
6851 attribute in U line.
6852 * lib-writ.ads: New attribute SE (serious erors) in unit line.
6853
6854 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
6855
6856 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
6857 Lit_Indexes, Scale_Value, Storage_Size_Variable,
6858 String_Literal_Low_Bound along associated routines and
6859 Write_FieldX_Name.
6860 (Pending_Access_Types): New routine.
6861 (Set_Pending_Access_Types): New routine.
6862 (Write_Field15_Name): Add an entry for Pending_Access_Types.
6863 * einfo.ads Add new attribute Pending_Access_Types along
6864 with usage in nodes. Update the usage of attributes
6865 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
6866 Storage_Size_Variable, String_Literal_Low_Bound.
6867 (Pending_Access_Types): New routine along with pragma Inline.
6868 (Set_Pending_Access_Types): New routine along with pragma Inline.
6869 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
6870 Ins_Node. Determine the insertion node for anonynous access type
6871 that acts as a component type of an array. Update the call to
6872 Build_Finalization_Master.
6873 (Expand_Freeze_Record_Type): Update
6874 the calls to Build_Finalization_Master.
6875 (Freeze_Type): Remove
6876 local variable RACW_Seen. Factor out the code that deals with
6877 remote access-to-class-wide types. Create a finalization master
6878 when the designated type contains a private component. Fully
6879 initialize all pending access types.
6880 (Process_RACW_Types): New routine.
6881 (Process_Pending_Access_Types): New routine.
6882 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
6883 needs to set primitive Finalize_Address.
6884 (Expand_N_Allocator): Allocation no longer sets primitive
6885 Finalize_Address.
6886 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
6887 Update the call to Build_Finalization_Master.
6888 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
6889 needs to set primitive Finalize_Address.
6890 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
6891 (Build_Finalization_Master): New parameter profile. Associate
6892 primitive Finalize_Address with the finalization master if the
6893 designated type has been frozen, otherwise treat the access
6894 type as pending. Simplify the insertion of the master and
6895 related initialization code.
6896 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
6897 abstract types.
6898 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
6899 Simplify the implementation.
6900 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
6901 along with comment on usage.
6902 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
6903 the comment on usage.
6904 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
6905 Finalize_Address to retrieve the primitive.
6906 (Finalize_Address): New routine.
6907 (Find_Finalize_Address): Removed.
6908 * exp_util.ads (Finalize_Address): New routine.
6909 * freeze.adb (Freeze_All): Remove the generation of finalization
6910 masters.
6911 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
6912 pending access types from the partial to the full view.
6913
6914 2015-01-30 Robert Dewar <dewar@adacore.com>
6915
6916 * sem_disp.adb: Minor reformatting.
6917 * sem_disp.ads: Documentation update.
6918
6919 2015-01-30 Ed Schonberg <schonberg@adacore.com>
6920
6921 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
6922 or a function call, return True if type is class-wide.
6923 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
6924 Apply RM 4.5.7 (17/3): all or none of the dependent expression
6925 of a conditional expression must be dynamically tagged.
6926
6927 2015-01-30 Ed Schonberg <schonberg@adacore.com>
6928
6929 * sem_ch6.adb (Analyze_Function_Return): In an extended return
6930 statement, apply accessibility check to result object when there
6931 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
6932
6933 2015-01-30 Robert Dewar <dewar@adacore.com>
6934
6935 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
6936 Boolean for case where ELSE is omitted.
6937 * sem_res.adb: Minor reformatting.
6938
6939 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6940
6941 Fix build under cygwin/64.
6942 * adaint.h: Add check for __CYGWIN__.
6943 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
6944
6945 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6946
6947 PR ada/64640
6948 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
6949 * mingw32.h: Don't include <tchar.h> under cygwin.
6950 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
6951
6952 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6953
6954 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
6955 (DEF_FUNCTION_TYPE_VAR_12): New macros.
6956
6957 2015-01-09 Michael Collison <michael.collison@linaro.org>
6958
6959 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
6960 vec.h, double-int.h, input.h, alias.h, symtab.h,
6961 fold-const.h, wide-int.h, and inchash.h due to
6962 flattening of tree.h.
6963 * gcc-interface/decl.c: Ditto.
6964 * gcc-interface/misc.c: Ditto.
6965 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
6966 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
6967 fold-const.h, wide-int.h, and inchash.h due to
6968 flattening of tree.h.
6969 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
6970 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
6971 fold-const.h, wide-int.h, inchash.h due to
6972 flattening of tree.h.
6973 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
6974 vec.h, double-int.h, input.h, alias.h, symtab.h,
6975 fold-const.h, wide-int.h, and inchash.h due to
6976 flattening of tree.h.
6977 * gcc-interface/utils2.c: Ditto.
6978
6979 2015-01-07 Robert Dewar <dewar@adacore.com>
6980
6981 * sem_warn.adb (Check_One_Unit): Don't give unused entities
6982 warning for a package which is used as a generic parameter.
6983
6984 2015-01-07 Bob Duff <duff@adacore.com>
6985
6986 * usage.adb (Usage): Correct documentation of
6987 -gnatw.f switches.
6988
6989 2015-01-07 Robert Dewar <dewar@adacore.com>
6990
6991 * s-fileio.adb: Minor reformatting.
6992
6993 2015-01-07 Ed Schonberg <schonberg@adacore.com>
6994
6995 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
6996 access to subprogram, replace its formals with new entities when
6997 building the object declaration, both if actual is present and
6998 when it is defaulted.
6999
7000 2015-01-07 Ed Schonberg <schonberg@adacore.com>
7001
7002 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
7003 conversion and type of expression has invariant, apply invariant
7004 check on expression.
7005
7006 2015-01-07 Ed Schonberg <schonberg@adacore.com>
7007
7008 * sem_ch3.adb (Create_Constrained_Components): A call to
7009 Gather_Components may detect an error if an inherited discriminant
7010 that controls a variant is non-static.
7011 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
7012 Gather_Components may report an error if an inherited discriminant
7013 in a variant in non-static.
7014 * sem_util.adb (Gather_Components): If a non-static discriminant
7015 is inherited do not report error here, but let caller handle it.
7016 (Find_Actual): Small optimization.
7017
7018 2015-01-07 Bob Duff <duff@adacore.com>
7019
7020 * usage.adb (Usage): Document -gnatw.f switch.
7021
7022 2015-01-07 Ed Schonberg <schonberg@adacore.com>
7023
7024 * sem_ch12.adb: Code clean up and minor reformatting.
7025
7026 2015-01-07 Robert Dewar <dewar@adacore.com>
7027
7028 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
7029 Raise_Accessibility_Error call.
7030 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
7031 on handling of invalid digits in based constants.
7032 * s-fatgen.ads: Minor reformatting.
7033 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
7034 Avoid noting bogus modification for Valid test.
7035 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
7036 * einfo.ads: Minor reformatting.
7037 * sem_warn.adb: Minor comment clarification.
7038 * sem_ch12.adb: Minor reformatting.
7039
7040 2015-01-07 Ed Schonberg <schonberg@adacore.com>
7041
7042 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
7043 over static predicates when the loop parameter specification
7044 carries a Reverse indicator.
7045
7046 2015-01-07 Ed Schonberg <schonberg@adacore.com>
7047
7048 * sem_ch12.adb (Instantiate_Object): If formal has a default,
7049 actual is missing and formal has an anonymous access type, copy
7050 access definition in full so that tree for instance is properly
7051 formatted for ASIS use.
7052
7053 2015-01-07 Bob Duff <duff@adacore.com>
7054
7055 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
7056 for P'Access, where P is a subprogram in the same package as
7057 the P'Access, and the P'Access is evaluated at elaboration
7058 time, and occurs before the body of P. For example, "X : T :=
7059 P'Access;" would allow a subsequent call to X.all to be an
7060 access-before-elaboration error; hence the warning. This warning
7061 is enabled by the -gnatw.f switch.
7062 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
7063 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
7064 * gnat_ugn.texi: Document the new warning.
7065
7066 2015-01-07 Johannes Kanig <kanig@adacore.com>
7067
7068 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
7069 cross ref files.
7070
7071 2015-01-07 Robert Dewar <dewar@adacore.com>
7072
7073 * s-taprop-linux.adb, clean.adb: Minor reformatting.
7074
7075 2015-01-07 Arnaud Charlet <charlet@adacore.com>
7076
7077 * s-tassta.adb: Relax some overzealous assertions.
7078
7079 2015-01-07 Ed Schonberg <schonberg@adacore.com>
7080
7081 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
7082 view of a type is legal when context is a thunk generated for
7083 operation inherited from an interface.
7084 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
7085 a thunk and return type is an incomplete type do not continue
7086 expansion; thunk will be fully elaborated when generating code.
7087
7088 2015-01-07 Doug Rupp <rupp@adacore.com>
7089
7090 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
7091 (QueryPerformanceFrequency): New imported procedure.
7092 * s-taprop-mingw.adb (RT_Resolution): Call above and return
7093 resolution vice a hardcoded value.
7094 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
7095 resolution vice a hardcoded value.
7096 * s-linux-android.ads (clockid_t): New subtype.
7097 * s-osinte-aix.ads (clock_getres): New imported subprogram.
7098 * s-osinte-android.ads (clock_getres): Likewise.
7099 * s-osinte-freebsd.ads (clock_getres): Likewise.
7100 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
7101 * s-osinte-darwin.ads (clock_getres): New subprogram.
7102 * s-osinte-darwin.adb (clock_getres): New subprogram.
7103 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
7104 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
7105 calculate resolution vice hard coded value.
7106
7107 2015-01-07 Ed Schonberg <schonberg@adacore.com>
7108
7109 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
7110 limited view, use non-limited view when available to create
7111 equivalent record type.
7112
7113 2015-01-07 Vincent Celier <celier@adacore.com>
7114
7115 * gnatcmd.adb: Remove command Sync and any data and processing
7116 related to this command. Remove project processing for gnatstack.
7117 * prj-attr.adb: Remove package Synchonize and its attributes.
7118
7119 2015-01-07 Vincent Celier <celier@adacore.com>
7120
7121 * clean.adb: Minor error message change.
7122
7123 2015-01-07 Tristan Gingold <gingold@adacore.com>
7124
7125 PR ada/64349
7126 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
7127
7128 2015-01-07 Javier Miranda <miranda@adacore.com>
7129
7130 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
7131 protect the frontend against never ending recursion caused by
7132 circularities in the sources.
7133
7134 2015-01-07 Robert Dewar <dewar@adacore.com>
7135
7136 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
7137 exp_ch3.adb: Minor reformatting.
7138
7139 2015-01-07 Doug Rupp <rupp@adacore.com>
7140
7141 * s-linux.ads (clockid_t): New subtype.
7142 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
7143 (clockid_t): New subtype.
7144 (clock_getres): Import system call.
7145 * s-taprop-linux.adb (System.OS_Constants): With and rename.
7146 (RT_Resolution): Remove
7147 hardcoded value and call clock_getres.
7148 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
7149 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
7150
7151 2015-01-07 Robert Dewar <dewar@adacore.com>
7152
7153 * sem_warn.adb (Check_One_Unit): Guard against context item
7154 with no Entity field.
7155
7156 2015-01-07 Vincent Celier <celier@adacore.com>
7157
7158 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
7159 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
7160
7161 2015-01-07 Vincent Celier <celier@adacore.com>
7162
7163 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
7164 errors/warnings in the first parsing of the project files,
7165 to display the warnings when there is no errors.
7166
7167 2015-01-07 Tristan Gingold <gingold@adacore.com>
7168
7169 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
7170
7171 2015-01-07 Doug Rupp <rupp@adacore.com>
7172
7173 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
7174 value from Int_Lock as parameter to Int_Unlock.
7175 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
7176 * s-vxwext.ads (Int_Unlock): Likewise.
7177 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
7178 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
7179 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
7180 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
7181
7182 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
7183
7184 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
7185 keep ___XP suffixes
7186
7187 2015-01-07 Tristan Gingold <gingold@adacore.com>
7188
7189 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
7190 handle overlap.
7191
7192 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
7193
7194 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
7195 automatically set No_Strict_Aliasing on access types.
7196 * fe.h (No_Strict_Aliasing_CP): Declare.
7197 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
7198 No_Strict_Aliasing_CP is set.
7199
7200 2015-01-07 Johannes Kanig <kanig@adacore.com>
7201
7202 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
7203 not build function wrapper in gnatprove mode when the package
7204 is externally axiomatized.
7205
7206 2015-01-07 Jose Ruiz <ruiz@adacore.com>
7207
7208 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
7209 intermediate computations when the parameters have different signs.
7210
7211 2015-01-07 Javier Miranda <miranda@adacore.com>
7212
7213 * exp_ch3.adb (Build_Init_Procedure): For derived types,
7214 improve the code which takes care of identifying and moving to
7215 the beginning of the init-proc the call to the init-proc of the
7216 parent type.
7217
7218 2015-01-07 Olivier Hainque <hainque@adacore.com>
7219
7220 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
7221 Elaborate the expression as part of the same stmt group as the actions.
7222
7223 2015-01-07 Robert Dewar <dewar@adacore.com>
7224
7225 * sem_ch3.adb: Minor error message change.
7226
7227 2015-01-07 Ed Schonberg <schonberg@adacore.com>
7228
7229 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
7230 Following AI05-028, the pragam applies legally to any composite type.
7231
7232 2015-01-07 Arnaud Charlet <charlet@adacore.com>
7233
7234 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
7235 (sigwait, sigwaitinfo): Removed, not needed after all on any
7236 VxWorks configurations.
7237
7238 2015-01-07 Robert Dewar <dewar@adacore.com>
7239
7240 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
7241
7242 2015-01-07 Javier Miranda <miranda@adacore.com>
7243
7244 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
7245 generation of accessibility check.
7246
7247 2015-01-07 Ed Schonberg <schonberg@adacore.com>
7248
7249 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
7250 illegal completion from a class- wide type, set etype of the
7251 derived type properly to prevent cascaded errors.
7252
7253 2015-01-07 Robert Dewar <dewar@adacore.com>
7254
7255 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
7256 reformatting.
7257
7258 2015-01-07 Robert Dewar <dewar@adacore.com>
7259
7260 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
7261 New procedure.
7262 (OK_No_Use_Of_Entity_Name): New function.
7263 (Set_Restriction_No_Use_Of_Entity): New procedure.
7264 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
7265 New procedure.
7266 (OK_No_Use_Of_Entity_Name): New function.
7267 (Set_Restriction_No_Use_Of_Entity): New procedure.
7268 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
7269 No_Use_Of_Entity.
7270 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
7271 Add processing for new restriction No_Use_Of_Entity.
7272
7273 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
7274
7275 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
7276 component type as to Has_Atomic_Components type. Remove useless
7277 test on Is_Aliased component type.
7278
7279 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
7280
7281 * alloc.ads Alphabetize several declarations. Add constants
7282 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
7283 * atree.adb Add with and use clauses for Opt.
7284 (Allocate_Initialize_Node): Mark a node as ignored Ghost
7285 if it is created in an ignored Ghost region.
7286 (Ekind_In): New variant.
7287 (Is_Ignored_Ghost_Node): New routine.
7288 (Set_Is_Ignored_Ghost_Node): New routine.
7289 * atree.adb Aplhabetize several subprograms declarations. Flag
7290 Spare0 is now known as Is_Ignored_Ghost_Node.
7291 (Ekind_In): New variant.
7292 (Is_Ignored_Ghost_Node): New routine.
7293 (Set_Is_Ignored_Ghost_Node): New routine.
7294 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
7295 (Contains_Ignored_Ghost_Code): New routine.
7296 (Set_Contains_Ignored_Ghost_Code): New routine.
7297 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
7298 It is now possible to set this property on an unanalyzed entity.
7299 (Write_Entity_Flags): Output the status of flag
7300 Contains_Ignored_Ghost_Code.
7301 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
7302 usage in nodes.
7303 (Contains_Ignored_Ghost_Code): New routine
7304 along with pragma Inline.
7305 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
7306 * exp_ch3.adb Add with and use clauses for Ghost.
7307 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
7308 Set the Ghost_Mode in effect.
7309 (Restore_Globals): New routine.
7310 * exp_ch7.adb (Process_Declarations): Do not process a context
7311 that invoves an ignored Ghost entity.
7312 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
7313 construct that has been rewritten as a null statement.
7314 * exp_disp.adb Add with and use clauses for Ghost.
7315 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
7316 the Ghost_Mode in effect.
7317 (Restore_Globals): New routine.
7318 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
7319 does not require any clean up. Add two missing cases that deal
7320 with block statements.
7321 * freeze.adb Add with and use clauses for Ghost.
7322 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
7323 Set the Ghost_Mode in effect.
7324 (Restore_Globals): New routine.
7325 * frontend.adb Add with and use clauses for Ghost. Remove any
7326 ignored Ghost code from all units that qualify.
7327 * ghost.adb New unit.
7328 * ghost.ads New unit.
7329 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
7330 the table in package Ghost.
7331 * lib.ads: Alphabetize several subprogram declarations.
7332 * lib-xref.adb (Output_References): Do not generate reference
7333 information for ignored Ghost entities.
7334 * opt.ads Add new type Ghost_Mode_Type and new global variable
7335 Ghost_Mode.
7336 * rtsfind.adb (Load_RTU): Provide a clean environment when
7337 loading a runtime unit.
7338 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
7339 entry/exit as the node may set a different mode.
7340 (Do_Analyze):
7341 Capture/restore the value of Ghost_Mode on entry/exit as the
7342 unit may be withed from a unit with a different Ghost mode.
7343 * sem_ch3.adb Add with and use clauses for Ghost.
7344 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
7345 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
7346 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
7347 the entity as Ghost when there is a Ghost_Mode in effect.
7348 (Array_Type_Declaration): The implicit base type inherits the
7349 "ghostness" from the array type.
7350 (Derive_Subprogram): The
7351 alias inherits the "ghostness" from the parent subprogram.
7352 (Make_Implicit_Base): The implicit base type inherits the
7353 "ghostness" from the parent type.
7354 * sem_ch5.adb Add with and use clauses for Ghost.
7355 (Analyze_Assignment): Set the Ghost_Mode in effect.
7356 * sem_ch6.adb Add with and use clauses for Ghost.
7357 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
7358 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
7359 Set the Ghost_Mode in effect. Mark the entity as Ghost when
7360 there is a Ghost_Mode in effect.
7361 * sem_ch7.adb Add with and use clauses for Ghost.
7362 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
7363 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
7364 effect. Mark the entity as Ghost when there is a Ghost_Mode
7365 in effect.
7366 * sem_ch8.adb Add with and use clauses for Ghost.
7367 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7368 Analyze_Object_Renaming, Analyze_Package_Renaming,
7369 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
7370 the entity as Ghost when there is a Ghost_Mode in effect.
7371 (Find_Type): Check the Ghost context of a type.
7372 * sem_ch11.adb Add with and use clauses for Ghost.
7373 (Analyze_Exception_Declaration): Set the Ghost_Mode in
7374 effect. Mark the entity as Ghost when there is a Ghost_Mode
7375 in effect.
7376 * sem_ch12.adb Add with and use clauses for Ghost.
7377 (Analyze_Generic_Package_Declaration,
7378 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
7379 Mark the entity as Ghost when there is a Ghost_Mode in effect.
7380 * sem_prag.adb Add with and use clauses for Ghost.
7381 (Analyze_Pragma): Ghost-related checks are triggered when there
7382 is a Ghost mode in effect.
7383 (Create_Abstract_State): Mark the
7384 entity as Ghost when there is a Ghost_Mode in effect.
7385 * sem_res.adb Add with and use clauses for Ghost.
7386 (Check_Ghost_Context): Removed.
7387 * sem_util.adb (Check_Ghost_Completion): Removed.
7388 (Check_Ghost_Derivation): Removed.
7389 (Incomplete_Or_Partial_View):
7390 Add a guard in case the entity has not been analyzed yet
7391 and does carry a scope.
7392 (Is_Declaration): New routine.
7393 (Is_Ghost_Entity): Removed.
7394 (Is_Ghost_Statement_Or_Pragma):
7395 Removed.
7396 (Is_Subject_To_Ghost): Removed.
7397 (Set_Is_Ghost_Entity):
7398 Removed.
7399 (Within_Ghost_Scope): Removed.
7400 * sem_util.adb (Check_Ghost_Completion): Removed.
7401 (Check_Ghost_Derivation): Removed.
7402 (Is_Declaration): New routine.
7403 (Is_Ghost_Entity): Removed.
7404 (Is_Ghost_Statement_Or_Pragma): Removed.
7405 (Is_Subject_To_Ghost): Removed.
7406 (Set_Is_Ghost_Entity): Removed.
7407 (Within_Ghost_Scope): Removed.
7408 * sinfo.ads Add a section on Ghost mode.
7409 * treepr.adb (Print_Header_Flag): New routine.
7410 (Print_Node_Header): Factor out code. Output flag
7411 Is_Ignored_Ghost_Node.
7412 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
7413
7414 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
7415
7416 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
7417 true test and unreachable 'else' arm.
7418
7419 2015-01-06 Vincent Celier <celier@adacore.com>
7420
7421 * prj-conf.adb (Check_Target): Improve error message when
7422 there are mismatched targets between the on in the configuration
7423 project file and the specified one, either in the main project
7424 file or in the --target= switch.
7425
7426 2015-01-06 Pascal Obry <obry@adacore.com>
7427
7428 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
7429 Install_Name attribute definitions.
7430
7431 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7432
7433 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
7434 generated Import pragma for the internal imported procedure does
7435 not come from an aspect, so that Is_Imported can be properly
7436 set for it.
7437
7438 2015-01-06 Gary Dismukes <dismukes@adacore.com>
7439
7440 * sem_ch12.adb (Might_Inline_Subp): Record whether
7441 any subprograms in the generic package are marked with
7442 pragma Inline_Always (setting flag Has_Inline_Always).
7443 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
7444 alongside existing test of Front_End_Inlining as alternative
7445 conditions for setting Inline_Now. Also add test of
7446 Has_Inline_Always along with Front_End_Inlining test as an
7447 alternative condition for setting Needs_Body to False.
7448
7449 2015-01-06 Tristan Gingold <gingold@adacore.com>
7450
7451 * i-cpoint.adb (Copy_Array): Handle overlap.
7452
7453 2015-01-06 Pascal Obry <obry@adacore.com>
7454
7455 * bindgen.adb: Minor style fix.
7456
7457 2015-01-06 Robert Dewar <dewar@adacore.com>
7458
7459 * sem_util.ads, sem_util.adb: Minor reformatting.
7460
7461 2015-01-06 Vincent Celier <celier@adacore.com>
7462
7463 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
7464 with flags before parsing the projects.
7465 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
7466 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
7467 to True in the flags, when Ignore_Missing_With is True and an
7468 imported project cannot be found.
7469 * prj-proc.adb (Expression): When there are incomplete withs and
7470 a variable or attribute is not found, set the variable/attribute
7471 to unknown.
7472 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
7473 defaulted to False.
7474
7475 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
7476
7477 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
7478 prj-err.adb: Add new switch --no-command-line.
7479
7480 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7481
7482 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
7483
7484 2015-01-06 Robert Dewar <dewar@adacore.com>
7485
7486 * sem_ch11.adb: Minor reformatting.
7487
7488 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7489
7490 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
7491 Build_Array_Aggr_Code, used to initialized components covered
7492 by a box association. If the component type is scalar and has
7493 a default aspect, use it to initialize such components.
7494
7495 2015-01-06 Pascal Obry <obry@adacore.com>
7496
7497 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
7498 control the setup of the exception handler.
7499 * initialize.c: Remove unused declaration.
7500 * bindgen.adb: Always call __gnat_runtime_initialize and pass
7501 whether the exeception handler must be set or not.
7502
7503 2015-01-06 Thomas Quinot <quinot@adacore.com>
7504
7505 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
7506 order to native from default, make sure to also adjust bit order.
7507 * exp_aggr.adb: Minor reformatting.
7508
7509 2015-01-06 Robert Dewar <dewar@adacore.com>
7510
7511 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
7512 s-valrea.adb, s-valrea.ads: Add some additional guards for
7513 Str'Last = Positive'Last.
7514
7515 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7516
7517 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
7518 subprograms.
7519
7520 2015-01-06 Javier Miranda <miranda@adacore.com>
7521
7522 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
7523
7524 2015-01-06 Thomas Quinot <quinot@adacore.com>
7525
7526 * sem_util.ads: Minor reformatting.
7527 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
7528 (In_RCI_Declaration) Return to old name, as proper checking of
7529 entity being in the visible part depends on entity kind and must
7530 be done by the caller.
7531
7532 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7533
7534 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
7535 for operators in SPARK.
7536
7537 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7538
7539 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
7540 expression in an others association before making copies for
7541 separate resolution and accessibility checks. This ensures that
7542 the type of the expression is available to ASIS in all cases,
7543 in particular if the expression is itself an aggregate.
7544
7545 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
7546
7547 * einfo.ads (Has_Independent_Components): Document extended
7548 usage.
7549 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
7550 (Set_Has_Independent_Components): Adjust assertion.
7551 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
7552 for pragma Atomic_Components. Set Has_Independent_Components
7553 on the object instead of the type for an object declaration with
7554 pragma Independent_Components.
7555
7556 2015-01-06 Olivier Hainque <hainque@adacore.com>
7557
7558 * set_targ.adb (Read_Target_Dependent_Values): Set
7559 Long_Double_Index when "long double" is read.
7560 (elaboration code): Register_Back_End_Types only when not reading from
7561 config files. Doing otherwise is pointless and error prone.
7562
7563 2015-01-06 Robert Dewar <dewar@adacore.com>
7564
7565 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
7566
7567 2015-01-06 Robert Dewar <dewar@adacore.com>
7568
7569 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
7570 Str'Last = Positive'Last.
7571
7572 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7573
7574 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
7575 where the non-limited type is a generic actual and appears as
7576 a subtype of the non-limited view of the other.
7577 * freeze.adb (Build_Renamed_Body): If the return type of the
7578 declaration that is being completed is a limited view and the
7579 non-limited view is available, use it in the specification of
7580 the generated body.
7581
7582 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7583
7584 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
7585 incomplete view, the type of the classwide type common to both
7586 views is the type being declared.
7587
7588 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
7589
7590 * einfo.ads (Is_Independent): Further document extended usage.
7591
7592 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
7593
7594 * einfo.ads (Is_Independent): Document extended usage.
7595 * einfo.adb (Is_Independent): Remove obsolete assertion.
7596 (Set_Is_Independent): Likewise.
7597 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
7598 (Process_Atomic_Independent_Shared_Volatile): ...this.
7599 Deal with pragma Independent here.
7600 (Analyze_Pragma): Adjust
7601 to above renaming and also invoke it for pragma Independent.
7602 Adjust comment for Independent_Components.
7603
7604 2015-01-06 Robert Dewar <dewar@adacore.com>
7605
7606 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
7607 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
7608
7609 2015-01-06 Robert Dewar <dewar@adacore.com>
7610
7611 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
7612 = Positive'Last.
7613 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
7614 Str'Last = Positive'Last.
7615
7616 2015-01-06 Robert Dewar <dewar@adacore.com>
7617
7618 * sem_prag.adb (Process_Inline): Remove redundant construct
7619 warning (-gnatw.r) for an ineffective pragma Inline.
7620
7621 2015-01-06 Robert Dewar <dewar@adacore.com>
7622
7623 * s-valint.adb: Fix typo in last checkin.
7624 * s-valuns.adb (Value_Unsigned): More efficient fix for
7625 Positive'Last case.
7626 * sem_attr.adb (Analyze_Attribute): Minor reformatting
7627 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
7628
7629 2015-01-06 Robert Dewar <dewar@adacore.com>
7630
7631 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
7632 Str'Last = Positive'Last
7633
7634 2015-01-06 Thomas Quinot <quinot@adacore.com>
7635
7636 * xoscons.adb: Display exception information and return non-zero
7637 exit status in top level exception handler.
7638
7639 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7640
7641 * sem_ch8.adb: Code clean up.
7642
7643 2015-01-06 Tristan Gingold <gingold@adacore.com>
7644
7645 * targparm.ads: Remove obsolete comment.
7646
7647 2015-01-06 Olivier Hainque <hainque@adacore.com>
7648
7649 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
7650 constructing a ref to variable, update inner_const_flag from the
7651 variable TREE_READONLY attribute.
7652 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
7653 definition.
7654 (get_target_float_size): Remove.
7655 (get_target_double_size): Remove.
7656 (get_target_long_double_size): Remove.
7657
7658 2015-01-06 Pascal Obry <obry@adacore.com>
7659
7660 * adaint.c (ProcListEvt): Set to NULL.
7661 * rtinit.c: New file.
7662 (__gnat_rt_init_count): New reference counter set to 0.
7663 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
7664 this code is actually needed for the runtime initialization. This
7665 routine returns immediately if the initialization has already been done.
7666 * final.c: Revert previous change.
7667 * rtfinal.c: New file.
7668 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
7669 section and event. The default version of this routine is empty (except
7670 for the reference counting code). This routine returns immediately if
7671 some others libraries are referencing the runtime.
7672 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
7673 remove circuitry to initialize the signal handler as this is
7674 now done by the runtime initialization routine.
7675 (Gen_Adafinal): Generate call to Runtime_Finalize.
7676 * gnat_ugn.texi: Update documentation about concurrency and
7677 initialization/finalization of the run-time.
7678 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
7679 references to rtfinal.o and rtinit.o
7680
7681 2015-01-06 Robert Dewar <dewar@adacore.com>
7682
7683 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
7684 for Enum_Image.
7685 * sem_attr.adb: Implement Enum_Image attribute.
7686 * snames.ads-tmpl: Add entries for Enum_Image attribute.
7687
7688 2015-01-06 Robert Dewar <dewar@adacore.com>
7689
7690 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
7691 * restrict.ads (No_Use_Of_Entity): New table.
7692 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
7693 Ignore No_Use_Of_Entity (will be processed in parser).
7694 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
7695
7696 2015-01-06 Vincent Celier <celier@adacore.com>
7697
7698 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
7699 to check for an extended project, if a project does not have
7700 yet a project declaration.
7701
7702 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
7703
7704 * scos.ads: Update documentation about the SCO table build
7705 process and about table records format.
7706 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
7707 (SCO_Record_Filtered): New procedure.
7708 (Set_SCO_Logical_Operator): New procedure.
7709 (dsco): Update documentation.
7710 * par_sco.adb: Update library-level comments.
7711 (SCO_Generation_State_Type): New type.
7712 (SCO_Generation_State): New variable.
7713 (SCO_Raw_Table): New package instanciation.
7714 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
7715 ("<"): New.
7716 (Tristate): New type.
7717 (Is_Logical_Operator): Return Tristate and update documentation.
7718 (Has_Decision): Update call to Is_Logical_Operator and complete
7719 documentation.
7720 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
7721 comment, add an assertion for state checking and change
7722 references to SCO_Table into SCO_Raw_Table.
7723 (dsco): Refactor to dump the raw and the filtered tables.
7724 (Process_Decisions.Output_Decision_Operand): Handle putative
7725 short-circuit operators.
7726 (Process_Decisions.Output_Element): Update references
7727 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
7728 (Process_Decisions.Process_Decision_Operand): Update call
7729 to Is_Logical_Operator.
7730 (Process_Decisions.Process_Node): Handle putative short-circuit
7731 operators and change references to
7732 SCO_Table into SCO_Raw_Table.
7733 (SCO_Output): Add an assertion
7734 for state checking and remove code that used to stamp out SCO entries.
7735 (SCO_Pragma_Disabled): Change reference to SCO_Table
7736 into SCO_Raw_Table.
7737 (SCO_Record): Rename to SCO_Record_Raw,
7738 add an assertion for state checking and change references
7739 to SCO_Table into SCO_Raw_Table.
7740 (Set_SCO_Condition): Add an assertion for state checking, update
7741 references to Condition_Pragma_Hash_Table and change references to
7742 SCO_Table into SCO_Raw_Table.
7743 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
7744 change references to SCO_Table into SCO_Raw_Table.
7745 (Set_SCO_Logical_Operator): New procedure.
7746 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
7747 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
7748 (SCO_Record_Fildered): New procedure.
7749 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
7750 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
7751 output SCOs.
7752 * par-load.adb (Load): Update reference to SCO_Record.
7753 * par.adb (Par): Update reference to SCO_Record.
7754 * put_scos.adb (Put_SCOs): Add an assertion to check that no
7755 putative SCO condition reaches this end.
7756 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
7757 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
7758 when corresponding to an "and"/"or" operator affected by the
7759 Short_Circuit_And_Or pragma.
7760
7761 2015-01-06 Robert Dewar <dewar@adacore.com>
7762
7763 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
7764 msg for attempted USE of generic subprogram or subprogram.
7765
7766 2015-01-06 Robert Dewar <dewar@adacore.com>
7767
7768 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
7769 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
7770 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
7771
7772 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7773
7774 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
7775 that specify stream subprograms, if the prefix is a class-wide
7776 type then the generated attribute definition clause must apply
7777 to the same class-wide type.
7778 (Default_Iterator): An iterator defined by an aspect of some
7779 container type T must have a first parameter of type T, T'class,
7780 or an access to such (from code reading RM 5.5.1 (2/3)).
7781
7782 2015-01-06 Arnaud Charlet <charlet@adacore.com>
7783
7784 * gnat1drv.adb: Minor: complete previous change.
7785
7786 2015-01-06 Olivier Hainque <hainque@adacore.com>
7787
7788 * set_targ.ads (C_Type_For): New function. Return the name of
7789 a C type supported by the back-end and suitable as a basis to
7790 construct the standard Ada floating point type identified by
7791 the T parameter. This is used as a common ground to feed both
7792 ttypes values and the GNAT tree nodes for the standard floating
7793 point types.
7794 * set_targ.adb (Long_Double_Index): The index at which "long
7795 double" gets registered in the FPT_Mode_Table. This is useful to
7796 know whether we have a "long double" available at all and get at
7797 it's characteristics without having to search the FPT_Mode_Table
7798 when we need to decide which C type should be used as the
7799 basis for Long_Long_Float in Ada.
7800 (Register_Float_Type): Fill Long_Double_Index.
7801 (FPT_Mode_Index_For): New function. Return the index in
7802 FPT_Mode_Table that designates the entry corresponding to the
7803 provided C type name.
7804 (FPT_Mode_Index_For): New function. Return the index in
7805 FPT_Mode_Table that designates the entry for a back-end type
7806 suitable as a basis to construct the standard Ada floating point
7807 type identified by the input T parameter.
7808 (elaboration code): Register_Back_End_Types unconditionally,
7809 so C_Type_For can operate regardless of -gnateT. Do it
7810 early so we can query it for the floating point sizes, via
7811 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
7812 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
7813 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
7814 which C type should be used as the basis for the construction
7815 of the Standard Ada floating point types.
7816 * get_targ.ads (Get_Float_Size, Get_Double_Size,
7817 Get_Long_Double_Size): Remove.
7818 * get_targ.adb: Likewise.
7819
7820 2015-01-06 Thomas Quinot <quinot@adacore.com>
7821
7822 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
7823 parameter and rename to...
7824 (In_RCI_Visible_Declarations): Fix handling of private part of nested
7825 package.
7826 (Validate_RCI_Subprogram_Declaration): Reject illegal function
7827 returning anonymous access in RCI unit.
7828
7829 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7830
7831 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
7832 function wrapper may be a homonym of another local declaration.
7833 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
7834 build function and operator wrappers after the actual subprogram
7835 has been resolved, and replace the standard renaming declaration
7836 with the declaration of wrapper.
7837 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
7838 make public for use elsewhere.
7839 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
7840 rewrite, now that actual is fully resolved when wrapper is
7841 constructed.
7842
7843 2015-01-06 Javier Miranda <miranda@adacore.com>
7844
7845 * exp_disp.adb: Revert previous change.
7846
7847 2015-01-06 Robert Dewar <dewar@adacore.com>
7848
7849 * exp_util.adb: Change name Name_Table_Boolean to
7850 Name_Table_Boolean1.
7851 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
7852 Introduce Name_Table_Boolean2/3.
7853 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
7854 Introduce Name_Table_Boolean2/3.
7855 * par-ch13.adb: Change name Name_Table_Boolean to
7856 Name_Table_Boolean1.
7857
7858 2015-01-06 Bob Duff <duff@adacore.com>
7859
7860 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
7861
7862 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7863
7864 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
7865 others choice that covers multiple components, analyze each
7866 copy with the type of the component even in compile-only mode,
7867 to detect potential accessibility errors.
7868
7869 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
7870
7871 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
7872 (Resolve_Actuals): An effectively volatile out
7873 parameter cannot act as an in or in out actual in a call.
7874 (Resolve_Entity_Name): An effectively volatile out parameter
7875 cannot be read.
7876
7877 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7878
7879 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
7880 the expansion of an expression function it may be pre-analyzed
7881 if a 'access attribute is applied to the function, in which case
7882 last_entity may have been assigned already.
7883
7884 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7885
7886 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
7887 type and actual has the corresponding full view, there is no
7888 error, but a case of use of incomplete type in a predicate or
7889 invariant expression.
7890
7891 2015-01-06 Vincent Celier <celier@adacore.com>
7892
7893 * makeutl.adb (Insert_No_Roots): Make sure that the same source
7894 in two different project tree is checked in both trees, if they
7895 are sources of two different projects, extended or not.
7896
7897 2015-01-06 Arnaud Charlet <charlet@adacore.com>
7898
7899 * gnat1drv.adb: Minor code clean up.
7900 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
7901
7902 2015-01-06 Bob Duff <duff@adacore.com>
7903
7904 * osint.adb (Read_Source_File): Don't print out
7905 file name unless T = Source.
7906
7907 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7908
7909 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
7910 recognize improper uses of constant_reference types as actuals
7911 for in-out parameters.
7912 (Check_Function_Call): Do not collect identifiers if function
7913 name is missing because of previous error.
7914
7915 2015-01-06 Robert Dewar <dewar@adacore.com>
7916
7917 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
7918 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
7919 Minor change of name Name_Table_Info => Name_Table_Int.
7920
7921 2015-01-06 Robert Dewar <dewar@adacore.com>
7922
7923 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
7924 in previous checkin.
7925 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
7926 of bounds.
7927 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
7928
7929 2015-01-06 Vincent Celier <celier@adacore.com>
7930
7931 * a-strsup.adb (Times (Natural;String;Positive)): Raise
7932 Length_Error, not Index_Error, when the result is too long.
7933
7934 2015-01-06 Thomas Quinot <quinot@adacore.com>
7935
7936 * a-direct.adb (Create_Path): Minor error handling and
7937 performance improvement.
7938
7939 2015-01-06 Robert Dewar <dewar@adacore.com>
7940
7941 * checks.ads, sem_ch12.adb: Minor reformatting.
7942 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
7943 zero check for fixed-point case if Backend_Divide_Checks_On_Target
7944 is False.
7945
7946 2015-01-06 Robert Dewar <dewar@adacore.com>
7947
7948 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
7949 Do not set restriction No_Elaboration_Code unless the pragma
7950 appears in the main unit).
7951
7952 2015-01-06 Ed Schonberg <schonberg@adacore.com>
7953
7954 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
7955 that with clause has already been analyzed before checking kind
7956 of with_clause.
7957
7958 2015-01-06 Robert Dewar <dewar@adacore.com>
7959
7960 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
7961 (as required by RM).
7962
7963 2015-01-06 Arnaud Charlet <charlet@adacore.com>
7964
7965 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
7966
7967 2015-01-06 Robert Dewar <dewar@adacore.com>
7968
7969 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
7970 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
7971
7972 2015-01-06 Javier Miranda <miranda@adacore.com>
7973
7974 * exp_disp.adb (Expand_Interface_Conversion): No displacement
7975 of the pointer to the object needed when the type of the operand
7976 is not an interface type and the interface is one of its parent
7977 types (since they share the primary dispatch table).
7978
7979 2015-01-06 Vincent Celier <celier@adacore.com>
7980
7981 * prj-env.adb: Minor comment update.
7982
7983 2015-01-06 Javier Miranda <miranda@adacore.com>
7984
7985 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
7986 access types whose target type is an interface type to operands
7987 that are access types; required to report an error when the
7988 operand is not an access type.
7989
7990 2015-01-06 Bob Duff <duff@adacore.com>
7991
7992 * a-cfinve.adb (Copy): Set the discriminant to the Length when
7993 Capacity = 0.
7994 * a-cofove.ads (Capacity): Add a postcondition.
7995 * a-cfinve.ads (Capacity): Add a postcondition.
7996 (Reserve_Capacity): Correct the postcondition in the case where
7997 Capacity = 0; that means "Capacity => Length (Container)".
7998 * a-cofove.adb (Elems[c]): Add a comment
7999 explaining the dangers and how to avoid them.
8000
8001 2015-01-06 Ed Schonberg <schonberg@adacore.com>
8002
8003 * sem_ch12.adb: Code clean up.
8004
8005 2015-01-06 Arnaud Charlet <charlet@adacore.com>
8006
8007 * gnatvsn.ads: Bump copyright year.
8008
8009 2015-01-06 Robert Dewar <dewar@adacore.com>
8010
8011 * s-taskin.ads, s-traces.ads: Minor reformatting.
8012 * exp_util.adb: Minor typo fix.
8013
8014 2015-01-06 Vincent Celier <celier@adacore.com>
8015
8016 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
8017 with the runtime name.
8018 * prj-env.adb (Initialize_Default_Project_Path): When both
8019 Target_Name and Runtime_Name are not empty string, add to the
8020 project path the two directories .../lib/gnat and .../share/gpr
8021 related to the runtime.
8022 * prj-env.ads (Initialize_Default_Project_Path): New String
8023 parameter Runtime_Name, defaulted to the empty string.
8024
8025 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8026
8027 * frontend.adb: Guard against the case where a configuration
8028 pragma may be split into multiple pragmas and the original
8029 rewritten as a null statement.
8030 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
8031 pragma using Insert_Before rather than Insert_Action. This
8032 takes care of the configuration pragma case where Insert_Action
8033 would fail.
8034
8035 2015-01-06 Bob Duff <duff@adacore.com>
8036
8037 * a-coboho.ads (Element_Access): Add "pragma
8038 No_Strict_Aliasing (Element_Access);". This is needed because
8039 we are unchecked-converting from Address to Element_Access.
8040 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
8041 result to be 1.
8042
8043 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
8044
8045 * sem_res.adb (Resolve_Actuals): Remove the
8046 restriction which prohibits volatile actual parameters with
8047 enabled external propery Async_Writers to act appear in procedure
8048 calls where the corresponding formal is of mode OUT.
8049
8050 2015-01-05 Jakub Jelinek <jakub@redhat.com>
8051
8052 * gnat_ugn.texi: Bump @copying's copyright year.
8053
8054 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
8055
8056 PR ada/64492
8057 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
8058
8059 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
8060
8061 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
8062 of unchecked asprintf.
8063
8064 \f
8065 Copyright (C) 2015 Free Software Foundation, Inc.
8066
8067 Copying and distribution of this file, with or without modification,
8068 are permitted in any medium without royalty provided the copyright
8069 notice and this notice are preserved.