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