1 2015-05-22 Ed Schonberg <schonberg@adacore.com>
3 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
4 limited_with clause on a predefined unit is not transformed into
5 a regular with_clause, to preserve the original tree structure.
6 * sinfo.ads (N_With_Clause): Add comment on handling of
8 * sem_ch10.adb: Minor reformatting.
10 2015-05-22 Ed Schonberg <schonberg@adacore.com>
12 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
13 the profile of a subprogram renaming does not require freezing,
14 because it is declared in a different unit.
16 2015-05-22 Ed Schonberg <schonberg@adacore.com>
18 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
19 composite type) is private, go to full view. This was previously
20 done only in an instance context, but is happen whenever a chain
21 of private extensions includes one inherited discriminant.
23 2015-05-22 Robert Dewar <dewar@adacore.com>
25 * einfo.ads: Minor comment updates.
26 * exp_unst.adb: Move Subps table to spec Don't remove old entries
27 from table Add Last field to record last entry used.
28 * exp_unst.ads: Move Subps table here from body So that Cprint
29 can access saved values.
31 2015-05-22 Bob Duff <duff@adacore.com>
33 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
34 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
35 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
36 (Pseudo_Reference, Element_Access, Get_Element_Access): New
37 declarations added for use by performance improvements in exp_ch5.adb.
38 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
39 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
40 Instead of doing literally what the RM calls for, we do something
41 equivalent that avoids expensive operations inside the loop. If the
42 container package has appropriate Next, Pseudo_Reference,
43 Element_Access, Get_Element_Access declarations, we invoke the
45 * snames.ads-tmpl: Note speed improvement.
47 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
49 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
50 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
51 Add pattern to translate "or else" into "||".
53 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
55 * einfo.ads (Has_Volatile_Full_Access): Rename into...
56 (Is_Volatile_Full_Access): ...this.
57 (Set_Has_Volatile_Full_Access): Rename into...
58 (Set_Is_Volatile_Full_Access): ...this.
59 * einfo.adb (Has_Volatile_Full_Access): Rename into...
60 (Is_Volatile_Full_Access): ...this.
61 (Set_Has_Volatile_Full_Access): Rename into...
62 (Set_Is_Volatile_Full_Access): ...this.
63 (Is_Atomic_Or_VFA): Adjust to above renaming.
64 * errout.adb (Special_Msg_Delete): Likewise.
65 * exp_pakd.adb (Install_PAT): Likewise.
66 * freeze.adb (Freeze_Array_Type): Likewise.
67 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
68 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
69 (Inherit_Aspects_At_Freeze_Point): Likewise.
70 * sem_prag.adb (Set_Atomic_VFA): Likewise.
71 (Process_Atomic_Independent_Shared_Volatile): Likewise.
72 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
74 2015-05-22 Robert Dewar <dewar@adacore.com>
76 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
77 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
78 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
79 change that deals with the fact that most of the special coding for
80 Atomic should also apply to the case of Volatile_Full_Access.
81 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
82 references to Is_Atomic now use this new attribute.
84 2015-05-22 Robert Dewar <dewar@adacore.com>
86 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
89 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
91 * sprint.adb (Source_Dump): When generating debug files, deal
92 with the case of a stand-alone package instantiation by dumping
93 together the spec and the body in the common debug file.
95 2015-05-22 Robert Dewar <dewar@adacore.com>
97 * sem_ch13.adb (Minimum_Size): Size is zero for null range
100 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
102 * einfo.adb (Anonymous_Master): This attribute now applies
103 to package and subprogram bodies.
104 (Set_Anonymous_Master): This attribute now applies to package and
106 (Write_Field36_Name): Add output for package and subprogram bodies.
107 * einfo.ads Update the documentation on attribute Anonymous_Master
108 along with occurrences in entities.
109 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
110 handle spec and body anonymous masters of the same unit.
111 (Current_Anonymous_Master): Reimplemented. Handle a
112 package instantiation that acts as a compilation unit.
113 (Insert_And_Analyze): Reimplemented.
115 2015-05-22 Ed Schonberg <schonberg@adacore.com>
117 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
118 predefined unit is treated as a regular with_clause.
120 2015-05-22 Robert Dewar <dewar@adacore.com>
122 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
123 prj-conf.adb, sem_disp.adb: Minor reformatting.
125 2015-05-22 Vincent Celier <celier@adacore.com>
127 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
128 for switch -P and, if found and gprclean is available, invoke
130 * make.adb (Initialize): For native gnatmake, check for switch -P
131 and, if found and gprbuild is available, invoke silently gprbuild.
133 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
135 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
136 specific warning for discrete types when the source is larger
139 2015-05-22 Ed Schonberg <schonberg@adacore.com>
141 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
142 package instantiations. Holds the list of actuals in the instance
143 that are incomplete types, to determine where the corresponding
144 instance body must be placed.
145 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
146 actual in an instance matches an incomplete formal.
147 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
148 explicit dereference.
149 (Inherited_Subprograms): In the presence of a limited view there
150 are no subprograms to inherit.
151 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
152 actuals of instance, for later placement of instance body and
153 freeze nodes for actuals.
154 (Install_Body): In the presence of actuals that incomplete types
155 from a limited view, the instance body cannot be placed after
156 the declaration because full views have not been seen yet. Any
157 use of the non-limited views in the instance body requires
158 the presence of a regular with_clause in the enclosing unit,
159 and will fail if this with_clause is missing. We place the
160 instance body at the beginning of the enclosing body, which is
161 the unit being compiled, and ensure that freeze nodes for the
162 full views of the incomplete types appear before the instance.
164 2015-05-22 Pascal Obry <obry@adacore.com>
166 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
167 (In_Place_Option): Removed.
168 (Relocate_Build_Tree_Option): New constant.
169 (Root_Dir_Option): New constant.
170 (Obj_Root_Dir): Removed.
171 (Build_Tree_Dir): New variable.
172 (Root_Src_Tree): Removed.
173 (Root_Dir): New variable.
174 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
175 for improper relocation.
176 * prj-nmsc.adb (Locate_Directory): Add check for improper
179 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
181 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
182 attribute now applies to the base type.
183 (Has_Default_Init_Cond): Now applies to the base type.
184 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
185 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
186 applies to the base type.
187 (Set_Has_Default_Init_Cond): Now applies to the base type.
188 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
189 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
190 base type when adding a call to the Default_Initial_Condition.
192 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
194 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
196 (Anonymous_Master): New routine.
197 (Has_Anonymous_Master): Removed.
198 (Set_Anonymous_Master): New routine.
199 (Set_Has_Anonymous_Master): Removed.
200 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
201 (Write_Field36_Name): Add output for Anonymous_Master.
202 * einfo.ads Add new attribute Anonymous_Master along with
203 occurrences in nodes. Remove attribute Has_Anonymous_Master along
204 with occurrences in nodes.
205 (Anonymous_Master): New routine along with pragma Inline.
206 (Has_Anonymous_Master): Removed along with pragma Inline.
207 (Set_Anonymous_Master): New routine along with pragma Inline.
208 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
209 * exp_ch4.adb (Create_Anonymous_Master): New routine.
210 (Current_Anonymous_Master): Reimplemented.
212 2015-05-22 Bob Duff <duff@adacore.com>
214 * freeze.adb (Freeze_Profile): Suppress warning if imported
215 subprogram is not at library level.
217 2015-05-22 Robert Dewar <dewar@adacore.com>
219 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
220 component of an object to which Volatile_Full_Access applies.
222 2015-05-22 Jerome Guitton <guitton@adacore.com>
224 * exp_dbug.ads: Add note about non bit-packed arrays.
226 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
228 * sem_prag.adb: Fix typo.
229 * einfo.ads: Grammar fixes in comments.
231 2015-05-22 Bob Duff <duff@adacore.com>
233 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
234 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
235 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
236 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
237 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
238 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
239 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
240 Add an initialization expression "raise Program_Error". See,
241 for example, RM-A.18.2(148.4).
243 2015-05-22 Robert Dewar <dewar@adacore.com>
245 * debug.adb: Update documentation.
246 * einfo.ads, einfo.adb (Needs_Typedef): New flag
247 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
249 * frontend.adb: Update comments.
250 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
252 * opt.ads (Generate_C_Code): New switch.
253 * osint-c.adb (Write_C_File_Info): Removed, not used
254 (Write_H_File_Info): Removed, not used
255 * osint-c.ads (Write_C_File_Info): Removed, not used
256 (Write_H_File_Info): Removed, not used
257 * osint.ads (Write_Info): Minor comment updates.
258 (Output_FD): Moved from private part to public part of spec.
259 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
261 * atree.ads: minor typo in comment.
262 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
263 Do not allow VFA on composite object with aliased component.
265 2015-05-22 Arnaud Charlet <charlet@adacore.com>
267 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
269 2015-05-22 Pascal Obry <obry@adacore.com>
271 * prj-util.adb: Minor comment editing.
273 2015-05-22 Pascal Obry <obry@adacore.com>
275 * makeutl.ads (In_Place_Option): New constant.
276 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
278 (Root_Src_Tree): New variable (absolute path of root source tree).
279 * prj-conf.adb (Do_Autoconf): Take into account the object root
280 directory (if defined) to generate configuration project.
281 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
283 (Locate_Directory): Likewise.
285 2015-05-22 Pascal Obry <obry@adacore.com>
287 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
289 2015-05-22 Bob Duff <duff@adacore.com>
291 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
292 interface to return Empty when not found, so we can avoid handling
293 Program_Error in that case.
294 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
296 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
297 code is expecting Empty.
298 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
301 2015-05-22 Robert Dewar <dewar@adacore.com>
303 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
304 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
306 * exp_util.adb: Add comment.
307 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
309 (Set_File_Name): New name for the above.
310 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
311 Close_C_File, Close_H_File): New procedure.
312 * osint.adb: Minor reformatting.
313 * osint.ads: Minor comment updates.
315 2015-05-22 Robert Dewar <dewar@adacore.com>
317 * exp_ch4.adb: Minor rewording.
318 * exp_util.ads: Clarify that Find_Prim_Op is only for
321 2015-05-22 Robert Dewar <dewar@adacore.com>
323 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
325 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
328 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
330 * exp_pakd.adb (Install_PAT): Propagate representation aspects
331 from the original array type to the PAT.
333 2015-05-22 Robert Dewar <dewar@adacore.com>
335 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
337 2015-05-22 Robert Dewar <dewar@adacore.com>
339 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
341 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
343 * sem_prag.adb (Analyze_Pragma): Remove the detection
344 of a useless Part_Of indicator when the related item is a constant.
345 (Check_Matching_Constituent): Do not emit an error on a constant.
346 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
347 when the related item is a constant.
348 (Collect_Body_States): Code cleanup.
349 (Collect_Visible_States): Code cleanup.
350 (Report_Unused_States): Do not emit an error on a constant.
351 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
353 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
355 * sem_ch8.adb (Analyze_Object_Renaming): Copy
356 Has_Volatile_Full_Access from renamed to renaming entities.
357 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
358 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
360 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
362 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
364 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
365 * sem_ch3.adb (Analyze_Object_Declaration): Update references
366 to SPARK RM 6.9 rules.
367 (Check_Completion): Ghost entities do not require a special form of
369 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
370 to SPARK RM 6.9 rules.
371 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
373 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
374 to SPARK RM 6.9 rules.
375 (Requires_Completion_In_Body): Ghost entities do not require a special
378 2015-05-22 Robert Dewar <dewar@adacore.com>
380 * a-csquin.ads: Use Ada 2012 notation.
381 * sem_ch8.adb: Minor reformatting.
383 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
385 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
386 acts as a completion.
388 2015-05-22 Ed Schonberg <schonberg@adacore.com>
390 * sem_ch13.adb: Minor reformatting.
392 2015-05-22 Jose Ruiz <ruiz@adacore.com>
394 * a-reatim.adb: Minor change, fix typo.
396 2015-05-22 Robert Dewar <dewar@adacore.com>
398 * sem_util.ads: Minor addition of ??? comment.
399 * sem_prag.adb, sem_util.adb: Minor reformatting.
400 * sem_ch13.adb: minor reformatting.
402 2015-05-22 Robert Dewar <dewar@adacore.com>
404 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
406 * sem_ch13.adb: Improve error message.
407 * exp_ch4.adb: Minor reformatting.
409 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
411 * sem_prag.adb (Analyze_Pragma): Constants without variable
412 input do not require indicator Part_Of.
413 (Check_Missing_Part_Of): Constants without variable input do not
414 requrie indicator Part_Of.
415 (Collect_Visible_States): Constants without variable input are
416 not part of the hidden state of a package.
417 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
419 2015-05-22 Robert Dewar <dewar@adacore.com>
421 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
422 Atomic_Sync_Required for an object renaming declaration.
423 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
424 Is_Independent to renaming object.
426 2015-05-22 Ed Schonberg <schonberg@adacore.com>
428 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
429 various illegalities in iterators over arrays and containers:
430 a) New function Get_Cursor_Type, to verify that the cursor is
431 not a limited type at the point of iteration.
432 b) If the container is a constant, an element_iterator is illegal
433 if the container type does not have a Constant_Indexing aspect.
434 c) If the iterate function has an in-out controlling parameter,
435 the container cannot be a constant object.
436 d) Reject additional cases of iterators over a
437 discriminant-dependent component of a mutable object.
439 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
441 * einfo.adb (Contract): This attribute now applies to constants.
442 (Set_Contract): This attribute now applies to constants.
443 (Write_Field34_Name): Add output for constants.
444 * einfo.ads Attribute Contract now applies to constants.
445 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
446 their Part_Of indicator verified.
447 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
449 (Analyze_Global_Item): A constant cannot act as an output.
450 (Analyze_Initialization_Item): Constants are now a valid
452 (Analyze_Initializes_In_Decl_Part): Rename
453 global variable States_And_Vars to States_And_Objs and update
455 (Analyze_Input_Item): Constants are now a
456 valid initialization item. Remove SPARM RM references from error
458 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
459 (Collect_Body_States): Collect both source constants
461 (Collect_States_And_Objects): Collect both source constants and
463 (Collect_States_And_Variables): Rename
464 to Collect_States_And_Objects and update all its occurrences.
465 (Collect_Visible_States): Do not collect constants and variables
466 used to map generic formals to actuals.
467 (Find_Role): The role of a constant is that of an input. Separate the
468 role of a variable from that of a constant.
469 (Report_Unused_Constituents): Add specialized wording for constants.
470 (Report_Unused_States): Add specialized wording for constants.
471 * sem_util.adb (Add_Contract_Item): Add processing for constants.
472 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
473 (Find_Placement_In_State_Space): Update the comment on usage.
475 2015-05-21 Ed Schonberg <schonberg@adacore.com>
477 * sem_ch5.adb: minor reformatting.
479 2015-05-21 Robert Dewar <dewar@adacore.com>
481 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
483 2015-05-21 Robert Dewar <dewar@adacore.com>
485 * freeze.adb: Minor reformatting.
486 * cstand.adb (Print_Standard): Fix bad printing of Duration
488 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
491 2015-05-21 Ed Schonberg <schonberg@adacore.com>
493 * sem_ch5.adb: add (useless) initial value.
494 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
495 Check whether the procedure has parameters before processing
496 formals in ASIS mode.
498 2015-05-21 Ed Schonberg <schonberg@adacore.com>
500 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
501 aspect as well when indexing function is illegal.
502 (Valid_Default_Iterator): Handle properly somme illegal cases
503 to prevent compilation abandoned messages.
504 (Check_Primitive_Function): Verify that type and indexing function
505 are in the same scope.
506 * freeze.adb (Freeze_Record): Extend patch on the presence of
507 indexing aspects to aspect Default_Iterator.
509 2015-05-19 David Malcolm <dmalcolm@redhat.com>
511 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
512 from line_map * to line_map_ordinary *.
514 2015-05-12 Jason Merrill <jason@redhat.com>
516 * sigtramp-vxworks.c: Add space between string literal and macro
519 2015-05-12 Arnaud Charlet <charlet@adacore.com>
521 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
523 2015-05-12 Ed Schonberg <schonberg@adacore.com>
525 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
526 legality checks for array and container iterators:
527 a) The domain of iteration cannot be a component that depends
528 on discriminants of a mutable object. The check was recently
529 added for element iterators.
530 b) The cursor type cannot be a limited type at the point of the
531 iteration, because the cursor will be assigned to in the body
534 2015-05-12 Robert Dewar <dewar@adacore.com>
536 * freeze.adb (Freeze_Record_Type): Make sure that if we have
537 aspect Iterator_Element, then we have either Constant_Indexing
538 or Variable_Indexing.
540 2015-05-12 Ed Schonberg <schonberg@adacore.com>
542 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
543 and Reference_Control_Type to support element iterators over
545 * a-ciormu.ads, a-ciormu.adb: Ditto for
546 indefinite_ordered_multisets.
548 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
550 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
551 the evaluation of the EWA expression. Code cleanup.
552 (Process_Transient_Object): Code cleanup.
553 * exp_util.adb (Is_Aliased): Controlled transient objects found
554 within EWA nodes are not aliased.
555 (Is_Finalizable_Transient): Iterators are not finalizable transients.
557 2015-05-12 Robert Dewar <dewar@adacore.com>
559 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
560 Don't allow Atomic and Volatile_Full_Access for the same entity.
562 2015-05-12 Ed Schonberg <schonberg@adacore.com>
564 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
565 semantics and safety checks specified in AI12-0151.
567 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
569 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
570 for subunit in generic units.
572 2015-05-12 Robert Dewar <dewar@adacore.com>
574 * sem_elab.adb (Check_A_Call): Avoid checking internal call
577 2015-05-12 Ed Schonberg <schonberg@adacore.com>
579 * sem_ch6.adb (Process_Formals): An untagged incomplete type
580 is legal in the profile of a null procedure.
582 2015-05-12 Ed Schonberg <schonberg@adacore.com>
584 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
585 the checks on a derived formal whose parent type is a previous
586 formal that is not a derived type.
588 2015-05-12 Robert Dewar <dewar@adacore.com>
590 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
591 * einfo.adb (Has_Volatile_Full_Access): New flag.
592 (Has_Volatile_Full_Access): New flag.
593 * einfo.ads (Has_Volatile_Full_Access): New flag.
594 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
595 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
596 Implement new pragma.
597 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
599 2015-05-12 Robert Dewar <dewar@adacore.com>
601 * targparm.ads: Minor reformatting.
603 2015-05-12 Robert Dewar <dewar@adacore.com>
605 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
606 * a-reatim.ads: Minor reformatting.
608 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
610 * einfo.ads: Update the documentation of flags
611 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
613 2015-05-12 Robert Dewar <dewar@adacore.com>
615 * impunit.adb: Add entry for a-dhfina.ads
616 * a-dhfina.ads: New file.
618 2015-05-12 Ed Schonberg <schonberg@adacore.com>
620 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
621 type has convention Fortran, a multidimensional iterator varies
622 the first dimension fastest.
624 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
626 * einfo.adb: Node32 is now used as Encapsulating_State.
627 Node37 is now used as Associated_Entity.
628 (Associated_Entity): New routine.
629 (Encapsulating_State): Update the assertion guard to include constants.
630 (Set_Associated_Entity): New routine.
631 (Set_Encapsulating_State): Update the assertion guard to
633 (Write_Field10_Name): Remove the output for Encapsulating_State.
634 (Write_Field32_Name): Add output for Encapsulating_State.
635 (Write_Field37_Name): Add output for Associated_Entity.
636 * einfo.ads New attribute Associated_Entity along with placement
637 in entities. Attribute Encapsulating_State now uses Node32.
638 (Associated_Entity): New routine along with pragma Inline.
639 (Set_Associated_Entity): New routine along with pragma Inline.
640 * inline.ads Code reformatting.
641 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
642 attribute 'Result when the context is a generic instantiation.
643 (Analyze_Attribute_Old_Result): Pragmas Depends and
644 Refined_Depends are a valid context for attribute 'Result.
645 (Denote_Same_Function): Allow attribute 'Result to denote
647 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
648 (Analyze_Declarations): Capture global references within the
649 contracts of packages, subprograms and their respective bodies.
650 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
651 (Analyze_Completion_Contract): Removed.
652 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
653 creating the generic copy. Create a generic contract for the
654 template. Analyze the aspects of the generic body. Analyze the
655 contract of the generic body when it is a compilation unit and
656 capture global references.
657 (Analyze_Subprogram_Body_Contract): Code cleanup.
658 (Analyze_Subprogram_Contract): Do not save global references here.
659 (Save_Global_References_In_List): Removed.
660 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
661 (Analyze_Package_Body_Helper): Create a generic contract for
663 (Analyze_Package_Contract): Code cleanup.
664 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
665 (Analyze_Compilation_Unit): Capture global references in a
666 generic subprogram declaration that acts as a compilation unit.
667 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
668 the implementation of generic contracts. Alphabetize various
670 (Analyze_Generic_Package_Declaration):
671 Create a generic contract for the template.
672 (Analyze_Generic_Subprogram_Declaration): Create a generic
673 contract for the template.
674 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
676 (Copy_Generic_Node): Link defining entities of the generic template
677 with the corresponding defining entities of the generic copy. Update
678 the processing of pragmas.
679 (Instantiate_Contract): Removed.
680 (Instantiate_Subprogram_Contract): New routine.
681 (Requires_Delayed_Save): New routine.
682 (Save_Global_References): Rename formal parameter N to Templ. Various
684 (Save_Global_References_In_Aspects): Moved from the spec.
685 (Save_Global_References_In_Contract): New routine.
686 (Save_References_In_Aggregate): New routine.
687 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
688 (Save_References_In_Descendants): New routine.
689 (Save_References_In_Identifier): New routine.
690 (Save_References_In_Operator): New routine.
691 (Save_References_In_Pragma): New routine.
692 * sem_ch12.ads (Save_Global_References): Rename formal
693 parameter N to Templ. Update the comment on usage.
694 (Save_Global_References_In_Aspects): Moved to the body.
695 (Save_Global_References_In_Contract): New routine.
696 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
698 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
700 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
702 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
703 (Analyze_Depends_Global): New routine.
704 (Analyze_Depends_In_Decl_Part): Code cleanup.
705 (Analyze_Global_In_Decl_Part): Code cleanup.
706 (Analyze_Global_Item): Constants are now valid global items. Do
707 not perform state-related checks in an instance. Change the way
708 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
710 (Analyze_Initializes_In_Decl_Part): Code cleanup.
711 (Analyze_Input_Output): The analysis of attribute 'Result in
712 the context of pragmas Depends or Refined_Depends now reuses
713 the existing attribute analysis machinery. Constants and
714 generic parameters are now valid dependency items. Do not
715 perform state-related checks in an instance. Change the way
716 renamings are handled. (Analyze_Pragma): Add a "characteristics"
717 section for pragmas Abstract_State, Contract_Cases, Depends,
718 Extensions_Visible, Global, Initial_Condition, Initializes,
719 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
720 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
721 (Analyze_Pre_Post_Condition): Do not create a generic
723 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
724 (Analyze_Refined_Depends_Global_Post): New routine.
725 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
726 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
727 (Analyze_Refined_Pragma): Removed.
728 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
729 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
730 (Check_Dependency_Clause): Do not perform this check in an instance.
731 (Check_Function_Return): Add support for generic functions.
732 (Check_In_Out_States): Do not perform this check in an instance.
733 (Check_Input_States): Do not perform this check in an instance.
734 (Check_Mode_Restriction_In_Function): Add support for generic functions.
735 (Check_Output_States): Do not perform this check in an instance.
736 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
737 parameter Subp_Id to Spec_Id and update comment on usage.
738 (Check_Proof_In_States): Do not perform this check in an instance.
739 (Check_Refined_Global_Item): Add support for constants.
740 (Check_Refined_Global_List): Do not perform this check in an instance.
741 (Collect_Global_Items): Reimplemented.
742 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
743 (Create_Generic_Template): Removed.
744 (Find_Related_Package_Or_Body): Moved to spec.
745 (Find_Role): Add support for generic parameters and constants.
746 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
747 (Match_Item): Add support for constants.
748 (Preanalyze_Test_Case_Arg): Reimplemented.
749 (Report_Extra_Clauses): Do not perform this check in an instance.
750 (Report_Extra_Constituents): Do not perform this check in an instance.
751 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
752 the comment on usage.
753 (Find_Related_Package_Or_Body): Moved from body.
754 (Get_Argument): Moved from body.
755 * sem_util.adb Add with and use clauses for Sem_Ch12.
756 (Corresponding_Spec_Of): Add support for packages and package bodies.
757 (Create_Generic_Contract): New routine.
758 (Is_Contract_Annotation): Reimplemented.
759 (Is_Generic_Declaration_Or_Body): New routine.
760 (Is_Package_Contract_Annotation): New routine.
761 (Is_Subprogram_Contract_Annotation): New routine.
762 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
763 (Create_Generic_Contract): New routine.
764 (Is_Generic_Declaration_Or_Body): New routine.
765 (Is_Package_Contract_Annotation): New routine.
766 (Is_Subprogram_Contract_Annotation): New routine.
767 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
768 (Set_Is_Generic_Contract_Pragma): New routine.
769 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
770 with occurrences in nodes.
771 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
772 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
773 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
775 2015-05-12 Robert Dewar <dewar@adacore.com>
777 * a-taster.ads: Minor comment fix: fix bad header, this is a
780 2015-05-12 Robert Dewar <dewar@adacore.com>
782 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
784 2015-05-12 Robert Dewar <dewar@adacore.com>
786 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
787 Alignment_Checks on non-strict alignment machine.
788 * sem_ch13.adb (Validate_Address_Clauses): Don't give
789 compile-time alignment warnings if run time Alignment_Check
792 2015-05-12 Thomas Quinot <quinot@adacore.com>
794 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
795 Data_Rate): New literals B75, B110, B150, B300, B600.
797 2015-05-12 Doug Rupp <rupp@adacore.com>
799 * init.c (__gnat_init_float) [vxworks]: For e500v2,
800 do nothing and leave the responsibility to install the handler
801 and enable the exceptions to the BSP.
803 2015-05-12 Robert Dewar <dewar@adacore.com>
805 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
806 * sem_disp.adb: Minor code reorganization (remove junk redundant
808 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
809 references to bounds of types coming from original type reference.
810 * checks.ads: Minor reformatting.
811 * checks.adb: Minor reformatting.
812 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
813 assertion, then make sure we do not drag in bignum stuff.
815 2015-05-12 Ed Schonberg <schonberg@adacore.com>
817 * sem_ch9.adb (Collect_Interfaces): Initialize
818 Direct_Primitive_Operations for a tagged synchronized type,
819 so it can used in ASIS mode.
820 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
821 disabled, attach subprogram to list of Direct_Primitive_Operations
822 of synchronized type itself, for ASIS use, because in this case
823 Corresponding_Record_Type is not built.
824 * einfo.ads: Indicate use of Direct_Primitive_Operations on
827 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
829 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
832 2015-05-12 Robert Dewar <dewar@adacore.com>
834 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
836 2015-05-12 Robert Dewar <dewar@adacore.com>
838 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
840 2015-05-12 Ed Schonberg <schonberg@adacore.com>
842 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
843 tag to be retrieved for the generated call is the first entry
844 in the dispatch table for the return type of the instantiated
847 2015-05-12 Bob Duff <duff@adacore.com>
849 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
850 exp_util.ads: Update comments.
852 2015-05-12 Ed Schonberg <schonberg@adacore.com>
854 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
855 freeze nodes for these in ASIS mode, because they lead to
856 elaoration order issues in gigi.
858 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
860 * sem_ch6.adb (Analyze_Expression_Function): Code
861 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
862 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
863 prepare a stand alone body for inlining in GNATprove mode
864 when inside a generic. (Body_Has_Contract): Reimplemented.
865 (Build_Subprogram_Declaration): New routine.
866 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
867 references within generic bodies by loading them.
868 * sem_util.adb (Copy_Parameter_List): Code cleanup.
869 (Copy_Subprogram_Spec): New routine.
870 (Is_Contract_Annotation): New routine.
871 * sem_util.ads (Copy_Subprogram_Spec): New routine.
872 (Is_Contract_Annotation): New routine.
874 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
876 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
877 body of an expression function when the prefix of attribute
880 2015-05-12 Ed Schonberg <schonberg@adacore.com>
882 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
883 created for a derived enumeration type is not a first subtype,
884 even though it is defined through a full type declaration.
885 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
886 aspects for the anonymous base type constructed for a derived
887 scalar type, because they will be set when the first subtype
889 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
890 Default_Value and Default_Component_Value, that prevented the
891 proper inheritance of these aspects.
893 2015-05-12 Gary Dismukes <dismukes@adacore.com>
895 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
897 2015-05-12 Robert Dewar <dewar@adacore.com>
899 * sem_ch3.adb: Minor reformatting.
901 2015-05-12 Vincent Celier <celier@adacore.com>
903 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
904 -P, then check if gprbuild (gprclean) is available; if it is,
905 use gprbuild (gprclean) instead of gnatmake (gnatclean).
907 2015-05-12 Robert Dewar <dewar@adacore.com>
909 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
911 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
913 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
914 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
915 for later call instead of calling Unnest_Subprogram directly
916 (Initialize): New procedure (Unnest_Subprograms): New procedure
917 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
919 (Initialize): New procedure.
920 (Unnest_Subprograms): New procedure.
921 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
922 all processing to this routine which is now called late
923 after instantiating bodies. Fully handles the case of generic
925 * exp_unst.ads: Major rewrite, moving all processing to
927 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
928 (Frontend): Add call to Unnest_Subprograms.
929 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
930 for Check_Nested_Access.
931 * sem_util.adb (Build_Default_Subtype): Minor reformatting
932 (Check_Nested_Access): Back to original VM-only form (we
933 now do all the processing for Unnest_Subprogram at the time
935 (Denotes_Same_Object): Minor reformatting
936 (Note_Possible_Modification): Old calling sequence for
938 * sem_util.ads (Check_Nested_Access): Back to original VM-only
939 form (we now do all the processing for Unnest_Subprogram at the
942 2015-05-12 Robert Dewar <dewar@adacore.com>
944 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
946 2015-05-12 Ed Schonberg <schonberg@adacore.com>
948 * sem_ch3.adb (Analyze_Object_Declaration): New function
949 Has_Delayed_Aspect, used to defer resolution of an aggregate
950 expression when the object declaration carries aspects Address
952 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
953 to Freeze_Entity. In addition to the previous processing steps
954 at the freeze point of an object, this procedure also handles
955 aggregates in object declarations, when the declaration carries
956 delayed aspects that require that the initialization of the
957 object be attached to its freeze actions.
959 2015-05-12 Ed Schonberg <schonberg@adacore.com>
961 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
962 AI12-0147, null procedures and expression functions are allowed
965 2015-05-12 Tristan Gingold <gingold@adacore.com>
967 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
969 2015-05-12 Ed Schonberg <schonberg@adacore.com>
971 * sem_ch3.adb (Complete_Private_Subtype): Propagate
972 Has_Delayed_Aspects flag from private to full view, to ensure
973 that predicate functions are constructed.
975 2015-05-12 Ed Schonberg <schonberg@adacore.com>
977 * sem_ch6.adb (Process_Formals): If a tagged formal is an
978 incomplete class-wide type, the subprogram must have a delayed
979 freeze even though the opertation is not a primitive of the
980 type. THis ensures that the backend can recover the full view
981 when elaborating the subprogram declaration.
983 2015-05-12 Ed Schonberg <schonberg@adacore.com>
985 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
986 done if an elsif part has been rewritten so that it is not part
987 of an enclosing if_statement.
989 2015-05-12 Robert Dewar <dewar@adacore.com>
991 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
994 2015-05-12 Bob Duff <duff@adacore.com>
996 * exp_attr.adb (Size): Remove unnecessary check for types with
997 unknown discriminants. That was causing the compiler to build
998 a function call _size(T), where T is a type, not an object.
1000 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1002 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
1003 primitive operations of a type extension declared in the package
1004 body, to prevent duplicates in extended list.
1006 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1008 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
1009 an unconstrained synchronized type with discriminants, create a
1010 constrained default subtype for it, so that the enclosing record
1011 can be given the proper size.
1012 * sem_util.adb (Build_Default_Subtype): If the subtype is created
1013 for a record discriminant, do not analyze the declarztion at
1014 once because it is added to the freezing actions of the enclosing
1017 2015-05-12 Robert Dewar <dewar@adacore.com>
1019 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
1021 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
1022 * par-prag.adb (Prag): Implement Ignore_Pragma.
1023 * sem_prag.adb: Implement Ignore_Pragma.
1024 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
1026 2015-05-12 Javier Miranda <miranda@adacore.com>
1028 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
1029 entity with its corresponding real entity.
1030 (Decorate_Type): Unconditionally build the class-wide shadow entity of
1032 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
1034 (Non_Limited_View): Moved from field 17 to field 19 be available
1035 in class-wide entities.
1036 * exp_attr.adb (Access_Cases): Code cleanup.
1037 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
1038 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
1039 * freeze.adb (Build_Renamed_Bdody): Ditto.
1040 * sem_aux.adb (Available_View): Ditto.
1041 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
1042 (Try_One_Prefix_Interpretation): Ditto.
1043 * sem_ch5.adb (Analyze_Assignment): Ditto.
1044 * sem_ch6.adb (Detect_And_Exchange): Ditto.
1045 * sem_ch8.adb (Find_Expanded_Name): Ditto.
1046 * sem_disp.adb (Check_Controlling_Type): Ditto.
1047 * sem_res.adb (Resolve_Type_Conversion): Ditto.
1048 (Full_Designated_Type): Ditto.
1049 * sem_type.adb (Covers): Ditto.
1050 * sem_util.adb: Fix typo in comment.
1052 2015-05-12 Robert Dewar <dewar@adacore.com>
1054 * exp_unst.adb (Get_Real_Subp): New subprogram.
1055 (Unnest_Subprogram): Use Get_Real_Subp.
1056 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
1057 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
1059 2015-05-12 Robert Dewar <dewar@adacore.com>
1061 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
1063 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1065 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
1066 auxiliary to Try_Primitive_Operation to handle properly prefixed
1067 calls where the operation is not a primitive of the type, but
1068 is declared in the package body that is in the immediate scope
1071 2015-05-12 Robert Dewar <dewar@adacore.com>
1073 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
1075 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1077 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
1078 qualified name for an instance of a generic grand-child unit in
1079 the body its parent.
1081 2015-05-12 Robert Dewar <dewar@adacore.com>
1083 * exp_unst.adb (Upref_Name): New subprogram.
1084 (Unnest_Subprogram): Use Upref_Name.
1085 (Unnest_Subprogram): Use new Deref attribute.
1086 * exp_unst.ads: Doc updates.
1088 2015-05-12 Thomas Quinot <quinot@adacore.com>
1090 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
1091 can access files on filesystems mounted from servers that use large
1094 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
1096 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
1097 method instead of global_decl for TYPE_DECLs.
1099 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
1101 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
1104 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
1106 * gnatvsn.ads (Library_Version): Bump to 6.
1108 2015-04-09 Iain Sandoe <iain@codesourcery.com>
1110 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
1112 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
1114 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
1115 a function returning an unconstrained type 'const' for the middle-end.
1117 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
1118 exact condition to detect Reason => "..." pattern.
1120 2015-03-31 Tom de Vries <tom@codesourcery.com>
1123 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
1124 bzero call is the same expression as the destination'.
1126 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
1128 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
1130 2015-03-24 Gary Dismukes <dismukes@adacore.com>
1132 * sem_ch3.adb: Minor typo fix (missing paren).
1134 2015-03-24 Robert Dewar <dewar@adacore.com>
1136 * sinfo.ads: Update comment.
1138 2015-03-24 Robert Dewar <dewar@adacore.com>
1140 * exp_attr.adb: Add entry for typ'Deref.
1141 * sem_attr.adb (Deref): New GNAT attribute.
1142 * sem_attr.ads: Add entry for new GNAT attribute Deref.
1143 * snames.ads-tmpl: Add entries for new attribute Deref.
1145 2015-03-24 Ed Schonberg <schonberg@adacore.com>
1147 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
1150 2015-03-24 Gary Dismukes <dismukes@adacore.com>
1152 * inline.adb: Minor typo fix.
1154 2015-03-24 Arnaud Charlet <charlet@adacore.com>
1156 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1157 doc/gnat_ugn/gnat_utility_programs.rst
1158 doc/gnat_rm/implementation_defined_attributes.rst
1159 doc/gnat_rm/implementation_defined_pragmas.rst
1160 doc/gnat_rm/representation_clauses_and_pragmas.rst
1161 doc/gnat_rm/about_this_guide.rst
1162 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
1163 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
1165 2015-03-23 Jakub Jelinek <jakub@redhat.com>
1168 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
1170 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
1173 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
1174 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
1176 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
1178 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
1180 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
1181 of the expression ends up being composite.
1183 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
1185 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
1186 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
1187 parameter types to detect circularities in ASIS mode.
1188 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
1190 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
1192 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
1193 short-circuit the regular handling.
1195 2015-03-13 Robert Dewar <dewar@adacore.com>
1197 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
1199 (Actual_Ref): New function.
1200 (AREC_String): Minor reformatting.
1201 (Unnest_Subprogram): Use Actual_Ref.
1202 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
1203 before call to Instantiate_Bodies.
1205 2015-03-13 Ed Schonberg <schonberg@adacore.com>
1207 * freeze.adb (Freeze_Profile): If the return type of a function
1208 being frozen is an untagged limited view and the function is
1209 abstract, mark the type as frozen because there is no later
1210 point at which the profile of the subprogram will be elaborated.
1212 2015-03-13 Robert Dewar <dewar@adacore.com>
1214 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
1215 component to entities. Add new fields Field36-41 and Node36-41.
1217 2015-03-13 Claire Dross <dross@adacore.com>
1219 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
1221 2015-03-13 Robert Dewar <dewar@adacore.com>
1223 * exp_util.adb (Is_Volatile_Reference): Compile time known
1224 value is never considered to be a volatile reference.
1226 2015-03-13 Robert Dewar <dewar@adacore.com>
1228 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
1229 cannot be volatile" for internally generated object (such as
1230 FIRST and LAST constants).
1232 2015-03-13 Ed Schonberg <schonberg@adacore.com>
1234 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
1235 convention is specified for the formal parameter, verify that
1236 the actual has the same convention.
1237 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
1238 pragma to be set on a generic formal type.
1239 * sem_util.adb (Set_Convention): Ignore within an instance,
1240 as it has already been verified in the generic unit.
1242 2015-03-13 Claire Dross <dross@adacore.com>
1244 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
1245 subprograms with unconstrained record parameters containing
1247 * sinfo.ads Document GNATprove assumption that type should match
1249 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
1250 Do not check for Refined_Depends and Refined_Globals contracts
1251 as they are optional.
1253 2015-03-13 Ed Schonberg <schonberg@adacore.com>
1255 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
1256 capture dimension info if any, because the generated subtype
1257 declaration does not come from source and will not process dimensions.
1258 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
1259 Do not analyze expressions with an initialization procedure
1260 because aggregates will have been checked at the point of record
1263 2015-03-13 Robert Dewar <dewar@adacore.com>
1265 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
1266 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
1267 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
1268 * snames.ads-tmpl: Add entry for Name_Unimplemented.
1270 2015-03-13 Gary Dismukes <dismukes@adacore.com>
1272 * style.adb (Missing_Overriding): Apply the
1273 Comes_From_Source test to the Original_Node of the subprogram
1274 node, to handle the case of a null procedure declaration that
1275 has been rewritten as an empty procedure body.
1277 2015-03-13 Robert Dewar <dewar@adacore.com>
1279 * exp_util.ads: Minor fix to comment.
1280 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
1283 2015-03-13 Robert Dewar <dewar@adacore.com>
1285 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
1286 Is_Low/High_Bound params.
1287 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
1288 sequence to simplify generation of FIRST/LAST temps for bounds.
1290 2015-03-12 Olivier Hainque <hainque@adacore.com>
1292 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
1293 On targets where a function symbol designates a function descriptor,
1294 fetch the function code address from the descriptor.
1295 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
1297 2015-03-04 Robert Dewar <dewar@adacore.com>
1299 * sem_warn.adb: Minor reformatting.
1300 * init.c: Minor tweaks.
1302 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
1304 * a-coinho-shared.adb: Fix clear of already empty holder.
1306 2015-03-04 Robert Dewar <dewar@adacore.com>
1308 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
1309 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
1310 (Note_Uplevel_Reference): Ignore call inside generic.
1311 (Note_Uplevel_Reference): Fix check for no entity field.
1312 (Unnest_Subprogram): Ignore call inside generic.
1313 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
1314 (Visit_Node): Ignore calls to Imported subprograms.
1315 (Visit_Node): Fix problem in finding subprogram body in some cases.
1316 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
1318 2015-03-04 Robert Dewar <dewar@adacore.com>
1320 * einfo.adb (Is_ARECnF_Entity): Removed.
1321 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
1322 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
1323 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
1324 (Number_Entries): Minor reformatting.
1325 * einfo.ads (Is_ARECnF_Entity): Removed.
1326 * exp_unst.adb (Unnest_Subprogram): Remove setting of
1328 (Add_Extra_Formal): Use normal Extra_Formal circuit.
1329 * sprint.adb (Write_Param_Specs): Properly handle case where
1330 there are no source formals, but we have at least one Extra_Formal
1333 2015-03-04 Ed Schonberg <schonberg@adacore.com>
1335 * sem_aggr.adb (Resolve_Record_Aggregate,
1336 Add_Discriminant_Values): If the value is a reference to the
1337 current instance of an enclosing type, use its base type to check
1338 against prefix of attribute reference, because the target type
1339 may be otherwise constrained.
1341 2015-03-04 Robert Dewar <dewar@adacore.com>
1343 * atree.h: Add entries for Flag287-Flag309.
1344 * einfo.adb: Add (unused) flags Flag287-Flag309.
1346 2015-03-04 Ed Schonberg <schonberg@adacore.com>
1348 * sem_util.adb (Collect_Interfaces, Collect): When gathering
1349 interfaces of ancestors, handle properly a subtype of a private
1352 2015-03-04 Robert Dewar <dewar@adacore.com>
1354 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
1355 (Next_Formal): Don't return ARECnF formal.
1356 (Last_Formal): Don't consider ARECnF formal.
1357 (Next_Formal_With_Extras): Do consider ARECnF formal.
1358 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
1359 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
1361 2015-03-04 Javier Miranda <miranda@adacore.com>
1363 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
1364 object is a class-wide interface object and we generate the
1365 accessibility described in RM 6.5(8/3) then displace the pointer
1366 to the object to reference the base of the object (to get access
1367 to the TSD of the object).
1369 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
1371 * sem_prag.adb (Analyze_Abstract_State): Use routine
1372 Malformed_State_Error to issue general errors.
1373 (Analyze_Pragma): Diagnose a syntax error related to a state
1374 declaration with a simple option.
1375 (Malformed_State_Error): New routine.
1377 2015-03-04 Robert Dewar <dewar@adacore.com>
1379 * a-strsup.adb (Super_Slice): Deal with super flat case.
1380 * einfo.ads: Minor reformatting.
1381 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
1384 2015-03-04 Claire Dross <dross@adacore.com>
1386 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
1387 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
1390 2015-03-04 Ed Schonberg <schonberg@adacore.com>
1392 * sem_warn.adb (Check_References): When checking for an unused
1393 in-out parameter of a class- wide type, use its type to determine
1394 whether it is private, in order to avoid a spurious warning when
1395 subprogram spec and body are in different units.
1397 2015-03-04 Yannick Moy <moy@adacore.com>
1399 * sem_attr.adb: Improve warning messages.
1401 2015-03-04 Robert Dewar <dewar@adacore.com>
1403 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
1404 generic subprograms.
1405 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
1406 (Note_Uplevel_Reference): Ignore uplevel references to non-types
1407 (Get_Level): Consider only subprograms, not blocks.
1408 (Visit_Node): Set proper condition for generating ARECnF entity.
1409 Ignore indirect calls. Ignore calls to subprograms
1411 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
1412 (Add_Form_To_Spec): Properly set Last_Entity field.
1413 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
1414 Handle case of no uplevel refs in outer subprogram
1415 Don't mark uplevel entities as aliased.
1416 Don't deal with calls with no ARECnF requirement.
1418 2015-03-04 Robert Dewar <dewar@adacore.com>
1420 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
1421 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
1422 operation in computing LZ.
1423 * sem_attr.adb: Minor typo fix
1425 2015-03-04 Robert Dewar <dewar@adacore.com>
1427 * exp_ch7.adb: Minor reformatting.
1428 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
1430 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
1432 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
1434 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
1435 references to formal parameters subject to pragma Unreferenced.
1436 (Suppress_Reference): New routine.
1437 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
1438 of attribute 'Old. Attributes 'Old and 'Result now share
1440 (Analyze_Old_Result_Attribute): New routine.
1441 (Check_Placement_In_Check): Removed.
1442 (Check_Placement_In_Contract_Cases): Removed.
1443 (Check_Placement_In_Test_Case): Removed.
1444 (Check_Use_In_Contract_Cases): Removed.
1445 (Check_Use_In_Test_Case): Removed.
1446 (In_Refined_Post): Removed.
1447 (Is_Within): Removed.
1448 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
1449 (Check_Low_Bound_Tested_For): New routine.
1451 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
1453 * exp_ch3.adb (Expand_N_Object_Declaration):
1454 Generate a runtime check to test the expression of pragma
1455 Default_Initial_Condition when the object is default initialized.
1457 2015-03-02 Robert Dewar <dewar@adacore.com>
1459 * scng.adb (Scan): Ignore illegal character in relaxed
1462 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1464 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
1465 on left operand, so it can be properly resolved with type of
1466 alternatives of right operand.
1467 * sem_res.adb (Resolve_Set_Membership): Handle properly an
1468 overloaded left-hand side when the alternatives on the right
1469 hand side are literals of some universal type. Use first
1470 non-overloaded alternative to find expected type.
1472 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1474 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
1475 type to retrieve designated type, because the purported access
1476 type may be a partial (private) view, when it is declared in
1477 the private part of a nested package, and finalization actions
1478 are generated when completing compilation of enclosing unit.
1480 2015-03-02 Robert Dewar <dewar@adacore.com>
1482 * back_end.adb (Call_Back_End): Remove previous patch,
1483 the back end now gets to see the result of -gnatd.1
1484 (Unnest_Subprogram_Mode) processing.
1485 * elists.ads, elists.adb (List_Length): New function.
1486 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
1487 * sem_util.adb (Check_Nested_Access): Handle formals in
1488 Unnest_Subprogram_Mode.
1489 (Adjust_Named_Associations): Minor reformatting.
1490 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
1493 2015-03-02 Robert Dewar <dewar@adacore.com>
1495 * atree.ads, atree.adb (Uint24): New function
1496 (Set_Uint24): New procedure.
1497 * atree.h (Uint24): New macro for field access.
1498 * back_end.adb (Call_Back_End): For now, don't call back end
1499 if unnesting subprogs.
1500 * einfo.adb (Activation_Record_Component): New field
1501 (Subps_Index): New field.
1502 * einfo.ads (Activation_Record_Component): New field
1503 (Subps_Index): New field Minor reordering of comments into alpha order.
1504 * exp_unst.ads, exp_unst.adb: Continued development.
1506 2015-03-02 Gary Dismukes <dismukes@adacore.com>
1508 * exp_disp.ads: Minor reformatting.
1510 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1512 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
1513 ancestor to list of use clauses active in descendant unit if we
1514 are within the private part of an intervening parent, to prevent
1515 circularities in use clause list.
1517 2015-03-02 Javier Miranda <miranda@adacore.com>
1519 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
1520 invariants to the corresponding record type.
1521 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
1522 which sets the value of the DTC_Entity associated with a given
1523 primitive of a tagged type and propagates the value to the
1525 (Set_DTC_Entity_Value): Propagate the DTC
1526 value to the wrapped entity.
1527 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
1528 associated with invariants of progenitors.
1529 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
1530 of parents and progenitors.
1531 (Process_Full_View): Check hidden inheritance of class-wide type
1533 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
1534 the invariant procedure for interface types; build the invariant
1535 procedure for tagged types inheriting invariants from their
1537 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
1538 types but do not build their invariant procedure since their
1539 invariants will be propagated to the invariant procedure of
1540 types covering the interface.
1541 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
1542 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
1543 by calls to Set_DT_Position_Value.
1545 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
1547 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
1548 code in Denote_Same_Function. Do not analyze attribute 'Result
1549 when it is inside procedure _Postconditions. Remove a misplaced
1550 warning diagnostic. Code cleanup.
1551 (Denote_Same_Function): New routine.
1552 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
1553 cleanup. Warn on pre/postconditions on an inlined subprogram.
1554 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
1555 an inlined subprogram.
1556 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
1557 pre/post condition on an inlined subprogram.
1558 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
1559 pre/postconditions on an inlined subprogram.
1560 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
1562 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
1564 * sem_prag.adb (Ensure_Aggregate_Form):
1565 Ensure that the name denoted by the Chars of a pragma argument
1566 association has the proper Sloc when converted into an aggregate.
1568 2015-03-02 Bob Duff <duff@adacore.com>
1570 * sem_ch6.adb (Check_Private_Overriding): Capture
1571 Incomplete_Or_Partial_View in a constant. This is cleaner and
1574 2015-03-02 Gary Dismukes <dismukes@adacore.com>
1576 * einfo.ads, exp_unst.ads: Minor reformatting.
1578 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1580 * a-strsea.adb (Find_Token): Ensure that the range of iteration
1581 does not perform any improper character access. This prevents
1582 erroneous access in the unusual case of an empty string target
1583 and a From parameter less than Source'First.
1585 2015-03-02 Robert Dewar <dewar@adacore.com>
1587 * elists.adb (List_Length): Fix incorrect result.
1589 2015-03-02 Bob Duff <duff@adacore.com>
1591 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
1592 checks here. It used to check that the function is merely
1593 overriding SOMEthing. Now it checks that the function is
1594 overriding a corresponding public operation. This is a correction
1595 to the implementation of the rule in RM-3.9.3(10).
1597 2015-03-02 Robert Dewar <dewar@adacore.com>
1599 * debug.adb: Document new debug flag -gnatd.1.
1600 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
1601 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
1602 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
1603 * elists.ads elists.adb (List_Length): New function.
1604 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
1605 when appropriate (Process_Preconditions): Minor code
1606 reorganization and reformatting
1607 * exp_unst.ads, exp_unst.adb: New files.
1608 * gnat1drv.adb (Adjust_Global_Switches): Set
1609 Unnest_Subprogram_Mode if -gnatd.1
1610 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
1612 * opt.ads (Unnest_Subprogram_Mode): New flag.
1613 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
1614 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
1615 Has_Nested_Subprogram flag.
1616 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
1617 Check_Nested_Access.
1618 (Find_Selected_Component): Minor comment addition.
1619 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
1620 (Note_Possible_Modification): New calling sequence for
1621 Check_Nested_Access.
1622 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
1623 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
1625 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
1627 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
1628 types, preserve the original type and create copies just like the C
1629 front-end does. For artificial ones, do not define a name for
1631 (create_type_decl): When gnat_pushdecl made the input type the
1632 original type for the new declaration, do not define a stub
1634 * gcc-interface/utils2.c (build_binary_op): Accept two different
1635 pointer types when they point to the same type.
1637 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
1639 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
1641 * sem_util.adb (Kill_Current_Values): Do not invalidate and
1644 2015-03-02 Robert Dewar <dewar@adacore.com>
1646 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
1649 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1651 * sem_ch8.adb: extend use of Available_Subtype.
1653 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
1655 * sem_prag.adb (Duplication_Error): Remove the special handling
1656 of 'Class or _Class in the context of pre/postconditions.
1657 (Process_Class_Wide_Condition): Remove the special handling of
1658 'Class or _Class in the context of pre/postconditions.
1659 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
1660 and Post_Class no longer need to be converted to _Pre and _Post.
1661 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
1664 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
1666 * exp_ch6.adb (Process_Preconditions): Modify the
1667 mechanism that find the first source declaration to correct exit
1668 the loop once it has been found.
1670 2015-03-02 Gary Dismukes <dismukes@adacore.com>
1672 * a-strsea.adb: Minor typo fix.
1674 2015-03-02 Bob Duff <duff@adacore.com>
1676 * einfo.ads: Minor comment fixes.
1678 2015-03-02 Gary Dismukes <dismukes@adacore.com>
1680 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
1682 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1684 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
1685 is defined for the array type, use it instead of a Default_Value
1686 specified for the component type itself.
1688 2015-03-02 Thomas Quinot <quinot@adacore.com>
1690 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
1691 expanding a 'Input attribute reference for a class-wide type,
1692 do not generate a separate object declaration for the controlling
1693 tag dummy object; instead, generate the expression inline in the
1694 dispatching call. Otherwise, the declaration (which involves a
1695 call to String'Input, returning a dynamically sized value on the
1696 secondary stack) will be expanded outside of proper secondary
1697 stack mark/release operations, and will thus cause a secondary
1700 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
1702 * checks.adb (Add_Validity_Check): Change the names of all
1703 formal parameters to better illustrate their purpose. Update
1704 the subprogram documentation. Update all occurrences of the
1705 formal parameters. Generate a pre/postcondition pragma by
1706 calling Build_Pre_Post_Condition.
1707 (Build_PPC_Pragma): Removed.
1708 (Build_Pre_Post_Condition): New routine.
1709 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
1710 is now used as Postconditions_Proc. Flag240 is now renamed to
1711 Has_Expanded_Contract. (First_Formal): The routine can now
1712 operate on generic subprograms.
1713 (First_Formal_With_Extras): The routine can now operate on generic
1715 (Has_Expanded_Contract): New routine.
1716 (Has_Postconditions): Removed.
1717 (Postcondition_Proc): Removed.
1718 (Postconditions_Proc): New routine.
1719 (Set_Has_Expanded_Contract): New routine.
1720 (Set_Has_Postconditions): Removed.
1721 (Set_Postcondition_Proc): Removed.
1722 (Set_Postconditions_Proc): New routine.
1723 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
1724 the output of Has_Expanded_Contract.
1725 (Write_Field8_Name): Remove the output of Postcondition_Proc.
1726 (Write_Field14_Name): Add the output of Postconditions_Proc.
1727 * einfo.ads New attributes Has_Expanded_Contract and
1728 Postconditions_Proc along with occurrences in entities.
1729 Remove attributes Has_Postconditions and Postcondition_Proc
1730 along with occurrences in entities.
1731 (Has_Expanded_Contract): New routine along with pragma Inline.
1732 (Has_Postconditions): Removed along with pragma Inline.
1733 (Postcondition_Proc): Removed along with pragma Inline.
1734 (Postconditions_Proc): New routine along with pragma Inline.
1735 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
1736 (Set_Has_Postconditions): Removed along with pragma Inline.
1737 (Set_Postcondition_Proc): Removed along with pragma Inline.
1738 (Set_Postconditions_Proc): New routine along with pragma Inline.
1739 * exp_ch6.adb (Add_Return): Code cleanup. Update the
1740 generation of the call to the _Postconditions routine of
1741 the procedure. (Expand_Non_Function_Return): Reformat the
1742 comment on usage. Code cleanup. Update the generation of
1743 the call to the _Postconditions routine of the procedure or
1745 (Expand_Simple_Function_Return): Update the
1746 generation of the _Postconditions routine of the function.
1747 (Expand_Subprogram_Contract): Reimplemented.
1748 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
1749 profile along the comment on usage.
1750 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
1751 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
1752 wrapper when the entry [family] has a contract with
1754 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
1755 (Expand_Contract_Cases): This routine and its subsidiaries now
1756 analyze all generated code.
1757 (Expand_Old_In_Consequence): Removed.
1758 * sem_attr.adb Add with and use clause for Sem_Prag.
1759 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
1760 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
1762 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
1763 a generic subprogram.
1764 (Analyze_Object_Declaration): Do not create a contract node.
1765 (Derive_Subprogram): Do not create a contract node.
1766 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
1767 not create a contract node.
1768 (Analyze_Completion_Contract): New routine.
1769 (Analyze_Function_Return): Alphabetize.
1770 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
1771 contract node. Do not copy pre/postconditions to the original
1773 (Analyze_Null_Procedure): Do not create a contract node.
1774 (Analyze_Subprogram_Body_Contract): Reimplemented.
1775 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
1776 as having postconditions. Do not create a contract node. Analyze
1777 the subprogram body contract of a body that acts as a compilation
1778 unit. Expand the subprogram contract after the declarations have
1780 (Analyze_Subprogram_Contract): Reimplemented.
1781 (Analyze_Subprogram_Specification): Do not create a contract node.
1782 (List_Inherited_Pre_Post_Aspects): Code cleanup.
1783 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
1785 (Analyze_Subprogram_Contract): Update the
1786 parameter profile and the comment on usage.
1787 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
1789 (Analyze_Package_Declaration): Do not create a
1791 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
1792 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
1794 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
1796 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
1797 their proper section and alphabetize them. Analyze the contract of
1798 a [generic] subprogram after all Pragmas_After have been analyzed.
1799 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
1800 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
1801 create a contract node.
1802 (Analyze_Generic_Subprogram_Declaration):
1803 Alphabetize local variables. Do not create a contract
1804 node. Do not generate aspects out of pragmas for ASIS.
1805 (Analyze_Subprogram_Instantiation): Instantiate
1806 the contract of the subprogram. Do not create a
1807 contract node. (Instantiate_Contract): New routine.
1808 (Instantiate_Subprogram_Body): Alphabetize local variables.
1809 (Save_Global_References_In_Aspects): New routine.
1810 (Save_References): Do not save the global references found within
1811 the aspects of a generic subprogram.
1812 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
1813 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
1814 Original_Node for establishing linkages.
1815 (Insert_Pragma): Insertion in a subprogram body takes precedence over
1816 the case where the subprogram body is also a compilation unit.
1817 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
1818 Get_Argument to obtain the proper expression. Install the generic
1819 formals when the related context is a generic subprogram.
1820 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
1821 the proper expression. Use Corresponding_Spec_Of to obtain
1822 the spec. Install the generic formal when the related context
1823 is a generic subprogram.
1824 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
1825 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
1826 generic formal when the related context is a generic subprogram.
1827 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
1828 to obtain the proper expression. Remove the call to
1829 Check_SPARK_Aspect_For_ASIS as the analysis is now done
1831 (Analyze_Pragma): Update all occurrences
1832 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
1833 Extensions_Visible, Global, Postcondition, Precondition and
1834 Test_Case now carry generic templates when the related context
1835 is a generic subprogram. The same pragmas are no longer
1836 forcefully fully analyzed when the context is a subprogram
1837 that acts as a compilation unit. Pragmas Abstract_State,
1838 Initial_Condition, Initializes and Refined_State have been clean
1839 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
1840 and Precondition now use the same routine for analysis. Pragma
1841 Refined_Post does not need to check the use of 'Result or
1842 the lack of a post-state in its expression. Reimplement the
1843 analysis of pragma Test_Case.
1844 (Analyze_Pre_Post_Condition): New routine.
1845 (Analyze_Pre_Post_Condition_In_Decl_Part):
1847 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
1849 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
1850 the proper expression.
1851 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
1852 (Check_Pre_Post): Removed.
1853 (Check_Precondition_Postcondition): Removed.
1854 (Check_SPARK_Aspect_For_ASIS): Removed.
1855 (Check_Test_Case): Removed.
1856 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
1857 to obtain the proper expression. Use Corresponding_Spec_Of to
1858 find the proper spec.
1859 (Create_Generic_Template): New routine.
1860 (Duplication_Error): New routine.
1861 (Expression_Function_Error): New routine.
1862 (Find_Related_Subprogram_Or_Body): Moved to the spec
1863 of Sem_Prag. Emit precise error messages. Account for cases of
1864 rewritten expression functions, generic instantiations, handled
1865 sequence of statements and pragmas from aspects.
1866 (Get_Argument): New routine.
1867 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
1868 (Preanalyze_CTC_Args): Removed.
1869 (Process_Class_Wide_Condition): New routine.
1870 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
1871 the parameter profile along with the comment on usage.
1872 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
1873 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
1874 (Test_Case_Arg): New routine.
1875 * sem_util.adb Add with and use clauses for Sem_Ch6.
1876 (Add_Contract_Item): This routine now creates a contract
1877 node the first time an item is added. Remove the duplicate
1878 aspect/pragma checks.
1879 (Check_Result_And_Post_State): Reimplemented.
1880 (Corresponding_Spec_Of): New routine.
1881 (Get_Ensures_From_CTC_Pragma): Removed.
1882 (Get_Requires_From_CTC_Pragma): Removed.
1883 (Has_Significant_Contract): New routine.
1884 (Inherit_Subprogram_Contract): Inherit only if the source
1886 (Install_Generic_Formals): New routine.
1887 (Original_Aspect_Name): Removed.
1888 (Original_Aspect_Pragma_Name): New routine.
1889 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
1890 (Corresponding_Spec_Of): New routine.
1891 (Get_Ensures_From_CTC_Pragma): Removed.
1892 (Get_Requires_From_CTC_Pragma): Removed.
1893 (Has_Significant_Contract): New routine.
1894 (Install_Generic_Formals): New routine.
1895 (Original_Aspect_Name): Removed.
1896 (Original_Aspect_Pragma_Name): New routine.
1897 * sem_warn.adb Add with and use clauses for Sem_Prag.
1898 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
1900 2015-03-02 Ed Schonberg <schonberg@adacore.com>
1902 * sem_ch8.adb (Available_Subtype): Optimization in
1903 Find_Selected_Component: when safe, use existing subtype of
1904 array component, possibly discriminant-dependent, rather than
1905 creating new subtype declaration for it. In this fashion different
1906 occurrences of the component have the same subtype, rather than
1907 just equivalent ones. Simplifies value tracing in GNATProve.
1909 2015-03-01 Arnaud Charlet <charlet@adacore.com>
1913 * doc/gnat_ugn/gnat_project_manager.rst,
1914 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
1915 image, too troublesome with texi format.
1916 * gnat_ugn.texi: Regenerate.
1918 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1921 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
1922 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
1923 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1925 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
1927 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
1928 arguments parameter.
1929 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
1931 2015-02-22 Arnaud Charlet <charlet@adacore.com>
1933 * doc/Makefile: postprocess texinfo files to update @dircategory
1934 and update texi files under gcc/ada.
1935 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
1937 2015-02-22 Arnaud Charlet <charlet@adacore.com>
1939 * doc/gnat_ugn/project-manager-figure.png,
1940 doc/gnat_ugn/rtlibrary-structure.png: New.
1942 2015-02-22 Tom de Vries <tom@codesourcery.com>
1945 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
1946 @item, and fix warning '@itemize has text but no @item'.
1948 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1950 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
1951 legally applies to an abstract subprogram declaration.
1952 * freeze.adb: Minor comment addition.
1954 2015-02-20 Robert Dewar <dewar@adacore.com>
1956 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
1957 * erroutc.adb (Set_Msg_Str): Replace _xxx.
1958 (Pre/Post/Type_Invariant) by xxx'Class.
1959 * erroutc.ads (Set_Msg_Str): Replace _xxx.
1960 (Pre/Post/Type_Invariant) by xxx'Class.
1961 * sem_prag.adb (Fix_Error): Remove special casing of
1962 Name_uType_Invariant.
1963 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
1964 Name_uPre and Name_uPost in aspect case (done in Errout now).
1966 2015-02-20 Robert Dewar <dewar@adacore.com>
1968 * g-alveop.adb: Minor style fixes.
1970 2015-02-20 Robert Dewar <dewar@adacore.com>
1972 * freeze.adb (Warn_Overlay): Guard against blow up with address
1975 2015-02-20 Bob Duff <duff@adacore.com>
1977 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
1978 for the compiler to guess whether the call is internal or external --
1979 it is always external.
1980 (Expand_Access_To_Protected_Op): For P'Access, where P
1981 is a protected subprogram, always create a pointer to the
1982 External_Subprogram.
1984 2015-02-20 Robert Dewar <dewar@adacore.com>
1986 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
1988 2015-02-20 Robert Dewar <dewar@adacore.com>
1990 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
1991 predicate for non-static subtype.
1992 (Build_Predicate_Functions): Do not assume subtype associated with a
1993 static predicate must be static.
1995 2015-02-20 Robert Dewar <dewar@adacore.com>
1997 * errout.adb (Set_Msg_Node): Better handling of internal names
1998 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
1999 * errout.ads: Document additional case of message deletion.
2000 * namet.adb (Is_Internal_Name): Refined to consider wide
2001 strings in brackets notation and character literals not to be
2003 * sem_ch8.adb (Find_Selected_Component): Give additional error
2004 when selector name is a subprogram whose first parameter has
2005 the same type as the prefix, but that type is untagged.
2007 2015-02-20 Robert Dewar <dewar@adacore.com>
2009 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
2011 2015-02-20 Tristan Gingold <gingold@adacore.com>
2013 * opt.ads (GNAT_Mode_Config): New variable.
2014 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
2015 to set Assertions_Enabled.
2016 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
2019 2015-02-20 Robert Dewar <dewar@adacore.com>
2021 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
2022 comment regarding the handling of unterminated fixed-point
2024 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
2025 corresponding to those previously added for
2026 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
2028 2015-02-20 Olivier Hainque <hainque@adacore.com>
2030 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
2032 2015-02-20 Robert Dewar <dewar@adacore.com>
2034 * sem_prag.adb: Minor comment clarification.
2036 2015-02-20 Olivier Hainque <hainque@adacore.com>
2038 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
2039 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
2040 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
2041 (vec_ctf): Now renamings as well.
2043 2015-02-20 Robert Dewar <dewar@adacore.com>
2045 * switch-c.adb, bindgen.adb: Minor reformatting.
2047 2015-02-20 Ed Schonberg <schonberg@adacore.com>
2049 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
2050 Invariant'class is allowed on an abstract type.
2052 2015-02-20 Ed Schonberg <schonberg@adacore.com>
2054 * sem_ch3.adb (Access_Definition): If the access definition is
2055 for a protected component and defines an access to protected
2056 subprogram, do not create an itype reference for it because a
2057 full type declaration will be built in order to generate the
2058 proper equivalent type.
2059 (Analyze_Subtype_Declaration): Add information of incomplete
2060 subtypes, for Ada 2012 extended uses of incomplete types.
2062 2015-02-20 Gary Dismukes <dismukes@adacore.com>
2064 * sem_res.adb: Minor reformatting.
2066 2015-02-20 Vincent Celier <celier@adacore.com>
2068 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
2069 path name for several switches --RTS, use the normalized path
2072 2015-02-20 Vincent Celier <celier@adacore.com>
2074 * bindgen.adb: Minor reformatting and code reorganization.
2076 2015-02-20 Jose Ruiz <ruiz@adacore.com>
2078 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
2079 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
2080 defined by Ada 2012.
2082 2015-02-20 Arnaud Charlet <charlet@adacore.com>
2084 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
2085 obsolete references to RTX, nucleus, VMS.
2087 2015-02-20 Ed Schonberg <schonberg@adacore.com>
2089 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
2090 aspect, use name that mentions Class explicitly, rather than
2091 compiler-internal name.
2093 2015-02-20 Robert Dewar <dewar@adacore.com>
2095 * debug.adb: Add documentation for -gnatd.2 (allow statements
2097 * par-ch3.adb (P_Identifier_Declarations): Handle
2098 statement appearing where declaration expected more cleanly.
2099 (Statement_When_Declaration_Expected): Implement debug flag
2102 2015-02-20 Jose Ruiz <ruiz@adacore.com>
2104 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
2105 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
2106 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
2107 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
2108 defined by Ada 2005.
2109 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
2110 This is the correct name for the dispatching policy (FIFO was
2113 2015-02-20 Javier Miranda <miranda@adacore.com>
2115 * sem_res.adb (Resolve_Type_Conversion): If the type of the
2116 operand is the limited-view of a class-wide type then recover
2117 the class-wide type of the non-limited view.
2119 2015-02-20 Arnaud Charlet <charlet@adacore.com>
2121 * gcc-interface/Makefile.in: Remove references to nucleus.
2122 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
2123 extern_flag to true for Inline_Always subprograms with
2124 Intrinsic convention.
2126 2015-02-20 Yannick Moy <moy@adacore.com>
2128 * sem_prag.ads: Minor typo in comment.
2130 2015-02-20 Pascal Obry <obry@adacore.com>
2132 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
2134 2015-02-20 Vincent Celier <celier@adacore.com>
2136 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
2139 2015-02-20 Robert Dewar <dewar@adacore.com>
2141 * sem_eval.ads: Minor reformatting.
2143 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
2145 * freeze.adb (Size_Known): Do not set the packed size for
2146 independent type or component.
2147 (Freeze_Array_Type): Check for Independent[_Components] with packing
2148 or explicit component size clause.
2149 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
2150 of independence pragmas only for non-GCC back-ends.
2151 * sem_ch13.adb (Initialize): Likewise for the initialization.
2152 * sem_prag.adb (Record_Independence_Check): New procedure to record an
2153 independence check in the table.
2154 (Analyze_Pragma): Use it throughout instead of doing it manually.
2155 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
2156 independent type or component.
2158 2015-02-20 Thomas Quinot <quinot@adacore.com>
2160 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
2161 struct direct and readdir. This is required for NFS filesystems
2162 mounted from servers that use 64-bit cookies.
2164 2015-02-20 Ed Schonberg <schonberg@adacore.com>
2166 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
2167 Build_Subprogram_Renaming, to create renaming of subprogram
2168 instance in the the declaration of the wrapper package rather
2169 than in its body, so that it is available for analysis of aspects
2170 propagated from generic to instantiation.
2171 (Check_Mismatch): An actual for a formal package that is an
2172 incomplete type matches a formal type that is incomplete.
2173 (Instantiate_Package_Body): Move code that builds subprogram
2174 renaming to Analyze_Subprogram_Instantiation.
2175 (Instantiate_Type): The generated subtype is a limited view if
2176 the actual is a limited view.
2177 (Load_Parent_Of_Generic): Retrieve instance declaration from
2178 its new position within wrapper package.
2180 2015-02-20 Arnaud Charlet <charlet@adacore.com>
2182 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
2184 2015-02-20 Robert Dewar <dewar@adacore.com>
2186 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
2187 issue of negative arguments.
2189 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
2191 * gnat1drv.adb: Minor consistency fix.
2193 2015-02-20 Pascal Obry <obry@adacore.com>
2195 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
2198 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
2200 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
2202 * exp_ch6.adb (Expand_Call): Use back-end inlining
2203 instead of expansion for simple subprogram renamings.
2205 2015-02-20 Robert Dewar <dewar@adacore.com>
2207 * exp_util.adb: Minor reformatting.
2209 2015-02-20 Vincent Celier <celier@adacore.com>
2211 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
2212 is specified several times with different values that indicates
2213 the same runtime directory.
2215 2015-02-20 Ed Schonberg <schonberg@adacore.com>
2217 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
2218 handle properly illegal uses of attributes on prefixes on an
2219 incomplete type, both when the type of the prefix is locally
2220 incomplete, and when it is a limited view of a type whose
2221 non-limited view is not available.
2222 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
2223 'Address and others.
2225 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
2227 * exp_ch6.adb: Fix minor typo in comment.
2229 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
2231 * sinfo.ads: Add comment.
2233 2015-02-20 Olivier Hainque <hainque@adacore.com>
2235 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
2236 flags controlling the actual FE inlining out of pragma Inline
2237 and pragma Inline_Always.
2238 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
2239 on -fno-inline, which disables all inlining in compilers with
2240 an Ada back-end and without back-end inlining support.
2241 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
2242 flag to True on -fno-inline and leave Inline_Always alone for
2244 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
2245 names of the Opt flags it sets.
2246 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
2247 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
2248 * sem_prag.adb (Make_Inline): Remove early return conditioned
2249 on Opt.Suppress_All_Inlining.
2250 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
2251 disable the calls to Build_Body_To_Inline otherwise triggered
2252 by pragma Inline or Inline_Always. This will prevent actual
2253 front-end inlining of the subprogram on calls.
2255 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
2257 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
2258 Abort_Undefer_Direct function.
2259 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
2260 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
2261 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
2262 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
2264 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
2265 Remove call to Register_Backend_Call and move code resetting
2266 Needs_Debug_Info on inlined subprograms to...
2267 * inline.ads (Add_Inlined_Body): Add N parameter.
2268 (Register_Backend_Call): Delete.
2269 * inline.adb (Add_Inlined_Body): ...here and simplify.
2270 Register the call with Backend_Calls directly.
2271 (Register_Backend_Call): Delete.
2272 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
2274 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
2276 * s-stalib.ads: Fix typo.
2278 2015-02-20 Ed Schonberg <schonberg@adacore.com>
2280 * exp_ch3.adb (Default_Initialize_Object): If the object has a
2281 delayed freeze, the actions associated with default initialization
2282 must be part of the freeze actions, rather that being inserted
2283 directly after the object declaration.
2285 2015-02-20 Robert Dewar <dewar@adacore.com>
2287 * lib-load.adb: Minor comment update.
2289 2015-02-20 Vincent Celier <celier@adacore.com>
2291 * prj-proc.adb (Process_Case_Construction): When there are
2292 incomplete withed projects and the case variable is unknown,
2293 skip the case construction.
2295 2015-02-20 Ed Schonberg <schonberg@adacore.com>
2297 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
2298 when an actual is a view conversion, either because the call is
2299 to an inherited operation, or because the actual is an explicit
2300 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
2302 2015-02-20 Robert Dewar <dewar@adacore.com>
2304 * einfo.ads: Minor comment updates Fix missing pragma Inline
2305 for Set_Partial_View_Has_Unknown_Discr.
2306 * einfo.adb (Write_Entity_Flags): Add missing entry for
2307 Partial_View_Has_Unknown_Discr.
2308 * sem_ch3.adb: Minor reformatting.
2310 2015-02-20 Vincent Celier <celier@adacore.com>
2312 * opt.ads: Minor cleanup: remove mention of gprmake.
2313 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
2314 * s-tataat.adb: Do not call System.Tasking.Self but directly
2315 System.Task_Primitives.Operations.Self.
2317 2015-02-20 Arnaud Charlet <charlet@adacore.com>
2319 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
2320 sphinx in the doc directory.
2321 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
2323 2015-02-20 Robert Dewar <dewar@adacore.com>
2325 * sem_res.adb: Minor reformatting.
2326 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
2328 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
2329 aspects from circuitry setting delay required to false if the
2330 argument is an integer literal.
2332 2015-02-20 Ed Schonberg <schonberg@adacore.com>
2334 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
2335 on type entities, to enforce AI12-0133: default initialization
2336 of types whose partial view has unknown discriminants does not
2337 get an invariant check, because clients of the unit can never
2338 declare objects of such types.
2339 * sem_ch3.adb (Find_Type_Name); Set new flag
2340 Partial_View_Has_Unknown_Discr when needed.
2341 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
2342 generation of invariant call on default-initialized object.
2344 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
2346 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
2347 if the parameter either is passed by reference or if the alignment
2350 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
2352 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
2353 detect primitive operations of tagged and untagged types.
2355 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
2357 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
2358 sets in presence of derivation for subprogram types.
2360 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
2362 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
2363 present in the same context as the declaration.
2365 2015-02-07 Jakub Jelinek <jakub@redhat.com>
2368 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
2369 and optimization_current_node after tweaking global_options.
2371 2015-02-05 Robert Dewar <dewar@adacore.com>
2373 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
2374 prj-nmsc.adb: Minor reformatting.
2376 2015-02-05 Ed Schonberg <schonberg@adacore.com>
2378 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
2379 of a protected type may not be available, so to check conformance
2380 with an interface type, examine the interface list in the type
2381 declaration directly.
2382 (Write_Overloads): Improve information for indirect calls,
2385 2015-02-05 Ed Schonberg <schonberg@adacore.com>
2387 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
2388 expansion activity in ASIS mode.
2390 2015-02-05 Javier Miranda <miranda@adacore.com>
2392 * errout.adb (Error_Msg_PT): Add missing error.
2393 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
2394 RM rule. Code cleanup.
2395 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
2396 anonymous access types. Found working on the tests. Code cleanup.
2398 2015-02-05 Vincent Celier <celier@adacore.com>
2400 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
2401 when there are incomplete withs.
2402 * prj-nmsc.adb (Process_Naming): Do not try to get the value
2403 of an element when it is nil.
2404 (Check_Naming): Do not check a nil suffix for illegality
2405 * prj-proc.adb (Expression): Do not process an empty term.
2406 * prj-strt.adb (Attribute_Reference): If attribute cannot be
2407 found, parse a possible index to avoid cascading errors.
2409 2015-02-05 Ed Schonberg <schonberg@adacore.com>
2411 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
2412 for an access_to_subprogram declaration is not a derived type.
2414 2015-02-05 Robert Dewar <dewar@adacore.com>
2416 * errout.adb (Error_Msg_Internal): For non-serious error set
2417 Fatal_Error to Ignored.
2418 * lib-load.adb (Load_Unit): Minor comment updates.
2419 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
2420 setting from with'ed unit to with'ing unit.
2421 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
2424 2015-02-05 Yannick Moy <moy@adacore.com>
2426 * sem_prag.adb, par-prag.adb: Minor code clean up.
2428 2015-02-05 Yannick Moy <moy@adacore.com>
2430 * par-prag.adb (Pragma_Warnings): Update for extended form
2431 of pragma Warnings. The "one" argument case may now have 2 or
2433 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
2434 extended form of pragma Warnings. Pragma with tool name is either
2435 rewritten as null or as an equivalent form without tool name,
2437 * snames.ads-tmpl (Name_Gnatprove): New name.
2439 2015-02-05 Robert Dewar <dewar@adacore.com>
2441 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
2443 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
2444 condition is standard Boolean, it can be non-standard derived
2447 2015-02-05 Robert Dewar <dewar@adacore.com>
2449 * checks.adb (Enable_Range_Check): Disconnect attempted
2450 optimization for the case of range check for subscript of
2451 unconstrained array.
2453 2015-02-05 Robert Dewar <dewar@adacore.com>
2455 * par-ch13.adb (With_Present): New function
2456 (Aspect_Specifications_Present): Handle WHEN in place of WITH
2457 (Get_Aspect_Specifications): Comment update.
2458 * par.adb: Comment updates.
2460 2015-02-05 Robert Dewar <dewar@adacore.com>
2462 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
2463 * frontend.adb (Frontend): New setting of Fatal_Error.
2464 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
2466 (Load_Main_Source): New setting of Fatal_Error
2467 (Load_Unit): New setting of Fatal_Error.
2468 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
2470 (Ensure_System_Dependency): New setting of Fatal_Error.
2471 * lib.adb (Fatal_Error): New setting of Fatal_Error
2472 (Set_Fatal_Error): New setting of Fatal_Error.
2473 * lib.ads: New definition of Fatal_Error and associated routines.
2474 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
2475 * par-load.adb (Load): New setting of Fatal_Error.
2476 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
2477 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
2479 (Optional_Subunit): New setting of Fatal_Error.
2480 (Analyze_Proper_Body): New setting of Fatal_Error.
2481 (Load_Needed_Body): New setting of Fatal_Error.
2483 2015-02-05 Ed Schonberg <schonberg@adacore.com>
2485 * sem_res.adb (Resolve_Call): If the function being called has
2486 out parameters do not check for language version if the function
2487 comes from a predefined unit, as those are always compiled in
2490 2015-02-05 Ed Schonberg <schonberg@adacore.com>
2492 * sem_ch3.adb (Process_Full_View): Verify that the full view
2493 of a type extension must carry an explicit limited keyword if
2494 the partial view does (RM 7.3 (10.1)).
2496 2015-02-05 Robert Dewar <dewar@adacore.com>
2498 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
2499 sem_warn.ads: Minor reformatting.
2500 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
2502 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
2503 error for abstract type.
2505 2015-02-05 Yannick Moy <moy@adacore.com>
2507 * opt.ads (Warn_On_Suspicious_Contract): Update comment
2509 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
2510 suspicious uses of 'Update.
2511 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
2512 function issues warning on suspicious uses of 'Update.
2513 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
2514 package spec and body as SPARK_Mode Off.
2516 2015-02-05 Robert Dewar <dewar@adacore.com>
2518 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
2519 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
2520 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
2521 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
2522 for exported entity.
2524 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
2526 * sem_prag.adb (Check_Pragma_Conformance): Add
2527 local variable Arg. Ensure that all errors are associated with
2528 the pragma if it appears without an argument. Add comments on
2531 2015-02-05 Robert Dewar <dewar@adacore.com>
2533 * lib-xref.adb: Minor reformatting.
2535 2015-02-05 Tristan Gingold <gingold@adacore.com>
2537 PR ada/64349da/64349
2538 * env.c: Fix thinko: handle Darwin case before default one.
2540 2015-01-30 Robert Dewar <dewar@adacore.com>
2542 * a-assert.adb: Minor reformatting.
2543 * sem_ch13.adb: Minor comment clarification.
2544 * types.ads: Minor comment update.
2545 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
2546 when we have a predicate that is nothing but an inherited dynamic
2549 2015-01-30 Jerome Guitton <guitton@adacore.com>
2551 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
2552 include cert link spec.
2554 2015-01-30 Robert Dewar <dewar@adacore.com>
2556 * einfo.ads: Minor comment fix.
2557 * freeze.adb (Freeze_Profile): Add test for suspicious import
2559 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
2560 use in Pure unit is now moved to Freeze (to properly catch
2561 Pure_Function exemption).
2563 2015-01-30 Bob Duff <duff@adacore.com>
2565 * sem_res.ads: Minor comment fix.
2566 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
2567 check both operands of an operator.
2569 2015-01-30 Yannick Moy <moy@adacore.com>
2571 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
2572 policy for Pre to Ignore.
2573 (Assert): Add precondition.
2575 2015-01-30 Robert Dewar <dewar@adacore.com>
2577 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
2579 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
2580 documentation for some special cases of invalid attempts at
2583 2015-01-30 Gary Dismukes <dismukes@adacore.com>
2585 * errout.ads: Minor reformatting.
2587 2015-01-30 Yannick Moy <moy@adacore.com>
2589 * inline.adb (Process_Formals): Use the sloc of
2590 the inlined node instead of the sloc of the actual parameter,
2591 when replacing formal parameters by the actual one.
2593 2015-01-30 Arnaud Charlet <charlet@adacore.com>
2595 * g-expect.adb (Get_Command_Output): Use infinite timeout when
2598 2015-01-30 Ed Schonberg <schonberg@adacore.com>
2600 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
2601 defaulted in an instantiation, add an entry in the list of actuals
2602 to indicate the default value of the formal (as is already done
2603 for defaulted subprograms).
2605 2015-01-30 Javier Miranda <miranda@adacore.com>
2607 * errout.adb (Error_Msg_PT): Minor error phrasing update.
2609 2015-01-30 Robert Dewar <dewar@adacore.com>
2611 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
2614 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
2616 * exp_dbug.adb (Get_Encoded_Name): When
2617 -fgnat-encodings=minimal, do not generate names for biased types.
2619 2015-01-30 Tristan Gingold <gingold@adacore.com>
2622 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
2624 2015-01-30 Gary Dismukes <dismukes@adacore.com>
2626 * freeze.adb: Minor reformatting.
2628 2015-01-30 Javier Miranda <miranda@adacore.com>
2630 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
2631 improve its documentation.
2632 * errout.adb (Error_Msg_PT): Improve the error message.
2633 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
2634 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
2635 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
2637 2015-01-30 Robert Dewar <dewar@adacore.com>
2639 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
2640 message for False case.
2642 2015-01-30 Doug Rupp <rupp@adacore.com>
2644 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
2645 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
2648 2015-01-30 Gary Dismukes <dismukes@adacore.com>
2650 * sem_attr.adb (Declared_Within_Generic_Unit):
2651 New function to test whether an entity is declared within the
2652 declarative region of a given generic unit.
2653 (Resolve_Attribute): For checking legality of subprogram'Access within
2654 a generic unit, call new Boolean function Declared_Within_Generic_Unit
2655 instead of simply comparing the results of Enclosing_Generic_Unit on
2656 the prefix and access type. Correct minor comment typos.
2658 2015-01-30 Robert Dewar <dewar@adacore.com>
2660 * freeze.adb, exp_util.ads: Update comment.
2661 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
2662 * sem_util.adb: Minor: fix typo.
2664 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
2666 * sem_attr.adb (Analyze_Attribute): Ensure that
2667 the check concerning Refined_Post takes precedence over the
2670 2015-01-30 Gary Dismukes <dismukes@adacore.com>
2672 * sem_prag.adb: Minor typo fixes and reformatting.
2674 2015-01-30 Yannick Moy <moy@adacore.com>
2676 * sem_attr.adb: Code clean up.
2678 2015-01-30 Robert Dewar <dewar@adacore.com>
2680 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
2681 * ali.ads (Unit_Record): Add new field Serious_Errors.
2682 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
2683 attribute in U line.
2684 * lib-writ.ads: New attribute SE (serious erors) in unit line.
2686 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
2688 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
2689 Lit_Indexes, Scale_Value, Storage_Size_Variable,
2690 String_Literal_Low_Bound along associated routines and
2692 (Pending_Access_Types): New routine.
2693 (Set_Pending_Access_Types): New routine.
2694 (Write_Field15_Name): Add an entry for Pending_Access_Types.
2695 * einfo.ads Add new attribute Pending_Access_Types along
2696 with usage in nodes. Update the usage of attributes
2697 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
2698 Storage_Size_Variable, String_Literal_Low_Bound.
2699 (Pending_Access_Types): New routine along with pragma Inline.
2700 (Set_Pending_Access_Types): New routine along with pragma Inline.
2701 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
2702 Ins_Node. Determine the insertion node for anonynous access type
2703 that acts as a component type of an array. Update the call to
2704 Build_Finalization_Master.
2705 (Expand_Freeze_Record_Type): Update
2706 the calls to Build_Finalization_Master.
2707 (Freeze_Type): Remove
2708 local variable RACW_Seen. Factor out the code that deals with
2709 remote access-to-class-wide types. Create a finalization master
2710 when the designated type contains a private component. Fully
2711 initialize all pending access types.
2712 (Process_RACW_Types): New routine.
2713 (Process_Pending_Access_Types): New routine.
2714 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
2715 needs to set primitive Finalize_Address.
2716 (Expand_N_Allocator): Allocation no longer sets primitive
2718 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2719 Update the call to Build_Finalization_Master.
2720 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
2721 needs to set primitive Finalize_Address.
2722 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
2723 (Build_Finalization_Master): New parameter profile. Associate
2724 primitive Finalize_Address with the finalization master if the
2725 designated type has been frozen, otherwise treat the access
2726 type as pending. Simplify the insertion of the master and
2727 related initialization code.
2728 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
2730 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
2731 Simplify the implementation.
2732 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
2733 along with comment on usage.
2734 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
2735 the comment on usage.
2736 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
2737 Finalize_Address to retrieve the primitive.
2738 (Finalize_Address): New routine.
2739 (Find_Finalize_Address): Removed.
2740 * exp_util.ads (Finalize_Address): New routine.
2741 * freeze.adb (Freeze_All): Remove the generation of finalization
2743 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
2744 pending access types from the partial to the full view.
2746 2015-01-30 Robert Dewar <dewar@adacore.com>
2748 * sem_disp.adb: Minor reformatting.
2749 * sem_disp.ads: Documentation update.
2751 2015-01-30 Ed Schonberg <schonberg@adacore.com>
2753 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
2754 or a function call, return True if type is class-wide.
2755 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
2756 Apply RM 4.5.7 (17/3): all or none of the dependent expression
2757 of a conditional expression must be dynamically tagged.
2759 2015-01-30 Ed Schonberg <schonberg@adacore.com>
2761 * sem_ch6.adb (Analyze_Function_Return): In an extended return
2762 statement, apply accessibility check to result object when there
2763 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
2765 2015-01-30 Robert Dewar <dewar@adacore.com>
2767 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
2768 Boolean for case where ELSE is omitted.
2769 * sem_res.adb: Minor reformatting.
2771 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
2773 Fix build under cygwin/64.
2774 * adaint.h: Add check for __CYGWIN__.
2775 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
2777 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2780 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
2781 * mingw32.h: Don't include <tchar.h> under cygwin.
2782 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
2784 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2786 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
2787 (DEF_FUNCTION_TYPE_VAR_12): New macros.
2789 2015-01-09 Michael Collison <michael.collison@linaro.org>
2791 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
2792 vec.h, double-int.h, input.h, alias.h, symtab.h,
2793 fold-const.h, wide-int.h, and inchash.h due to
2794 flattening of tree.h.
2795 * gcc-interface/decl.c: Ditto.
2796 * gcc-interface/misc.c: Ditto.
2797 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
2798 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
2799 fold-const.h, wide-int.h, and inchash.h due to
2800 flattening of tree.h.
2801 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
2802 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
2803 fold-const.h, wide-int.h, inchash.h due to
2804 flattening of tree.h.
2805 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
2806 vec.h, double-int.h, input.h, alias.h, symtab.h,
2807 fold-const.h, wide-int.h, and inchash.h due to
2808 flattening of tree.h.
2809 * gcc-interface/utils2.c: Ditto.
2811 2015-01-07 Robert Dewar <dewar@adacore.com>
2813 * sem_warn.adb (Check_One_Unit): Don't give unused entities
2814 warning for a package which is used as a generic parameter.
2816 2015-01-07 Bob Duff <duff@adacore.com>
2818 * usage.adb (Usage): Correct documentation of
2821 2015-01-07 Robert Dewar <dewar@adacore.com>
2823 * s-fileio.adb: Minor reformatting.
2825 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2827 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
2828 access to subprogram, replace its formals with new entities when
2829 building the object declaration, both if actual is present and
2830 when it is defaulted.
2832 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2834 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
2835 conversion and type of expression has invariant, apply invariant
2836 check on expression.
2838 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2840 * sem_ch3.adb (Create_Constrained_Components): A call to
2841 Gather_Components may detect an error if an inherited discriminant
2842 that controls a variant is non-static.
2843 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
2844 Gather_Components may report an error if an inherited discriminant
2845 in a variant in non-static.
2846 * sem_util.adb (Gather_Components): If a non-static discriminant
2847 is inherited do not report error here, but let caller handle it.
2848 (Find_Actual): Small optimization.
2850 2015-01-07 Bob Duff <duff@adacore.com>
2852 * usage.adb (Usage): Document -gnatw.f switch.
2854 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2856 * sem_ch12.adb: Code clean up and minor reformatting.
2858 2015-01-07 Robert Dewar <dewar@adacore.com>
2860 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
2861 Raise_Accessibility_Error call.
2862 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
2863 on handling of invalid digits in based constants.
2864 * s-fatgen.ads: Minor reformatting.
2865 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
2866 Avoid noting bogus modification for Valid test.
2867 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
2868 * einfo.ads: Minor reformatting.
2869 * sem_warn.adb: Minor comment clarification.
2870 * sem_ch12.adb: Minor reformatting.
2872 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2874 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
2875 over static predicates when the loop parameter specification
2876 carries a Reverse indicator.
2878 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2880 * sem_ch12.adb (Instantiate_Object): If formal has a default,
2881 actual is missing and formal has an anonymous access type, copy
2882 access definition in full so that tree for instance is properly
2883 formatted for ASIS use.
2885 2015-01-07 Bob Duff <duff@adacore.com>
2887 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
2888 for P'Access, where P is a subprogram in the same package as
2889 the P'Access, and the P'Access is evaluated at elaboration
2890 time, and occurs before the body of P. For example, "X : T :=
2891 P'Access;" would allow a subsequent call to X.all to be an
2892 access-before-elaboration error; hence the warning. This warning
2893 is enabled by the -gnatw.f switch.
2894 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
2895 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
2896 * gnat_ugn.texi: Document the new warning.
2898 2015-01-07 Johannes Kanig <kanig@adacore.com>
2900 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
2903 2015-01-07 Robert Dewar <dewar@adacore.com>
2905 * s-taprop-linux.adb, clean.adb: Minor reformatting.
2907 2015-01-07 Arnaud Charlet <charlet@adacore.com>
2909 * s-tassta.adb: Relax some overzealous assertions.
2911 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2913 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
2914 view of a type is legal when context is a thunk generated for
2915 operation inherited from an interface.
2916 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
2917 a thunk and return type is an incomplete type do not continue
2918 expansion; thunk will be fully elaborated when generating code.
2920 2015-01-07 Doug Rupp <rupp@adacore.com>
2922 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
2923 (QueryPerformanceFrequency): New imported procedure.
2924 * s-taprop-mingw.adb (RT_Resolution): Call above and return
2925 resolution vice a hardcoded value.
2926 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
2927 resolution vice a hardcoded value.
2928 * s-linux-android.ads (clockid_t): New subtype.
2929 * s-osinte-aix.ads (clock_getres): New imported subprogram.
2930 * s-osinte-android.ads (clock_getres): Likewise.
2931 * s-osinte-freebsd.ads (clock_getres): Likewise.
2932 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
2933 * s-osinte-darwin.ads (clock_getres): New subprogram.
2934 * s-osinte-darwin.adb (clock_getres): New subprogram.
2935 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
2936 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
2937 calculate resolution vice hard coded value.
2939 2015-01-07 Ed Schonberg <schonberg@adacore.com>
2941 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
2942 limited view, use non-limited view when available to create
2943 equivalent record type.
2945 2015-01-07 Vincent Celier <celier@adacore.com>
2947 * gnatcmd.adb: Remove command Sync and any data and processing
2948 related to this command. Remove project processing for gnatstack.
2949 * prj-attr.adb: Remove package Synchonize and its attributes.
2951 2015-01-07 Vincent Celier <celier@adacore.com>
2953 * clean.adb: Minor error message change.
2955 2015-01-07 Tristan Gingold <gingold@adacore.com>
2958 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
2960 2015-01-07 Javier Miranda <miranda@adacore.com>
2962 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
2963 protect the frontend against never ending recursion caused by
2964 circularities in the sources.
2966 2015-01-07 Robert Dewar <dewar@adacore.com>
2968 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
2969 exp_ch3.adb: Minor reformatting.
2971 2015-01-07 Doug Rupp <rupp@adacore.com>
2973 * s-linux.ads (clockid_t): New subtype.
2974 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
2975 (clockid_t): New subtype.
2976 (clock_getres): Import system call.
2977 * s-taprop-linux.adb (System.OS_Constants): With and rename.
2978 (RT_Resolution): Remove
2979 hardcoded value and call clock_getres.
2980 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
2981 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
2983 2015-01-07 Robert Dewar <dewar@adacore.com>
2985 * sem_warn.adb (Check_One_Unit): Guard against context item
2986 with no Entity field.
2988 2015-01-07 Vincent Celier <celier@adacore.com>
2990 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
2991 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
2993 2015-01-07 Vincent Celier <celier@adacore.com>
2995 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
2996 errors/warnings in the first parsing of the project files,
2997 to display the warnings when there is no errors.
2999 2015-01-07 Tristan Gingold <gingold@adacore.com>
3001 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
3003 2015-01-07 Doug Rupp <rupp@adacore.com>
3005 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
3006 value from Int_Lock as parameter to Int_Unlock.
3007 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
3008 * s-vxwext.ads (Int_Unlock): Likewise.
3009 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
3010 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
3011 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
3012 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
3014 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
3016 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
3019 2015-01-07 Tristan Gingold <gingold@adacore.com>
3021 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
3024 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
3026 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
3027 automatically set No_Strict_Aliasing on access types.
3028 * fe.h (No_Strict_Aliasing_CP): Declare.
3029 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
3030 No_Strict_Aliasing_CP is set.
3032 2015-01-07 Johannes Kanig <kanig@adacore.com>
3034 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
3035 not build function wrapper in gnatprove mode when the package
3036 is externally axiomatized.
3038 2015-01-07 Jose Ruiz <ruiz@adacore.com>
3040 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
3041 intermediate computations when the parameters have different signs.
3043 2015-01-07 Javier Miranda <miranda@adacore.com>
3045 * exp_ch3.adb (Build_Init_Procedure): For derived types,
3046 improve the code which takes care of identifying and moving to
3047 the beginning of the init-proc the call to the init-proc of the
3050 2015-01-07 Olivier Hainque <hainque@adacore.com>
3052 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
3053 Elaborate the expression as part of the same stmt group as the actions.
3055 2015-01-07 Robert Dewar <dewar@adacore.com>
3057 * sem_ch3.adb: Minor error message change.
3059 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3061 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
3062 Following AI05-028, the pragam applies legally to any composite type.
3064 2015-01-07 Arnaud Charlet <charlet@adacore.com>
3066 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
3067 (sigwait, sigwaitinfo): Removed, not needed after all on any
3068 VxWorks configurations.
3070 2015-01-07 Robert Dewar <dewar@adacore.com>
3072 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
3074 2015-01-07 Javier Miranda <miranda@adacore.com>
3076 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
3077 generation of accessibility check.
3079 2015-01-07 Ed Schonberg <schonberg@adacore.com>
3081 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
3082 illegal completion from a class- wide type, set etype of the
3083 derived type properly to prevent cascaded errors.
3085 2015-01-07 Robert Dewar <dewar@adacore.com>
3087 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
3090 2015-01-07 Robert Dewar <dewar@adacore.com>
3092 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
3094 (OK_No_Use_Of_Entity_Name): New function.
3095 (Set_Restriction_No_Use_Of_Entity): New procedure.
3096 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
3098 (OK_No_Use_Of_Entity_Name): New function.
3099 (Set_Restriction_No_Use_Of_Entity): New procedure.
3100 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
3102 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3103 Add processing for new restriction No_Use_Of_Entity.
3105 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
3107 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
3108 component type as to Has_Atomic_Components type. Remove useless
3109 test on Is_Aliased component type.
3111 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
3113 * alloc.ads Alphabetize several declarations. Add constants
3114 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
3115 * atree.adb Add with and use clauses for Opt.
3116 (Allocate_Initialize_Node): Mark a node as ignored Ghost
3117 if it is created in an ignored Ghost region.
3118 (Ekind_In): New variant.
3119 (Is_Ignored_Ghost_Node): New routine.
3120 (Set_Is_Ignored_Ghost_Node): New routine.
3121 * atree.adb Aplhabetize several subprograms declarations. Flag
3122 Spare0 is now known as Is_Ignored_Ghost_Node.
3123 (Ekind_In): New variant.
3124 (Is_Ignored_Ghost_Node): New routine.
3125 (Set_Is_Ignored_Ghost_Node): New routine.
3126 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
3127 (Contains_Ignored_Ghost_Code): New routine.
3128 (Set_Contains_Ignored_Ghost_Code): New routine.
3129 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
3130 It is now possible to set this property on an unanalyzed entity.
3131 (Write_Entity_Flags): Output the status of flag
3132 Contains_Ignored_Ghost_Code.
3133 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
3135 (Contains_Ignored_Ghost_Code): New routine
3136 along with pragma Inline.
3137 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
3138 * exp_ch3.adb Add with and use clauses for Ghost.
3139 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
3140 Set the Ghost_Mode in effect.
3141 (Restore_Globals): New routine.
3142 * exp_ch7.adb (Process_Declarations): Do not process a context
3143 that invoves an ignored Ghost entity.
3144 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
3145 construct that has been rewritten as a null statement.
3146 * exp_disp.adb Add with and use clauses for Ghost.
3147 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
3148 the Ghost_Mode in effect.
3149 (Restore_Globals): New routine.
3150 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
3151 does not require any clean up. Add two missing cases that deal
3152 with block statements.
3153 * freeze.adb Add with and use clauses for Ghost.
3154 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
3155 Set the Ghost_Mode in effect.
3156 (Restore_Globals): New routine.
3157 * frontend.adb Add with and use clauses for Ghost. Remove any
3158 ignored Ghost code from all units that qualify.
3159 * ghost.adb New unit.
3160 * ghost.ads New unit.
3161 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
3162 the table in package Ghost.
3163 * lib.ads: Alphabetize several subprogram declarations.
3164 * lib-xref.adb (Output_References): Do not generate reference
3165 information for ignored Ghost entities.
3166 * opt.ads Add new type Ghost_Mode_Type and new global variable
3168 * rtsfind.adb (Load_RTU): Provide a clean environment when
3169 loading a runtime unit.
3170 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
3171 entry/exit as the node may set a different mode.
3173 Capture/restore the value of Ghost_Mode on entry/exit as the
3174 unit may be withed from a unit with a different Ghost mode.
3175 * sem_ch3.adb Add with and use clauses for Ghost.
3176 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
3177 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
3178 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
3179 the entity as Ghost when there is a Ghost_Mode in effect.
3180 (Array_Type_Declaration): The implicit base type inherits the
3181 "ghostness" from the array type.
3182 (Derive_Subprogram): The
3183 alias inherits the "ghostness" from the parent subprogram.
3184 (Make_Implicit_Base): The implicit base type inherits the
3185 "ghostness" from the parent type.
3186 * sem_ch5.adb Add with and use clauses for Ghost.
3187 (Analyze_Assignment): Set the Ghost_Mode in effect.
3188 * sem_ch6.adb Add with and use clauses for Ghost.
3189 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
3190 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
3191 Set the Ghost_Mode in effect. Mark the entity as Ghost when
3192 there is a Ghost_Mode in effect.
3193 * sem_ch7.adb Add with and use clauses for Ghost.
3194 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
3195 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
3196 effect. Mark the entity as Ghost when there is a Ghost_Mode
3198 * sem_ch8.adb Add with and use clauses for Ghost.
3199 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
3200 Analyze_Object_Renaming, Analyze_Package_Renaming,
3201 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
3202 the entity as Ghost when there is a Ghost_Mode in effect.
3203 (Find_Type): Check the Ghost context of a type.
3204 * sem_ch11.adb Add with and use clauses for Ghost.
3205 (Analyze_Exception_Declaration): Set the Ghost_Mode in
3206 effect. Mark the entity as Ghost when there is a Ghost_Mode
3208 * sem_ch12.adb Add with and use clauses for Ghost.
3209 (Analyze_Generic_Package_Declaration,
3210 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
3211 Mark the entity as Ghost when there is a Ghost_Mode in effect.
3212 * sem_prag.adb Add with and use clauses for Ghost.
3213 (Analyze_Pragma): Ghost-related checks are triggered when there
3214 is a Ghost mode in effect.
3215 (Create_Abstract_State): Mark the
3216 entity as Ghost when there is a Ghost_Mode in effect.
3217 * sem_res.adb Add with and use clauses for Ghost.
3218 (Check_Ghost_Context): Removed.
3219 * sem_util.adb (Check_Ghost_Completion): Removed.
3220 (Check_Ghost_Derivation): Removed.
3221 (Incomplete_Or_Partial_View):
3222 Add a guard in case the entity has not been analyzed yet
3223 and does carry a scope.
3224 (Is_Declaration): New routine.
3225 (Is_Ghost_Entity): Removed.
3226 (Is_Ghost_Statement_Or_Pragma):
3228 (Is_Subject_To_Ghost): Removed.
3229 (Set_Is_Ghost_Entity):
3231 (Within_Ghost_Scope): Removed.
3232 * sem_util.adb (Check_Ghost_Completion): Removed.
3233 (Check_Ghost_Derivation): Removed.
3234 (Is_Declaration): New routine.
3235 (Is_Ghost_Entity): Removed.
3236 (Is_Ghost_Statement_Or_Pragma): Removed.
3237 (Is_Subject_To_Ghost): Removed.
3238 (Set_Is_Ghost_Entity): Removed.
3239 (Within_Ghost_Scope): Removed.
3240 * sinfo.ads Add a section on Ghost mode.
3241 * treepr.adb (Print_Header_Flag): New routine.
3242 (Print_Node_Header): Factor out code. Output flag
3243 Is_Ignored_Ghost_Node.
3244 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
3246 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
3248 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
3249 true test and unreachable 'else' arm.
3251 2015-01-06 Vincent Celier <celier@adacore.com>
3253 * prj-conf.adb (Check_Target): Improve error message when
3254 there are mismatched targets between the on in the configuration
3255 project file and the specified one, either in the main project
3256 file or in the --target= switch.
3258 2015-01-06 Pascal Obry <obry@adacore.com>
3260 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
3261 Install_Name attribute definitions.
3263 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3265 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
3266 generated Import pragma for the internal imported procedure does
3267 not come from an aspect, so that Is_Imported can be properly
3270 2015-01-06 Gary Dismukes <dismukes@adacore.com>
3272 * sem_ch12.adb (Might_Inline_Subp): Record whether
3273 any subprograms in the generic package are marked with
3274 pragma Inline_Always (setting flag Has_Inline_Always).
3275 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
3276 alongside existing test of Front_End_Inlining as alternative
3277 conditions for setting Inline_Now. Also add test of
3278 Has_Inline_Always along with Front_End_Inlining test as an
3279 alternative condition for setting Needs_Body to False.
3281 2015-01-06 Tristan Gingold <gingold@adacore.com>
3283 * i-cpoint.adb (Copy_Array): Handle overlap.
3285 2015-01-06 Pascal Obry <obry@adacore.com>
3287 * bindgen.adb: Minor style fix.
3289 2015-01-06 Robert Dewar <dewar@adacore.com>
3291 * sem_util.ads, sem_util.adb: Minor reformatting.
3293 2015-01-06 Vincent Celier <celier@adacore.com>
3295 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
3296 with flags before parsing the projects.
3297 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
3298 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
3299 to True in the flags, when Ignore_Missing_With is True and an
3300 imported project cannot be found.
3301 * prj-proc.adb (Expression): When there are incomplete withs and
3302 a variable or attribute is not found, set the variable/attribute
3304 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
3307 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
3309 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
3310 prj-err.adb: Add new switch --no-command-line.
3312 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3314 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
3316 2015-01-06 Robert Dewar <dewar@adacore.com>
3318 * sem_ch11.adb: Minor reformatting.
3320 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3322 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
3323 Build_Array_Aggr_Code, used to initialized components covered
3324 by a box association. If the component type is scalar and has
3325 a default aspect, use it to initialize such components.
3327 2015-01-06 Pascal Obry <obry@adacore.com>
3329 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
3330 control the setup of the exception handler.
3331 * initialize.c: Remove unused declaration.
3332 * bindgen.adb: Always call __gnat_runtime_initialize and pass
3333 whether the exeception handler must be set or not.
3335 2015-01-06 Thomas Quinot <quinot@adacore.com>
3337 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
3338 order to native from default, make sure to also adjust bit order.
3339 * exp_aggr.adb: Minor reformatting.
3341 2015-01-06 Robert Dewar <dewar@adacore.com>
3343 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
3344 s-valrea.adb, s-valrea.ads: Add some additional guards for
3345 Str'Last = Positive'Last.
3347 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3349 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
3352 2015-01-06 Javier Miranda <miranda@adacore.com>
3354 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
3356 2015-01-06 Thomas Quinot <quinot@adacore.com>
3358 * sem_util.ads: Minor reformatting.
3359 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
3360 (In_RCI_Declaration) Return to old name, as proper checking of
3361 entity being in the visible part depends on entity kind and must
3362 be done by the caller.
3364 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3366 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
3367 for operators in SPARK.
3369 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3371 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
3372 expression in an others association before making copies for
3373 separate resolution and accessibility checks. This ensures that
3374 the type of the expression is available to ASIS in all cases,
3375 in particular if the expression is itself an aggregate.
3377 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
3379 * einfo.ads (Has_Independent_Components): Document extended
3381 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
3382 (Set_Has_Independent_Components): Adjust assertion.
3383 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
3384 for pragma Atomic_Components. Set Has_Independent_Components
3385 on the object instead of the type for an object declaration with
3386 pragma Independent_Components.
3388 2015-01-06 Olivier Hainque <hainque@adacore.com>
3390 * set_targ.adb (Read_Target_Dependent_Values): Set
3391 Long_Double_Index when "long double" is read.
3392 (elaboration code): Register_Back_End_Types only when not reading from
3393 config files. Doing otherwise is pointless and error prone.
3395 2015-01-06 Robert Dewar <dewar@adacore.com>
3397 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
3399 2015-01-06 Robert Dewar <dewar@adacore.com>
3401 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
3402 Str'Last = Positive'Last.
3404 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3406 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
3407 where the non-limited type is a generic actual and appears as
3408 a subtype of the non-limited view of the other.
3409 * freeze.adb (Build_Renamed_Body): If the return type of the
3410 declaration that is being completed is a limited view and the
3411 non-limited view is available, use it in the specification of
3414 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3416 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
3417 incomplete view, the type of the classwide type common to both
3418 views is the type being declared.
3420 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
3422 * einfo.ads (Is_Independent): Further document extended usage.
3424 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
3426 * einfo.ads (Is_Independent): Document extended usage.
3427 * einfo.adb (Is_Independent): Remove obsolete assertion.
3428 (Set_Is_Independent): Likewise.
3429 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
3430 (Process_Atomic_Independent_Shared_Volatile): ...this.
3431 Deal with pragma Independent here.
3432 (Analyze_Pragma): Adjust
3433 to above renaming and also invoke it for pragma Independent.
3434 Adjust comment for Independent_Components.
3436 2015-01-06 Robert Dewar <dewar@adacore.com>
3438 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
3439 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
3441 2015-01-06 Robert Dewar <dewar@adacore.com>
3443 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
3445 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
3446 Str'Last = Positive'Last.
3448 2015-01-06 Robert Dewar <dewar@adacore.com>
3450 * sem_prag.adb (Process_Inline): Remove redundant construct
3451 warning (-gnatw.r) for an ineffective pragma Inline.
3453 2015-01-06 Robert Dewar <dewar@adacore.com>
3455 * s-valint.adb: Fix typo in last checkin.
3456 * s-valuns.adb (Value_Unsigned): More efficient fix for
3458 * sem_attr.adb (Analyze_Attribute): Minor reformatting
3459 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
3461 2015-01-06 Robert Dewar <dewar@adacore.com>
3463 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
3464 Str'Last = Positive'Last
3466 2015-01-06 Thomas Quinot <quinot@adacore.com>
3468 * xoscons.adb: Display exception information and return non-zero
3469 exit status in top level exception handler.
3471 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3473 * sem_ch8.adb: Code clean up.
3475 2015-01-06 Tristan Gingold <gingold@adacore.com>
3477 * targparm.ads: Remove obsolete comment.
3479 2015-01-06 Olivier Hainque <hainque@adacore.com>
3481 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
3482 constructing a ref to variable, update inner_const_flag from the
3483 variable TREE_READONLY attribute.
3484 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
3486 (get_target_float_size): Remove.
3487 (get_target_double_size): Remove.
3488 (get_target_long_double_size): Remove.
3490 2015-01-06 Pascal Obry <obry@adacore.com>
3492 * adaint.c (ProcListEvt): Set to NULL.
3493 * rtinit.c: New file.
3494 (__gnat_rt_init_count): New reference counter set to 0.
3495 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
3496 this code is actually needed for the runtime initialization. This
3497 routine returns immediately if the initialization has already been done.
3498 * final.c: Revert previous change.
3499 * rtfinal.c: New file.
3500 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
3501 section and event. The default version of this routine is empty (except
3502 for the reference counting code). This routine returns immediately if
3503 some others libraries are referencing the runtime.
3504 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
3505 remove circuitry to initialize the signal handler as this is
3506 now done by the runtime initialization routine.
3507 (Gen_Adafinal): Generate call to Runtime_Finalize.
3508 * gnat_ugn.texi: Update documentation about concurrency and
3509 initialization/finalization of the run-time.
3510 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
3511 references to rtfinal.o and rtinit.o
3513 2015-01-06 Robert Dewar <dewar@adacore.com>
3515 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
3517 * sem_attr.adb: Implement Enum_Image attribute.
3518 * snames.ads-tmpl: Add entries for Enum_Image attribute.
3520 2015-01-06 Robert Dewar <dewar@adacore.com>
3522 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
3523 * restrict.ads (No_Use_Of_Entity): New table.
3524 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3525 Ignore No_Use_Of_Entity (will be processed in parser).
3526 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
3528 2015-01-06 Vincent Celier <celier@adacore.com>
3530 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
3531 to check for an extended project, if a project does not have
3532 yet a project declaration.
3534 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
3536 * scos.ads: Update documentation about the SCO table build
3537 process and about table records format.
3538 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
3539 (SCO_Record_Filtered): New procedure.
3540 (Set_SCO_Logical_Operator): New procedure.
3541 (dsco): Update documentation.
3542 * par_sco.adb: Update library-level comments.
3543 (SCO_Generation_State_Type): New type.
3544 (SCO_Generation_State): New variable.
3545 (SCO_Raw_Table): New package instanciation.
3546 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
3548 (Tristate): New type.
3549 (Is_Logical_Operator): Return Tristate and update documentation.
3550 (Has_Decision): Update call to Is_Logical_Operator and complete
3552 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
3553 comment, add an assertion for state checking and change
3554 references to SCO_Table into SCO_Raw_Table.
3555 (dsco): Refactor to dump the raw and the filtered tables.
3556 (Process_Decisions.Output_Decision_Operand): Handle putative
3557 short-circuit operators.
3558 (Process_Decisions.Output_Element): Update references
3559 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
3560 (Process_Decisions.Process_Decision_Operand): Update call
3561 to Is_Logical_Operator.
3562 (Process_Decisions.Process_Node): Handle putative short-circuit
3563 operators and change references to
3564 SCO_Table into SCO_Raw_Table.
3565 (SCO_Output): Add an assertion
3566 for state checking and remove code that used to stamp out SCO entries.
3567 (SCO_Pragma_Disabled): Change reference to SCO_Table
3569 (SCO_Record): Rename to SCO_Record_Raw,
3570 add an assertion for state checking and change references
3571 to SCO_Table into SCO_Raw_Table.
3572 (Set_SCO_Condition): Add an assertion for state checking, update
3573 references to Condition_Pragma_Hash_Table and change references to
3574 SCO_Table into SCO_Raw_Table.
3575 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
3576 change references to SCO_Table into SCO_Raw_Table.
3577 (Set_SCO_Logical_Operator): New procedure.
3578 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
3579 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
3580 (SCO_Record_Fildered): New procedure.
3581 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
3582 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
3584 * par-load.adb (Load): Update reference to SCO_Record.
3585 * par.adb (Par): Update reference to SCO_Record.
3586 * put_scos.adb (Put_SCOs): Add an assertion to check that no
3587 putative SCO condition reaches this end.
3588 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
3589 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
3590 when corresponding to an "and"/"or" operator affected by the
3591 Short_Circuit_And_Or pragma.
3593 2015-01-06 Robert Dewar <dewar@adacore.com>
3595 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
3596 msg for attempted USE of generic subprogram or subprogram.
3598 2015-01-06 Robert Dewar <dewar@adacore.com>
3600 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
3601 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
3602 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
3604 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3606 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
3607 that specify stream subprograms, if the prefix is a class-wide
3608 type then the generated attribute definition clause must apply
3609 to the same class-wide type.
3610 (Default_Iterator): An iterator defined by an aspect of some
3611 container type T must have a first parameter of type T, T'class,
3612 or an access to such (from code reading RM 5.5.1 (2/3)).
3614 2015-01-06 Arnaud Charlet <charlet@adacore.com>
3616 * gnat1drv.adb: Minor: complete previous change.
3618 2015-01-06 Olivier Hainque <hainque@adacore.com>
3620 * set_targ.ads (C_Type_For): New function. Return the name of
3621 a C type supported by the back-end and suitable as a basis to
3622 construct the standard Ada floating point type identified by
3623 the T parameter. This is used as a common ground to feed both
3624 ttypes values and the GNAT tree nodes for the standard floating
3626 * set_targ.adb (Long_Double_Index): The index at which "long
3627 double" gets registered in the FPT_Mode_Table. This is useful to
3628 know whether we have a "long double" available at all and get at
3629 it's characteristics without having to search the FPT_Mode_Table
3630 when we need to decide which C type should be used as the
3631 basis for Long_Long_Float in Ada.
3632 (Register_Float_Type): Fill Long_Double_Index.
3633 (FPT_Mode_Index_For): New function. Return the index in
3634 FPT_Mode_Table that designates the entry corresponding to the
3635 provided C type name.
3636 (FPT_Mode_Index_For): New function. Return the index in
3637 FPT_Mode_Table that designates the entry for a back-end type
3638 suitable as a basis to construct the standard Ada floating point
3639 type identified by the input T parameter.
3640 (elaboration code): Register_Back_End_Types unconditionally,
3641 so C_Type_For can operate regardless of -gnateT. Do it
3642 early so we can query it for the floating point sizes, via
3643 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
3644 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
3645 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
3646 which C type should be used as the basis for the construction
3647 of the Standard Ada floating point types.
3648 * get_targ.ads (Get_Float_Size, Get_Double_Size,
3649 Get_Long_Double_Size): Remove.
3650 * get_targ.adb: Likewise.
3652 2015-01-06 Thomas Quinot <quinot@adacore.com>
3654 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
3655 parameter and rename to...
3656 (In_RCI_Visible_Declarations): Fix handling of private part of nested
3658 (Validate_RCI_Subprogram_Declaration): Reject illegal function
3659 returning anonymous access in RCI unit.
3661 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3663 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
3664 function wrapper may be a homonym of another local declaration.
3665 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
3666 build function and operator wrappers after the actual subprogram
3667 has been resolved, and replace the standard renaming declaration
3668 with the declaration of wrapper.
3669 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
3670 make public for use elsewhere.
3671 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
3672 rewrite, now that actual is fully resolved when wrapper is
3675 2015-01-06 Javier Miranda <miranda@adacore.com>
3677 * exp_disp.adb: Revert previous change.
3679 2015-01-06 Robert Dewar <dewar@adacore.com>
3681 * exp_util.adb: Change name Name_Table_Boolean to
3682 Name_Table_Boolean1.
3683 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
3684 Introduce Name_Table_Boolean2/3.
3685 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
3686 Introduce Name_Table_Boolean2/3.
3687 * par-ch13.adb: Change name Name_Table_Boolean to
3688 Name_Table_Boolean1.
3690 2015-01-06 Bob Duff <duff@adacore.com>
3692 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
3694 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3696 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
3697 others choice that covers multiple components, analyze each
3698 copy with the type of the component even in compile-only mode,
3699 to detect potential accessibility errors.
3701 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
3703 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
3704 (Resolve_Actuals): An effectively volatile out
3705 parameter cannot act as an in or in out actual in a call.
3706 (Resolve_Entity_Name): An effectively volatile out parameter
3709 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3711 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
3712 the expansion of an expression function it may be pre-analyzed
3713 if a 'access attribute is applied to the function, in which case
3714 last_entity may have been assigned already.
3716 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3718 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
3719 type and actual has the corresponding full view, there is no
3720 error, but a case of use of incomplete type in a predicate or
3721 invariant expression.
3723 2015-01-06 Vincent Celier <celier@adacore.com>
3725 * makeutl.adb (Insert_No_Roots): Make sure that the same source
3726 in two different project tree is checked in both trees, if they
3727 are sources of two different projects, extended or not.
3729 2015-01-06 Arnaud Charlet <charlet@adacore.com>
3731 * gnat1drv.adb: Minor code clean up.
3732 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
3734 2015-01-06 Bob Duff <duff@adacore.com>
3736 * osint.adb (Read_Source_File): Don't print out
3737 file name unless T = Source.
3739 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3741 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
3742 recognize improper uses of constant_reference types as actuals
3743 for in-out parameters.
3744 (Check_Function_Call): Do not collect identifiers if function
3745 name is missing because of previous error.
3747 2015-01-06 Robert Dewar <dewar@adacore.com>
3749 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
3750 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
3751 Minor change of name Name_Table_Info => Name_Table_Int.
3753 2015-01-06 Robert Dewar <dewar@adacore.com>
3755 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
3756 in previous checkin.
3757 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
3759 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
3761 2015-01-06 Vincent Celier <celier@adacore.com>
3763 * a-strsup.adb (Times (Natural;String;Positive)): Raise
3764 Length_Error, not Index_Error, when the result is too long.
3766 2015-01-06 Thomas Quinot <quinot@adacore.com>
3768 * a-direct.adb (Create_Path): Minor error handling and
3769 performance improvement.
3771 2015-01-06 Robert Dewar <dewar@adacore.com>
3773 * checks.ads, sem_ch12.adb: Minor reformatting.
3774 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
3775 zero check for fixed-point case if Backend_Divide_Checks_On_Target
3778 2015-01-06 Robert Dewar <dewar@adacore.com>
3780 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
3781 Do not set restriction No_Elaboration_Code unless the pragma
3782 appears in the main unit).
3784 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3786 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
3787 that with clause has already been analyzed before checking kind
3790 2015-01-06 Robert Dewar <dewar@adacore.com>
3792 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
3793 (as required by RM).
3795 2015-01-06 Arnaud Charlet <charlet@adacore.com>
3797 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
3799 2015-01-06 Robert Dewar <dewar@adacore.com>
3801 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
3802 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
3804 2015-01-06 Javier Miranda <miranda@adacore.com>
3806 * exp_disp.adb (Expand_Interface_Conversion): No displacement
3807 of the pointer to the object needed when the type of the operand
3808 is not an interface type and the interface is one of its parent
3809 types (since they share the primary dispatch table).
3811 2015-01-06 Vincent Celier <celier@adacore.com>
3813 * prj-env.adb: Minor comment update.
3815 2015-01-06 Javier Miranda <miranda@adacore.com>
3817 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
3818 access types whose target type is an interface type to operands
3819 that are access types; required to report an error when the
3820 operand is not an access type.
3822 2015-01-06 Bob Duff <duff@adacore.com>
3824 * a-cfinve.adb (Copy): Set the discriminant to the Length when
3826 * a-cofove.ads (Capacity): Add a postcondition.
3827 * a-cfinve.ads (Capacity): Add a postcondition.
3828 (Reserve_Capacity): Correct the postcondition in the case where
3829 Capacity = 0; that means "Capacity => Length (Container)".
3830 * a-cofove.adb (Elems[c]): Add a comment
3831 explaining the dangers and how to avoid them.
3833 2015-01-06 Ed Schonberg <schonberg@adacore.com>
3835 * sem_ch12.adb: Code clean up.
3837 2015-01-06 Arnaud Charlet <charlet@adacore.com>
3839 * gnatvsn.ads: Bump copyright year.
3841 2015-01-06 Robert Dewar <dewar@adacore.com>
3843 * s-taskin.ads, s-traces.ads: Minor reformatting.
3844 * exp_util.adb: Minor typo fix.
3846 2015-01-06 Vincent Celier <celier@adacore.com>
3848 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
3849 with the runtime name.
3850 * prj-env.adb (Initialize_Default_Project_Path): When both
3851 Target_Name and Runtime_Name are not empty string, add to the
3852 project path the two directories .../lib/gnat and .../share/gpr
3853 related to the runtime.
3854 * prj-env.ads (Initialize_Default_Project_Path): New String
3855 parameter Runtime_Name, defaulted to the empty string.
3857 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
3859 * frontend.adb: Guard against the case where a configuration
3860 pragma may be split into multiple pragmas and the original
3861 rewritten as a null statement.
3862 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
3863 pragma using Insert_Before rather than Insert_Action. This
3864 takes care of the configuration pragma case where Insert_Action
3867 2015-01-06 Bob Duff <duff@adacore.com>
3869 * a-coboho.ads (Element_Access): Add "pragma
3870 No_Strict_Aliasing (Element_Access);". This is needed because
3871 we are unchecked-converting from Address to Element_Access.
3872 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
3875 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
3877 * sem_res.adb (Resolve_Actuals): Remove the
3878 restriction which prohibits volatile actual parameters with
3879 enabled external propery Async_Writers to act appear in procedure
3880 calls where the corresponding formal is of mode OUT.
3882 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3884 * gnat_ugn.texi: Bump @copying's copyright year.
3886 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
3889 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
3891 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
3893 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
3894 of unchecked asprintf.
3897 Copyright (C) 2015 Free Software Foundation, Inc.
3899 Copying and distribution of this file, with or without modification,
3900 are permitted in any medium without royalty provided the copyright
3901 notice and this notice are preserved.