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