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