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