1 2015-05-22 Robert Dewar <dewar@adacore.com>
3 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
4 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
6 * exp_util.adb: Add comment.
7 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
9 (Set_File_Name): New name for the above.
10 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
11 Close_C_File, Close_H_File): New procedure.
12 * osint.adb: Minor reformatting.
13 * osint.ads: Minor comment updates.
15 2015-05-22 Robert Dewar <dewar@adacore.com>
17 * exp_ch4.adb: Minor rewording.
18 * exp_util.ads: Clarify that Find_Prim_Op is only for
21 2015-05-22 Robert Dewar <dewar@adacore.com>
23 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
25 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
28 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
30 * exp_pakd.adb (Install_PAT): Propagate representation aspects
31 from the original array type to the PAT.
33 2015-05-22 Robert Dewar <dewar@adacore.com>
35 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
37 2015-05-22 Robert Dewar <dewar@adacore.com>
39 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
41 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
43 * sem_prag.adb (Analyze_Pragma): Remove the detection
44 of a useless Part_Of indicator when the related item is a constant.
45 (Check_Matching_Constituent): Do not emit an error on a constant.
46 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
47 when the related item is a constant.
48 (Collect_Body_States): Code cleanup.
49 (Collect_Visible_States): Code cleanup.
50 (Report_Unused_States): Do not emit an error on a constant.
51 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
53 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
55 * sem_ch8.adb (Analyze_Object_Renaming): Copy
56 Has_Volatile_Full_Access from renamed to renaming entities.
57 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
58 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
60 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
62 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
64 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
65 * sem_ch3.adb (Analyze_Object_Declaration): Update references
66 to SPARK RM 6.9 rules.
67 (Check_Completion): Ghost entities do not require a special form of
69 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
70 to SPARK RM 6.9 rules.
71 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
73 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
74 to SPARK RM 6.9 rules.
75 (Requires_Completion_In_Body): Ghost entities do not require a special
78 2015-05-22 Robert Dewar <dewar@adacore.com>
80 * a-csquin.ads: Use Ada 2012 notation.
81 * sem_ch8.adb: Minor reformatting.
83 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
85 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
88 2015-05-22 Ed Schonberg <schonberg@adacore.com>
90 * sem_ch13.adb: Minor reformatting.
92 2015-05-22 Jose Ruiz <ruiz@adacore.com>
94 * a-reatim.adb: Minor change, fix typo.
96 2015-05-22 Robert Dewar <dewar@adacore.com>
98 * sem_util.ads: Minor addition of ??? comment.
99 * sem_prag.adb, sem_util.adb: Minor reformatting.
100 * sem_ch13.adb: minor reformatting.
102 2015-05-22 Robert Dewar <dewar@adacore.com>
104 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
106 * sem_ch13.adb: Improve error message.
107 * exp_ch4.adb: Minor reformatting.
109 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
111 * sem_prag.adb (Analyze_Pragma): Constants without variable
112 input do not require indicator Part_Of.
113 (Check_Missing_Part_Of): Constants without variable input do not
114 requrie indicator Part_Of.
115 (Collect_Visible_States): Constants without variable input are
116 not part of the hidden state of a package.
117 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
119 2015-05-22 Robert Dewar <dewar@adacore.com>
121 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
122 Atomic_Sync_Required for an object renaming declaration.
123 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
124 Is_Independent to renaming object.
126 2015-05-22 Ed Schonberg <schonberg@adacore.com>
128 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
129 various illegalities in iterators over arrays and containers:
130 a) New function Get_Cursor_Type, to verify that the cursor is
131 not a limited type at the point of iteration.
132 b) If the container is a constant, an element_iterator is illegal
133 if the container type does not have a Constant_Indexing aspect.
134 c) If the iterate function has an in-out controlling parameter,
135 the container cannot be a constant object.
136 d) Reject additional cases of iterators over a
137 discriminant-dependent component of a mutable object.
139 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
141 * einfo.adb (Contract): This attribute now applies to constants.
142 (Set_Contract): This attribute now applies to constants.
143 (Write_Field34_Name): Add output for constants.
144 * einfo.ads Attribute Contract now applies to constants.
145 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
146 their Part_Of indicator verified.
147 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
149 (Analyze_Global_Item): A constant cannot act as an output.
150 (Analyze_Initialization_Item): Constants are now a valid
152 (Analyze_Initializes_In_Decl_Part): Rename
153 global variable States_And_Vars to States_And_Objs and update
155 (Analyze_Input_Item): Constants are now a
156 valid initialization item. Remove SPARM RM references from error
158 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
159 (Collect_Body_States): Collect both source constants
161 (Collect_States_And_Objects): Collect both source constants and
163 (Collect_States_And_Variables): Rename
164 to Collect_States_And_Objects and update all its occurrences.
165 (Collect_Visible_States): Do not collect constants and variables
166 used to map generic formals to actuals.
167 (Find_Role): The role of a constant is that of an input. Separate the
168 role of a variable from that of a constant.
169 (Report_Unused_Constituents): Add specialized wording for constants.
170 (Report_Unused_States): Add specialized wording for constants.
171 * sem_util.adb (Add_Contract_Item): Add processing for constants.
172 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
173 (Find_Placement_In_State_Space): Update the comment on usage.
175 2015-05-21 Ed Schonberg <schonberg@adacore.com>
177 * sem_ch5.adb: minor reformatting.
179 2015-05-21 Robert Dewar <dewar@adacore.com>
181 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
183 2015-05-21 Robert Dewar <dewar@adacore.com>
185 * freeze.adb: Minor reformatting.
186 * cstand.adb (Print_Standard): Fix bad printing of Duration
188 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
191 2015-05-21 Ed Schonberg <schonberg@adacore.com>
193 * sem_ch5.adb: add (useless) initial value.
194 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
195 Check whether the procedure has parameters before processing
196 formals in ASIS mode.
198 2015-05-21 Ed Schonberg <schonberg@adacore.com>
200 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
201 aspect as well when indexing function is illegal.
202 (Valid_Default_Iterator): Handle properly somme illegal cases
203 to prevent compilation abandoned messages.
204 (Check_Primitive_Function): Verify that type and indexing function
205 are in the same scope.
206 * freeze.adb (Freeze_Record): Extend patch on the presence of
207 indexing aspects to aspect Default_Iterator.
209 2015-05-19 David Malcolm <dmalcolm@redhat.com>
211 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
212 from line_map * to line_map_ordinary *.
214 2015-05-12 Jason Merrill <jason@redhat.com>
216 * sigtramp-vxworks.c: Add space between string literal and macro
219 2015-05-12 Arnaud Charlet <charlet@adacore.com>
221 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
223 2015-05-12 Ed Schonberg <schonberg@adacore.com>
225 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
226 legality checks for array and container iterators:
227 a) The domain of iteration cannot be a component that depends
228 on discriminants of a mutable object. The check was recently
229 added for element iterators.
230 b) The cursor type cannot be a limited type at the point of the
231 iteration, because the cursor will be assigned to in the body
234 2015-05-12 Robert Dewar <dewar@adacore.com>
236 * freeze.adb (Freeze_Record_Type): Make sure that if we have
237 aspect Iterator_Element, then we have either Constant_Indexing
238 or Variable_Indexing.
240 2015-05-12 Ed Schonberg <schonberg@adacore.com>
242 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
243 and Reference_Control_Type to support element iterators over
245 * a-ciormu.ads, a-ciormu.adb: Ditto for
246 indefinite_ordered_multisets.
248 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
250 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
251 the evaluation of the EWA expression. Code cleanup.
252 (Process_Transient_Object): Code cleanup.
253 * exp_util.adb (Is_Aliased): Controlled transient objects found
254 within EWA nodes are not aliased.
255 (Is_Finalizable_Transient): Iterators are not finalizable transients.
257 2015-05-12 Robert Dewar <dewar@adacore.com>
259 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
260 Don't allow Atomic and Volatile_Full_Access for the same entity.
262 2015-05-12 Ed Schonberg <schonberg@adacore.com>
264 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
265 semantics and safety checks specified in AI12-0151.
267 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
269 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
270 for subunit in generic units.
272 2015-05-12 Robert Dewar <dewar@adacore.com>
274 * sem_elab.adb (Check_A_Call): Avoid checking internal call
277 2015-05-12 Ed Schonberg <schonberg@adacore.com>
279 * sem_ch6.adb (Process_Formals): An untagged incomplete type
280 is legal in the profile of a null procedure.
282 2015-05-12 Ed Schonberg <schonberg@adacore.com>
284 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
285 the checks on a derived formal whose parent type is a previous
286 formal that is not a derived type.
288 2015-05-12 Robert Dewar <dewar@adacore.com>
290 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
291 * einfo.adb (Has_Volatile_Full_Access): New flag.
292 (Has_Volatile_Full_Access): New flag.
293 * einfo.ads (Has_Volatile_Full_Access): New flag.
294 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
295 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
296 Implement new pragma.
297 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
299 2015-05-12 Robert Dewar <dewar@adacore.com>
301 * targparm.ads: Minor reformatting.
303 2015-05-12 Robert Dewar <dewar@adacore.com>
305 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
306 * a-reatim.ads: Minor reformatting.
308 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
310 * einfo.ads: Update the documentation of flags
311 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
313 2015-05-12 Robert Dewar <dewar@adacore.com>
315 * impunit.adb: Add entry for a-dhfina.ads
316 * a-dhfina.ads: New file.
318 2015-05-12 Ed Schonberg <schonberg@adacore.com>
320 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
321 type has convention Fortran, a multidimensional iterator varies
322 the first dimension fastest.
324 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
326 * einfo.adb: Node32 is now used as Encapsulating_State.
327 Node37 is now used as Associated_Entity.
328 (Associated_Entity): New routine.
329 (Encapsulating_State): Update the assertion guard to include constants.
330 (Set_Associated_Entity): New routine.
331 (Set_Encapsulating_State): Update the assertion guard to
333 (Write_Field10_Name): Remove the output for Encapsulating_State.
334 (Write_Field32_Name): Add output for Encapsulating_State.
335 (Write_Field37_Name): Add output for Associated_Entity.
336 * einfo.ads New attribute Associated_Entity along with placement
337 in entities. Attribute Encapsulating_State now uses Node32.
338 (Associated_Entity): New routine along with pragma Inline.
339 (Set_Associated_Entity): New routine along with pragma Inline.
340 * inline.ads Code reformatting.
341 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
342 attribute 'Result when the context is a generic instantiation.
343 (Analyze_Attribute_Old_Result): Pragmas Depends and
344 Refined_Depends are a valid context for attribute 'Result.
345 (Denote_Same_Function): Allow attribute 'Result to denote
347 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
348 (Analyze_Declarations): Capture global references within the
349 contracts of packages, subprograms and their respective bodies.
350 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
351 (Analyze_Completion_Contract): Removed.
352 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
353 creating the generic copy. Create a generic contract for the
354 template. Analyze the aspects of the generic body. Analyze the
355 contract of the generic body when it is a compilation unit and
356 capture global references.
357 (Analyze_Subprogram_Body_Contract): Code cleanup.
358 (Analyze_Subprogram_Contract): Do not save global references here.
359 (Save_Global_References_In_List): Removed.
360 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
361 (Analyze_Package_Body_Helper): Create a generic contract for
363 (Analyze_Package_Contract): Code cleanup.
364 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
365 (Analyze_Compilation_Unit): Capture global references in a
366 generic subprogram declaration that acts as a compilation unit.
367 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
368 the implementation of generic contracts. Alphabetize various
370 (Analyze_Generic_Package_Declaration):
371 Create a generic contract for the template.
372 (Analyze_Generic_Subprogram_Declaration): Create a generic
373 contract for the template.
374 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
376 (Copy_Generic_Node): Link defining entities of the generic template
377 with the corresponding defining entities of the generic copy. Update
378 the processing of pragmas.
379 (Instantiate_Contract): Removed.
380 (Instantiate_Subprogram_Contract): New routine.
381 (Requires_Delayed_Save): New routine.
382 (Save_Global_References): Rename formal parameter N to Templ. Various
384 (Save_Global_References_In_Aspects): Moved from the spec.
385 (Save_Global_References_In_Contract): New routine.
386 (Save_References_In_Aggregate): New routine.
387 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
388 (Save_References_In_Descendants): New routine.
389 (Save_References_In_Identifier): New routine.
390 (Save_References_In_Operator): New routine.
391 (Save_References_In_Pragma): New routine.
392 * sem_ch12.ads (Save_Global_References): Rename formal
393 parameter N to Templ. Update the comment on usage.
394 (Save_Global_References_In_Aspects): Moved to the body.
395 (Save_Global_References_In_Contract): New routine.
396 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
398 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
400 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
402 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
403 (Analyze_Depends_Global): New routine.
404 (Analyze_Depends_In_Decl_Part): Code cleanup.
405 (Analyze_Global_In_Decl_Part): Code cleanup.
406 (Analyze_Global_Item): Constants are now valid global items. Do
407 not perform state-related checks in an instance. Change the way
408 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
410 (Analyze_Initializes_In_Decl_Part): Code cleanup.
411 (Analyze_Input_Output): The analysis of attribute 'Result in
412 the context of pragmas Depends or Refined_Depends now reuses
413 the existing attribute analysis machinery. Constants and
414 generic parameters are now valid dependency items. Do not
415 perform state-related checks in an instance. Change the way
416 renamings are handled. (Analyze_Pragma): Add a "characteristics"
417 section for pragmas Abstract_State, Contract_Cases, Depends,
418 Extensions_Visible, Global, Initial_Condition, Initializes,
419 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
420 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
421 (Analyze_Pre_Post_Condition): Do not create a generic
423 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
424 (Analyze_Refined_Depends_Global_Post): New routine.
425 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
426 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
427 (Analyze_Refined_Pragma): Removed.
428 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
429 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
430 (Check_Dependency_Clause): Do not perform this check in an instance.
431 (Check_Function_Return): Add support for generic functions.
432 (Check_In_Out_States): Do not perform this check in an instance.
433 (Check_Input_States): Do not perform this check in an instance.
434 (Check_Mode_Restriction_In_Function): Add support for generic functions.
435 (Check_Output_States): Do not perform this check in an instance.
436 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
437 parameter Subp_Id to Spec_Id and update comment on usage.
438 (Check_Proof_In_States): Do not perform this check in an instance.
439 (Check_Refined_Global_Item): Add support for constants.
440 (Check_Refined_Global_List): Do not perform this check in an instance.
441 (Collect_Global_Items): Reimplemented.
442 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
443 (Create_Generic_Template): Removed.
444 (Find_Related_Package_Or_Body): Moved to spec.
445 (Find_Role): Add support for generic parameters and constants.
446 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
447 (Match_Item): Add support for constants.
448 (Preanalyze_Test_Case_Arg): Reimplemented.
449 (Report_Extra_Clauses): Do not perform this check in an instance.
450 (Report_Extra_Constituents): Do not perform this check in an instance.
451 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
452 the comment on usage.
453 (Find_Related_Package_Or_Body): Moved from body.
454 (Get_Argument): Moved from body.
455 * sem_util.adb Add with and use clauses for Sem_Ch12.
456 (Corresponding_Spec_Of): Add support for packages and package bodies.
457 (Create_Generic_Contract): New routine.
458 (Is_Contract_Annotation): Reimplemented.
459 (Is_Generic_Declaration_Or_Body): New routine.
460 (Is_Package_Contract_Annotation): New routine.
461 (Is_Subprogram_Contract_Annotation): New routine.
462 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
463 (Create_Generic_Contract): New routine.
464 (Is_Generic_Declaration_Or_Body): New routine.
465 (Is_Package_Contract_Annotation): New routine.
466 (Is_Subprogram_Contract_Annotation): New routine.
467 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
468 (Set_Is_Generic_Contract_Pragma): New routine.
469 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
470 with occurrences in nodes.
471 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
472 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
473 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
475 2015-05-12 Robert Dewar <dewar@adacore.com>
477 * a-taster.ads: Minor comment fix: fix bad header, this is a
480 2015-05-12 Robert Dewar <dewar@adacore.com>
482 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
484 2015-05-12 Robert Dewar <dewar@adacore.com>
486 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
487 Alignment_Checks on non-strict alignment machine.
488 * sem_ch13.adb (Validate_Address_Clauses): Don't give
489 compile-time alignment warnings if run time Alignment_Check
492 2015-05-12 Thomas Quinot <quinot@adacore.com>
494 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
495 Data_Rate): New literals B75, B110, B150, B300, B600.
497 2015-05-12 Doug Rupp <rupp@adacore.com>
499 * init.c (__gnat_init_float) [vxworks]: For e500v2,
500 do nothing and leave the responsibility to install the handler
501 and enable the exceptions to the BSP.
503 2015-05-12 Robert Dewar <dewar@adacore.com>
505 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
506 * sem_disp.adb: Minor code reorganization (remove junk redundant
508 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
509 references to bounds of types coming from original type reference.
510 * checks.ads: Minor reformatting.
511 * checks.adb: Minor reformatting.
512 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
513 assertion, then make sure we do not drag in bignum stuff.
515 2015-05-12 Ed Schonberg <schonberg@adacore.com>
517 * sem_ch9.adb (Collect_Interfaces): Initialize
518 Direct_Primitive_Operations for a tagged synchronized type,
519 so it can used in ASIS mode.
520 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
521 disabled, attach subprogram to list of Direct_Primitive_Operations
522 of synchronized type itself, for ASIS use, because in this case
523 Corresponding_Record_Type is not built.
524 * einfo.ads: Indicate use of Direct_Primitive_Operations on
527 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
529 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
532 2015-05-12 Robert Dewar <dewar@adacore.com>
534 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
536 2015-05-12 Robert Dewar <dewar@adacore.com>
538 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
540 2015-05-12 Ed Schonberg <schonberg@adacore.com>
542 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
543 tag to be retrieved for the generated call is the first entry
544 in the dispatch table for the return type of the instantiated
547 2015-05-12 Bob Duff <duff@adacore.com>
549 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
550 exp_util.ads: Update comments.
552 2015-05-12 Ed Schonberg <schonberg@adacore.com>
554 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
555 freeze nodes for these in ASIS mode, because they lead to
556 elaoration order issues in gigi.
558 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
560 * sem_ch6.adb (Analyze_Expression_Function): Code
561 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
562 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
563 prepare a stand alone body for inlining in GNATprove mode
564 when inside a generic. (Body_Has_Contract): Reimplemented.
565 (Build_Subprogram_Declaration): New routine.
566 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
567 references within generic bodies by loading them.
568 * sem_util.adb (Copy_Parameter_List): Code cleanup.
569 (Copy_Subprogram_Spec): New routine.
570 (Is_Contract_Annotation): New routine.
571 * sem_util.ads (Copy_Subprogram_Spec): New routine.
572 (Is_Contract_Annotation): New routine.
574 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
576 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
577 body of an expression function when the prefix of attribute
580 2015-05-12 Ed Schonberg <schonberg@adacore.com>
582 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
583 created for a derived enumeration type is not a first subtype,
584 even though it is defined through a full type declaration.
585 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
586 aspects for the anonymous base type constructed for a derived
587 scalar type, because they will be set when the first subtype
589 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
590 Default_Value and Default_Component_Value, that prevented the
591 proper inheritance of these aspects.
593 2015-05-12 Gary Dismukes <dismukes@adacore.com>
595 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
597 2015-05-12 Robert Dewar <dewar@adacore.com>
599 * sem_ch3.adb: Minor reformatting.
601 2015-05-12 Vincent Celier <celier@adacore.com>
603 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
604 -P, then check if gprbuild (gprclean) is available; if it is,
605 use gprbuild (gprclean) instead of gnatmake (gnatclean).
607 2015-05-12 Robert Dewar <dewar@adacore.com>
609 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
611 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
613 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
614 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
615 for later call instead of calling Unnest_Subprogram directly
616 (Initialize): New procedure (Unnest_Subprograms): New procedure
617 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
619 (Initialize): New procedure.
620 (Unnest_Subprograms): New procedure.
621 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
622 all processing to this routine which is now called late
623 after instantiating bodies. Fully handles the case of generic
625 * exp_unst.ads: Major rewrite, moving all processing to
627 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
628 (Frontend): Add call to Unnest_Subprograms.
629 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
630 for Check_Nested_Access.
631 * sem_util.adb (Build_Default_Subtype): Minor reformatting
632 (Check_Nested_Access): Back to original VM-only form (we
633 now do all the processing for Unnest_Subprogram at the time
635 (Denotes_Same_Object): Minor reformatting
636 (Note_Possible_Modification): Old calling sequence for
638 * sem_util.ads (Check_Nested_Access): Back to original VM-only
639 form (we now do all the processing for Unnest_Subprogram at the
642 2015-05-12 Robert Dewar <dewar@adacore.com>
644 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
646 2015-05-12 Ed Schonberg <schonberg@adacore.com>
648 * sem_ch3.adb (Analyze_Object_Declaration): New function
649 Has_Delayed_Aspect, used to defer resolution of an aggregate
650 expression when the object declaration carries aspects Address
652 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
653 to Freeze_Entity. In addition to the previous processing steps
654 at the freeze point of an object, this procedure also handles
655 aggregates in object declarations, when the declaration carries
656 delayed aspects that require that the initialization of the
657 object be attached to its freeze actions.
659 2015-05-12 Ed Schonberg <schonberg@adacore.com>
661 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
662 AI12-0147, null procedures and expression functions are allowed
665 2015-05-12 Tristan Gingold <gingold@adacore.com>
667 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
669 2015-05-12 Ed Schonberg <schonberg@adacore.com>
671 * sem_ch3.adb (Complete_Private_Subtype): Propagate
672 Has_Delayed_Aspects flag from private to full view, to ensure
673 that predicate functions are constructed.
675 2015-05-12 Ed Schonberg <schonberg@adacore.com>
677 * sem_ch6.adb (Process_Formals): If a tagged formal is an
678 incomplete class-wide type, the subprogram must have a delayed
679 freeze even though the opertation is not a primitive of the
680 type. THis ensures that the backend can recover the full view
681 when elaborating the subprogram declaration.
683 2015-05-12 Ed Schonberg <schonberg@adacore.com>
685 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
686 done if an elsif part has been rewritten so that it is not part
687 of an enclosing if_statement.
689 2015-05-12 Robert Dewar <dewar@adacore.com>
691 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
694 2015-05-12 Bob Duff <duff@adacore.com>
696 * exp_attr.adb (Size): Remove unnecessary check for types with
697 unknown discriminants. That was causing the compiler to build
698 a function call _size(T), where T is a type, not an object.
700 2015-05-12 Ed Schonberg <schonberg@adacore.com>
702 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
703 primitive operations of a type extension declared in the package
704 body, to prevent duplicates in extended list.
706 2015-05-12 Ed Schonberg <schonberg@adacore.com>
708 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
709 an unconstrained synchronized type with discriminants, create a
710 constrained default subtype for it, so that the enclosing record
711 can be given the proper size.
712 * sem_util.adb (Build_Default_Subtype): If the subtype is created
713 for a record discriminant, do not analyze the declarztion at
714 once because it is added to the freezing actions of the enclosing
717 2015-05-12 Robert Dewar <dewar@adacore.com>
719 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
721 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
722 * par-prag.adb (Prag): Implement Ignore_Pragma.
723 * sem_prag.adb: Implement Ignore_Pragma.
724 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
726 2015-05-12 Javier Miranda <miranda@adacore.com>
728 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
729 entity with its corresponding real entity.
730 (Decorate_Type): Unconditionally build the class-wide shadow entity of
732 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
734 (Non_Limited_View): Moved from field 17 to field 19 be available
735 in class-wide entities.
736 * exp_attr.adb (Access_Cases): Code cleanup.
737 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
738 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
739 * freeze.adb (Build_Renamed_Bdody): Ditto.
740 * sem_aux.adb (Available_View): Ditto.
741 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
742 (Try_One_Prefix_Interpretation): Ditto.
743 * sem_ch5.adb (Analyze_Assignment): Ditto.
744 * sem_ch6.adb (Detect_And_Exchange): Ditto.
745 * sem_ch8.adb (Find_Expanded_Name): Ditto.
746 * sem_disp.adb (Check_Controlling_Type): Ditto.
747 * sem_res.adb (Resolve_Type_Conversion): Ditto.
748 (Full_Designated_Type): Ditto.
749 * sem_type.adb (Covers): Ditto.
750 * sem_util.adb: Fix typo in comment.
752 2015-05-12 Robert Dewar <dewar@adacore.com>
754 * exp_unst.adb (Get_Real_Subp): New subprogram.
755 (Unnest_Subprogram): Use Get_Real_Subp.
756 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
757 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
759 2015-05-12 Robert Dewar <dewar@adacore.com>
761 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
763 2015-05-12 Ed Schonberg <schonberg@adacore.com>
765 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
766 auxiliary to Try_Primitive_Operation to handle properly prefixed
767 calls where the operation is not a primitive of the type, but
768 is declared in the package body that is in the immediate scope
771 2015-05-12 Robert Dewar <dewar@adacore.com>
773 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
775 2015-05-12 Ed Schonberg <schonberg@adacore.com>
777 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
778 qualified name for an instance of a generic grand-child unit in
781 2015-05-12 Robert Dewar <dewar@adacore.com>
783 * exp_unst.adb (Upref_Name): New subprogram.
784 (Unnest_Subprogram): Use Upref_Name.
785 (Unnest_Subprogram): Use new Deref attribute.
786 * exp_unst.ads: Doc updates.
788 2015-05-12 Thomas Quinot <quinot@adacore.com>
790 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
791 can access files on filesystems mounted from servers that use large
794 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
796 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
797 method instead of global_decl for TYPE_DECLs.
799 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
801 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
804 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
806 * gnatvsn.ads (Library_Version): Bump to 6.
808 2015-04-09 Iain Sandoe <iain@codesourcery.com>
810 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
812 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
814 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
815 a function returning an unconstrained type 'const' for the middle-end.
817 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
818 exact condition to detect Reason => "..." pattern.
820 2015-03-31 Tom de Vries <tom@codesourcery.com>
823 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
824 bzero call is the same expression as the destination'.
826 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
828 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
830 2015-03-24 Gary Dismukes <dismukes@adacore.com>
832 * sem_ch3.adb: Minor typo fix (missing paren).
834 2015-03-24 Robert Dewar <dewar@adacore.com>
836 * sinfo.ads: Update comment.
838 2015-03-24 Robert Dewar <dewar@adacore.com>
840 * exp_attr.adb: Add entry for typ'Deref.
841 * sem_attr.adb (Deref): New GNAT attribute.
842 * sem_attr.ads: Add entry for new GNAT attribute Deref.
843 * snames.ads-tmpl: Add entries for new attribute Deref.
845 2015-03-24 Ed Schonberg <schonberg@adacore.com>
847 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
850 2015-03-24 Gary Dismukes <dismukes@adacore.com>
852 * inline.adb: Minor typo fix.
854 2015-03-24 Arnaud Charlet <charlet@adacore.com>
856 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
857 doc/gnat_ugn/gnat_utility_programs.rst
858 doc/gnat_rm/implementation_defined_attributes.rst
859 doc/gnat_rm/implementation_defined_pragmas.rst
860 doc/gnat_rm/representation_clauses_and_pragmas.rst
861 doc/gnat_rm/about_this_guide.rst
862 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
863 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
865 2015-03-23 Jakub Jelinek <jakub@redhat.com>
868 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
870 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
873 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
874 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
876 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
878 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
880 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
881 of the expression ends up being composite.
883 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
885 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
886 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
887 parameter types to detect circularities in ASIS mode.
888 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
890 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
892 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
893 short-circuit the regular handling.
895 2015-03-13 Robert Dewar <dewar@adacore.com>
897 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
899 (Actual_Ref): New function.
900 (AREC_String): Minor reformatting.
901 (Unnest_Subprogram): Use Actual_Ref.
902 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
903 before call to Instantiate_Bodies.
905 2015-03-13 Ed Schonberg <schonberg@adacore.com>
907 * freeze.adb (Freeze_Profile): If the return type of a function
908 being frozen is an untagged limited view and the function is
909 abstract, mark the type as frozen because there is no later
910 point at which the profile of the subprogram will be elaborated.
912 2015-03-13 Robert Dewar <dewar@adacore.com>
914 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
915 component to entities. Add new fields Field36-41 and Node36-41.
917 2015-03-13 Claire Dross <dross@adacore.com>
919 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
921 2015-03-13 Robert Dewar <dewar@adacore.com>
923 * exp_util.adb (Is_Volatile_Reference): Compile time known
924 value is never considered to be a volatile reference.
926 2015-03-13 Robert Dewar <dewar@adacore.com>
928 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
929 cannot be volatile" for internally generated object (such as
930 FIRST and LAST constants).
932 2015-03-13 Ed Schonberg <schonberg@adacore.com>
934 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
935 convention is specified for the formal parameter, verify that
936 the actual has the same convention.
937 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
938 pragma to be set on a generic formal type.
939 * sem_util.adb (Set_Convention): Ignore within an instance,
940 as it has already been verified in the generic unit.
942 2015-03-13 Claire Dross <dross@adacore.com>
944 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
945 subprograms with unconstrained record parameters containing
947 * sinfo.ads Document GNATprove assumption that type should match
949 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
950 Do not check for Refined_Depends and Refined_Globals contracts
951 as they are optional.
953 2015-03-13 Ed Schonberg <schonberg@adacore.com>
955 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
956 capture dimension info if any, because the generated subtype
957 declaration does not come from source and will not process dimensions.
958 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
959 Do not analyze expressions with an initialization procedure
960 because aggregates will have been checked at the point of record
963 2015-03-13 Robert Dewar <dewar@adacore.com>
965 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
966 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
967 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
968 * snames.ads-tmpl: Add entry for Name_Unimplemented.
970 2015-03-13 Gary Dismukes <dismukes@adacore.com>
972 * style.adb (Missing_Overriding): Apply the
973 Comes_From_Source test to the Original_Node of the subprogram
974 node, to handle the case of a null procedure declaration that
975 has been rewritten as an empty procedure body.
977 2015-03-13 Robert Dewar <dewar@adacore.com>
979 * exp_util.ads: Minor fix to comment.
980 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
983 2015-03-13 Robert Dewar <dewar@adacore.com>
985 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
986 Is_Low/High_Bound params.
987 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
988 sequence to simplify generation of FIRST/LAST temps for bounds.
990 2015-03-12 Olivier Hainque <hainque@adacore.com>
992 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
993 On targets where a function symbol designates a function descriptor,
994 fetch the function code address from the descriptor.
995 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
997 2015-03-04 Robert Dewar <dewar@adacore.com>
999 * sem_warn.adb: Minor reformatting.
1000 * init.c: Minor tweaks.
1002 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
1004 * a-coinho-shared.adb: Fix clear of already empty holder.
1006 2015-03-04 Robert Dewar <dewar@adacore.com>
1008 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
1009 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
1010 (Note_Uplevel_Reference): Ignore call inside generic.
1011 (Note_Uplevel_Reference): Fix check for no entity field.
1012 (Unnest_Subprogram): Ignore call inside generic.
1013 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
1014 (Visit_Node): Ignore calls to Imported subprograms.
1015 (Visit_Node): Fix problem in finding subprogram body in some cases.
1016 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
1018 2015-03-04 Robert Dewar <dewar@adacore.com>
1020 * einfo.adb (Is_ARECnF_Entity): Removed.
1021 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
1022 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
1023 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
1024 (Number_Entries): Minor reformatting.
1025 * einfo.ads (Is_ARECnF_Entity): Removed.
1026 * exp_unst.adb (Unnest_Subprogram): Remove setting of
1028 (Add_Extra_Formal): Use normal Extra_Formal circuit.
1029 * sprint.adb (Write_Param_Specs): Properly handle case where
1030 there are no source formals, but we have at least one Extra_Formal
1033 2015-03-04 Ed Schonberg <schonberg@adacore.com>
1035 * sem_aggr.adb (Resolve_Record_Aggregate,
1036 Add_Discriminant_Values): If the value is a reference to the
1037 current instance of an enclosing type, use its base type to check
1038 against prefix of attribute reference, because the target type
1039 may be otherwise constrained.
1041 2015-03-04 Robert Dewar <dewar@adacore.com>
1043 * atree.h: Add entries for Flag287-Flag309.
1044 * einfo.adb: Add (unused) flags Flag287-Flag309.
1046 2015-03-04 Ed Schonberg <schonberg@adacore.com>
1048 * sem_util.adb (Collect_Interfaces, Collect): When gathering
1049 interfaces of ancestors, handle properly a subtype of a private
1052 2015-03-04 Robert Dewar <dewar@adacore.com>
1054 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
1055 (Next_Formal): Don't return ARECnF formal.
1056 (Last_Formal): Don't consider ARECnF formal.
1057 (Next_Formal_With_Extras): Do consider ARECnF formal.
1058 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
1059 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
1061 2015-03-04 Javier Miranda <miranda@adacore.com>
1063 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
1064 object is a class-wide interface object and we generate the
1065 accessibility described in RM 6.5(8/3) then displace the pointer
1066 to the object to reference the base of the object (to get access
1067 to the TSD of the object).
1069 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
1071 * sem_prag.adb (Analyze_Abstract_State): Use routine
1072 Malformed_State_Error to issue general errors.
1073 (Analyze_Pragma): Diagnose a syntax error related to a state
1074 declaration with a simple option.
1075 (Malformed_State_Error): New routine.
1077 2015-03-04 Robert Dewar <dewar@adacore.com>
1079 * a-strsup.adb (Super_Slice): Deal with super flat case.
1080 * einfo.ads: Minor reformatting.
1081 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
1084 2015-03-04 Claire Dross <dross@adacore.com>
1086 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1087 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
1090 2015-03-04 Ed Schonberg <schonberg@adacore.com>
1092 * sem_warn.adb (Check_References): When checking for an unused
1093 in-out parameter of a class- wide type, use its type to determine
1094 whether it is private, in order to avoid a spurious warning when
1095 subprogram spec and body are in different units.
1097 2015-03-04 Yannick Moy <moy@adacore.com>
1099 * sem_attr.adb: Improve warning messages.
1101 2015-03-04 Robert Dewar <dewar@adacore.com>
1103 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
1104 generic subprograms.
1105 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
1106 (Note_Uplevel_Reference): Ignore uplevel references to non-types
1107 (Get_Level): Consider only subprograms, not blocks.
1108 (Visit_Node): Set proper condition for generating ARECnF entity.
1109 Ignore indirect calls. Ignore calls to subprograms
1111 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
1112 (Add_Form_To_Spec): Properly set Last_Entity field.
1113 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
1114 Handle case of no uplevel refs in outer subprogram
1115 Don't mark uplevel entities as aliased.
1116 Don't deal with calls with no ARECnF requirement.
1118 2015-03-04 Robert Dewar <dewar@adacore.com>
1120 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
1121 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
1122 operation in computing LZ.
1123 * sem_attr.adb: Minor typo fix
1125 2015-03-04 Robert Dewar <dewar@adacore.com>
1127 * exp_ch7.adb: Minor reformatting.
1128 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
1130 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
1132 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
1134 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
1135 references to formal parameters subject to pragma Unreferenced.
1136 (Suppress_Reference): New routine.
1137 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
1138 of attribute 'Old. Attributes 'Old and 'Result now share
1140 (Analyze_Old_Result_Attribute): New routine.
1141 (Check_Placement_In_Check): Removed.
1142 (Check_Placement_In_Contract_Cases): Removed.
1143 (Check_Placement_In_Test_Case): Removed.
1144 (Check_Use_In_Contract_Cases): Removed.
1145 (Check_Use_In_Test_Case): Removed.
1146 (In_Refined_Post): Removed.
1147 (Is_Within): Removed.
1148 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
1149 (Check_Low_Bound_Tested_For): New routine.
1151 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
1153 * exp_ch3.adb (Expand_N_Object_Declaration):
1154 Generate a runtime check to test the expression of pragma
1155 Default_Initial_Condition when the object is default initialized.
1157 2015-03-02 Robert Dewar <dewar@adacore.com>
1159 * scng.adb (Scan): Ignore illegal character in relaxed
1162 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1164 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
1165 on left operand, so it can be properly resolved with type of
1166 alternatives of right operand.
1167 * sem_res.adb (Resolve_Set_Membership): Handle properly an
1168 overloaded left-hand side when the alternatives on the right
1169 hand side are literals of some universal type. Use first
1170 non-overloaded alternative to find expected type.
1172 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1174 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
1175 type to retrieve designated type, because the purported access
1176 type may be a partial (private) view, when it is declared in
1177 the private part of a nested package, and finalization actions
1178 are generated when completing compilation of enclosing unit.
1180 2015-03-02 Robert Dewar <dewar@adacore.com>
1182 * back_end.adb (Call_Back_End): Remove previous patch,
1183 the back end now gets to see the result of -gnatd.1
1184 (Unnest_Subprogram_Mode) processing.
1185 * elists.ads, elists.adb (List_Length): New function.
1186 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
1187 * sem_util.adb (Check_Nested_Access): Handle formals in
1188 Unnest_Subprogram_Mode.
1189 (Adjust_Named_Associations): Minor reformatting.
1190 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
1193 2015-03-02 Robert Dewar <dewar@adacore.com>
1195 * atree.ads, atree.adb (Uint24): New function
1196 (Set_Uint24): New procedure.
1197 * atree.h (Uint24): New macro for field access.
1198 * back_end.adb (Call_Back_End): For now, don't call back end
1199 if unnesting subprogs.
1200 * einfo.adb (Activation_Record_Component): New field
1201 (Subps_Index): New field.
1202 * einfo.ads (Activation_Record_Component): New field
1203 (Subps_Index): New field Minor reordering of comments into alpha order.
1204 * exp_unst.ads, exp_unst.adb: Continued development.
1206 2015-03-02 Gary Dismukes <dismukes@adacore.com>
1208 * exp_disp.ads: Minor reformatting.
1210 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1212 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
1213 ancestor to list of use clauses active in descendant unit if we
1214 are within the private part of an intervening parent, to prevent
1215 circularities in use clause list.
1217 2015-03-02 Javier Miranda <miranda@adacore.com>
1219 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
1220 invariants to the corresponding record type.
1221 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
1222 which sets the value of the DTC_Entity associated with a given
1223 primitive of a tagged type and propagates the value to the
1225 (Set_DTC_Entity_Value): Propagate the DTC
1226 value to the wrapped entity.
1227 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
1228 associated with invariants of progenitors.
1229 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
1230 of parents and progenitors.
1231 (Process_Full_View): Check hidden inheritance of class-wide type
1233 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
1234 the invariant procedure for interface types; build the invariant
1235 procedure for tagged types inheriting invariants from their
1237 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
1238 types but do not build their invariant procedure since their
1239 invariants will be propagated to the invariant procedure of
1240 types covering the interface.
1241 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
1242 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
1243 by calls to Set_DT_Position_Value.
1245 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
1247 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
1248 code in Denote_Same_Function. Do not analyze attribute 'Result
1249 when it is inside procedure _Postconditions. Remove a misplaced
1250 warning diagnostic. Code cleanup.
1251 (Denote_Same_Function): New routine.
1252 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
1253 cleanup. Warn on pre/postconditions on an inlined subprogram.
1254 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
1255 an inlined subprogram.
1256 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
1257 pre/post condition on an inlined subprogram.
1258 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
1259 pre/postconditions on an inlined subprogram.
1260 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
1262 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
1264 * sem_prag.adb (Ensure_Aggregate_Form):
1265 Ensure that the name denoted by the Chars of a pragma argument
1266 association has the proper Sloc when converted into an aggregate.
1268 2015-03-02 Bob Duff <duff@adacore.com>
1270 * sem_ch6.adb (Check_Private_Overriding): Capture
1271 Incomplete_Or_Partial_View in a constant. This is cleaner and
1274 2015-03-02 Gary Dismukes <dismukes@adacore.com>
1276 * einfo.ads, exp_unst.ads: Minor reformatting.
1278 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1280 * a-strsea.adb (Find_Token): Ensure that the range of iteration
1281 does not perform any improper character access. This prevents
1282 erroneous access in the unusual case of an empty string target
1283 and a From parameter less than Source'First.
1285 2015-03-02 Robert Dewar <dewar@adacore.com>
1287 * elists.adb (List_Length): Fix incorrect result.
1289 2015-03-02 Bob Duff <duff@adacore.com>
1291 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
1292 checks here. It used to check that the function is merely
1293 overriding SOMEthing. Now it checks that the function is
1294 overriding a corresponding public operation. This is a correction
1295 to the implementation of the rule in RM-3.9.3(10).
1297 2015-03-02 Robert Dewar <dewar@adacore.com>
1299 * debug.adb: Document new debug flag -gnatd.1.
1300 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
1301 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
1302 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
1303 * elists.ads elists.adb (List_Length): New function.
1304 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
1305 when appropriate (Process_Preconditions): Minor code
1306 reorganization and reformatting
1307 * exp_unst.ads, exp_unst.adb: New files.
1308 * gnat1drv.adb (Adjust_Global_Switches): Set
1309 Unnest_Subprogram_Mode if -gnatd.1
1310 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
1312 * opt.ads (Unnest_Subprogram_Mode): New flag.
1313 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
1314 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
1315 Has_Nested_Subprogram flag.
1316 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
1317 Check_Nested_Access.
1318 (Find_Selected_Component): Minor comment addition.
1319 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
1320 (Note_Possible_Modification): New calling sequence for
1321 Check_Nested_Access.
1322 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
1323 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
1325 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
1327 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
1328 types, preserve the original type and create copies just like the C
1329 front-end does. For artificial ones, do not define a name for
1331 (create_type_decl): When gnat_pushdecl made the input type the
1332 original type for the new declaration, do not define a stub
1334 * gcc-interface/utils2.c (build_binary_op): Accept two different
1335 pointer types when they point to the same type.
1337 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
1339 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
1341 * sem_util.adb (Kill_Current_Values): Do not invalidate and
1344 2015-03-02 Robert Dewar <dewar@adacore.com>
1346 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
1349 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1351 * sem_ch8.adb: extend use of Available_Subtype.
1353 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
1355 * sem_prag.adb (Duplication_Error): Remove the special handling
1356 of 'Class or _Class in the context of pre/postconditions.
1357 (Process_Class_Wide_Condition): Remove the special handling of
1358 'Class or _Class in the context of pre/postconditions.
1359 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
1360 and Post_Class no longer need to be converted to _Pre and _Post.
1361 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
1364 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
1366 * exp_ch6.adb (Process_Preconditions): Modify the
1367 mechanism that find the first source declaration to correct exit
1368 the loop once it has been found.
1370 2015-03-02 Gary Dismukes <dismukes@adacore.com>
1372 * a-strsea.adb: Minor typo fix.
1374 2015-03-02 Bob Duff <duff@adacore.com>
1376 * einfo.ads: Minor comment fixes.
1378 2015-03-02 Gary Dismukes <dismukes@adacore.com>
1380 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
1382 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1384 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
1385 is defined for the array type, use it instead of a Default_Value
1386 specified for the component type itself.
1388 2015-03-02 Thomas Quinot <quinot@adacore.com>
1390 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
1391 expanding a 'Input attribute reference for a class-wide type,
1392 do not generate a separate object declaration for the controlling
1393 tag dummy object; instead, generate the expression inline in the
1394 dispatching call. Otherwise, the declaration (which involves a
1395 call to String'Input, returning a dynamically sized value on the
1396 secondary stack) will be expanded outside of proper secondary
1397 stack mark/release operations, and will thus cause a secondary
1400 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
1402 * checks.adb (Add_Validity_Check): Change the names of all
1403 formal parameters to better illustrate their purpose. Update
1404 the subprogram documentation. Update all occurrences of the
1405 formal parameters. Generate a pre/postcondition pragma by
1406 calling Build_Pre_Post_Condition.
1407 (Build_PPC_Pragma): Removed.
1408 (Build_Pre_Post_Condition): New routine.
1409 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
1410 is now used as Postconditions_Proc. Flag240 is now renamed to
1411 Has_Expanded_Contract. (First_Formal): The routine can now
1412 operate on generic subprograms.
1413 (First_Formal_With_Extras): The routine can now operate on generic
1415 (Has_Expanded_Contract): New routine.
1416 (Has_Postconditions): Removed.
1417 (Postcondition_Proc): Removed.
1418 (Postconditions_Proc): New routine.
1419 (Set_Has_Expanded_Contract): New routine.
1420 (Set_Has_Postconditions): Removed.
1421 (Set_Postcondition_Proc): Removed.
1422 (Set_Postconditions_Proc): New routine.
1423 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
1424 the output of Has_Expanded_Contract.
1425 (Write_Field8_Name): Remove the output of Postcondition_Proc.
1426 (Write_Field14_Name): Add the output of Postconditions_Proc.
1427 * einfo.ads New attributes Has_Expanded_Contract and
1428 Postconditions_Proc along with occurrences in entities.
1429 Remove attributes Has_Postconditions and Postcondition_Proc
1430 along with occurrences in entities.
1431 (Has_Expanded_Contract): New routine along with pragma Inline.
1432 (Has_Postconditions): Removed along with pragma Inline.
1433 (Postcondition_Proc): Removed along with pragma Inline.
1434 (Postconditions_Proc): New routine along with pragma Inline.
1435 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
1436 (Set_Has_Postconditions): Removed along with pragma Inline.
1437 (Set_Postcondition_Proc): Removed along with pragma Inline.
1438 (Set_Postconditions_Proc): New routine along with pragma Inline.
1439 * exp_ch6.adb (Add_Return): Code cleanup. Update the
1440 generation of the call to the _Postconditions routine of
1441 the procedure. (Expand_Non_Function_Return): Reformat the
1442 comment on usage. Code cleanup. Update the generation of
1443 the call to the _Postconditions routine of the procedure or
1445 (Expand_Simple_Function_Return): Update the
1446 generation of the _Postconditions routine of the function.
1447 (Expand_Subprogram_Contract): Reimplemented.
1448 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
1449 profile along the comment on usage.
1450 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
1451 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
1452 wrapper when the entry [family] has a contract with
1454 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
1455 (Expand_Contract_Cases): This routine and its subsidiaries now
1456 analyze all generated code.
1457 (Expand_Old_In_Consequence): Removed.
1458 * sem_attr.adb Add with and use clause for Sem_Prag.
1459 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
1460 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
1462 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
1463 a generic subprogram.
1464 (Analyze_Object_Declaration): Do not create a contract node.
1465 (Derive_Subprogram): Do not create a contract node.
1466 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
1467 not create a contract node.
1468 (Analyze_Completion_Contract): New routine.
1469 (Analyze_Function_Return): Alphabetize.
1470 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
1471 contract node. Do not copy pre/postconditions to the original
1473 (Analyze_Null_Procedure): Do not create a contract node.
1474 (Analyze_Subprogram_Body_Contract): Reimplemented.
1475 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
1476 as having postconditions. Do not create a contract node. Analyze
1477 the subprogram body contract of a body that acts as a compilation
1478 unit. Expand the subprogram contract after the declarations have
1480 (Analyze_Subprogram_Contract): Reimplemented.
1481 (Analyze_Subprogram_Specification): Do not create a contract node.
1482 (List_Inherited_Pre_Post_Aspects): Code cleanup.
1483 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
1485 (Analyze_Subprogram_Contract): Update the
1486 parameter profile and the comment on usage.
1487 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
1489 (Analyze_Package_Declaration): Do not create a
1491 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
1492 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
1494 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
1496 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
1497 their proper section and alphabetize them. Analyze the contract of
1498 a [generic] subprogram after all Pragmas_After have been analyzed.
1499 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
1500 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
1501 create a contract node.
1502 (Analyze_Generic_Subprogram_Declaration):
1503 Alphabetize local variables. Do not create a contract
1504 node. Do not generate aspects out of pragmas for ASIS.
1505 (Analyze_Subprogram_Instantiation): Instantiate
1506 the contract of the subprogram. Do not create a
1507 contract node. (Instantiate_Contract): New routine.
1508 (Instantiate_Subprogram_Body): Alphabetize local variables.
1509 (Save_Global_References_In_Aspects): New routine.
1510 (Save_References): Do not save the global references found within
1511 the aspects of a generic subprogram.
1512 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
1513 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
1514 Original_Node for establishing linkages.
1515 (Insert_Pragma): Insertion in a subprogram body takes precedence over
1516 the case where the subprogram body is also a compilation unit.
1517 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
1518 Get_Argument to obtain the proper expression. Install the generic
1519 formals when the related context is a generic subprogram.
1520 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
1521 the proper expression. Use Corresponding_Spec_Of to obtain
1522 the spec. Install the generic formal when the related context
1523 is a generic subprogram.
1524 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
1525 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
1526 generic formal when the related context is a generic subprogram.
1527 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
1528 to obtain the proper expression. Remove the call to
1529 Check_SPARK_Aspect_For_ASIS as the analysis is now done
1531 (Analyze_Pragma): Update all occurrences
1532 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
1533 Extensions_Visible, Global, Postcondition, Precondition and
1534 Test_Case now carry generic templates when the related context
1535 is a generic subprogram. The same pragmas are no longer
1536 forcefully fully analyzed when the context is a subprogram
1537 that acts as a compilation unit. Pragmas Abstract_State,
1538 Initial_Condition, Initializes and Refined_State have been clean
1539 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
1540 and Precondition now use the same routine for analysis. Pragma
1541 Refined_Post does not need to check the use of 'Result or
1542 the lack of a post-state in its expression. Reimplement the
1543 analysis of pragma Test_Case.
1544 (Analyze_Pre_Post_Condition): New routine.
1545 (Analyze_Pre_Post_Condition_In_Decl_Part):
1547 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
1549 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
1550 the proper expression.
1551 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
1552 (Check_Pre_Post): Removed.
1553 (Check_Precondition_Postcondition): Removed.
1554 (Check_SPARK_Aspect_For_ASIS): Removed.
1555 (Check_Test_Case): Removed.
1556 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
1557 to obtain the proper expression. Use Corresponding_Spec_Of to
1558 find the proper spec.
1559 (Create_Generic_Template): New routine.
1560 (Duplication_Error): New routine.
1561 (Expression_Function_Error): New routine.
1562 (Find_Related_Subprogram_Or_Body): Moved to the spec
1563 of Sem_Prag. Emit precise error messages. Account for cases of
1564 rewritten expression functions, generic instantiations, handled
1565 sequence of statements and pragmas from aspects.
1566 (Get_Argument): New routine.
1567 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
1568 (Preanalyze_CTC_Args): Removed.
1569 (Process_Class_Wide_Condition): New routine.
1570 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
1571 the parameter profile along with the comment on usage.
1572 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
1573 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
1574 (Test_Case_Arg): New routine.
1575 * sem_util.adb Add with and use clauses for Sem_Ch6.
1576 (Add_Contract_Item): This routine now creates a contract
1577 node the first time an item is added. Remove the duplicate
1578 aspect/pragma checks.
1579 (Check_Result_And_Post_State): Reimplemented.
1580 (Corresponding_Spec_Of): New routine.
1581 (Get_Ensures_From_CTC_Pragma): Removed.
1582 (Get_Requires_From_CTC_Pragma): Removed.
1583 (Has_Significant_Contract): New routine.
1584 (Inherit_Subprogram_Contract): Inherit only if the source
1586 (Install_Generic_Formals): New routine.
1587 (Original_Aspect_Name): Removed.
1588 (Original_Aspect_Pragma_Name): New routine.
1589 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
1590 (Corresponding_Spec_Of): New routine.
1591 (Get_Ensures_From_CTC_Pragma): Removed.
1592 (Get_Requires_From_CTC_Pragma): Removed.
1593 (Has_Significant_Contract): New routine.
1594 (Install_Generic_Formals): New routine.
1595 (Original_Aspect_Name): Removed.
1596 (Original_Aspect_Pragma_Name): New routine.
1597 * sem_warn.adb Add with and use clauses for Sem_Prag.
1598 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
1600 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1602 * sem_ch8.adb (Available_Subtype): Optimization in
1603 Find_Selected_Component: when safe, use existing subtype of
1604 array component, possibly discriminant-dependent, rather than
1605 creating new subtype declaration for it. In this fashion different
1606 occurrences of the component have the same subtype, rather than
1607 just equivalent ones. Simplifies value tracing in GNATProve.
1609 2015-03-01 Arnaud Charlet <charlet@adacore.com>
1613 * doc/gnat_ugn/gnat_project_manager.rst,
1614 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
1615 image, too troublesome with texi format.
1616 * gnat_ugn.texi: Regenerate.
1618 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1621 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
1622 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
1623 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1625 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
1627 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
1628 arguments parameter.
1629 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
1631 2015-02-22 Arnaud Charlet <charlet@adacore.com>
1633 * doc/Makefile: postprocess texinfo files to update @dircategory
1634 and update texi files under gcc/ada.
1635 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
1637 2015-02-22 Arnaud Charlet <charlet@adacore.com>
1639 * doc/gnat_ugn/project-manager-figure.png,
1640 doc/gnat_ugn/rtlibrary-structure.png: New.
1642 2015-02-22 Tom de Vries <tom@codesourcery.com>
1645 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
1646 @item, and fix warning '@itemize has text but no @item'.
1648 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1650 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
1651 legally applies to an abstract subprogram declaration.
1652 * freeze.adb: Minor comment addition.
1654 2015-02-20 Robert Dewar <dewar@adacore.com>
1656 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
1657 * erroutc.adb (Set_Msg_Str): Replace _xxx.
1658 (Pre/Post/Type_Invariant) by xxx'Class.
1659 * erroutc.ads (Set_Msg_Str): Replace _xxx.
1660 (Pre/Post/Type_Invariant) by xxx'Class.
1661 * sem_prag.adb (Fix_Error): Remove special casing of
1662 Name_uType_Invariant.
1663 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
1664 Name_uPre and Name_uPost in aspect case (done in Errout now).
1666 2015-02-20 Robert Dewar <dewar@adacore.com>
1668 * g-alveop.adb: Minor style fixes.
1670 2015-02-20 Robert Dewar <dewar@adacore.com>
1672 * freeze.adb (Warn_Overlay): Guard against blow up with address
1675 2015-02-20 Bob Duff <duff@adacore.com>
1677 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
1678 for the compiler to guess whether the call is internal or external --
1679 it is always external.
1680 (Expand_Access_To_Protected_Op): For P'Access, where P
1681 is a protected subprogram, always create a pointer to the
1682 External_Subprogram.
1684 2015-02-20 Robert Dewar <dewar@adacore.com>
1686 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
1688 2015-02-20 Robert Dewar <dewar@adacore.com>
1690 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
1691 predicate for non-static subtype.
1692 (Build_Predicate_Functions): Do not assume subtype associated with a
1693 static predicate must be static.
1695 2015-02-20 Robert Dewar <dewar@adacore.com>
1697 * errout.adb (Set_Msg_Node): Better handling of internal names
1698 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
1699 * errout.ads: Document additional case of message deletion.
1700 * namet.adb (Is_Internal_Name): Refined to consider wide
1701 strings in brackets notation and character literals not to be
1703 * sem_ch8.adb (Find_Selected_Component): Give additional error
1704 when selector name is a subprogram whose first parameter has
1705 the same type as the prefix, but that type is untagged.
1707 2015-02-20 Robert Dewar <dewar@adacore.com>
1709 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
1711 2015-02-20 Tristan Gingold <gingold@adacore.com>
1713 * opt.ads (GNAT_Mode_Config): New variable.
1714 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
1715 to set Assertions_Enabled.
1716 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
1719 2015-02-20 Robert Dewar <dewar@adacore.com>
1721 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
1722 comment regarding the handling of unterminated fixed-point
1724 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
1725 corresponding to those previously added for
1726 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
1728 2015-02-20 Olivier Hainque <hainque@adacore.com>
1730 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
1732 2015-02-20 Robert Dewar <dewar@adacore.com>
1734 * sem_prag.adb: Minor comment clarification.
1736 2015-02-20 Olivier Hainque <hainque@adacore.com>
1738 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
1739 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
1740 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
1741 (vec_ctf): Now renamings as well.
1743 2015-02-20 Robert Dewar <dewar@adacore.com>
1745 * switch-c.adb, bindgen.adb: Minor reformatting.
1747 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1749 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
1750 Invariant'class is allowed on an abstract type.
1752 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1754 * sem_ch3.adb (Access_Definition): If the access definition is
1755 for a protected component and defines an access to protected
1756 subprogram, do not create an itype reference for it because a
1757 full type declaration will be built in order to generate the
1758 proper equivalent type.
1759 (Analyze_Subtype_Declaration): Add information of incomplete
1760 subtypes, for Ada 2012 extended uses of incomplete types.
1762 2015-02-20 Gary Dismukes <dismukes@adacore.com>
1764 * sem_res.adb: Minor reformatting.
1766 2015-02-20 Vincent Celier <celier@adacore.com>
1768 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
1769 path name for several switches --RTS, use the normalized path
1772 2015-02-20 Vincent Celier <celier@adacore.com>
1774 * bindgen.adb: Minor reformatting and code reorganization.
1776 2015-02-20 Jose Ruiz <ruiz@adacore.com>
1778 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
1779 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
1780 defined by Ada 2012.
1782 2015-02-20 Arnaud Charlet <charlet@adacore.com>
1784 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
1785 obsolete references to RTX, nucleus, VMS.
1787 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1789 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
1790 aspect, use name that mentions Class explicitly, rather than
1791 compiler-internal name.
1793 2015-02-20 Robert Dewar <dewar@adacore.com>
1795 * debug.adb: Add documentation for -gnatd.2 (allow statements
1797 * par-ch3.adb (P_Identifier_Declarations): Handle
1798 statement appearing where declaration expected more cleanly.
1799 (Statement_When_Declaration_Expected): Implement debug flag
1802 2015-02-20 Jose Ruiz <ruiz@adacore.com>
1804 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
1805 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
1806 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
1807 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
1808 defined by Ada 2005.
1809 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
1810 This is the correct name for the dispatching policy (FIFO was
1813 2015-02-20 Javier Miranda <miranda@adacore.com>
1815 * sem_res.adb (Resolve_Type_Conversion): If the type of the
1816 operand is the limited-view of a class-wide type then recover
1817 the class-wide type of the non-limited view.
1819 2015-02-20 Arnaud Charlet <charlet@adacore.com>
1821 * gcc-interface/Makefile.in: Remove references to nucleus.
1822 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
1823 extern_flag to true for Inline_Always subprograms with
1824 Intrinsic convention.
1826 2015-02-20 Yannick Moy <moy@adacore.com>
1828 * sem_prag.ads: Minor typo in comment.
1830 2015-02-20 Pascal Obry <obry@adacore.com>
1832 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
1834 2015-02-20 Vincent Celier <celier@adacore.com>
1836 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
1839 2015-02-20 Robert Dewar <dewar@adacore.com>
1841 * sem_eval.ads: Minor reformatting.
1843 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1845 * freeze.adb (Size_Known): Do not set the packed size for
1846 independent type or component.
1847 (Freeze_Array_Type): Check for Independent[_Components] with packing
1848 or explicit component size clause.
1849 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
1850 of independence pragmas only for non-GCC back-ends.
1851 * sem_ch13.adb (Initialize): Likewise for the initialization.
1852 * sem_prag.adb (Record_Independence_Check): New procedure to record an
1853 independence check in the table.
1854 (Analyze_Pragma): Use it throughout instead of doing it manually.
1855 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
1856 independent type or component.
1858 2015-02-20 Thomas Quinot <quinot@adacore.com>
1860 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
1861 struct direct and readdir. This is required for NFS filesystems
1862 mounted from servers that use 64-bit cookies.
1864 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1866 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
1867 Build_Subprogram_Renaming, to create renaming of subprogram
1868 instance in the the declaration of the wrapper package rather
1869 than in its body, so that it is available for analysis of aspects
1870 propagated from generic to instantiation.
1871 (Check_Mismatch): An actual for a formal package that is an
1872 incomplete type matches a formal type that is incomplete.
1873 (Instantiate_Package_Body): Move code that builds subprogram
1874 renaming to Analyze_Subprogram_Instantiation.
1875 (Instantiate_Type): The generated subtype is a limited view if
1876 the actual is a limited view.
1877 (Load_Parent_Of_Generic): Retrieve instance declaration from
1878 its new position within wrapper package.
1880 2015-02-20 Arnaud Charlet <charlet@adacore.com>
1882 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
1884 2015-02-20 Robert Dewar <dewar@adacore.com>
1886 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
1887 issue of negative arguments.
1889 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1891 * gnat1drv.adb: Minor consistency fix.
1893 2015-02-20 Pascal Obry <obry@adacore.com>
1895 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
1898 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1900 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
1902 * exp_ch6.adb (Expand_Call): Use back-end inlining
1903 instead of expansion for simple subprogram renamings.
1905 2015-02-20 Robert Dewar <dewar@adacore.com>
1907 * exp_util.adb: Minor reformatting.
1909 2015-02-20 Vincent Celier <celier@adacore.com>
1911 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
1912 is specified several times with different values that indicates
1913 the same runtime directory.
1915 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1917 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
1918 handle properly illegal uses of attributes on prefixes on an
1919 incomplete type, both when the type of the prefix is locally
1920 incomplete, and when it is a limited view of a type whose
1921 non-limited view is not available.
1922 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
1923 'Address and others.
1925 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1927 * exp_ch6.adb: Fix minor typo in comment.
1929 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1931 * sinfo.ads: Add comment.
1933 2015-02-20 Olivier Hainque <hainque@adacore.com>
1935 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
1936 flags controlling the actual FE inlining out of pragma Inline
1937 and pragma Inline_Always.
1938 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
1939 on -fno-inline, which disables all inlining in compilers with
1940 an Ada back-end and without back-end inlining support.
1941 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
1942 flag to True on -fno-inline and leave Inline_Always alone for
1944 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
1945 names of the Opt flags it sets.
1946 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
1947 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
1948 * sem_prag.adb (Make_Inline): Remove early return conditioned
1949 on Opt.Suppress_All_Inlining.
1950 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
1951 disable the calls to Build_Body_To_Inline otherwise triggered
1952 by pragma Inline or Inline_Always. This will prevent actual
1953 front-end inlining of the subprogram on calls.
1955 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1957 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
1958 Abort_Undefer_Direct function.
1959 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
1960 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
1961 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
1962 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
1964 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
1965 Remove call to Register_Backend_Call and move code resetting
1966 Needs_Debug_Info on inlined subprograms to...
1967 * inline.ads (Add_Inlined_Body): Add N parameter.
1968 (Register_Backend_Call): Delete.
1969 * inline.adb (Add_Inlined_Body): ...here and simplify.
1970 Register the call with Backend_Calls directly.
1971 (Register_Backend_Call): Delete.
1972 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
1974 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1976 * s-stalib.ads: Fix typo.
1978 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1980 * exp_ch3.adb (Default_Initialize_Object): If the object has a
1981 delayed freeze, the actions associated with default initialization
1982 must be part of the freeze actions, rather that being inserted
1983 directly after the object declaration.
1985 2015-02-20 Robert Dewar <dewar@adacore.com>
1987 * lib-load.adb: Minor comment update.
1989 2015-02-20 Vincent Celier <celier@adacore.com>
1991 * prj-proc.adb (Process_Case_Construction): When there are
1992 incomplete withed projects and the case variable is unknown,
1993 skip the case construction.
1995 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1997 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
1998 when an actual is a view conversion, either because the call is
1999 to an inherited operation, or because the actual is an explicit
2000 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
2002 2015-02-20 Robert Dewar <dewar@adacore.com>
2004 * einfo.ads: Minor comment updates Fix missing pragma Inline
2005 for Set_Partial_View_Has_Unknown_Discr.
2006 * einfo.adb (Write_Entity_Flags): Add missing entry for
2007 Partial_View_Has_Unknown_Discr.
2008 * sem_ch3.adb: Minor reformatting.
2010 2015-02-20 Vincent Celier <celier@adacore.com>
2012 * opt.ads: Minor cleanup: remove mention of gprmake.
2013 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
2014 * s-tataat.adb: Do not call System.Tasking.Self but directly
2015 System.Task_Primitives.Operations.Self.
2017 2015-02-20 Arnaud Charlet <charlet@adacore.com>
2019 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
2020 sphinx in the doc directory.
2021 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
2023 2015-02-20 Robert Dewar <dewar@adacore.com>
2025 * sem_res.adb: Minor reformatting.
2026 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
2028 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
2029 aspects from circuitry setting delay required to false if the
2030 argument is an integer literal.
2032 2015-02-20 Ed Schonberg <schonberg@adacore.com>
2034 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
2035 on type entities, to enforce AI12-0133: default initialization
2036 of types whose partial view has unknown discriminants does not
2037 get an invariant check, because clients of the unit can never
2038 declare objects of such types.
2039 * sem_ch3.adb (Find_Type_Name); Set new flag
2040 Partial_View_Has_Unknown_Discr when needed.
2041 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
2042 generation of invariant call on default-initialized object.
2044 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
2046 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
2047 if the parameter either is passed by reference or if the alignment
2050 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
2052 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
2053 detect primitive operations of tagged and untagged types.
2055 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
2057 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
2058 sets in presence of derivation for subprogram types.
2060 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
2062 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
2063 present in the same context as the declaration.
2065 2015-02-07 Jakub Jelinek <jakub@redhat.com>
2068 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
2069 and optimization_current_node after tweaking global_options.
2071 2015-02-05 Robert Dewar <dewar@adacore.com>
2073 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
2074 prj-nmsc.adb: Minor reformatting.
2076 2015-02-05 Ed Schonberg <schonberg@adacore.com>
2078 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
2079 of a protected type may not be available, so to check conformance
2080 with an interface type, examine the interface list in the type
2081 declaration directly.
2082 (Write_Overloads): Improve information for indirect calls,
2085 2015-02-05 Ed Schonberg <schonberg@adacore.com>
2087 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
2088 expansion activity in ASIS mode.
2090 2015-02-05 Javier Miranda <miranda@adacore.com>
2092 * errout.adb (Error_Msg_PT): Add missing error.
2093 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
2094 RM rule. Code cleanup.
2095 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
2096 anonymous access types. Found working on the tests. Code cleanup.
2098 2015-02-05 Vincent Celier <celier@adacore.com>
2100 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
2101 when there are incomplete withs.
2102 * prj-nmsc.adb (Process_Naming): Do not try to get the value
2103 of an element when it is nil.
2104 (Check_Naming): Do not check a nil suffix for illegality
2105 * prj-proc.adb (Expression): Do not process an empty term.
2106 * prj-strt.adb (Attribute_Reference): If attribute cannot be
2107 found, parse a possible index to avoid cascading errors.
2109 2015-02-05 Ed Schonberg <schonberg@adacore.com>
2111 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
2112 for an access_to_subprogram declaration is not a derived type.
2114 2015-02-05 Robert Dewar <dewar@adacore.com>
2116 * errout.adb (Error_Msg_Internal): For non-serious error set
2117 Fatal_Error to Ignored.
2118 * lib-load.adb (Load_Unit): Minor comment updates.
2119 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
2120 setting from with'ed unit to with'ing unit.
2121 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
2124 2015-02-05 Yannick Moy <moy@adacore.com>
2126 * sem_prag.adb, par-prag.adb: Minor code clean up.
2128 2015-02-05 Yannick Moy <moy@adacore.com>
2130 * par-prag.adb (Pragma_Warnings): Update for extended form
2131 of pragma Warnings. The "one" argument case may now have 2 or
2133 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
2134 extended form of pragma Warnings. Pragma with tool name is either
2135 rewritten as null or as an equivalent form without tool name,
2137 * snames.ads-tmpl (Name_Gnatprove): New name.
2139 2015-02-05 Robert Dewar <dewar@adacore.com>
2141 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
2143 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
2144 condition is standard Boolean, it can be non-standard derived
2147 2015-02-05 Robert Dewar <dewar@adacore.com>
2149 * checks.adb (Enable_Range_Check): Disconnect attempted
2150 optimization for the case of range check for subscript of
2151 unconstrained array.
2153 2015-02-05 Robert Dewar <dewar@adacore.com>
2155 * par-ch13.adb (With_Present): New function
2156 (Aspect_Specifications_Present): Handle WHEN in place of WITH
2157 (Get_Aspect_Specifications): Comment update.
2158 * par.adb: Comment updates.
2160 2015-02-05 Robert Dewar <dewar@adacore.com>
2162 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
2163 * frontend.adb (Frontend): New setting of Fatal_Error.
2164 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
2166 (Load_Main_Source): New setting of Fatal_Error
2167 (Load_Unit): New setting of Fatal_Error.
2168 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
2170 (Ensure_System_Dependency): New setting of Fatal_Error.
2171 * lib.adb (Fatal_Error): New setting of Fatal_Error
2172 (Set_Fatal_Error): New setting of Fatal_Error.
2173 * lib.ads: New definition of Fatal_Error and associated routines.
2174 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
2175 * par-load.adb (Load): New setting of Fatal_Error.
2176 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
2177 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
2179 (Optional_Subunit): New setting of Fatal_Error.
2180 (Analyze_Proper_Body): New setting of Fatal_Error.
2181 (Load_Needed_Body): New setting of Fatal_Error.
2183 2015-02-05 Ed Schonberg <schonberg@adacore.com>
2185 * sem_res.adb (Resolve_Call): If the function being called has
2186 out parameters do not check for language version if the function
2187 comes from a predefined unit, as those are always compiled in
2190 2015-02-05 Ed Schonberg <schonberg@adacore.com>
2192 * sem_ch3.adb (Process_Full_View): Verify that the full view
2193 of a type extension must carry an explicit limited keyword if
2194 the partial view does (RM 7.3 (10.1)).
2196 2015-02-05 Robert Dewar <dewar@adacore.com>
2198 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
2199 sem_warn.ads: Minor reformatting.
2200 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
2202 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
2203 error for abstract type.
2205 2015-02-05 Yannick Moy <moy@adacore.com>
2207 * opt.ads (Warn_On_Suspicious_Contract): Update comment
2209 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
2210 suspicious uses of 'Update.
2211 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
2212 function issues warning on suspicious uses of 'Update.
2213 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
2214 package spec and body as SPARK_Mode Off.
2216 2015-02-05 Robert Dewar <dewar@adacore.com>
2218 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
2219 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
2220 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
2221 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
2222 for exported entity.
2224 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
2226 * sem_prag.adb (Check_Pragma_Conformance): Add
2227 local variable Arg. Ensure that all errors are associated with
2228 the pragma if it appears without an argument. Add comments on
2231 2015-02-05 Robert Dewar <dewar@adacore.com>
2233 * lib-xref.adb: Minor reformatting.
2235 2015-02-05 Tristan Gingold <gingold@adacore.com>
2237 PR ada/64349da/64349
2238 * env.c: Fix thinko: handle Darwin case before default one.
2240 2015-01-30 Robert Dewar <dewar@adacore.com>
2242 * a-assert.adb: Minor reformatting.
2243 * sem_ch13.adb: Minor comment clarification.
2244 * types.ads: Minor comment update.
2245 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
2246 when we have a predicate that is nothing but an inherited dynamic
2249 2015-01-30 Jerome Guitton <guitton@adacore.com>
2251 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
2252 include cert link spec.
2254 2015-01-30 Robert Dewar <dewar@adacore.com>
2256 * einfo.ads: Minor comment fix.
2257 * freeze.adb (Freeze_Profile): Add test for suspicious import
2259 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
2260 use in Pure unit is now moved to Freeze (to properly catch
2261 Pure_Function exemption).
2263 2015-01-30 Bob Duff <duff@adacore.com>
2265 * sem_res.ads: Minor comment fix.
2266 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
2267 check both operands of an operator.
2269 2015-01-30 Yannick Moy <moy@adacore.com>
2271 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
2272 policy for Pre to Ignore.
2273 (Assert): Add precondition.
2275 2015-01-30 Robert Dewar <dewar@adacore.com>
2277 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
2279 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
2280 documentation for some special cases of invalid attempts at
2283 2015-01-30 Gary Dismukes <dismukes@adacore.com>
2285 * errout.ads: Minor reformatting.
2287 2015-01-30 Yannick Moy <moy@adacore.com>
2289 * inline.adb (Process_Formals): Use the sloc of
2290 the inlined node instead of the sloc of the actual parameter,
2291 when replacing formal parameters by the actual one.
2293 2015-01-30 Arnaud Charlet <charlet@adacore.com>
2295 * g-expect.adb (Get_Command_Output): Use infinite timeout when
2298 2015-01-30 Ed Schonberg <schonberg@adacore.com>
2300 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
2301 defaulted in an instantiation, add an entry in the list of actuals
2302 to indicate the default value of the formal (as is already done
2303 for defaulted subprograms).
2305 2015-01-30 Javier Miranda <miranda@adacore.com>
2307 * errout.adb (Error_Msg_PT): Minor error phrasing update.
2309 2015-01-30 Robert Dewar <dewar@adacore.com>
2311 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
2314 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
2316 * exp_dbug.adb (Get_Encoded_Name): When
2317 -fgnat-encodings=minimal, do not generate names for biased types.
2319 2015-01-30 Tristan Gingold <gingold@adacore.com>
2322 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
2324 2015-01-30 Gary Dismukes <dismukes@adacore.com>
2326 * freeze.adb: Minor reformatting.
2328 2015-01-30 Javier Miranda <miranda@adacore.com>
2330 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
2331 improve its documentation.
2332 * errout.adb (Error_Msg_PT): Improve the error message.
2333 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
2334 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
2335 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
2337 2015-01-30 Robert Dewar <dewar@adacore.com>
2339 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
2340 message for False case.
2342 2015-01-30 Doug Rupp <rupp@adacore.com>
2344 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
2345 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
2348 2015-01-30 Gary Dismukes <dismukes@adacore.com>
2350 * sem_attr.adb (Declared_Within_Generic_Unit):
2351 New function to test whether an entity is declared within the
2352 declarative region of a given generic unit.
2353 (Resolve_Attribute): For checking legality of subprogram'Access within
2354 a generic unit, call new Boolean function Declared_Within_Generic_Unit
2355 instead of simply comparing the results of Enclosing_Generic_Unit on
2356 the prefix and access type. Correct minor comment typos.
2358 2015-01-30 Robert Dewar <dewar@adacore.com>
2360 * freeze.adb, exp_util.ads: Update comment.
2361 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
2362 * sem_util.adb: Minor: fix typo.
2364 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
2366 * sem_attr.adb (Analyze_Attribute): Ensure that
2367 the check concerning Refined_Post takes precedence over the
2370 2015-01-30 Gary Dismukes <dismukes@adacore.com>
2372 * sem_prag.adb: Minor typo fixes and reformatting.
2374 2015-01-30 Yannick Moy <moy@adacore.com>
2376 * sem_attr.adb: Code clean up.
2378 2015-01-30 Robert Dewar <dewar@adacore.com>
2380 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
2381 * ali.ads (Unit_Record): Add new field Serious_Errors.
2382 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
2383 attribute in U line.
2384 * lib-writ.ads: New attribute SE (serious erors) in unit line.
2386 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
2388 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
2389 Lit_Indexes, Scale_Value, Storage_Size_Variable,
2390 String_Literal_Low_Bound along associated routines and
2392 (Pending_Access_Types): New routine.
2393 (Set_Pending_Access_Types): New routine.
2394 (Write_Field15_Name): Add an entry for Pending_Access_Types.
2395 * einfo.ads Add new attribute Pending_Access_Types along
2396 with usage in nodes. Update the usage of attributes
2397 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
2398 Storage_Size_Variable, String_Literal_Low_Bound.
2399 (Pending_Access_Types): New routine along with pragma Inline.
2400 (Set_Pending_Access_Types): New routine along with pragma Inline.
2401 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
2402 Ins_Node. Determine the insertion node for anonynous access type
2403 that acts as a component type of an array. Update the call to
2404 Build_Finalization_Master.
2405 (Expand_Freeze_Record_Type): Update
2406 the calls to Build_Finalization_Master.
2407 (Freeze_Type): Remove
2408 local variable RACW_Seen. Factor out the code that deals with
2409 remote access-to-class-wide types. Create a finalization master
2410 when the designated type contains a private component. Fully
2411 initialize all pending access types.
2412 (Process_RACW_Types): New routine.
2413 (Process_Pending_Access_Types): New routine.
2414 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
2415 needs to set primitive Finalize_Address.
2416 (Expand_N_Allocator): Allocation no longer sets primitive
2418 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2419 Update the call to Build_Finalization_Master.
2420 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
2421 needs to set primitive Finalize_Address.
2422 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
2423 (Build_Finalization_Master): New parameter profile. Associate
2424 primitive Finalize_Address with the finalization master if the
2425 designated type has been frozen, otherwise treat the access
2426 type as pending. Simplify the insertion of the master and
2427 related initialization code.
2428 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
2430 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
2431 Simplify the implementation.
2432 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
2433 along with comment on usage.
2434 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
2435 the comment on usage.
2436 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
2437 Finalize_Address to retrieve the primitive.
2438 (Finalize_Address): New routine.
2439 (Find_Finalize_Address): Removed.
2440 * exp_util.ads (Finalize_Address): New routine.
2441 * freeze.adb (Freeze_All): Remove the generation of finalization
2443 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
2444 pending access types from the partial to the full view.
2446 2015-01-30 Robert Dewar <dewar@adacore.com>
2448 * sem_disp.adb: Minor reformatting.
2449 * sem_disp.ads: Documentation update.
2451 2015-01-30 Ed Schonberg <schonberg@adacore.com>
2453 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
2454 or a function call, return True if type is class-wide.
2455 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
2456 Apply RM 4.5.7 (17/3): all or none of the dependent expression
2457 of a conditional expression must be dynamically tagged.
2459 2015-01-30 Ed Schonberg <schonberg@adacore.com>
2461 * sem_ch6.adb (Analyze_Function_Return): In an extended return
2462 statement, apply accessibility check to result object when there
2463 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
2465 2015-01-30 Robert Dewar <dewar@adacore.com>
2467 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
2468 Boolean for case where ELSE is omitted.
2469 * sem_res.adb: Minor reformatting.
2471 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
2473 Fix build under cygwin/64.
2474 * adaint.h: Add check for __CYGWIN__.
2475 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
2477 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2480 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
2481 * mingw32.h: Don't include <tchar.h> under cygwin.
2482 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
2484 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2486 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
2487 (DEF_FUNCTION_TYPE_VAR_12): New macros.
2489 2015-01-09 Michael Collison <michael.collison@linaro.org>
2491 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
2492 vec.h, double-int.h, input.h, alias.h, symtab.h,
2493 fold-const.h, wide-int.h, and inchash.h due to
2494 flattening of tree.h.
2495 * gcc-interface/decl.c: Ditto.
2496 * gcc-interface/misc.c: Ditto.
2497 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
2498 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
2499 fold-const.h, wide-int.h, and inchash.h due to
2500 flattening of tree.h.
2501 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
2502 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
2503 fold-const.h, wide-int.h, inchash.h due to
2504 flattening of tree.h.
2505 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
2506 vec.h, double-int.h, input.h, alias.h, symtab.h,
2507 fold-const.h, wide-int.h, and inchash.h due to
2508 flattening of tree.h.
2509 * gcc-interface/utils2.c: Ditto.
2511 2015-01-07 Robert Dewar <dewar@adacore.com>
2513 * sem_warn.adb (Check_One_Unit): Don't give unused entities
2514 warning for a package which is used as a generic parameter.
2516 2015-01-07 Bob Duff <duff@adacore.com>
2518 * usage.adb (Usage): Correct documentation of
2521 2015-01-07 Robert Dewar <dewar@adacore.com>
2523 * s-fileio.adb: Minor reformatting.
2525 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2527 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
2528 access to subprogram, replace its formals with new entities when
2529 building the object declaration, both if actual is present and
2530 when it is defaulted.
2532 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2534 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
2535 conversion and type of expression has invariant, apply invariant
2536 check on expression.
2538 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2540 * sem_ch3.adb (Create_Constrained_Components): A call to
2541 Gather_Components may detect an error if an inherited discriminant
2542 that controls a variant is non-static.
2543 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
2544 Gather_Components may report an error if an inherited discriminant
2545 in a variant in non-static.
2546 * sem_util.adb (Gather_Components): If a non-static discriminant
2547 is inherited do not report error here, but let caller handle it.
2548 (Find_Actual): Small optimization.
2550 2015-01-07 Bob Duff <duff@adacore.com>
2552 * usage.adb (Usage): Document -gnatw.f switch.
2554 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2556 * sem_ch12.adb: Code clean up and minor reformatting.
2558 2015-01-07 Robert Dewar <dewar@adacore.com>
2560 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
2561 Raise_Accessibility_Error call.
2562 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
2563 on handling of invalid digits in based constants.
2564 * s-fatgen.ads: Minor reformatting.
2565 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
2566 Avoid noting bogus modification for Valid test.
2567 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
2568 * einfo.ads: Minor reformatting.
2569 * sem_warn.adb: Minor comment clarification.
2570 * sem_ch12.adb: Minor reformatting.
2572 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2574 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
2575 over static predicates when the loop parameter specification
2576 carries a Reverse indicator.
2578 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2580 * sem_ch12.adb (Instantiate_Object): If formal has a default,
2581 actual is missing and formal has an anonymous access type, copy
2582 access definition in full so that tree for instance is properly
2583 formatted for ASIS use.
2585 2015-01-07 Bob Duff <duff@adacore.com>
2587 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
2588 for P'Access, where P is a subprogram in the same package as
2589 the P'Access, and the P'Access is evaluated at elaboration
2590 time, and occurs before the body of P. For example, "X : T :=
2591 P'Access;" would allow a subsequent call to X.all to be an
2592 access-before-elaboration error; hence the warning. This warning
2593 is enabled by the -gnatw.f switch.
2594 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
2595 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
2596 * gnat_ugn.texi: Document the new warning.
2598 2015-01-07 Johannes Kanig <kanig@adacore.com>
2600 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
2603 2015-01-07 Robert Dewar <dewar@adacore.com>
2605 * s-taprop-linux.adb, clean.adb: Minor reformatting.
2607 2015-01-07 Arnaud Charlet <charlet@adacore.com>
2609 * s-tassta.adb: Relax some overzealous assertions.
2611 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2613 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
2614 view of a type is legal when context is a thunk generated for
2615 operation inherited from an interface.
2616 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
2617 a thunk and return type is an incomplete type do not continue
2618 expansion; thunk will be fully elaborated when generating code.
2620 2015-01-07 Doug Rupp <rupp@adacore.com>
2622 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
2623 (QueryPerformanceFrequency): New imported procedure.
2624 * s-taprop-mingw.adb (RT_Resolution): Call above and return
2625 resolution vice a hardcoded value.
2626 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
2627 resolution vice a hardcoded value.
2628 * s-linux-android.ads (clockid_t): New subtype.
2629 * s-osinte-aix.ads (clock_getres): New imported subprogram.
2630 * s-osinte-android.ads (clock_getres): Likewise.
2631 * s-osinte-freebsd.ads (clock_getres): Likewise.
2632 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
2633 * s-osinte-darwin.ads (clock_getres): New subprogram.
2634 * s-osinte-darwin.adb (clock_getres): New subprogram.
2635 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
2636 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
2637 calculate resolution vice hard coded value.
2639 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2641 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
2642 limited view, use non-limited view when available to create
2643 equivalent record type.
2645 2015-01-07 Vincent Celier <celier@adacore.com>
2647 * gnatcmd.adb: Remove command Sync and any data and processing
2648 related to this command. Remove project processing for gnatstack.
2649 * prj-attr.adb: Remove package Synchonize and its attributes.
2651 2015-01-07 Vincent Celier <celier@adacore.com>
2653 * clean.adb: Minor error message change.
2655 2015-01-07 Tristan Gingold <gingold@adacore.com>
2658 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
2660 2015-01-07 Javier Miranda <miranda@adacore.com>
2662 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
2663 protect the frontend against never ending recursion caused by
2664 circularities in the sources.
2666 2015-01-07 Robert Dewar <dewar@adacore.com>
2668 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
2669 exp_ch3.adb: Minor reformatting.
2671 2015-01-07 Doug Rupp <rupp@adacore.com>
2673 * s-linux.ads (clockid_t): New subtype.
2674 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
2675 (clockid_t): New subtype.
2676 (clock_getres): Import system call.
2677 * s-taprop-linux.adb (System.OS_Constants): With and rename.
2678 (RT_Resolution): Remove
2679 hardcoded value and call clock_getres.
2680 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
2681 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
2683 2015-01-07 Robert Dewar <dewar@adacore.com>
2685 * sem_warn.adb (Check_One_Unit): Guard against context item
2686 with no Entity field.
2688 2015-01-07 Vincent Celier <celier@adacore.com>
2690 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
2691 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
2693 2015-01-07 Vincent Celier <celier@adacore.com>
2695 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
2696 errors/warnings in the first parsing of the project files,
2697 to display the warnings when there is no errors.
2699 2015-01-07 Tristan Gingold <gingold@adacore.com>
2701 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
2703 2015-01-07 Doug Rupp <rupp@adacore.com>
2705 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
2706 value from Int_Lock as parameter to Int_Unlock.
2707 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
2708 * s-vxwext.ads (Int_Unlock): Likewise.
2709 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
2710 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
2711 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
2712 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
2714 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
2716 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
2719 2015-01-07 Tristan Gingold <gingold@adacore.com>
2721 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
2724 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
2726 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
2727 automatically set No_Strict_Aliasing on access types.
2728 * fe.h (No_Strict_Aliasing_CP): Declare.
2729 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
2730 No_Strict_Aliasing_CP is set.
2732 2015-01-07 Johannes Kanig <kanig@adacore.com>
2734 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
2735 not build function wrapper in gnatprove mode when the package
2736 is externally axiomatized.
2738 2015-01-07 Jose Ruiz <ruiz@adacore.com>
2740 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
2741 intermediate computations when the parameters have different signs.
2743 2015-01-07 Javier Miranda <miranda@adacore.com>
2745 * exp_ch3.adb (Build_Init_Procedure): For derived types,
2746 improve the code which takes care of identifying and moving to
2747 the beginning of the init-proc the call to the init-proc of the
2750 2015-01-07 Olivier Hainque <hainque@adacore.com>
2752 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
2753 Elaborate the expression as part of the same stmt group as the actions.
2755 2015-01-07 Robert Dewar <dewar@adacore.com>
2757 * sem_ch3.adb: Minor error message change.
2759 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2761 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
2762 Following AI05-028, the pragam applies legally to any composite type.
2764 2015-01-07 Arnaud Charlet <charlet@adacore.com>
2766 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
2767 (sigwait, sigwaitinfo): Removed, not needed after all on any
2768 VxWorks configurations.
2770 2015-01-07 Robert Dewar <dewar@adacore.com>
2772 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
2774 2015-01-07 Javier Miranda <miranda@adacore.com>
2776 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
2777 generation of accessibility check.
2779 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2781 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
2782 illegal completion from a class- wide type, set etype of the
2783 derived type properly to prevent cascaded errors.
2785 2015-01-07 Robert Dewar <dewar@adacore.com>
2787 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
2790 2015-01-07 Robert Dewar <dewar@adacore.com>
2792 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
2794 (OK_No_Use_Of_Entity_Name): New function.
2795 (Set_Restriction_No_Use_Of_Entity): New procedure.
2796 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
2798 (OK_No_Use_Of_Entity_Name): New function.
2799 (Set_Restriction_No_Use_Of_Entity): New procedure.
2800 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
2802 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2803 Add processing for new restriction No_Use_Of_Entity.
2805 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
2807 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
2808 component type as to Has_Atomic_Components type. Remove useless
2809 test on Is_Aliased component type.
2811 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
2813 * alloc.ads Alphabetize several declarations. Add constants
2814 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
2815 * atree.adb Add with and use clauses for Opt.
2816 (Allocate_Initialize_Node): Mark a node as ignored Ghost
2817 if it is created in an ignored Ghost region.
2818 (Ekind_In): New variant.
2819 (Is_Ignored_Ghost_Node): New routine.
2820 (Set_Is_Ignored_Ghost_Node): New routine.
2821 * atree.adb Aplhabetize several subprograms declarations. Flag
2822 Spare0 is now known as Is_Ignored_Ghost_Node.
2823 (Ekind_In): New variant.
2824 (Is_Ignored_Ghost_Node): New routine.
2825 (Set_Is_Ignored_Ghost_Node): New routine.
2826 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
2827 (Contains_Ignored_Ghost_Code): New routine.
2828 (Set_Contains_Ignored_Ghost_Code): New routine.
2829 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
2830 It is now possible to set this property on an unanalyzed entity.
2831 (Write_Entity_Flags): Output the status of flag
2832 Contains_Ignored_Ghost_Code.
2833 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
2835 (Contains_Ignored_Ghost_Code): New routine
2836 along with pragma Inline.
2837 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
2838 * exp_ch3.adb Add with and use clauses for Ghost.
2839 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
2840 Set the Ghost_Mode in effect.
2841 (Restore_Globals): New routine.
2842 * exp_ch7.adb (Process_Declarations): Do not process a context
2843 that invoves an ignored Ghost entity.
2844 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
2845 construct that has been rewritten as a null statement.
2846 * exp_disp.adb Add with and use clauses for Ghost.
2847 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
2848 the Ghost_Mode in effect.
2849 (Restore_Globals): New routine.
2850 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
2851 does not require any clean up. Add two missing cases that deal
2852 with block statements.
2853 * freeze.adb Add with and use clauses for Ghost.
2854 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
2855 Set the Ghost_Mode in effect.
2856 (Restore_Globals): New routine.
2857 * frontend.adb Add with and use clauses for Ghost. Remove any
2858 ignored Ghost code from all units that qualify.
2859 * ghost.adb New unit.
2860 * ghost.ads New unit.
2861 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
2862 the table in package Ghost.
2863 * lib.ads: Alphabetize several subprogram declarations.
2864 * lib-xref.adb (Output_References): Do not generate reference
2865 information for ignored Ghost entities.
2866 * opt.ads Add new type Ghost_Mode_Type and new global variable
2868 * rtsfind.adb (Load_RTU): Provide a clean environment when
2869 loading a runtime unit.
2870 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
2871 entry/exit as the node may set a different mode.
2873 Capture/restore the value of Ghost_Mode on entry/exit as the
2874 unit may be withed from a unit with a different Ghost mode.
2875 * sem_ch3.adb Add with and use clauses for Ghost.
2876 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
2877 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
2878 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
2879 the entity as Ghost when there is a Ghost_Mode in effect.
2880 (Array_Type_Declaration): The implicit base type inherits the
2881 "ghostness" from the array type.
2882 (Derive_Subprogram): The
2883 alias inherits the "ghostness" from the parent subprogram.
2884 (Make_Implicit_Base): The implicit base type inherits the
2885 "ghostness" from the parent type.
2886 * sem_ch5.adb Add with and use clauses for Ghost.
2887 (Analyze_Assignment): Set the Ghost_Mode in effect.
2888 * sem_ch6.adb Add with and use clauses for Ghost.
2889 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
2890 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
2891 Set the Ghost_Mode in effect. Mark the entity as Ghost when
2892 there is a Ghost_Mode in effect.
2893 * sem_ch7.adb Add with and use clauses for Ghost.
2894 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
2895 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
2896 effect. Mark the entity as Ghost when there is a Ghost_Mode
2898 * sem_ch8.adb Add with and use clauses for Ghost.
2899 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
2900 Analyze_Object_Renaming, Analyze_Package_Renaming,
2901 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
2902 the entity as Ghost when there is a Ghost_Mode in effect.
2903 (Find_Type): Check the Ghost context of a type.
2904 * sem_ch11.adb Add with and use clauses for Ghost.
2905 (Analyze_Exception_Declaration): Set the Ghost_Mode in
2906 effect. Mark the entity as Ghost when there is a Ghost_Mode
2908 * sem_ch12.adb Add with and use clauses for Ghost.
2909 (Analyze_Generic_Package_Declaration,
2910 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
2911 Mark the entity as Ghost when there is a Ghost_Mode in effect.
2912 * sem_prag.adb Add with and use clauses for Ghost.
2913 (Analyze_Pragma): Ghost-related checks are triggered when there
2914 is a Ghost mode in effect.
2915 (Create_Abstract_State): Mark the
2916 entity as Ghost when there is a Ghost_Mode in effect.
2917 * sem_res.adb Add with and use clauses for Ghost.
2918 (Check_Ghost_Context): Removed.
2919 * sem_util.adb (Check_Ghost_Completion): Removed.
2920 (Check_Ghost_Derivation): Removed.
2921 (Incomplete_Or_Partial_View):
2922 Add a guard in case the entity has not been analyzed yet
2923 and does carry a scope.
2924 (Is_Declaration): New routine.
2925 (Is_Ghost_Entity): Removed.
2926 (Is_Ghost_Statement_Or_Pragma):
2928 (Is_Subject_To_Ghost): Removed.
2929 (Set_Is_Ghost_Entity):
2931 (Within_Ghost_Scope): Removed.
2932 * sem_util.adb (Check_Ghost_Completion): Removed.
2933 (Check_Ghost_Derivation): Removed.
2934 (Is_Declaration): New routine.
2935 (Is_Ghost_Entity): Removed.
2936 (Is_Ghost_Statement_Or_Pragma): Removed.
2937 (Is_Subject_To_Ghost): Removed.
2938 (Set_Is_Ghost_Entity): Removed.
2939 (Within_Ghost_Scope): Removed.
2940 * sinfo.ads Add a section on Ghost mode.
2941 * treepr.adb (Print_Header_Flag): New routine.
2942 (Print_Node_Header): Factor out code. Output flag
2943 Is_Ignored_Ghost_Node.
2944 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
2946 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
2948 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
2949 true test and unreachable 'else' arm.
2951 2015-01-06 Vincent Celier <celier@adacore.com>
2953 * prj-conf.adb (Check_Target): Improve error message when
2954 there are mismatched targets between the on in the configuration
2955 project file and the specified one, either in the main project
2956 file or in the --target= switch.
2958 2015-01-06 Pascal Obry <obry@adacore.com>
2960 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
2961 Install_Name attribute definitions.
2963 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2965 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
2966 generated Import pragma for the internal imported procedure does
2967 not come from an aspect, so that Is_Imported can be properly
2970 2015-01-06 Gary Dismukes <dismukes@adacore.com>
2972 * sem_ch12.adb (Might_Inline_Subp): Record whether
2973 any subprograms in the generic package are marked with
2974 pragma Inline_Always (setting flag Has_Inline_Always).
2975 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
2976 alongside existing test of Front_End_Inlining as alternative
2977 conditions for setting Inline_Now. Also add test of
2978 Has_Inline_Always along with Front_End_Inlining test as an
2979 alternative condition for setting Needs_Body to False.
2981 2015-01-06 Tristan Gingold <gingold@adacore.com>
2983 * i-cpoint.adb (Copy_Array): Handle overlap.
2985 2015-01-06 Pascal Obry <obry@adacore.com>
2987 * bindgen.adb: Minor style fix.
2989 2015-01-06 Robert Dewar <dewar@adacore.com>
2991 * sem_util.ads, sem_util.adb: Minor reformatting.
2993 2015-01-06 Vincent Celier <celier@adacore.com>
2995 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
2996 with flags before parsing the projects.
2997 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
2998 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
2999 to True in the flags, when Ignore_Missing_With is True and an
3000 imported project cannot be found.
3001 * prj-proc.adb (Expression): When there are incomplete withs and
3002 a variable or attribute is not found, set the variable/attribute
3004 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
3007 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
3009 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
3010 prj-err.adb: Add new switch --no-command-line.
3012 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3014 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
3016 2015-01-06 Robert Dewar <dewar@adacore.com>
3018 * sem_ch11.adb: Minor reformatting.
3020 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3022 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
3023 Build_Array_Aggr_Code, used to initialized components covered
3024 by a box association. If the component type is scalar and has
3025 a default aspect, use it to initialize such components.
3027 2015-01-06 Pascal Obry <obry@adacore.com>
3029 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
3030 control the setup of the exception handler.
3031 * initialize.c: Remove unused declaration.
3032 * bindgen.adb: Always call __gnat_runtime_initialize and pass
3033 whether the exeception handler must be set or not.
3035 2015-01-06 Thomas Quinot <quinot@adacore.com>
3037 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
3038 order to native from default, make sure to also adjust bit order.
3039 * exp_aggr.adb: Minor reformatting.
3041 2015-01-06 Robert Dewar <dewar@adacore.com>
3043 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
3044 s-valrea.adb, s-valrea.ads: Add some additional guards for
3045 Str'Last = Positive'Last.
3047 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3049 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
3052 2015-01-06 Javier Miranda <miranda@adacore.com>
3054 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
3056 2015-01-06 Thomas Quinot <quinot@adacore.com>
3058 * sem_util.ads: Minor reformatting.
3059 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
3060 (In_RCI_Declaration) Return to old name, as proper checking of
3061 entity being in the visible part depends on entity kind and must
3062 be done by the caller.
3064 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3066 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
3067 for operators in SPARK.
3069 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3071 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
3072 expression in an others association before making copies for
3073 separate resolution and accessibility checks. This ensures that
3074 the type of the expression is available to ASIS in all cases,
3075 in particular if the expression is itself an aggregate.
3077 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
3079 * einfo.ads (Has_Independent_Components): Document extended
3081 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
3082 (Set_Has_Independent_Components): Adjust assertion.
3083 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
3084 for pragma Atomic_Components. Set Has_Independent_Components
3085 on the object instead of the type for an object declaration with
3086 pragma Independent_Components.
3088 2015-01-06 Olivier Hainque <hainque@adacore.com>
3090 * set_targ.adb (Read_Target_Dependent_Values): Set
3091 Long_Double_Index when "long double" is read.
3092 (elaboration code): Register_Back_End_Types only when not reading from
3093 config files. Doing otherwise is pointless and error prone.
3095 2015-01-06 Robert Dewar <dewar@adacore.com>
3097 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
3099 2015-01-06 Robert Dewar <dewar@adacore.com>
3101 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
3102 Str'Last = Positive'Last.
3104 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3106 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
3107 where the non-limited type is a generic actual and appears as
3108 a subtype of the non-limited view of the other.
3109 * freeze.adb (Build_Renamed_Body): If the return type of the
3110 declaration that is being completed is a limited view and the
3111 non-limited view is available, use it in the specification of
3114 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3116 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
3117 incomplete view, the type of the classwide type common to both
3118 views is the type being declared.
3120 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
3122 * einfo.ads (Is_Independent): Further document extended usage.
3124 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
3126 * einfo.ads (Is_Independent): Document extended usage.
3127 * einfo.adb (Is_Independent): Remove obsolete assertion.
3128 (Set_Is_Independent): Likewise.
3129 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
3130 (Process_Atomic_Independent_Shared_Volatile): ...this.
3131 Deal with pragma Independent here.
3132 (Analyze_Pragma): Adjust
3133 to above renaming and also invoke it for pragma Independent.
3134 Adjust comment for Independent_Components.
3136 2015-01-06 Robert Dewar <dewar@adacore.com>
3138 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
3139 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
3141 2015-01-06 Robert Dewar <dewar@adacore.com>
3143 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
3145 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
3146 Str'Last = Positive'Last.
3148 2015-01-06 Robert Dewar <dewar@adacore.com>
3150 * sem_prag.adb (Process_Inline): Remove redundant construct
3151 warning (-gnatw.r) for an ineffective pragma Inline.
3153 2015-01-06 Robert Dewar <dewar@adacore.com>
3155 * s-valint.adb: Fix typo in last checkin.
3156 * s-valuns.adb (Value_Unsigned): More efficient fix for
3158 * sem_attr.adb (Analyze_Attribute): Minor reformatting
3159 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
3161 2015-01-06 Robert Dewar <dewar@adacore.com>
3163 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
3164 Str'Last = Positive'Last
3166 2015-01-06 Thomas Quinot <quinot@adacore.com>
3168 * xoscons.adb: Display exception information and return non-zero
3169 exit status in top level exception handler.
3171 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3173 * sem_ch8.adb: Code clean up.
3175 2015-01-06 Tristan Gingold <gingold@adacore.com>
3177 * targparm.ads: Remove obsolete comment.
3179 2015-01-06 Olivier Hainque <hainque@adacore.com>
3181 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
3182 constructing a ref to variable, update inner_const_flag from the
3183 variable TREE_READONLY attribute.
3184 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
3186 (get_target_float_size): Remove.
3187 (get_target_double_size): Remove.
3188 (get_target_long_double_size): Remove.
3190 2015-01-06 Pascal Obry <obry@adacore.com>
3192 * adaint.c (ProcListEvt): Set to NULL.
3193 * rtinit.c: New file.
3194 (__gnat_rt_init_count): New reference counter set to 0.
3195 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
3196 this code is actually needed for the runtime initialization. This
3197 routine returns immediately if the initialization has already been done.
3198 * final.c: Revert previous change.
3199 * rtfinal.c: New file.
3200 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
3201 section and event. The default version of this routine is empty (except
3202 for the reference counting code). This routine returns immediately if
3203 some others libraries are referencing the runtime.
3204 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
3205 remove circuitry to initialize the signal handler as this is
3206 now done by the runtime initialization routine.
3207 (Gen_Adafinal): Generate call to Runtime_Finalize.
3208 * gnat_ugn.texi: Update documentation about concurrency and
3209 initialization/finalization of the run-time.
3210 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
3211 references to rtfinal.o and rtinit.o
3213 2015-01-06 Robert Dewar <dewar@adacore.com>
3215 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
3217 * sem_attr.adb: Implement Enum_Image attribute.
3218 * snames.ads-tmpl: Add entries for Enum_Image attribute.
3220 2015-01-06 Robert Dewar <dewar@adacore.com>
3222 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
3223 * restrict.ads (No_Use_Of_Entity): New table.
3224 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3225 Ignore No_Use_Of_Entity (will be processed in parser).
3226 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
3228 2015-01-06 Vincent Celier <celier@adacore.com>
3230 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
3231 to check for an extended project, if a project does not have
3232 yet a project declaration.
3234 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
3236 * scos.ads: Update documentation about the SCO table build
3237 process and about table records format.
3238 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
3239 (SCO_Record_Filtered): New procedure.
3240 (Set_SCO_Logical_Operator): New procedure.
3241 (dsco): Update documentation.
3242 * par_sco.adb: Update library-level comments.
3243 (SCO_Generation_State_Type): New type.
3244 (SCO_Generation_State): New variable.
3245 (SCO_Raw_Table): New package instanciation.
3246 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
3248 (Tristate): New type.
3249 (Is_Logical_Operator): Return Tristate and update documentation.
3250 (Has_Decision): Update call to Is_Logical_Operator and complete
3252 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
3253 comment, add an assertion for state checking and change
3254 references to SCO_Table into SCO_Raw_Table.
3255 (dsco): Refactor to dump the raw and the filtered tables.
3256 (Process_Decisions.Output_Decision_Operand): Handle putative
3257 short-circuit operators.
3258 (Process_Decisions.Output_Element): Update references
3259 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
3260 (Process_Decisions.Process_Decision_Operand): Update call
3261 to Is_Logical_Operator.
3262 (Process_Decisions.Process_Node): Handle putative short-circuit
3263 operators and change references to
3264 SCO_Table into SCO_Raw_Table.
3265 (SCO_Output): Add an assertion
3266 for state checking and remove code that used to stamp out SCO entries.
3267 (SCO_Pragma_Disabled): Change reference to SCO_Table
3269 (SCO_Record): Rename to SCO_Record_Raw,
3270 add an assertion for state checking and change references
3271 to SCO_Table into SCO_Raw_Table.
3272 (Set_SCO_Condition): Add an assertion for state checking, update
3273 references to Condition_Pragma_Hash_Table and change references to
3274 SCO_Table into SCO_Raw_Table.
3275 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
3276 change references to SCO_Table into SCO_Raw_Table.
3277 (Set_SCO_Logical_Operator): New procedure.
3278 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
3279 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
3280 (SCO_Record_Fildered): New procedure.
3281 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
3282 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
3284 * par-load.adb (Load): Update reference to SCO_Record.
3285 * par.adb (Par): Update reference to SCO_Record.
3286 * put_scos.adb (Put_SCOs): Add an assertion to check that no
3287 putative SCO condition reaches this end.
3288 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
3289 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
3290 when corresponding to an "and"/"or" operator affected by the
3291 Short_Circuit_And_Or pragma.
3293 2015-01-06 Robert Dewar <dewar@adacore.com>
3295 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
3296 msg for attempted USE of generic subprogram or subprogram.
3298 2015-01-06 Robert Dewar <dewar@adacore.com>
3300 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
3301 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
3302 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
3304 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3306 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
3307 that specify stream subprograms, if the prefix is a class-wide
3308 type then the generated attribute definition clause must apply
3309 to the same class-wide type.
3310 (Default_Iterator): An iterator defined by an aspect of some
3311 container type T must have a first parameter of type T, T'class,
3312 or an access to such (from code reading RM 5.5.1 (2/3)).
3314 2015-01-06 Arnaud Charlet <charlet@adacore.com>
3316 * gnat1drv.adb: Minor: complete previous change.
3318 2015-01-06 Olivier Hainque <hainque@adacore.com>
3320 * set_targ.ads (C_Type_For): New function. Return the name of
3321 a C type supported by the back-end and suitable as a basis to
3322 construct the standard Ada floating point type identified by
3323 the T parameter. This is used as a common ground to feed both
3324 ttypes values and the GNAT tree nodes for the standard floating
3326 * set_targ.adb (Long_Double_Index): The index at which "long
3327 double" gets registered in the FPT_Mode_Table. This is useful to
3328 know whether we have a "long double" available at all and get at
3329 it's characteristics without having to search the FPT_Mode_Table
3330 when we need to decide which C type should be used as the
3331 basis for Long_Long_Float in Ada.
3332 (Register_Float_Type): Fill Long_Double_Index.
3333 (FPT_Mode_Index_For): New function. Return the index in
3334 FPT_Mode_Table that designates the entry corresponding to the
3335 provided C type name.
3336 (FPT_Mode_Index_For): New function. Return the index in
3337 FPT_Mode_Table that designates the entry for a back-end type
3338 suitable as a basis to construct the standard Ada floating point
3339 type identified by the input T parameter.
3340 (elaboration code): Register_Back_End_Types unconditionally,
3341 so C_Type_For can operate regardless of -gnateT. Do it
3342 early so we can query it for the floating point sizes, via
3343 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
3344 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
3345 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
3346 which C type should be used as the basis for the construction
3347 of the Standard Ada floating point types.
3348 * get_targ.ads (Get_Float_Size, Get_Double_Size,
3349 Get_Long_Double_Size): Remove.
3350 * get_targ.adb: Likewise.
3352 2015-01-06 Thomas Quinot <quinot@adacore.com>
3354 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
3355 parameter and rename to...
3356 (In_RCI_Visible_Declarations): Fix handling of private part of nested
3358 (Validate_RCI_Subprogram_Declaration): Reject illegal function
3359 returning anonymous access in RCI unit.
3361 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3363 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
3364 function wrapper may be a homonym of another local declaration.
3365 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
3366 build function and operator wrappers after the actual subprogram
3367 has been resolved, and replace the standard renaming declaration
3368 with the declaration of wrapper.
3369 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
3370 make public for use elsewhere.
3371 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
3372 rewrite, now that actual is fully resolved when wrapper is
3375 2015-01-06 Javier Miranda <miranda@adacore.com>
3377 * exp_disp.adb: Revert previous change.
3379 2015-01-06 Robert Dewar <dewar@adacore.com>
3381 * exp_util.adb: Change name Name_Table_Boolean to
3382 Name_Table_Boolean1.
3383 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
3384 Introduce Name_Table_Boolean2/3.
3385 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
3386 Introduce Name_Table_Boolean2/3.
3387 * par-ch13.adb: Change name Name_Table_Boolean to
3388 Name_Table_Boolean1.
3390 2015-01-06 Bob Duff <duff@adacore.com>
3392 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
3394 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3396 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
3397 others choice that covers multiple components, analyze each
3398 copy with the type of the component even in compile-only mode,
3399 to detect potential accessibility errors.
3401 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
3403 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
3404 (Resolve_Actuals): An effectively volatile out
3405 parameter cannot act as an in or in out actual in a call.
3406 (Resolve_Entity_Name): An effectively volatile out parameter
3409 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3411 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
3412 the expansion of an expression function it may be pre-analyzed
3413 if a 'access attribute is applied to the function, in which case
3414 last_entity may have been assigned already.
3416 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3418 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
3419 type and actual has the corresponding full view, there is no
3420 error, but a case of use of incomplete type in a predicate or
3421 invariant expression.
3423 2015-01-06 Vincent Celier <celier@adacore.com>
3425 * makeutl.adb (Insert_No_Roots): Make sure that the same source
3426 in two different project tree is checked in both trees, if they
3427 are sources of two different projects, extended or not.
3429 2015-01-06 Arnaud Charlet <charlet@adacore.com>
3431 * gnat1drv.adb: Minor code clean up.
3432 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
3434 2015-01-06 Bob Duff <duff@adacore.com>
3436 * osint.adb (Read_Source_File): Don't print out
3437 file name unless T = Source.
3439 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3441 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
3442 recognize improper uses of constant_reference types as actuals
3443 for in-out parameters.
3444 (Check_Function_Call): Do not collect identifiers if function
3445 name is missing because of previous error.
3447 2015-01-06 Robert Dewar <dewar@adacore.com>
3449 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
3450 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
3451 Minor change of name Name_Table_Info => Name_Table_Int.
3453 2015-01-06 Robert Dewar <dewar@adacore.com>
3455 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
3456 in previous checkin.
3457 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
3459 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
3461 2015-01-06 Vincent Celier <celier@adacore.com>
3463 * a-strsup.adb (Times (Natural;String;Positive)): Raise
3464 Length_Error, not Index_Error, when the result is too long.
3466 2015-01-06 Thomas Quinot <quinot@adacore.com>
3468 * a-direct.adb (Create_Path): Minor error handling and
3469 performance improvement.
3471 2015-01-06 Robert Dewar <dewar@adacore.com>
3473 * checks.ads, sem_ch12.adb: Minor reformatting.
3474 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
3475 zero check for fixed-point case if Backend_Divide_Checks_On_Target
3478 2015-01-06 Robert Dewar <dewar@adacore.com>
3480 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
3481 Do not set restriction No_Elaboration_Code unless the pragma
3482 appears in the main unit).
3484 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3486 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
3487 that with clause has already been analyzed before checking kind
3490 2015-01-06 Robert Dewar <dewar@adacore.com>
3492 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
3493 (as required by RM).
3495 2015-01-06 Arnaud Charlet <charlet@adacore.com>
3497 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
3499 2015-01-06 Robert Dewar <dewar@adacore.com>
3501 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
3502 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
3504 2015-01-06 Javier Miranda <miranda@adacore.com>
3506 * exp_disp.adb (Expand_Interface_Conversion): No displacement
3507 of the pointer to the object needed when the type of the operand
3508 is not an interface type and the interface is one of its parent
3509 types (since they share the primary dispatch table).
3511 2015-01-06 Vincent Celier <celier@adacore.com>
3513 * prj-env.adb: Minor comment update.
3515 2015-01-06 Javier Miranda <miranda@adacore.com>
3517 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
3518 access types whose target type is an interface type to operands
3519 that are access types; required to report an error when the
3520 operand is not an access type.
3522 2015-01-06 Bob Duff <duff@adacore.com>
3524 * a-cfinve.adb (Copy): Set the discriminant to the Length when
3526 * a-cofove.ads (Capacity): Add a postcondition.
3527 * a-cfinve.ads (Capacity): Add a postcondition.
3528 (Reserve_Capacity): Correct the postcondition in the case where
3529 Capacity = 0; that means "Capacity => Length (Container)".
3530 * a-cofove.adb (Elems[c]): Add a comment
3531 explaining the dangers and how to avoid them.
3533 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3535 * sem_ch12.adb: Code clean up.
3537 2015-01-06 Arnaud Charlet <charlet@adacore.com>
3539 * gnatvsn.ads: Bump copyright year.
3541 2015-01-06 Robert Dewar <dewar@adacore.com>
3543 * s-taskin.ads, s-traces.ads: Minor reformatting.
3544 * exp_util.adb: Minor typo fix.
3546 2015-01-06 Vincent Celier <celier@adacore.com>
3548 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
3549 with the runtime name.
3550 * prj-env.adb (Initialize_Default_Project_Path): When both
3551 Target_Name and Runtime_Name are not empty string, add to the
3552 project path the two directories .../lib/gnat and .../share/gpr
3553 related to the runtime.
3554 * prj-env.ads (Initialize_Default_Project_Path): New String
3555 parameter Runtime_Name, defaulted to the empty string.
3557 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
3559 * frontend.adb: Guard against the case where a configuration
3560 pragma may be split into multiple pragmas and the original
3561 rewritten as a null statement.
3562 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
3563 pragma using Insert_Before rather than Insert_Action. This
3564 takes care of the configuration pragma case where Insert_Action
3567 2015-01-06 Bob Duff <duff@adacore.com>
3569 * a-coboho.ads (Element_Access): Add "pragma
3570 No_Strict_Aliasing (Element_Access);". This is needed because
3571 we are unchecked-converting from Address to Element_Access.
3572 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
3575 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
3577 * sem_res.adb (Resolve_Actuals): Remove the
3578 restriction which prohibits volatile actual parameters with
3579 enabled external propery Async_Writers to act appear in procedure
3580 calls where the corresponding formal is of mode OUT.
3582 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3584 * gnat_ugn.texi: Bump @copying's copyright year.
3586 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
3589 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
3591 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
3593 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
3594 of unchecked asprintf.
3597 Copyright (C) 2015 Free Software Foundation, Inc.
3599 Copying and distribution of this file, with or without modification,
3600 are permitted in any medium without royalty provided the copyright
3601 notice and this notice are preserved.