trans.c (Attribute_to_gnu): Add kludge to avoid generating an overflow for -1.
[platform/upstream/gcc.git] / gcc / ada / ChangeLog
1 2013-05-26  Eric Botcazou  <ebotcazou@adacore.com>
2
3         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge
4         to avoid generating an overflow for -1.
5
6 2013-05-26  Eric Botcazou  <ebotcazou@adacore.com>
7
8         * gcc-interface/gigi.h (create_type_decl): Adjust prototype.
9         (create_label_decl): Complete prototype.
10         (process_attributes): Declare.
11         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust multiple calls to
12         create_type_decl throughout.
13         <E_Enumeration_Type>: Do the layout of the type manually and call
14         process_attributes on it.  Reindent.
15         <E_Enumeration_Subtype>: Minor tweak.
16         <E_Floating_Point_Subtype>: Reindent.
17         <E_Array_Subtype>: Call process_attributes on the array type built
18         for a packed array type.
19         <E_Record_Type>: Call process_attributes on the type.
20         <E_Record_Subtype>: Likewise.
21         <E_Access_Type>: Likewise.
22         <E_Subprogram_Type>: Likewise.
23         Likewise for all types at the end of the processing.
24         * gcc-interface/utils.c (make_aligning_type): Adjust call to
25         create_type_decl.
26         (maybe_pad_type): Likewise.
27         (create_index_type): Likewise.
28         (create_type_decl): Remove attr_list parameter and associated code.
29         (create_var_decl_1): Call process_attributes on the variable.
30         (process_attributes): Take a pointer to the object and add in_place
31         and gnat_node parameters and adjust throughout.
32         <ATTR_MACHINE_ATTRIBUTE>: Pass ATTR_FLAG_TYPE_IN_PLACE only on demand
33         and set the input location.
34         Zap the attribute list at the end.
35         (create_subprog_decl): Call process_attributes on the subprogram.
36         (build_unc_object_type): Adjust call to create_type_decl.
37         (handle_vector_type_attribute): Remove dead code.
38
39 2013-05-26  Eric Botcazou  <ebotcazou@adacore.com>
40
41         * gcc-interface/gigi.h (make_aligning_type): Adjust prototype.
42         * gcc-interface/utils.c (make_aligning_type): Take GNAT_NODE parameter
43         for the position of the associated TYPE_DECL.
44         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to above.
45         * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
46
47 2013-05-26  Eric Botcazou  <ebotcazou@adacore.com>
48
49         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not prematurely
50         elaborate the full view of a type with a freeze node.
51         * gcc-interface/trans.c (process_type): Add explicit predicate.
52
53 2013-05-26  Eric Botcazou  <ebotcazou@adacore.com>
54
55         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Always build the
56         UNC variable for aliased objects with unconstrained nominal subtype.
57
58 2013-05-24  Eric Botcazou  <ebotcazou@adacore.com>
59
60         * gcc-interface/gigi.h (gnat_init_gcc_fp): Declare.
61         * gcc-interface/trans.c (gigi): Call it.
62         * gcc-interface/misc.c (gnat_init_gcc_fp): New function.
63
64 2013-05-24  Eric Botcazou  <ebotcazou@adacore.com>
65
66         * gcc-interface/gigi.h (enum inline_status_t): New type.
67         (create_subprog_decl): Adjust prototype.
68         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Adjust
69         calls to create_subprog_decl.
70         (get_minimal_subprog_decl): Likewise.
71         * gcc-interface/trans.c (gigi): Likewise.
72         (build_raise_check): Likewise.
73         (establish_gnat_vms_condition_handler): Likewise.
74         (Compilation_Unit_to_gnu): Likewise.
75         (gnat_to_gnu): Likewise.
76         * gcc-interface/utils.c (create_subprog_decl): Change inline_flag
77         parameter to inline_status and implement for suppressed inlining.
78
79 2013-05-24  Eric Botcazou  <ebotcazou@adacore.com>
80
81         * gcc-interface/ada-tree.h (LOOP_STMT_NO_UNROLL): New define.
82         (LOOP_STMT_UNROLL): Likewise.
83         (LOOP_STMT_NO_VECTOR): Likewise.
84         (LOOP_STMT_VECTOR): Likewise.
85         * gcc-interface/trans.c (struct loop_info_d): Replace label field
86         with stmt field.
87         (Pragma_to_gnu) <Pragma_Loop_Optimize>: New case.
88         (Loop_Statement_to_gnu): Save the loop statement onto the stack
89         instead of the label.
90         (gnat_to_gnu) <N_Exit_Statement>: Retrieve the loop label.
91
92 2013-05-24  Eric Botcazou  <ebotcazou@adacore.com>
93
94         * gcc-interface/trans.c: Include diagnostic.h and opts.h.
95         (Pragma_to_gnu) <Pragma_Warnings>: New case.
96
97 2013-05-24  Eric Botcazou  <ebotcazou@adacore.com>
98
99         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Constify
100         a handful of local variables.
101         For a derived untagged type that renames discriminants, change the type
102         of the stored discriminants to a subtype with the bounds of the type
103         of the visible discriminants.
104         (build_subst_list): Rename local variable.
105
106 2013-05-16  Jason Merrill  <jason@redhat.com>
107
108         * gcc-interface/Make-lang.in (gnat1$(exeext)): Use link mutex.
109
110 2013-05-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
111
112         PR ada/57188
113         * gcc-interface/Makefile.in: Allow for amd64 solaris2.
114
115 2013-05-07  Eric Botcazou  <ebotcazou@adacore.com>
116
117         PR ada/56474
118         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Use
119         int_const_binop to shift bounds by 1 when they are integer constants.
120
121 2013-04-25  Arnaud Charlet  <charlet@adacore.com>>
122
123         * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Exclude s-init.ad{s,b}
124
125 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
126
127         * checks.adb (Apply_Predicate_Check): Update the comment associated
128         with the call to Check_Expression_Against_Static_Predicate.
129         * sem_ch3.adb (Analyze_Object_Declaration): Update the comment
130         associated with the call to Check_Expression_Against_Static_Predicate.
131         * sem_util.adb (Check_Expression_Against_Static_Predicate):
132         Broaden the check from a static expression to an expression with
133         a known value at compile time.
134         * sem_util.ads (Check_Expression_Against_Static_Predicate): Update
135         comment on usage.
136
137 2013-04-25  Thomas Quinot  <quinot@adacore.com>
138
139         * exp_attr.adb (Expand_N_Attribute_Reference, cases Position,
140         First_Bit, and Last_Bit): Fix incorrect test in implementation of
141         RM 2005 13.5.2(3/2).
142
143 2013-04-25  Claire Dross  <dross@adacore.com>
144
145         * a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads, a-cfhama.adb,
146         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads
147         (Query_Element): Removed.
148         (Update_Element): Removed.
149         (Insert): The version with no New_Item specified is removed.
150         (Iterate): Removed.
151         (Write): Removed.
152         (Read): Removed.
153         Every check of fields Busy and Lock has been removed.
154
155 2013-04-25  Robert Dewar  <dewar@adacore.com>
156
157         * sem_prag.adb (Analyze_Pragma, case Contract_Cases): Remove
158         call to S14_Pragma (Find_Related_Subprogram): Require proper
159         placement in subprogram body (Find_Related_Subprogram): Detect
160         duplicates for all cases (Find_Related_Subprogram): Handle case
161         of spec nested inside body.
162
163 2013-04-25  Arnaud Charlet  <charlet@adacore.com>
164
165         * par-prag.adb: Fix typo.
166
167 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
168
169         * checks.adb (Apply_Predicate_Check): If the type has a static
170         predicate and the expression is also static, check whether the
171         expression satisfies the predicate.
172         * sem_ch3.adb (Analyze_Object_Declaration): If the type has a
173         static predicate and the expression is also static, see if the
174         expression satisfies the predicate.
175         * sem_util.adb: Alphabetize several routines.
176         (Check_Expression_Against_Static_Predicate): New routine.
177         * sem_util.ads (Check_Expression_Against_Static_Predicate): New routine.
178
179 2013-04-25  Robert Dewar  <dewar@adacore.com>
180
181         * gnat_rm.texi: Document Reason argument for pragma Warnings.
182         * par-prag.adb: Handle Reason parameter for pragma Warnings.
183         * sem_prag.adb (Analyze_Pragma, case Warnings): Allow Reason argument.
184         * snames.ads-tmpl (Name_Reason): New name entry.
185
186 2013-04-25  Yannick Moy  <moy@adacore.com>
187
188         * exp_spark.adb (Expand_SPARK_N_In): Remove procedure.
189         (Expand_SPARK): Remove special expansion for membership tests.
190
191 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
192
193         * exp_ch3.adb (Expand_N_Object_Declaration): Update all places
194         that should use constant Base_Typ. When building an invariant
195         check, account for invariants coming from the base type. Prevent
196         the creation of a junk invariant check when the related object
197         is of an array type and it is initialized with an aggregate.
198         * exp_util.adb (Make_Invariant_Call): Typ is now a variable. Use
199         the base type to create an invariant call when the type of the
200         expression is a composite subtype.
201
202 2013-04-25  Vasiliy Fofanov  <fofanov@adacore.com>
203
204         * a-cborse.adb: Fix minor typo.
205
206 2013-04-25  Ed Schonberg  <schonberg@adacore.com>
207
208         * sem_ch6.adb (Different_Generic_Profile): A spec and body
209         match in an instance if a subtype declaration that renames a
210         generic actual with the same name appears between spec and body.
211
212 2013-04-25  Robert Dewar  <dewar@adacore.com>
213
214         * sem_util.adb: Minor reformatting.
215
216 2013-04-25  Ed Schonberg  <schonberg@adacore.com>
217
218         * exp_aggr.adb (Expand_N_Aggregate): Use special circuitry to
219         fold strings with a single others choice only if there are no
220         expressions in the aggregate.
221
222 2013-04-25  Arnaud Charlet  <charlet@adacore.com>
223
224         * gnat_ugn.texi: Update doc on Ada 2012 default mode.
225
226 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
227
228         * exp_ch6.adb: Add with and use clause for Stringt.
229         (Expand_Contract_Cases): Moved from sem_ch6. Add formal parameters
230         Decls and Stmts along with comments on their usage.
231         * exp_ch6.ads (Expand_Contract_Cases): Moved from sem_ch6.
232         * sem_ch6.adb (Expand_Contract_Cases): Moved to exp_ch6.
233         (Process_Contract_Cases): Update the call to Expand_Contract_Cases.
234
235 2013-04-25  Ed Schonberg  <schonberg@adacore.com>
236
237         * gnat_rm.texi: Minor editing, to clarify use of dimension aspects.
238         * sem_util.adb (Is_OK_Variable_For_Out_Formal): Reject an
239         aggregate for a packed type, which may be converted into an
240         unchecked conversion of an object.
241
242 2013-04-25  Robert Dewar  <dewar@adacore.com>
243
244         * sem_prag.adb: Minor code reorganization (correct misspelling
245         Restiction).
246         * sem_util.adb, aspects.ads, sem_ch6.adb: Minor reformatting.
247         * gnat_rm.texi: Document impl-defined aspects.
248         * sem_dim.adb, sem_dim.ads, gnat_ugn.texi, s-dimmks.ads: Minor
249         reformatting.
250
251 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
252
253         * einfo.adb (Set_Abstract_States): The attribute now applies
254         to generic packages.
255         * sem_ch4.adb (Referenced): Moved to sem_util.
256         * sem_ch7.adb (Unit_Requires_Body): A [generic] package with
257         a non-null abstract state needs a body.
258         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Update the calls
259         to Collect_Subprogram_Inputs_Outputs.
260         (Analyze_Global_Item): Verify the proper usage of an item with mode
261         In_Out or Output relative to the enclosing context.
262         (Analyze_Pragma): Abstract_State can now be applied to a generic
263         package. Do not reset the Analyzed flag for pragmas Depends and Global
264         as this is not needed.
265         (Appears_In): Moved to library level.
266         (Check_Mode_Restiction_In_Enclosing_Context): New routine.
267         (Collect_Subprogram_Inputs_Outputs): Moved to library level. Add
268         formal parameters Subp_Id, Subp_Inputs, Subp_Outputs and Global
269         seen along with comments on usage.
270         * sem_util.ads, sem_util.adb (Referenced): New routine.
271
272 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
273
274         * sem_ch6.adb (Expand_Contract_Cases): Generate
275         detailed error messages only when switch -gnateE is in effect.
276
277 2013-04-25  Yannick Moy  <moy@adacore.com>
278
279         * sem_attr.adb (Analyze_Attribute): Do not issue
280         an error for a possibly misplaced 'Result or 'Old attribute when
281         analyzing the aspect.
282
283 2013-04-25  Robert Dewar  <dewar@adacore.com>
284
285         * sem_ch12.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
286
287 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
288
289         * sem_ch4.adb (Analyze_Quantified_Expression):
290         Add local variable Loop_Id. Verify that the loop variable
291         is used within the condition of the quantified expression.
292         (Referenced): New routine.
293
294 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
295
296         * sem_case.adb (Analyze_Choices): Enhance the error message
297         given on a bad use of subtype predicate.
298         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Enhance
299         the error message given on a bad use of subtype predicate.
300         * sem_util.adb (Bad_Predicated_Subtype_Use): Add formal parameter
301         Suggest_Static. Emit an extra error message advising how to
302         remedy the bad use of the predicate if the context warrants it.
303         * sem_util.ads (Bad_Predicated_Subtype_Use): Add formal parameter
304         Suggest_Static along with a comment explaining its usage.
305
306 2013-04-25  Ed Schonberg  <schonberg@adacore.com>
307
308         * sem_disp.adb (Check_Dispatching_Operation): Further refinement
309         to checks for AI05-0125: the check for a hidden primitive that
310         may be overridden by the new declaration only applies if the
311         hidden operation is never declared. This is not the case if the
312         operation is declared in a parent unit.
313
314 2013-04-25  Robert Dewar  <dewar@adacore.com>
315
316         * debug.adb: Remove d.X and d.Y entries and documentation.
317         * exp_ch4.adb (Expand_N_If_Expression): Remove special code used
318         if expression with actions not available (now always available).
319         (Expand_Short_Circuit_Operator): Same change.
320         * gnat1drv.adb (Adjust_Global_Switches) Remove setting
321         Use_Expression_With_Actions flag, since this is now obsolete.
322         * opt.ads (Use_Expression_Actions): Removed (always True now).
323         * sinfo.ads: Minor comment updates.
324
325 2013-04-25  Ed Schonberg  <schonberg@adacore.com>
326
327         * sem_ch12.adb (Check_Generic_Actuals): If an actual is an array
328         subtype whose base type is currently private, install full view
329         when compiling instance body.
330
331 2013-04-25  Ed Schonberg  <schonberg@adacore.com>
332
333         * sem_disp.adb (Check_Dispatching_Operation): Refine checks for
334         AI05-0125: the check for a hidden primitive that may be overridden
335         by the new declaration is only performed if the declaration comes
336         from source, and it must carry an explicit overriding indicator.
337
338 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
339
340         * einfo.adb (Abstract_States): The attribute now applies to
341         generic packages.
342         * sem_ch3.adb (Analyze_Object_Declaration): Check whether an
343         object declaration introduces an illegal hidden state.
344         * sem_prag.adb (Analyze_Abstract_State): Check whether a state
345         declaration introduces an illegal hidden state.
346         * sem_util.ads, sem_util.adb (Check_No_Hidden_State): New routine.
347
348 2013-04-25  Ed Schonberg  <schonberg@adacore.com>
349
350         * exp_ch6.adb (Is_Build_In_Place_Function_Call): The call may
351         be to a protected function, in which case the name in the call
352         is a selected component.
353
354 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
355
356         * sem_ch4.adb (Analyze_Quantified_Expression):
357         Warn on a suspicious use of quantifier "some" when "all" was meant.
358         (No_Else_Or_Trivial_True): New routine.
359
360 2013-04-25  Robert Dewar  <dewar@adacore.com>
361
362         * einfo.ads, einfo.adb: Put back with/use for Namet.
363         (Get_Pragma): New name (wi new spec) for Find_Pragma.
364         * sem_ch6.adb: Change name Find_Pragma to Get_Pragma with
365         different interface.
366
367 2013-04-25  Ed Schonberg  <schonberg@adacore.com>
368
369         * sem_ch3.adb (Is_Visible_Component): In an instance all
370         components are visible.
371
372 2013-04-25  Matthew Heaney  <heaney@adacore.com>
373
374         * a-rbtgbo.adb, a-crbtgo.adb (Generic_Equal): do not test for
375         tampering when container empty.
376         * a-crbtgk.adb (Ceiling, Find, Floor): ditto.
377         (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
378         ditto.
379
380 2013-04-25  Ed Schonberg  <schonberg@adacore.com>
381
382         * par-ch12.adb: Move aspects from package specification to
383         generic package declaration.
384         * sem_ch12.adb: Analyze aspect specifications before building
385         and analyzing the generic copy, so that the generated pragmas
386         are properly taken into account.
387         * sem_ch13.adb: For compilation unit aspects that apply to a
388         generic package declaration, insert corresponding pragmas ahead
389         of visible declarations.
390         * sprint.adb: Display properly the aspects of a generic type
391         declaration.
392
393 2013-04-25  Robert Dewar  <dewar@adacore.com>
394
395         * frontend.adb: Minor reformatting.
396
397 2013-04-25  Ed Schonberg  <schonberg@adacore.com>
398
399         * einfo.ads: Extend documentation on use of Is_Private_Ancestor
400         for untagged types.
401         * sem_ch3.adb (Is_Visible_Component): Refine predicate for the
402         case of untagged types derived from private types, to reject
403         illegal selected components.
404
405 2013-04-25  Gary Dismukes  <dismukes@adacore.com>
406
407         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
408         for case of selecting from an unexpanded implicit dereference
409         and do not make a recursive call on such a prefix.
410
411 2013-04-25  Doug Rupp  <rupp@adacore.com>
412
413         * targparm.adb (VXF{_Str}): New tag for vaxfloat.
414         (Get_Target_Parameters): Handle VXF tag.
415         * targparm.ads (VAX_Float_On_Target): New boolean.
416         * system-vms-ia64.ads (VAX_Float): New boolean.
417         * frontend.adb (Frontend): Handle VAX float boolean.
418
419 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
420
421         * einfo.ads, einfo.adb: Remove with and use clauses for Namet.
422         (Find_Pragma): New routine.
423         * sem_util.ads, sem_util.adb (Find_Pragma): Moved to einfo.
424
425 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
426
427         * sem_ch13.adb (Add_Call): Do not capture the nature of the inherited
428         predicate.
429         (Add_Predicates): Save the static predicate for diagnostics and error
430         reporting purposes.
431         (Process_PPCs): Remove local variables Dynamic_Predicate_Present and
432         Static_Predicate_Present. Add local variable Static_Pred. Ensure that
433         the expression of a static predicate is static.
434
435 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
436
437         * einfo.adb (Is_Ghost_Subprogram): Remove useless code.
438
439 2013-04-25  Robert Dewar  <dewar@adacore.com>
440
441         * gnat_rm.texi: Minor addition of index entry.
442
443 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
444
445         * sem_ch6.adb (Check_Access_Invariants): Test whether an
446         invariant procedure is empty before generating a call to it.
447         (Has_Enabled_Predicate): New routine.
448         (Has_Null_Body): New routine.
449         (Process_PPCs): Test whether an invariant procedure is
450         empty before generating a call to it. Test whether predicates are
451         enabled for a particular type before generating a predicate call.
452         * sem_util.ads, sem_util.adb (Find_Pragma): New routine.
453
454 2013-04-25  Robert Dewar  <dewar@adacore.com>
455
456         * sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl,
457         snames.ads-tmpl: Minor reformatting.
458
459 2013-04-25  Thomas Quinot  <quinot@adacore.com>
460
461         * sem_ch7.adb: Minor reformatting.
462
463 2013-04-25  Robert Dewar  <dewar@adacore.com>
464
465         * gnat_rm.texi: Minor fix to Loop_Variant doc (Loop_Entry allowed).
466         * s-tarest.adb: Minor reformatting.
467
468 2013-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
469
470         * aspects.ads, aspects.adb: Remove aspect Ghost from all relevant
471         tables.
472         * einfo.adb: Remove with and use clause for Aspects.
473         (Is_Ghost_Function): Removed.
474         (Is_Ghost_Entity): New routine.
475         (Is_Ghost_Subprogram): New routine.
476         * einfo.ads: Remove synthesized attribute Is_Ghost_Function
477         along with its uses in entities.  Add synthesized attributes
478         Is_Ghost_Entity and Is_Ghost_Subprogram along with uses in related
479         entities.
480         (Is_Ghost_Function): Removed.
481         (Is_Ghost_Entity): New routine.
482         (Is_Ghost_Subprogram): New routine.
483         * par-prag.adb: Remove pragma Ghost from the processing machinery.
484         * repinfo.adb (List_Mechanisms): Add a value for convention Ghost.
485         * sem_attr.adb (Analyze_Access_Attribute): Update the check
486         for ghost subprograms.
487         * sem_ch4.adb (Analyze_Call): Update the check for calls
488         to ghost subprograms.
489         (Check_Ghost_Function_Call): Removed.
490         (Check_Ghost_Subprogram_Call): New routine.
491         * sem_ch6.adb (Check_Convention): Rewritten.
492         (Check_Overriding_Indicator): Remove the check for overriding
493         ghost functions.
494         (Convention_Of): New routine.
495         * sem_ch12.adb (Preanalyze_Actuals): Update the check for ghost
496         generic actual subprograms.
497         * sem_mech.adb (Set_Mechanisms): Add an entry for convention Ghost.
498         * sem_prag.adb: Remove the value for pragma Ghost from
499         table Sig_Flags.
500         (Analyze_Pragma): Remove the processing for pragma Ghost.
501         (Process_Convention): Emit an error when a ghost
502         subprogram attempts to override.
503         (Set_Convention_From_Pragma): Emit an error when a ghost subprogram
504         attempts to override.
505         * sinfo.ads: Clarify the usage of field Label_Construct.
506         * snames.adb-tmpl (Get_Convention_Id): Add an entry for
507         predefined name Ghost.
508         (Get_Convention_Name): Add an entry for convention Ghost.
509         * snames.ads-tmpl: Move predefined name Ghost to the sublist
510         denoting conventions. Add convention id Ghost. Remove pragma
511         id Ghost.
512
513 2013-04-25  Ed Schonberg  <schonberg@adacore.com>
514
515         * sem_ch7.adb (Swap_Private_Dependents): Do no recurse on child
516         units if within a generic hierarchy.
517
518 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
519
520         * exp_ch6.adb (Expand_Actuals): Add a predicate check on an
521         actual the related type has a predicate function.
522         * sem_ch3.adb (Constant_Redeclaration): Ensure that the related
523         type has an invariant procedure before building a call to it.
524         * sem_ch6.adb (Append_Enabled_Item): New routine.
525         (Check_Access_Invariants): Use routine
526         Append_Enabled_Item to chain onto the list of postconditions.
527         (Contains_Enabled_Pragmas): Removed.
528         (Expand_Contract_Cases): Use routine Append_Enabled_Item to chain onto
529         the list of postconditions.
530         (Invariants_Or_Predicates_Present): Removed.
531         (Process_PPCs): Partially reimplemented.
532
533 2013-04-24  Sergey Rybin  <rybin@adacore.com frybin>
534
535         * tree_io.ads: Update ASIS_Version_Number because of changes
536         in the way how entities are chained in a scope by means of
537         Next_Entity link.
538
539 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
540
541         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
542         Storage_Size): If the clause is not from an aspect, insert
543         assignment to size variable of task type at the point of the
544         clause, not after the task definition, to prevent access before
545         elaboration in the back-end.
546
547 2013-04-24  Yannick Moy  <moy@adacore.com>
548
549         * sem_prag.adb (Sig_Flags): Set correct value for Pragma_Assume.
550
551 2013-04-24  Yannick Moy  <moy@adacore.com>
552
553         * gnat_rm.texi: Document 'Loop_Entry.
554
555 2013-04-24  Jose Ruiz  <ruiz@adacore.com>
556
557         * s-tassta.adb, s-tarest.adb (Task_Wrapper): Start looking for
558         fall-back termination handlers from the parents, because they apply
559         only to dependent tasks.
560         * s-solita.adb (Task_Termination_Handler_T): Do not look for fall-back
561         termination handlers because the environment task has no parent,
562         and if it defines one of these handlers it does not apply to
563         itself because they apply only to dependent tasks.
564
565 2013-04-24  Robert Dewar  <dewar@adacore.com>
566
567         * sem_type.adb, exp_attr.adb, exp_ch4.adb: Minor reformatting.
568
569 2013-04-24  Robert Dewar  <dewar@adacore.com>
570
571         * gnat_rm.texi: Document 'Update attribute.
572         * sem_attr.adb (Analyze_Attribute, case Update): Remove call
573         to S14_Attribute (S14_Attribute): removed.
574
575 2013-04-24  Robert Dewar  <dewar@adacore.com>
576
577         * interfac.ads: Add size clauses for IEEE_Float_32/64
578
579 2013-04-24  Claire Dross  <dross@adacore.com>
580
581         * gnat1drv.adb (Adjust_Global_Switches): Remove
582         special assignment of Use_Expression_With_Actions for SPARK_Mode.
583
584 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
585
586         * checks.adb (Apply_Predicate_Check): Check for the presence
587         of the dynamic predicate aspect when trying to determine if the
588         predicate of a type is non-static.
589         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
590         for the presence of the dynamic predicate aspect when trying to
591         determine if the predicate of a type is non- static.
592         * sem_ch13.adb (Add_Call): Capture the nature of the
593         inherited ancestor predicate.
594         (Build_Predicate_Functions): Update comments. Rewrite the checks on
595         static predicate application. Complain about the form of a non-static
596         expression only when the type is static.
597
598 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
599
600         * sem_prag.adb: Add guard to tree traversal.
601
602 2013-04-24  Vincent Celier  <celier@adacore.com>
603
604         * clean.adb (Clean): Remove local variable Root_Environment,
605         use Makeutl.Root_Environment instead.
606         * gnatcmd.adb: Remove local variable Root_Environment, use
607         Makeutl.Root_Environment instead.
608         * make.adb (Gnatmake): Remove local variable Root_Environment,
609         use Makeutl.Root_Environment instead.
610         * prj-makr.adb: Remove local variable Root_Environment, use
611         Makeutl.Root_Environment instead.
612
613 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
614
615         * exp_attr.adb (Expand_Loop_Entry_Attribute): Clarify the
616         extraction of the declarative part of the conditional block. Move
617         the processing of simple infinite loops to the start of the
618         expansion logic. Correct the check which determines whether the
619         proper scope is installed in visibility.
620         * sem_attr.adb (Analyze_Attribute): Add local variable Attr
621         to keep track of the attribute in case the enclosing indexed
622         component has to be rewritten. When searching for the enclosing
623         loop, start from the proper attribute reference in case of a
624         rewriting. Do not allow for 'Loop_Entry to appear in pragma
625         Assert. Replace loop variable J with Index. Set the type of the
626         proper attribute.
627         * sem_ch5.adb (Check_Unreachable_Code): Detect a specialized
628         block that services a loop statement subject to at least one
629         'Loop_Entry attribute.
630
631 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
632
633         * sem_type.adb (Disambiguate): In Ada 2012 mode, when trying to
634         resolve a fixed point operation, use first subtype to determine
635         whether type and operator are declared in the same list of
636         declarations.
637
638 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
639
640         * par-ch6.adb (P_Subprogram): Detect an illegal
641         placement of the aspect specification list in the context of
642         expression functions.
643
644 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
645
646         * exp_ch4.adb (Expand_N_Allocator):  If the designated object
647         has tasks, and the pointer type is an itype that has no master
648         id, create a master renaming in the current context, which can
649         only be an init_proc.
650
651 2013-04-24  Robert Dewar  <dewar@adacore.com>
652
653         * sem_ch3.adb, sem_ch7.adb: Minor reformatting.
654         * gnat_rm.texi: Document pragma Loop_Invariant.
655         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): This is
656         no longer an S14_Attribute.
657         * sem_prag.adb (Analyze_Pragma, case Loop_Invariant): Combine
658         processing with Assert, allow message parameter, remove call
659         to S14_Pragma.
660
661 2013-04-24  Thomas Quinot  <quinot@adacore.com>
662
663         * exp_ch4.adb: Minor reformatting.
664
665 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
666
667         * sem_ch7.adb (Swap_Private_Dependents): New internal routine
668         to Install_Private_Declarations, to make the installation of
669         private dependents recursive in the presence of child units.
670         * sem_ch3.adb (Build_Discriminated_Subtype): Initialize properly
671         the Private_Dependents of a private subtype.
672
673 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
674
675         * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the
676         retrieval of the block declarations.
677         * par-ch4.adb (P_Name): Let the name parsing machinery create
678         a sequence of nested indexed components for attribute Loop_Entry.
679         * sem_attr.adb (Analyze_Attribute): Add local constant
680         Context. Reimplement part of the analysis of attribute Loop_Entry.
681         (Convert_To_Indexed_Component): Removed.
682         * sem_ch4.adb (Analyze_Indexed_Component_Form): Do not analyze
683         an indexed component after it has been rewritten into attribute
684         Loop_Entry.
685
686 2013-04-24  Yannick Moy  <moy@adacore.com>
687
688         * snames.ads-tmpl: Minor change to list
689         Loop_(In)variant not in configuration pragma.
690         * sem_ch3.adb (Analyze_Declarations): Do not look at the original node
691         for analyzing the expressions in pre/postconditions.
692
693 2013-04-24  Robert Dewar  <dewar@adacore.com>
694
695         * gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
696         reformatting.
697
698 2013-04-24  Yannick Moy  <moy@adacore.com>
699
700         * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
701         Analyze_Subprogram_Body_Helper): Reset contract node to Empty
702         before setting entity to E_Subprogram_Body.
703         * sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to
704         Empty before setting entity to E_Subprogram_Body.
705
706 2013-04-24  Vincent Celier  <celier@adacore.com>
707
708         * gnat_ugn.texi: Document new gnatls switch -aPdir.
709         * gnatcmd.adb: Pass switch -aP<dir> to gnatls.
710         * gnatls.adb (Scan_Ls_Arg): Process new switch -aP<dir>. Issue
711         a warning for unknown switches.
712         (Usage): Add line for new switch -aPdir.
713
714 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
715
716         * sem_util.adb, sem_util.ads (Is_Limited_Class_Wide_Type): Return true
717         if the type comes from a limited view, so that task attributes can be
718         constructed.
719
720 2013-04-24  Yannick Moy  <moy@adacore.com>
721
722         * checks.adb (Apply_Float_Conversion_Check): Do not apply checks if
723         full expansion is not enabled.
724
725 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
726
727         * sem_ch6.adb (Create_Extra_Formals): In Ada 2012, create extra
728         formals if the type does not yet have a completion, and thus
729         has no underlying view.
730
731 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
732
733         * sem_ch13.adb (Analyze_Aspect_Specifications): Treat an aspect
734         specification for Address as a reference, to suppress warnings
735         on entities that may be read by an external device.
736
737 2013-04-24  Sergey Rybin  <rybin@adacore.com frybin>
738
739         * gnat_ugn.texi: Add description of '--help' and '--version'
740         options for ASIS tools: gnatelim, gnatmetric, gnatstub, gnatpp.
741
742 2013-04-24  Arnaud Charlet  <charlet@adacore.com>
743
744         * gnat_rm.texi: Minor syntax fix.
745
746 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
747
748         * exp_attr.adb (Expand_Loop_Entry_Attribute): Add extra comments on
749         what and why is being analyzed. Remove the decoration of renamings as
750         this simply falls out of the general analysis mechanism.
751
752 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
753
754         * sem_res.adb (Explain_Redundancy): New routine.
755         (Resolve_Equality_Op): Place the error concerning a redundant
756         comparison to True at the "=". Try to explain the nature of the
757         redundant True.
758
759 2013-04-24  Javier Miranda  <miranda@adacore.com>
760
761
762         * checks.adb, exp_ch6.adb (Install_Null_Excluding_Check): No
763         check in interface thunks since it is performed at the caller
764         side.
765         (Expand_Simple_Function_Return): No accessibility check
766         needed in thunks since the check is done by the target routine.
767
768 2013-04-24  Vincent Celier  <celier@adacore.com>
769
770         * xref_lib.adb (Add_Entity): Use the canonical file names
771         so that source file names with capital letters are found on
772         platforms where file names are case insensitive.
773
774 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
775
776         * par-ch4.adb (P_Name): Continue to parse the name extension when the
777         construct is attribute Loop_Entry. Do not convert the attribute
778         reference into an indexed component when there is at least one
779         expression / range following 'Loop_Entry.
780
781 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
782
783         * sem_ch6.adb (Contains_Enabled_Pragmas): New routine.
784         (Process_PPCs): Generate procedure _Postconditions
785         only when the context has invariants or predicates or enabled
786         aspects/pragmas.
787
788 2013-04-24  Thomas Quinot  <quinot@adacore.com>
789
790         * g-socket.adb (Host_Entry): Introduce intermediate copy of
791         memory location pointed to by Hostent_H_Addr, as it might not
792         have sufficient alignment.
793
794 2013-04-24  Yannick Moy  <moy@adacore.com>
795
796         * repinfo.adb (List_Rep_Info): Set the value of Unit_Casing before
797         calling subprograms which may read it.
798
799 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
800
801         * einfo.adb: Remove Loop_Entry_Attributes from the usage of
802         nodes. Flag 260 is now used.
803         (Has_Loop_Entry_Attributes): New routine.
804         (Loop_Entry_Attributes): Removed.
805         (Set_Has_Loop_Entry_Attributes): New routine.
806         (Set_Loop_Entry_Attributes): Removed.
807         (Write_Entity_Flags): Write out Flag 260.
808         (Write_Field10_Name): Remove the output for Loop_Entry_Attributes.
809         * einfo.ads: Remove attribute Loop_Entry_Attributes,
810         its related comment and uses in nodes.  Add new attribute
811         Has_Loop_Entry_Attributes, related comment and uses in loop nodes.
812         (Has_Loop_Entry_Attributes): New routine and pragma Inline.
813         (Loop_Entry_Attributes): Removed along with pragma Inline.
814         (Set_Has_Loop_Entry_Attributes): New routine and pragma Inline.
815         (Set_Loop_Entry_Attributes): Removed along with pragma Inline.
816         * exp_attr.adb (Expand_Loop_Entry_Attribute): New routine.
817         (Expand_N_Attribute_Reference): Expand attribute 'Loop_Entry.
818         * exp_ch5.adb: Remove with and use clause for Elists.
819         (Expand_Loop_Entry_Attributes): Removed.
820         (Expand_N_Loop_Statement): Add local variable Stmt. Rename local
821         constant Isc to Scheme. When a loop is subject to attribute
822         'Loop_Entry, retrieve the nested loop from the conditional
823         block. Move the processing of controlled object at the end of
824         loop expansion.
825         * sem_attr.adb (Analyze_Attribute): Do not chain attribute
826         'Loop_Entry to its related loop.
827         * sem_ch5.adb (Analyze_Loop_Statement): Add local variable
828         Stmt. When the iteration scheme mentions attribute 'Loop_Entry,
829         the entire loop is rewritten into a block.  Retrieve the nested
830         loop in such cases to complete the analysis.
831         * sem_util.ads, sem_util.adb (Find_Loop_In_Conditional_Block): New
832         routine.
833         (Subject_To_Loop_Entry_Attributes): New routine.
834
835 2013-04-24  Robert Dewar  <dewar@adacore.com>
836
837         * exp_prag.adb (Expand_Loop_Variant): Generate pragma Check
838         (Loop_Variant, xxx) rather than Assert (xxx).
839         * gnat_rm.texi: Document pragma Loop_Variant.
840         * sem_prag.adb (Analyze_Pragma, case Loop_Variant): Remove call
841         to S14_Pragma.
842
843 2013-04-24  Yannick Moy  <moy@adacore.com>
844
845         * adabkend.adb, ali-util.adb, ali.adb, debug.adb,
846         errout.adb, errout.ads, erroutc.adb, exp_ch3.adb, exp_ch4.adb,
847         exp_ch6.adb, exp_ch7.adb, exp_dbug.adb, exp_util.adb,
848         expander.adb, freeze.adb, gnat1drv.adb, lib-writ.adb,
849         lib-writ.ads, lib-xref.adb, lib-xref.ads, opt.adb, opt.ads,
850         restrict.adb, sem_aggr.adb, sem_attr.adb, sem_ch3.adb,
851         sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_eval.adb, sem_prag.adb,
852         sem_res.adb, sem_util.adb: Everything with name
853         'Alfa' renamed in 'SPARK'. Update comments.
854         Renaming of units with name 'Alfa', renamed with 'SPARK' instead.
855         * exp_alfa.adb: renamed exp_spark.adb.
856         * exp_alfa.ads: renamed exp_spark.ads.
857         * get_alfa.adb: renamed get_spark_xrefs.adb.
858         * get_alfa.ads: renamed get_spark_xrefs.ads.
859         * lib-xref-alfa.adb: renamed lib-xref-spark_specific.adb.
860         * put_alfa.adb: renamed put_spark_xrefs.adb.
861         * put_alfa.ads: renamed put_spark_xrefs.ads.
862         * alfa.adb: renamed spark_xrefs.adb.
863         * alfa.ads: renamed spark_xrefs.ads.
864         * alfa_test.adb: renamed spark_xrefs_test.adb.
865         * gcc-interface/Make-lang.in: Update dependencies.
866
867 2013-04-24  Robert Dewar  <dewar@adacore.com>
868
869         * gnat_rm.texi: Document pragma Assume.
870         * sem_prag.adb (Analyze_Pragma, case Assume): Now processed as
871         part of Assert, and no longer requires -gnatd.F
872
873 2013-04-24  Robert Dewar  <dewar@adacore.com>
874
875         * gnat_rm.texi: Document pragma Assert_And_Cut.
876         * sem_prag.adb (Analyze_Pragma, case Assert_And_Cut): Remove
877         S14_Pragma call.
878
879 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
880
881         * sem_aux.adb: Add guard in Available_View.
882
883 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
884
885         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Use
886         Find_Related_Subprogram to find the associated subprogram.
887         (Analyze_Global_In_Decl_List): Use Find_Related_Subprogram
888         to find the associated subprogram.
889         (Analyze_Pragma): Use Find_Related_Subprogram to find the associated
890         subprogram.
891
892 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
893
894         * exp_ch6.adb: Remove with and use clause for Sem_Prag.
895         (Freeze_Subprogram): Call Analyze_Subprogram_Contract to analyze
896         the contract of a subprogram.
897         * sem_ch3.adb: Remove with and use clause for Sem_Prag.
898         (Analyze_Declarations): Call Analyze_Subprogram_Contract to
899         analyze the contract of a subprogram.
900         * sem_ch6.adb (Analyze_Subprogram_Contract): New routine.
901         (Check_Subprogram_Contract): Removed.
902         * sem_ch6.ads (Analyze_Subprogram_Contract): New routine.
903         (Check_Subprogram_Contract): Removed.
904         (Expand_Contract_Cases): Add a guard against malformed contract cases.
905         * sem_ch13.adb (Analyze_Aspect_Specifications): Call
906         Decorate_Delayed_Aspect_And_Pragma to decorate aspects
907         Contract_Cases, Depends and Global. Reimplement the analysis of
908         aspect Contract_Cases.
909         (Decorate_Delayed_Aspect_And_Pragma): New routine.
910         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): New routine.
911         (Analyze_CTC_In_Decl_Part): Removed.
912         (Analyze_Pragma): Reimplement the analysis of pragma Contract_Cases.
913         (Analyze_Test_Case_In_Decl_Part): New routine.
914         (Find_Related_Subprogram): New routine.
915         (Requires_Profile_Installation): Add new formal Prag. Update
916         the logic to take into account the origin of the pragma.
917         * sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part): New routine.
918         (Analyze_CTC_In_Decl_Part): Removed.
919         (Analyze_Test_Case_In_Decl_Part): New routine.
920
921 2013-04-24  Robert Dewar  <dewar@adacore.com>
922
923         * sem_prag.adb (Process_Convention): Move Stdcall tests to
924         Set_Convention_From_Pragma so that they are applied to each
925         entry of a homonym set.
926         (Process_Convention): Don't try to set convention if already set.
927
928 2013-04-24  Robert Dewar  <dewar@adacore.com>
929
930         * gnatbind.adb: Minor reformatting.
931
932 2013-04-24  Vincent Celier  <celier@adacore.com>
933
934         * clean.adb (Gnatclean): Add the default project search
935         directories in the project search path after scanning the
936         switches on the command line.
937         (Initialize): Do not put the default project search directories in the
938         project search path.
939         * gnatcmd.adb (GNATcmd): Add the default project search
940         directories in the project search path after scanning the switches
941         on the command line.
942         * make.adb (Initialize): Add the default project search
943         directories in the project search path after scanning the switches
944         on the command line.
945
946 2013-04-24  Yannick Moy  <moy@adacore.com>
947
948         * restrict.ads (Restriction_Warnings): Initialize with all False value.
949
950 2013-04-24  Robert Dewar  <dewar@adacore.com>
951
952         * checks.ads, checks.adb (Predicate_Checks_Suppressed): New function.
953         * exp_util.ads, exp_util.adb (Make_Predicate_Check): Check setting of
954         Predicate_Check.
955         * snames.ads-tmpl (Name_Predicate_Check): New check name.
956         * types.ads (Predicate_Check): New definition.
957         * gnat_rm.texi: Add documentation for Predicate_Check.
958
959 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
960
961         * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): If this
962         is a renaming of predefined equality for an untagged record,
963         add generated body to the freeze actions for the subprogram, to
964         prevent freezing issues when the record has incomplete components.
965         * exp_ch4.adb (Expand_Composite_Equality): If the type is a type
966         without completion, return a predefined comparison instead of
967         just False.  This may happen when building the expression for
968         record equality, when some component has a type whose completion
969         has not been seen yet. The operation will be analyzed an expanded
970         after the type has been frozen, at which point all component
971         types will have been completed, or an error reported.
972
973 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
974
975         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not delay
976         analysis of a Convention aspect.
977
978 2013-04-24  Eric Botcazou  <ebotcazou@adacore.com>
979
980         * fe.h (Machine_Overflows_On_Target): New macro and declaration.
981         (Signed_Zeros_On_Target): Likewise.
982
983 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
984
985         * exp_ch6.adb: Add with and use clause for Sem_Prag.
986         (Freeze_Subprogram): Analyze all delayed aspects for a null
987         procedure so that they are available when analyzing the
988         internally-generated _Postconditions routine.
989         * exp_ch13.adb: Remove with and use clause for Sem_Prag.
990         (Expand_N_Freeze_Entity): Move the code that analyzes delayed
991         aspects of null procedures to exp_ch6.Freeze_Subprogram.
992         * sem_prag.adb (Analyze_Abstract_State): Update the check on
993         volatile requirements.
994
995 2013-04-24  Bob Duff  <duff@adacore.com>
996
997         * ali-util.ads (Source_Record): New component Stamp_File
998         to record from whence the Stamp came.
999         * ali-util.adb (Set_Source_Table): Set Stamp_File component.
1000         * bcheck.adb (Check_Consistency): Print additional information in
1001         Verbose_Mode.
1002         * gnatbind.adb (Gnatbind): Print additional information in
1003         Verbose_Mode.
1004
1005 2013-04-24  Robert Dewar  <dewar@adacore.com>
1006
1007         * exp_ch13.adb, sem_prag.adb: Update comments.
1008         * sem_ch3.adb, exp_ch9.adb, g-socket.adb, sem_ch13.adb: Minor
1009         reformatting.
1010
1011 2013-04-24  Doug Rupp  <rupp@adacore.com>
1012
1013         * vms_data.ads (/{NO}INHIBIT-EXEC): Document new default behavior.
1014
1015 2013-04-24  Yannick Moy  <moy@adacore.com>
1016
1017         * sinfo.ads: Minor correction of typo.
1018
1019 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
1020
1021         * sem_ch3.adb: Create packed array only when expander is
1022         active.
1023
1024 2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>
1025
1026         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Install the formals only
1027         when the context warrants it.
1028         (Analyze_Global_In_Decl_List): Install the formals only when
1029         the context warrants it.
1030         (Requires_Profile_Installation): New routine.
1031
1032 2013-04-24  Ed Schonberg  <schonberg@adacore.com>
1033
1034         * exp_ch6.adb (Expand_N_Simple_Return_Statement): When the return
1035         type is a discriminated private type that does not require use
1036         of the secondary stack, a constrained subtype of the underlying
1037         type is created to convey the proper object size to the backend.
1038         If the return type is originally a private type, the return
1039         expression is wrapped in an unchecked_conversion. If the return
1040         expression is used subsequently in a call to the postcondition
1041         function, this conversion must be undone to prevent a spurious
1042         error on the analysis of that call.
1043
1044 2013-04-23  Kai Tietz  <ktietz@redhat.com>
1045
1046         PR target/55445
1047         * raise-gcc.c (__SEH__): Additional check that SjLj isn't active.
1048
1049 2013-04-23  Eric Botcazou  <ebotcazou@adacore.com>
1050             Pascal Obry    <obry@adacore.com>
1051
1052         * gcc-interface/Makefile.in (targ): Fix target name check.
1053         (../../gnatmake$(exeext)): Add '+' for LTO.
1054         (../../gnatlink$(exeext)): Likewise.
1055
1056 2013-04-23  Hristian Kirtchev  <kirtchev@adacore.com>
1057
1058         * exp_ch9.adb (Build_PPC_Wrapper): Correct the traversal of
1059         pre- and post-conditions.
1060         (Expand_N_Task_Type_Declaration):
1061         Use the correct attribute to check for pre- and post-conditions.
1062         * exp_ch13.adb (Expand_N_Freeze_Entity): Correct the traversal of
1063         pre- and post-conditions.  Analyze delayed classification items.
1064         * freeze.adb (Freeze_Entity): Use the correct attribute to
1065         check for pre- and post- conditions.
1066         * sem_ch3.adb (Analyze_Declarations): Correct the traversal
1067         of pre- and post-conditions as well as contract- and
1068         test-cases. Analyze delayed pragmas Depends and Global.
1069         * sem_ch6.adb (Check_Subprogram_Contract): Use the correct
1070         attribute to check for pre- and post-conditions, as well as
1071         contract-cases and test-cases.  (List_Inherited_Pre_Post_Aspects):
1072         Correct the traversal of pre- and post- conditions.
1073         (Process_Contract_Cases): Update the comment on usage. Correct
1074         the traversal of contract-cases.
1075         (Process_Post_Conditions): Update the comment on usage. Correct the
1076         traversal of pre- and post-conditions.
1077         (Process_PPCs): Correct the traversal of pre- and post-conditions.
1078         (Spec_Postconditions): Use the correct
1079         attribute to check for pre- and post- conditions, as well as
1080         contract-cases and test-cases.
1081         * sem_ch13.adb (Analyze_Aspect_Specifications): Reimplement the
1082         actions related to aspects Depends and Global. Code refactoring
1083         for pre- and post-conditions.
1084         (Insert_Delayed_Pragma): New routine.
1085         * sem_prag.adb (Add_Item): New routine.
1086         (Analyze_Depends_In_Decl_Part): New routine.
1087         (Analyze_Global_In_Decl_Part): New routine.
1088         (Analyze_Pragma): Reimplement the actions related to aspects Depends and
1089         Global. Verify that a body acts as a spec for pragma Contract_Cases.
1090         (Chain_PPC): Use Add_Contract_Item to chain a pragma.
1091         (Chain_CTC): Correct the traversal of contract-
1092         and test-cases. Use Add_Contract_Item to chain a pragma.
1093         (Chain_Contract_Cases): Correct the traversal of contract-
1094         and test-cases. Use Add_Contract_Item to chain a pragma.
1095         (Check_Precondition_Postcondition): Update the comment on usage.
1096         (Check_Test_Case): Update the comment on usage.
1097         * sem_prag.ads (Analyze_Depends_In_Decl_Part): New routine.
1098         (Analyze_Global_In_Decl_Part): New routine.
1099         * sem_util.ads, sem_util.adb (Add_Contract_Item): New routine.
1100         * sinfo.adb (Classifications): New routine.
1101         (Contract_Test_Cases): New routine.
1102         (Pre_Post_Conditions): New routine.
1103         (Set_Classifications): New routine.
1104         (Set_Contract_Test_Cases): New routine.
1105         (Set_Pre_Post_Conditions): New routine.
1106         (Set_Spec_CTC_List): Removed.
1107         (Set_Spec_PPC_List): Removed.
1108         (Spec_CTC_List): Removed.
1109         (Spec_PPC_List): Removed.
1110         * sinfo.ads: Update the structure of N_Contruct along with all
1111         related comments.
1112         (Classifications): New routine and pragma Inline.
1113         (Contract_Test_Cases): New routine and pragma Inline.
1114         (Pre_Post_Conditions): New routine and pragma Inline.
1115         (Set_Classifications): New routine and pragma Inline.
1116         (Set_Contract_Test_Cases): New routine and pragma Inline.
1117         (Set_Pre_Post_Conditions): New routine and pragma Inline.
1118         (Set_Spec_CTC_List): Removed.
1119         (Set_Spec_PPC_List): Removed.
1120         (Spec_CTC_List): Removed.
1121         (Spec_PPC_List): Removed.
1122
1123 2013-04-23  Doug Rupp  <rupp@adacore.com>
1124
1125         * init.c (GNAT$STOP) [VMS]: Bump sigargs[0] count by 2
1126         to account for LIB$STOP not having the chance to add the PC and
1127         PSL fields.
1128
1129 2013-04-23  Robert Dewar  <dewar@adacore.com>
1130
1131         * sem_ch13.adb: Minor code reorganization (remove some redundant
1132         assignments).
1133         * sem_ch3.adb, sem_prag.adb: Minor reformatting.
1134
1135 2013-04-23  Yannick Moy  <moy@adacore.com>
1136
1137         * einfo.ads: Minor typo fix.
1138         * sem_ch13.adb (Build_Predicate_Functions): Reject cases where
1139         Static_Predicate is applied to a non-scalar or non-static type.
1140         * sem_prag.adb: Minor typo fix.
1141
1142 2013-04-23  Doug Rupp  <rupp@adacore.com>
1143
1144         * init.c (GNAT$STOP) [VMS]: New function.
1145
1146 2013-04-23  Ed Schonberg  <schonberg@adacore.com>
1147
1148         * sem_ch3.adb: Add exp_pakd to context.
1149         (Constrain_Component_Type): If the component of the parent is
1150         packed, and the record subtype being built is already frozen,
1151         as is the case for an itype, the component type itself will not
1152         be frozen, and the packed array type for it must be constructed
1153         explicitly.
1154
1155 2013-04-23  Thomas Quinot  <quinot@adacore.com>
1156
1157         * g-socket.adb, g-socket.ads (Set_Close_On_Exec): New subprogram.
1158
1159 2013-04-23  Yannick Moy  <moy@adacore.com>
1160
1161         * err_vars.ads (Error_Msg_Qual_Level): Set variable to zero
1162         at declaration.
1163         * opt.ads (Multiple_Unit_Index): Set variable to zero at declaration.
1164         * sem_util.adb (NCT_Table_Entries): Set variable to zero at declaration.
1165         * set_targ.ads (Num_FPT_Modes): Set variable to zero at declaration.
1166         * stylesw.adb (Save_Style_Check_Options): Protect testing the
1167         value of Style_Check_Comments_Spacing by a previous test that
1168         Style_Check_Comments is True.
1169
1170 2013-04-23  Thomas Quinot  <quinot@adacore.com>
1171
1172         * sem_prag.adb, sem_prag.ads (Effective_Name): Rename to
1173         Original_Name, and move declaration to package body as this
1174         subprogram is not used from outside. Also clarify documentation.
1175
1176 2013-04-23  Ed Schonberg  <schonberg@adacore.com>
1177
1178         * exp_ch6.adb (Expand_N_Subprogram_Body): When compiling with
1179         initialize_scalars, disable predicate checks on the generated
1180         assignment to an out scalar parameter.
1181
1182 2013-04-23  Gary Dismukes  <dismukes@adacore.com>
1183
1184         * sem_ch4.adb (Analyze_Allocator): Remove error
1185         check for "constrained in partial view" constraints entirely.
1186
1187 2013-04-23  Robert Dewar  <dewar@adacore.com>
1188
1189         * einfo.ads, sem_prag.ads: Minor reformatting.
1190         * errout.ads: Comment update.
1191
1192 2013-04-23  Yannick Moy  <moy@adacore.com>
1193
1194         * exp_ch5.adb: Minor typo.
1195
1196 2013-04-23  Thomas Quinot  <quinot@adacore.com>
1197
1198         * gnat_ugn.texi: Fix typo.
1199
1200 2013-04-23  Ed Schonberg  <schonberg@adacore.com>
1201
1202         * einfo.ads: Minor documentation clarification.
1203
1204 2013-04-23  Bob Duff  <duff@adacore.com>
1205
1206         * types.ads: Fix incorrect comment.
1207
1208 2013-04-23  Ed Schonberg  <schonberg@adacore.com>
1209
1210         * sem_aux.adb sem_aux.ads (Effectively_has_Constrained_Partial_View):
1211         Rename subprogram as Object_Type_Has_Constrained_Partial_View, better
1212         description of purpose.
1213         * checks.adb (Apply_Discriminant_Check): Use above renaming.
1214         * sem_ch4.adb (Analyze_Allocator): Check Has_Constrained_Partial_View
1215         of the base type, rather than using the Object_Type predicate.
1216         * sem_attr.adb (Analyze_Attribute, case 'Access): Use above renaming.
1217         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): ditto.
1218         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained): Ditto.
1219         * exp_ch4.adb (Expand_N_Allocator): Ditto.
1220
1221 2013-04-23  Robert Dewar  <dewar@adacore.com>
1222
1223         * exp_prag.adb (Expand_Pragma_Check): Check for Assert rather
1224         than Assertion.
1225         * sem_prag.adb (Is_Valid_Assertion_Kind): Moved to spec
1226         (Effective_Name): New function (Analyze_Pragma, case Check):
1227         Disallow [Statement_]Assertions (Check_Kind): Implement
1228         Statement_Assertions (Check_Applicable_Policy): Use Effective_Name
1229         (Is_Valid_Assertion_Kind): Allow Statement_Assertions.
1230         * sem_prag.ads (Is_Valid_Assertion_Kind): Moved here from body
1231         (Effective_Name): New function.
1232         * sem_res.adb: Minor reformatting.
1233         * snames.ads-tmpl (Name_Statement_Assertions): New entry.
1234         * gnat_rm.texi: Add documentation of new assertion kind
1235         Statement_Assertions.
1236
1237 2013-04-23  Robert Dewar  <dewar@adacore.com>
1238
1239         * sinfo.ads, einfo.adb, sem_res.adb, exp_ch6.adb, aspects.adb: Minor
1240         reformatting and code clean up.
1241
1242 2013-04-23  Vincent Celier  <celier@adacore.com>
1243
1244         * prj-part.ads, prj-conf.ads: Minor comment updates.
1245
1246 2013-04-23  Ed Schonberg  <schonberg@adacore.com>
1247
1248         * einfo.adb (Predicate_Function): For a private type, retrieve
1249         predicate function from full view.
1250         * aspects.adb (Find_Aspect): Ditto.
1251         * exp_ch6.adb (Expand_Actuals): If the formal is class-wide and
1252         the actual is a definite type, apply predicate check after call.
1253         * sem_res.adb: Do not apply a predicate check before the call to
1254         a generated Init_Proc.
1255
1256 2013-04-23  Robert Dewar  <dewar@adacore.com>
1257
1258         * sem_ch13.adb (Analyze_Aspect_Specifications): Significant
1259         rewrite to make sure Is_Ignore is properly captured when aspect
1260         is declared.
1261         * sem_ch6.adb: Minor reformatting.
1262         * sem_prag.adb (Analyze_Pragma): Do not test policy at time of
1263         pragma for the case of a pragma coming from an aspect (already
1264         tested when we analyzed the aspect).
1265
1266 2013-04-23  Vincent Celier  <celier@adacore.com>
1267
1268         * prj-conf.adb (Parse_Project_And_Apply_Config): New
1269         Boolean parameter Implicit_Project, defaulted to False. Call
1270         Prj.Part.Parse with Implicit_Project.
1271         * prj-conf.ads (Parse_Project_And_Apply_Config): New Boolean
1272         parameter Implicit_Project, defaulted to False.
1273         * prj-part.adb (Parse_Single_Project): New Boolean parameter
1274         Implicit_Project, defaulted to False. When Implicit_Project is
1275         True, change the Directory of the project node to the Current_Dir.
1276         * prj-part.ads (Parse): New Boolean parameter, defaulted to False
1277
1278 2013-04-23  Robert Dewar  <dewar@adacore.com>
1279
1280         * exp_util.adb: Minor reformatting.
1281
1282 2013-04-23  Robert Dewar  <dewar@adacore.com>
1283
1284         * xoscons.adb: Minor reformatting.
1285
1286 2013-04-23  Hristian Kirtchev  <kirtchev@adacore.com>
1287
1288         * sem_prag.adb (Check_Mode): Ensure that a
1289         self-referential output appears in both input and output lists of
1290         the subprogram as categorized by aspect Global.
1291         (Check_Usage): Rename formal parameters to better illustrate their
1292         function. Update all uses of the said formals.
1293
1294 2013-04-23  Thomas Quinot  <quinot@adacore.com>
1295
1296         * exp_util.adb, exp_util.ads (Fully_Qualified_Name_String): New
1297         parameter Append_NUL to make NUL-termination optional.
1298         * exp_dist.adb: Consistently use the above throughout instead of
1299         Get_Library_Unit_Name_String.
1300
1301 2013-04-23  Robert Dewar  <dewar@adacore.com>
1302
1303         * sem_util.adb, sem_res.adb, prj-tree.adb, prj-tree.ads: Minor
1304         reformatting.
1305
1306 2013-04-23  Pascal Obry  <obry@adacore.com>
1307
1308         * xoscons.adb: Remove unused use clause, minor code clean-up.
1309
1310 2013-04-23  Ed Schonberg  <schonberg@adacore.com>
1311
1312         * sem_util.ads, sem_util.adb: Code cleanup for Is_Expression_Function
1313         (can apply to any scope entity).
1314         * sem_res.adb (Resolve_Call):  If the call is within another
1315         expression function it does not constitute a freeze point.
1316
1317 2013-04-23  Yannick Moy  <moy@adacore.com>
1318
1319         * exp_ch6.adb (Expand_Actuals): Test that Subp
1320         is overloadable before testing if it's an inherited operation.
1321
1322 2013-04-23  Robert Dewar  <dewar@adacore.com>
1323
1324         * a-envvar.adb, a-envvar.ads, exp_util.adb, sem_ch12.adb: Minor
1325         reformatting.
1326
1327 2013-04-23  Ed Schonberg  <schonberg@adacore.com>
1328
1329         * sem_ch3.adb (Analyze_Object_Declarations): Undo previous patch.
1330         * exp_util.adb (Expand_Subtype_From_Expr): If the expression
1331         is a source entity and the declaration is for an aliased
1332         unconstrained array, create a new subtype so that the flag
1333         Is_Constr_Subt_For_UN_Aliased does not pollute other entities.
1334
1335 2013-04-23  Hristian Kirtchev  <kirtchev@adacore.com>
1336
1337         * aspects.adb: Move tables Base_Aspect and Inherited_Aspect
1338         from the spec to the body.
1339         (Find_Aspect): Update the call to Get_Aspect_Id.
1340         (Get_Aspect_Id): New version that takes an aspect specification.
1341         * aspects.ads: Reorganize all aspect related tables.
1342         (Get_Aspect_Id): New version that takes an aspect specification.
1343         * par_sco.adb (Traverse_Aspects): Update the call to Get_Aspect_Id.
1344         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Update
1345         the call to Get_Aspect_Id.
1346         * sem_ch13.adb (Analyze_Aspect_At_Freeze_Point): Update the
1347         call to Get_Aspect_Id.  (Analyze_Aspect_Specifications): Update
1348         the call to Get_Aspect_Id. Update the call to Impl_Defined_Aspect.
1349
1350 2013-04-23  Robert Dewar  <dewar@adacore.com>
1351
1352         * sem_prag.adb (Fix_Error): Rewrite to do more accurate job
1353         of getting proper name in the case where pragma comes from
1354         aspect.
1355         * sem_ch3.adb, sinfo.ads, par-ch6.adb, exp_ch6.adb: Minor reformatting.
1356
1357 2013-04-23  Yannick Moy  <moy@adacore.com>
1358
1359         * sem_ch6.adb (Process_PPCs): Do not filter postconditions based on
1360         applicable policy.
1361
1362 2013-04-23  Thomas Quinot  <quinot@adacore.com>
1363
1364         * par_sco.adb (Traverse_Aux_Decls): Minor code reorganization.
1365
1366 2013-04-23  Doug Rupp  <rupp@adacore.com>
1367
1368         * init.c: Move facility macros outside IN_RTS.
1369
1370 2013-04-23  Thomas Quinot  <quinot@adacore.com>
1371
1372         * freeze.adb (Freeze_Entity): For the case of a bit-packed
1373         array time that is known at compile time to have more that
1374         Integer'Last+1 elements, issue an error, since such arrays are
1375         not supported.
1376
1377 2013-04-23  Hristian Kirtchev  <kirtchev@adacore.com>
1378
1379         * sem_prag.adb (Analyze_Dependency_Clause): Update all calls to
1380         Analyze_Input_Output.
1381         (Analyze_Input_List): Update all calls to Analyze_Input_Output.
1382         (Analyze_Input_Output): Add formal parameter Self_Ref along with
1383         comment on its usage. Update all calls to Analyze_Input_Output.
1384         (Analyze_Pragma): Add new local variable Self_Ref to capture
1385         the presence of a self-referential dependency clause. Update
1386         all calls to Analyze_Input_Output.
1387         (Check_Mode): Add formal parameter Self_Ref along with comment on its
1388         usage. Verify the legality of a self-referential output.
1389
1390 2013-04-23  Ed Schonberg  <schonberg@adacore.com>
1391
1392         * exp_ch6.adb: Add predicate checks on by-copy parameter.
1393
1394 2013-04-23  Vincent Celier  <celier@adacore.com>
1395
1396         * a-envvar.adb, a-envvar.ads (Value): New.
1397
1398 2013-04-22  Yannick Moy  <moy@adacore.com>
1399
1400         * exp_prag.adb (Expand_Pragma_Loop_Variant): Rewrite pragma as
1401         null statement if ignored.
1402         * sem_ch6.adb (Expand_Contract_Cases): Do nothing if pragma is ignored.
1403         * sem_prag.adb (Analyze_Pragma): Keep analyzing ignored pragmas.
1404
1405 2013-04-22  Hristian Kirtchev  <kirtchev@adacore.com>
1406
1407         * sem_prag.adb (Analyze_Contract_Case): New routine.
1408         (Analyze_Pragma): Aspect/pragma Contract_Cases can
1409         now be associated with a library level subprogram.
1410         Add circuitry to detect illegal uses of aspect/pragma Contract_Cases
1411         in a subprogram body.
1412         (Chain_Contract_Cases): Rename formal parameter Subp_Decl to
1413         Subp_Id. Remove local constant Subp. The entity of the subprogram
1414         is now obtained via the formal paramter.
1415
1416 2013-04-22  Ed Schonberg  <schonberg@adacore.com>
1417
1418         * sem_ch3.adb (Analyze_Object_Declaration): Do not set
1419         Is_Constr_Subt_For_Unc_Aliased on the subtype of the expression,
1420         if the expression is a source entity.
1421
1422 2013-04-22  Yannick Moy  <moy@adacore.com>
1423
1424         * exp_prag.adb, sinfo.ads, sem_prag.ads: Minor correction of typos in
1425         comments.
1426         * sem_ch6.adb (Expand_Contract_Cases): Add location to message.
1427
1428 2013-04-22  Thomas Quinot  <quinot@adacore.com>
1429
1430         * sem_prag.adb (Fix_Error): For a pragma rewritten from another
1431         pragma, fix up error message to include original pragma name.
1432         * par_sco.adb: Minor reformatting.
1433
1434 2013-04-22  Robert Dewar  <dewar@adacore.com>
1435
1436         * sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb,
1437         sem_ch6.adb, opt.ads: Minor reformatting.
1438
1439 2013-04-22  Pascal Obry  <obry@adacore.com>
1440
1441         * gnat_ugn.texi, prj-nmsc.adb, projects.texi: Add check for
1442         Library_Standalone and Library_Kind.
1443
1444 2013-04-22  Ed Schonberg  <schonberg@adacore.com>
1445
1446         * exp_ch6.adb (Expand_Actuals): If the call is to an
1447         inherited operation and the actual is a by-reference type with
1448         predicates, add predicate call to post-call actions.
1449         * sem_util.adb (Is_Inherited_Operation_For_Type): Fix coding
1450         error: a type declaration has a defining identifier, not an Etype.
1451         * sem_res.adb: Restore code removed because of above error.
1452
1453 2013-04-22  Doug Rupp  <rupp@adacore.com>
1454
1455         * init.c (__gnat_handle_vms_condition): Also match C$_SIGINT.
1456
1457 2013-04-22  Yannick Moy  <moy@adacore.com>
1458
1459         * gnat_rm.texi, exp_util.adb, sem_prag.adb, sem_prag.ads, par-ch2.adb,
1460         opt.ads, sem_ch13.adb: Minor correction of typos in comments/doc.
1461
1462 2013-04-22  Vincent Celier  <celier@adacore.com>
1463
1464         * prj-nmsc.adb (Check_Library_Attributes): Set Library_Dir to
1465         No_Path_Information only when Directories_Must_Exist_In_Projects
1466         is False.
1467         (Get_Directories): Set Object_Directory
1468         or Exec_Directory to No_Path_Information only when
1469         Directories_Must_Exist_In_Projects is False.
1470
1471 2013-04-22  Yannick Moy  <moy@adacore.com>
1472
1473         * par-prag.adb, sem_attr.adb, sem_ch6.adb, sem_prag.adb, sem_warn.adb,
1474         snames.ads-tmpl, sinfo.ads, sem_util.ads: Remove all references to
1475         Pragma_Contract_Case and Name_Contract_Case.
1476
1477 2013-04-22  Yannick Moy  <moy@adacore.com>
1478
1479         * aspects.ads, aspects.adb, sem_ch13.adb: Removal of references to
1480         Contract_Case.
1481         * gnat_ugn.texi, gnat_rm.texi Description of Contract_Case replaced by
1482         description of Contract_Cases.
1483
1484 2013-04-12  Robert Dewar  <dewar@adacore.com>
1485
1486         * makeutl.adb, prj-nmsc.adb: Minor reformatting.
1487
1488 2013-04-12  Robert Dewar  <dewar@adacore.com>
1489
1490         * exp_util.adb (Make_Invariant_Call): Use Check_Kind instead
1491         of Check_Enabled.
1492         * gnat_rm.texi (Check_Policy): Update documentation for new
1493         Check_Policy syntax.
1494         * sem_prag.adb (Check_Kind): Replaces Check_Enabled
1495         (Analyze_Pragma, case Check_Policy): Rework to accomodate new
1496         syntax (like Assertion_Policy).
1497         * sem_prag.ads (Check_Kind): Replaces Check_Enabled.
1498
1499 2013-04-12  Doug Rupp  <rupp@adacore.com>
1500
1501         * init.c (SS$_CONTROLC, SS$_CONTINUE) [VMS]: New macros.
1502         (__gnat_handle_vms_condition) [VMS]: Dispatch on the Crtl/C user
1503         handler if installed.
1504         * ctrl_c.c (__gnat_install_int_handler)
1505         [VMS]: Install a dummy sigaction handler to trigger the real
1506         user handler dispatch in init.c/__gnat_handle_vms_condition.
1507         (__gnat_uninstall_int_handler) [VMS]: Likewise.
1508
1509 2013-04-12  Vincent Celier  <celier@adacore.com>
1510
1511         * clean.adb (Parse_Cmd_Line): Set Directories_Must_Exist_In_Projects
1512         to False if switch is specified.
1513         * makeutl.adb (Initialize_Source_Record): Do not look for the
1514         object file if there is no object directory.
1515         * opt.ads (Directories_Must_Exist_In_Projects): New Boolean
1516         variable, defaulted to True.
1517         * prj-nmsc.adb (Check_Library_Attributes): Do not fail if library
1518         directory does not exist when Directories_Must_Exist_In_Projects is
1519         False.
1520         (Get_Directories): Do not fail when the object or the exec directory
1521         do not exist when Directories_Must_Exist_In_Projects is False.
1522
1523 2013-04-12  Robert Dewar  <dewar@adacore.com>
1524
1525         * namet.adb, namet.ads: Minor addition (7 arg version of Nam_In).
1526         * exp_prag.adb, sem_ch3.adb, sem_intr.adb, sem_type.adb, exp_util.adb,
1527         sem_aux.adb, exp_ch9.adb, sem_ch7.adb, sem_ch10.adb, sem_prag.adb,
1528         par-ch2.adb, tbuild.adb, rtsfind.adb, freeze.adb, sem_util.adb,
1529         sem_res.adb, sem_attr.adb, exp_ch2.adb, prj-makr.adb, sem_elab.adb,
1530         exp_ch4.adb, sem_ch4.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb,
1531         prj-nmsc.adb, exp_disp.adb, sem_ch8.adb, sem_warn.adb, par-util.adb,
1532         sem_eval.adb, exp_intr.adb, sem_ch13.adb, exp_cg.adb, lib-xref.adb,
1533         sem_disp.adb, exp_ch3.adb: Minor code reorganization (use Nam_In).
1534
1535 2013-04-12  Doug Rupp  <rupp@adacore.com>
1536
1537         * init.c: Don't clobber condition code on VMS.
1538
1539 2013-04-12  Robert Dewar  <dewar@adacore.com>
1540
1541         * exp_aggr.adb: Minor reformatting.
1542         * namet.ads, namet.adb (Nam_In): New functions.
1543
1544 2013-04-12  Robert Dewar  <dewar@adacore.com>
1545
1546         * einfo.adb (Has_Dynamic_Predicate_Aspect): New flag.
1547         (Has_Static_Predicate_Aspect): New flag.
1548         * einfo.ads (Has_Dynamic_Predicate_Aspect): New flag.
1549         (Has_Static_Predicate_Aspect): New flag.
1550         * exp_ch9.adb: Minor reformatting.
1551         * exp_util.adb (Make_Invariant_Call): Check_Enabled now handles
1552         synonyms.
1553         * gnat1drv.adb: Remove setting of Debug_Pragmas_Enabled,
1554         since this switch is gone and control of Debug is done with
1555         Assertions_Enabled.
1556         * gnat_rm.texi: Update documentation for Assertion_Policy and
1557         Check_Policy pragmas.
1558         * opt.adb (Debug_Pragmas_Disabled[_Config]): Removed
1559         (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
1560         controlled by Assertion_Enabled.
1561         * opt.ads (Debug_Pragmas_Disabled[_Config]): Removed
1562         (Debug_Pragmas_Enabled[_Config]): Removed Since debug now
1563         controlled by Assertion_Enabled.
1564         * par-ch2.adb (Scan_Pragma_Argument_Association): Allow new
1565         'Class forms.
1566         * sem_attr.adb: Minor reformatting.
1567         * sem_ch13.adb (Analyze_Aspect_Specification): Disable aspect
1568         if DISABLE policy applies.
1569         * sem_ch6.adb (Grab_PPC): Check original name of aspect for
1570         aspect from pragma (Process_PPCs): Properly check assertion policy.
1571         * sem_prag.adb (Check_Enabled): Rewritten for new Assertion_Policy
1572         (Check_Appicable_Policy): New procedure.
1573         (Is_Valid_Assertion_Kind): New function.
1574         (Rewrite_Assertion_Kind): New procedure.
1575         (Analyze_Pragma): Handle case of disabled assertion pragma.
1576         (Analyze_Pragma, case Assertion_Policy): Rewritten for Ada 2012.
1577         (Analyze_Pragma, case Check): Deal with 'Class possibilities.
1578         (Analyze_Pragma, case Check_Policy): Deal with 'Class possibilities.
1579         (Analyze_Pragma, case Contract_Class): New handling of ignored pragma.
1580         (Analyze_Pragma, case Debug): New control with Assertion_Policy.
1581         (Analyze_Pragma, case Debug_Policy): Now consistent with
1582         Assertion_Policy.
1583         (Analyze_Pragma, case Loop_Invariant): New handling of ignored
1584         pragma.
1585         (Analyze_Pragma, case Loop_Variant): New handling of ignored pragma.
1586         (Analyze_Pragma, case Precondition): Use proper name for Check pragma.
1587         (Analyze_Pragma, case Check_Enabled): Rewritten for new policy stuff.
1588         * sem_prag.ads (Check_Enabled): Rewritten for new
1589         Assertion_Policy stuff.
1590         (Check_Appicable_Policy): New procedure.
1591         * sinfo.adb (Is_Disabled): New flag.
1592         (Is_Ignored): New flag.
1593         * sinfo.ads (Is_Disabled): New flag.
1594         (Is_Ignored): New flag.
1595         (N_Pragma_Argument_Association): New 'Class forms.
1596         * snames.ads-tmpl: New names Name_uPre, Name_uPost,
1597         Name_uType_Invariant, Name_uInvariant.
1598         * switch-c.adb: Remove setting of Debug_Pragmas_Enabled for -gnata.
1599         * tree_io.ads (ASIS_Version_Number): Updated (remove
1600         read write of obsolete flags Debug_Pragmas_Disabled and
1601         Debug_Pragmas_Enabled.
1602
1603 2013-04-12  Ed Schonberg  <schonberg@adacore.com>
1604
1605         * exp_aggr.adb (Get_Explicit_Discriminant_Value): Subsidiary
1606         of Build_Record_Aggr_Code, used to retrieve explicit values
1607         for inherited discriminants in an extension aggregate, when the
1608         ancestor type is unconstrained.
1609
1610 2013-04-12  Ed Schonberg  <schonberg@adacore.com>
1611
1612         * sem_attr.adb (Check_Stream_Attribute): If restriction
1613         No_Default_Stream_Attributes is active, it is illegal to use a
1614         predefined elementary type stream attribute either by itself,
1615         or more importantly as part of the attribute subprogram for a
1616         composite type. However, if the broader restriction No_Streams
1617         is active, then stream operations are not generated, and there
1618         is no error.
1619
1620 2013-04-12  Robert Dewar  <dewar@adacore.com>
1621
1622         * gnatbind.adb: Minor reformatting.
1623
1624 2013-04-12  Bob Duff  <duff@adacore.com>
1625
1626         * sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a
1627         call only in the static elaboration model.
1628
1629 2013-04-12  Hristian Kirtchev  <kirtchev@adacore.com>
1630
1631         * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency
1632         clause where both input and output lists are null.
1633         (Analyze_Pragma): Update the grammar of pragma Depends.
1634
1635 2013-04-12  Vincent Celier  <celier@adacore.com>
1636
1637         * gnatbind.adb (No_Restriction_List): Exclude restrictions that
1638         take a parameter value, not a count.
1639         * prj.ads, prj.adb (Remove_All_Restricted_Languages): New procedure.
1640         * projects.texi: Complete documentation of attribute Roots.
1641
1642 2013-04-12  Thomas Quinot  <quinot@adacore.com>
1643
1644         * exp_ch3.adb, exp_util.ads, checks.adb, freeze.adb, sem_attr.adb,
1645         sem_ch3.adb: Minor reformatting.
1646         * exp_ch4.adb (Size_In_Storage_Elements): Minor documentation
1647         improvement: note that the computation is pessimistic for bit
1648         packed arrays.
1649         * gnat_rm.texi (Range_Length): Fix minor error in description
1650         of attribute.
1651
1652 2013-04-12  Hristian Kirtchev  <kirtchev@adacore.com>
1653
1654         * aspects.adb (Find_Aspect): New routine.
1655         (Find_Value_Of_Aspect): New routine.
1656         (Has_Aspect): Reimplemented.
1657         * aspects.ads (Find_Aspect): New routine.
1658         (Find_Value_Of_Aspect): New routine, previously known as Find_Aspect.
1659         * exp_ch5.adb (Expand_Iterator_Loop): Update the call to Find_Aspect.
1660         * exp_util.adb (Is_Iterated_Container): Update the call to Find_Aspect.
1661         * sem_ch4.adb (Try_Container_Indexing): Update calls to Find_Aspect.
1662         * sem_ch5.adb (Analyze_Iterator_Specification): Update
1663         the call to Find_Aspect. Use function Has_Aspect for better
1664         readability.
1665         (Preanalyze_Range): Use function Has_Aspect for better readability.
1666         * sem_ch13.adb (Check_One_Function): Update the call to Find_Aspect.
1667         * sem_prag.adb (Analyze_Pragma): There is no longer need to
1668         look at the parent to extract the corresponding pragma for
1669         aspect Global.
1670
1671 2013-04-12  Robert Dewar  <dewar@adacore.com>
1672
1673         * checks.adb, sem_elab.adb, repinfo.adb, sem_ch4.adb, restrict.adb,
1674         restrict.ads: Minor reformatting.
1675
1676 2013-04-12  Ed Schonberg  <schonberg@adacore.com>
1677
1678         * lib-xref.adb: Retrieve original name of classwide type if any.
1679
1680 2013-04-12  Thomas Quinot  <quinot@adacore.com>
1681
1682         * exp_ch11.ads: Minor reformatting.
1683
1684 2013-04-12  Hristian Kirtchev  <kirtchev@adacore.com>
1685
1686         * aspects.adb: Alphabetize subprogram bodies in this unit. Add
1687         an entry for Aspect_Ghost in the table of canonical aspects.
1688         (Has_Aspect): New routine.
1689         * aspects.ads: Add Aspect_Ghost to all relevant
1690         tables. Alphabetize subprograms in this unit.
1691         (Has_Aspect): New routine.
1692         * einfo.adb: Add with and use clauses for Aspects.
1693         (Is_Ghost_Function): New routine.
1694         * einfo.ads: Add new synthesized attribute Is_Ghost_Function and
1695         update the structure of the related nodes.
1696         (Is_Ghost_Function): New routine.
1697         * exp_ch4.adb (Find_Enclosing_Context): Use routine
1698         Is_Body_Or_Package_Declaration to terminate a search.
1699         (Is_Body_Or_Unit): Removed.
1700         * exp_util.adb (Within_Case_Or_If_Expression): Use routine
1701         Is_Body_Or_Package_Declaration to terminate a search.
1702         * par-prag.adb: Add pragma Ghost to the list of pragmas that do
1703         not need special processing by the parser.
1704         * sem_attr.adb (Analyze_Access_Attribute): Detect an
1705         illegal use of 'Access where the prefix is a ghost function.
1706         (Analyze_Attribute): Use routine Is_Body_Or_Package_Declaration
1707         to terminate a search.  (Check_References_In_Prefix): Use routine
1708         Is_Body_Or_Package_Declaration to terminate a search.
1709         * sem_ch4.adb (Analyze_Call): Mark a function when it appears
1710         inside an assertion expression.  Verify the legality of a call
1711         to a ghost function.
1712         (Check_Ghost_Function_Call): New routine.
1713         * sem_ch6.adb (Analyze_Function_Call): Code reformatting. Move
1714         the setting of attribute In_Assertion_Expression to Analyze_Call.
1715         (Check_Overriding_Indicator): Detect an illegal attempt to
1716         override a function with a ghost function.
1717         * sem_ch12.adb (Preanalyze_Actuals): Detect an illegal use of
1718         a ghost function as a generic actual.
1719         * sem_elab.adb (Check_Internal_Call_Continue): Update the call
1720         to In_Assertion.
1721         * sem_prag.adb: Add an entry for pragma Ghost in the table
1722         of significant arguments.
1723         (Analyze_Pragma): Do not analyze
1724         an "others" case guard. Add processing for pragma Ghost. Use
1725         Preanalyze_Assert_Expression when analyzing the expression of
1726         pragmas Loop_Invariant and Loop_Variant.
1727         * sem_util.adb (Get_Subprogram_Entity): Reimplemented.
1728         (Is_Body_Or_Package_Declaration): New routine.
1729         * sem_util.ads: Alphabetize subprotrams in this unit.
1730         (Is_Body_Or_Package_Declaration): New routine.
1731         * sinfo.adb (In_Assertion): Rename to In_Assertion_Expression.
1732         (Set_In_Assertion): Rename to Set_In_Assertion_Expression.
1733         * sinfo.ads: Rename flag In_Assertion to In_Assertion_Expression
1734         to better reflect its use.  Update all places that mention the flag.
1735         (In_Assertion): Rename to In_Assertion_Expression. Update
1736         related pragma Inline.  (Set_In_Assertion): Rename to
1737         Set_In_Assertion_Expression. Update related pragma Inline.
1738         * snames.ads-tmpl: Add new predefined name Ghost. Add new pragma
1739         id Pragma_Ghost.
1740
1741 2013-04-12  Arnaud Charlet  <charlet@adacore.com>
1742
1743         * sem_prag.adb (Set_Imported): Do not generate error for multiple
1744         Import in CodePeer mode.
1745         * s-rident.ads: Fix minor typo.
1746
1747 2013-04-12  Ed Schonberg  <schonberg@adacore.com>
1748
1749         * checks.adb (Insert_Valid_Check): Do not insert validity check
1750         in the body of the generated predicate function, to prevent
1751         infinite recursion.
1752
1753 2013-04-12  Ed Schonberg  <schonberg@adacore.com>
1754
1755         * s-rident.ads: Add various missing Ada 2012 restrictions:
1756         No_Access_Parameter_Allocators, No_Coextensions,
1757         No_Use_Of_Attribute, No_Use_Of_Pragma.
1758         * snames.ads-tmpl: Add corresponding names.
1759         * restrict.ads restrict.adb: Subprograms and data structures to
1760         handle aspects No_Use_Of_Attribute and No_Use_Of_Pragma.
1761         * sem_ch4.adb: Correct name of restrictions is
1762         No_Standard_Allocators_After_Elaboration.
1763         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
1764         violation of restriction No_Use_Of_Attribute.
1765         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1766         Set restrictions No_Use_Of_Pragma and No_Use_Of_Attribute.
1767         (Analyze_Pragma): Check violation of restriction No_Use_Of_Pragma.
1768         * sem_res.adb: Check restrictions No_Access_Parameter_Allocators
1769         and No_Coextensions.
1770         * bcheck.adb: Correct name of restrictions is
1771         No_Standard_Allocators_After_Elaboration.
1772         * gnatbind.adb: Correct name of restrictions is
1773         No_Standard_Allocators_After_Elaboration.
1774
1775 2013-04-12  Hristian Kirtchev  <kirtchev@adacore.com>
1776
1777         * sem_prag.adb (Analyze_Pragma, (Check_Mode_Restriction_In_Function):
1778         Correct error message format.
1779
1780 2013-04-12  Robert Dewar  <dewar@adacore.com>
1781
1782         * sem_attr.adb: Minor reformatting.
1783
1784 2013-04-12  Ed Schonberg  <schonberg@adacore.com>
1785
1786         * sem_elab.adb (Within_Elaborate_All): Do not examine a context
1787         item that has not been analyzed, because the unit may have errors,
1788         or the context item may come from a proper unit inserted at the
1789         point of a stub and not analyzed yet.
1790
1791 2013-04-12  Thomas Quinot  <quinot@adacore.com>
1792
1793         * gnat1drv.adb, repinfo.adb, repinfo.ads (Repinfo.List_Array_Info,
1794         List_Record_Info): Also include scalar storage order information in
1795         output.
1796
1797 2013-04-12  Yannick Moy  <moy@adacore.com>
1798
1799         * sem_ch6.adb (Process_Contract_Cases): Update code to apply to
1800         Contract_Cases instead of Contract_Case pragma.
1801
1802 2013-04-12  Robert Dewar  <dewar@adacore.com>
1803
1804         * a-cfdlli.ads, g-socket.adb, s-fileio.adb: Minor reformatting.
1805
1806 2013-04-12  Yannick Moy  <moy@adacore.com>
1807
1808         * sem_attr.adb (Analyze_Attribute): Update analyse of
1809         Attribute_Old and Attribute_Result so they are allowed in the
1810         right-hand-side of an association in a Contract_Cases pragma.
1811         * sem_prag.adb (Analyze_CTC_In_Decl_Part): Add pre-analysis of
1812         the expressions in a Contract_Cases pragma.
1813
1814 2013-04-12  Robert Dewar  <dewar@adacore.com>
1815
1816         * sem.ads, opt.ads: Minor comment edits.
1817         * sem_warn.adb, sem_ch6.adb: Minor reformatting.
1818
1819 2013-04-12  Claire Dross  <dross@adacore.com>
1820
1821         * a-cfdlli.adb a-cfdlli.ads (List, Not_No_Element, Iterate,
1822         Reverse_Iterate, Query_Element, Update_Element, Read, Write): Removed,
1823         not suitable for formal analysis.
1824
1825 2013-04-12  Ed Schonberg  <schonberg@adacore.com>
1826
1827         * sem_prag.adb (Analyze_Abstract_State): Use Defining entity
1828         to locate package entity, which may be a child unit.
1829
1830 2013-04-12  Thomas Quinot  <quinot@adacore.com>
1831
1832         * g-socket.adb, g-socket.ads (Connect_Socket, version with timeout): If
1833         the specified timeout is 0, do not attempt to determine whether the
1834         connection succeeded.
1835
1836 2013-04-12  Doug Rupp  <rupp@adacore.com>
1837
1838         * s-fileio.adb (Form_RMS Context_Key): Fix some thinkos.
1839
1840 2013-04-12  Doug Rupp  <rupp@adacore.com>
1841
1842         * s-fileio.adb: Minor reformatting.
1843
1844 2013-04-12  Ed Schonberg  <schonberg@adacore.com>
1845
1846         * sem_warn.adb (Check_Infinite_Loop_Warning): Do not warn if
1847         the last statement in the analyzed loop is an unconditional
1848         exit statement.
1849
1850 2013-04-12  Robert Dewar  <dewar@adacore.com>
1851
1852         * opt.ads (Style_Check_Main): New switch.
1853         * sem.adb (Semantics): Set Style_Check flag properly for new
1854         unit to be analyzed.
1855         * sem_ch10.adb (Analyze_With_Clause): Don't reset Style_Check,
1856         the proper setting of this flag is now part of the Semantics
1857         procedure.
1858         * switch-c.adb (Scan_Front_End_Switches): Set Style_Check_Main
1859         for -gnatg and -gnaty
1860
1861 2013-04-12  Doug Rupp  <rupp@adacore.com>
1862
1863         * s-crtl.ads (fopen, freopen): Add vms_form parameter
1864         * i-cstrea.ads (fopen, freopen): Likewise.
1865         * adaint.h (__gnat_fopen, __gnat_freopen): Likewise.
1866         * adaint.c (__gnat_fopen, __gnat_freopen): Likewise.
1867         [VMS]: Split out RMS keys and call CRTL function appropriately.
1868         * s-fileio.adb (Form_VMS_RMS_Keys, Form_RMS_Context_Key): New
1869         subprograms.
1870         (Open, Reset): Call Form_VMS_RMS_Keys. Call fopen,freopen with
1871         vms_form
1872         * gnat_rm.texi: Document implemented RMS keys.
1873
1874 2013-04-12  Hristian Kirtchev  <kirtchev@adacore.com>
1875
1876         * sem_ch13.adb (Analyze_Aspect_Specifications):
1877         Insert the corresponding pragma for aspect Abstract_State at
1878         the top of the visible declarations of the related package.
1879         Previously this was only done when the package is a compilation
1880         unit.
1881
1882 2013-04-12  Arnaud Charlet  <charlet@adacore.com>
1883
1884         * gnat_ugn.texi: Further menu clean ups.
1885         * sem_prag.adb, opt.ads: Minor reformatting.
1886         * sem_util.ads: Minor comment fix.
1887
1888 2013-04-12  Hristian Kirtchev  <kirtchev@adacore.com>
1889
1890         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect
1891         Depends is now a delayed aspect. The delay is required
1892         due to the interplay between aspects Depends and Global.
1893         (Check_Aspect_At_Freeze_Point): Add an entry for aspect Depends.
1894         * sem_prag.adb: Reformat various error messages.
1895         (Add_Item): New subsidiary routine.
1896         (Analyze_Pragma): Add new variables
1897         Global_Seen, Result_Seen, Subp_Inputs and Subp_Outputs. The
1898         analysis of pragma Depends now has the capability to check
1899         the proper mode and usage of subprogram inputs and outputs.
1900         (Appears_In): New routine.
1901         (Check_Function_Return): New routine.
1902         (Check_Mode): New routine.
1903         (Check_Usage): New routine.
1904         (Collect_Subprogram_Inputs_Outputs): New routine.
1905
1906 2013-04-12  Bob Duff  <duff@adacore.com>
1907
1908         * par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
1909         stack entry.
1910
1911 2013-04-12  Robert Dewar  <dewar@adacore.com>
1912
1913         * switch-c.adb: Minor fix to wording of error message for
1914         -gnatet/eT.
1915
1916 2013-04-12  Robert Dewar  <dewar@adacore.com>
1917
1918         * impunit.adb: Add s-multip and s-mudido to list of impl defined
1919         system units.
1920         * gnat_rm.texi: Add documentation for
1921         System.Multiprocessors[.Dispatching_Domains].
1922
1923 2013-04-12  Ben Brosgol  <brosgol@adacore.com>
1924
1925         * gnat_ugn.texi: Completion of menu cleanups.
1926
1927 2013-04-12  Arnaud Charlet  <charlet@adacore.com>
1928
1929         * sem_prag.adb (Diagnose_Multiple_Pragmas): Relax the rules
1930         in Relaxed_RM_Semantics.
1931
1932 2013-04-12  Arnaud Charlet  <charlet@adacore.com>
1933
1934         * set_targ.adb (elab code): Add support for non gcc back-ends
1935         where save_argv is null.
1936
1937 2013-04-12  Robert Dewar  <dewar@adacore.com>
1938
1939         * gnat1drv.adb (Gnat1drv): Test Target_Dependent_Info_Write_Name.
1940         * opt.ads (Target_Dependent_Info_Read): Add _Name, now an access
1941         type (Target_Dependent_Info_Write): Add _Name, now an access type.
1942         * set_targ.adb (Write_Target_Dependent_Values): Use name
1943         from -gnatet switch stored in Target_Dependent_Info_Write_Name
1944         (Read_Target_Dependent_Values): Use name from -gnateT switch
1945         stored in Target_Dependent_Info_Read_Name.
1946         * switch-c.adb: New form of -gnatet and -gnateT switches.
1947         * usage.adb: New form of -gnatet and -gnateT switches with
1948         file name.
1949
1950 2013-04-11  Eric Botcazou  <ebotcazou@adacore.com>
1951
1952         * gcc-interface/decl.c (elaborate_expression_1): Skip only constant
1953         arithmetics when looking for a read-only variable in the expression.
1954
1955 2013-04-11  Javier Miranda  <miranda@adacore.com>
1956
1957         * check.ads, exp_ch6.adb (Install_Null_Excluding_Check): No check in
1958         interface thunks since it is performed at the caller side.
1959         (Expand_Simple_Function_Return): No accessibility check needed in thunks
1960         since the check is done by the target routine.
1961
1962 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
1963
1964         * sem_prag.adb (Analyze_Pragma, case Priority): pre-analyze
1965         expression with type Any_Priority.
1966         * exp_ch9.adb (Initialize_Protection): Check that the value
1967         of the priority expression is within the bounds of the proper
1968         priority type.
1969
1970 2013-04-11  Robert Dewar  <dewar@adacore.com>
1971
1972         * sem_prag.adb, prj-env.adb: Minor reformatting.
1973
1974 2013-04-11  Ben Brosgol  <brosgol@adacore.com>
1975
1976         * gnat_ugn.texi: Clean ups.
1977
1978 2013-04-11  Yannick Moy  <moy@adacore.com>
1979
1980         * set_targ.adb: Minor comment update.
1981
1982 2013-04-11  Pascal Obry  <obry@adacore.com>
1983
1984         * gnat_ugn.texi: Remove obsolete comment about DLL calling
1985         convention.
1986
1987 2013-04-11  Javier Miranda  <miranda@adacore.com>
1988
1989         * exp_ch6.adb (Expand_Call): For the call to the target primitive
1990         of an interface thunks do not compute the extra actuals; just
1991         propagate the extra actuals received by the thunk.
1992         * exp_disp.adb (Expand_Interface_Thunk): Decorate new attribute
1993         Thunk_Entity.
1994         * sem_ch6.adb (Create_Extra_Formals): Do not generate extra
1995         formals in interface thunks whose target primitive has no extra
1996         formals.
1997
1998 2013-04-11  Hristian Kirtchev  <kirtchev@adacore.com>
1999
2000         * sem_prag.adb (Analyze_Pragma): Detect
2001         a renaming by looking at the Renamed_Object attribute.
2002         (Is_Renaming): Removed.
2003
2004 2013-04-11  Vincent Celier  <celier@adacore.com>
2005
2006         * prj-env.adb (Initialize_Default_Project_Path): Take
2007         into account a project path file, specified by environment
2008         variable GPR_PROJECT_PATH_FILE, before taking into account
2009         GPR_PROJECT_PATH.
2010         * projects.texi: Add documentation for GPR_PROJECT_PATH_FILE
2011
2012 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2013
2014         * a-cdlili.adb, a-cdlili.ads, a-cihama.adb, a-cihama.ads, a-coinve.adb,
2015         a-coinve.ads, a-ciorse.adb, a-ciorse.ads, a-coorma.adb, a-coorma.ads,
2016         a-cfdlli.adb, a-cfdlli.ads, a-cborma.adb, a-cborma.ads, a-cidlli.adb,
2017         a-cidlli.ads, a-ciormu.adb, a-ciormu.ads, a-cihase.adb, a-cihase.ads,
2018         a-cohama.adb, a-cohama.ads, a-coorse.adb, a-coorse.ads, a-cbhama.adb,
2019         a-cbhama.ads, a-cborse.adb, a-cborse.ads, a-ciorma.adb, a-cobove.adb,
2020         a-ciorma.ads, a-cobove.ads, a-coormu.adb, a-coormu.ads, a-cohase.adb,
2021         a-cohase.ads, a-cbdlli.adb, a-cbdlli.ads, a-cbhase.adb, a-cbhase.ads:
2022         Move Iterator operations from body to private part of spec.
2023
2024 2013-04-11  Eric Botcazou  <ebotcazou@adacore.com>
2025
2026         * ttypes.ads, get_targ.ads: More minor rewording of comments.
2027
2028 2013-04-11  Johannes Kanig  <kanig@adacore.com>
2029
2030         * debug.adb: Document use of switch -gnatd.Z.
2031
2032 2013-04-11  Hristian Kirtchev  <kirtchev@adacore.com>
2033
2034         * sem_prag.adb (Analyze_Pragma): Both pragma Depends and Global can now
2035         support renamings of entire objects. Legal renamings are replaced by
2036         the object they rename.
2037         (Is_Renaming): New routine.
2038
2039 2013-04-11  Yannick Moy  <moy@adacore.com>
2040
2041         * set_targ.adb, opt.ads: Minor changes in comments.
2042
2043 2013-04-11  Ben Brosgol  <brosgol@adacore.com>
2044
2045         * gnat_ugn.texi: Minor clean ups.
2046
2047 2013-04-11  Robert Dewar  <dewar@adacore.com>
2048
2049         * nlists.ads, nlists.adb, treepr.adb, treepr.ads: Move debugging
2050         function p from Nlists to Treepr.
2051
2052 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2053
2054         * sem_disp.adb (Check_Dispatching_Context): If the context is
2055         a contract for a null procedure defer error reporting until
2056         postcondition body is created.
2057         * exp_ch13.adb (Expand_N_Freeze_Entity): If the entity is a
2058         null procedure, complete the analysis of its contracts so that
2059         calls within classwide conditions are properly rewritten as
2060         dispatching calls.
2061
2062 2013-04-11  Thomas Quinot  <quinot@adacore.com>
2063
2064         * sem_ch10.adb, sem_ch12.adb: Minor reformatting.
2065
2066 2013-04-11  Robert Dewar  <dewar@adacore.com>
2067
2068         * exp_attr.adb, sem_res.adb, sem_attr.adb: Minor reformatting.
2069
2070 2013-04-11  Robert Dewar  <dewar@adacore.com>
2071
2072         * atree.adb, atree.ads (Node31): New function.
2073         (Set_Node31): New procedure.
2074
2075 2013-04-11  Robert Dewar  <dewar@adacore.com>
2076
2077         * errout.ads: Minor typo correction.
2078
2079 2013-04-11  Javier Miranda  <miranda@adacore.com>
2080
2081         * einfo.ad[sb] (Thunk_Entity/Set_Thunk_Entity): New attribute.
2082
2083 2013-04-11  Robert Dewar  <dewar@adacore.com>
2084
2085         * back_end.adb (Register_Back_End_Types): Moved to Get_Targ
2086         * back_end.ads (C_String): Moved to Get_Targ
2087         (Register_Type_Proc): Moved to Get_Targ (Register_Back_End_Types):
2088         Moved to Get_Targ.
2089         * cstand.adb (Register_Float_Type): New interface
2090         (Create_Back_End_Float_Types): Use entries in FPT_Mode_Table.
2091         * get_targ.adb (Register_Back_End_Types): Moved here from
2092         Back_End.
2093         * get_targ.ads (C_String): Moved here from Back_End
2094         (Register_Type_Proc): Moved here from Back_End
2095         (Register_Back_End_Types): here from Back_End.
2096         * gnat1drv.adb (GGnat11drv): Add call to
2097         Write_Target_Dependent_Values;
2098         * lib-writ.ads, lib-writ.adb (Write_ALI): Remove section writing
2099         obsolete target dependent info.
2100         * opt.ads (Generate_Target_Dependent_Info):
2101         Removed (Target_Dependent_Info_Read): New flag
2102         (Target_Dependent_Info_Write): New flag
2103         * output.adb: Minor comment change
2104         * s-os_lib.ads: Minor reformatting
2105         * set_targ.ads, set_targ.adb: Minor reformatting.
2106         * switch-c.adb (Scan_Switches.First_Ptr): New variable
2107         (Scan_Front_End_Switches): Check -gnatd.b, -gnateT come first
2108         (Scan_Front_End_Switches): Handle -gnatet, -gnateT
2109         * ttypes.ads: Remove documentation section on target dependent
2110         info in ali file Remove four letter codes, no longer used Instead
2111         of using Get_Targ.Get_xxx, we use Set_Targ.xxx
2112         * usage.adb: Add usage lines for -gnatet/-gnateT
2113         * gcc-interface/Make-lang.in: Update dependencies.
2114
2115 2013-04-11  Thomas Quinot  <quinot@adacore.com>
2116
2117         * sem_ch4.adb: Update documentation.
2118         * sinfo.ads (N_Expression_With_Actions): Ditto.
2119
2120 2013-04-11  Hristian Kirtchev  <kirtchev@adacore.com>
2121
2122         * sem_ch13.adb (Analyze_Aspect_Specifications):
2123         Add a guard to prevent the double insertion of the same aspect
2124         into a rep item list. This previously led to a circularity.
2125
2126 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2127
2128         * sem_attr.adb (Eval_Attribute, case 'Access): Reject attribute
2129         reference if the prefix is the dereference of an anonymous access
2130         to subprogram type.
2131         * exp_attr.adb (Expand_N_Attribute_Reference, Access_Cases): Handle
2132         properly a reference to the current instance of a protected type
2133         from within a protected subprogram.
2134         * sem_res.adb (Find_Unique_Access_Type): Treat
2135         Attribute_Access_Type like Allocator_Type when resolving an
2136         equality operator.
2137
2138 2013-04-11  Arnaud Charlet  <charlet@adacore.com>
2139
2140         * xgnatugn.adb: Remove obsolete comments.
2141
2142 2013-04-11  Robert Dewar  <dewar@adacore.com>
2143
2144         * back_end.ads, back_end.adb: Minor reformatting.
2145         * set_targ.ads, set_targ.adb: New files.
2146
2147 2013-04-11  Hristian Kirtchev  <kirtchev@adacore.com>
2148
2149         * sem_case.adb (Check_Against_Predicate): New routine.
2150         (Check_Choices): When the type covered by the list of choices
2151         is a static subtype with a static predicate, check all choices
2152         agains the predicate.
2153         (Issue_Msg): All versions removed.
2154         (Missing_Choice): New routines.
2155         * sem_ch4.adb: Code and comment reformatting.
2156         (Analyze_Case_Expression): Do not check the choices when the case
2157         expression is being preanalyzed and the type of the expression
2158         is a subtype with a static predicate.
2159         (Has_Static_Predicate): New routine.
2160         * sem_ch13.adb: Code and comment reformatting.  (Build_Range):
2161         Always build a range even if the low and hi bounds denote the
2162         same value. This is needed by the machinery in Check_Choices.
2163         (Build_Static_Predicate): Always build a range even if the low and
2164         hi bounds denote the same value. This is needed by the machinery
2165         in Check_Choices.
2166
2167 2013-04-11  Robert Dewar  <dewar@adacore.com>
2168
2169         * einfo.ads, sem_util.adb, exp_ch6.adb, xgnatugn.adb: Minor
2170         reformatting.
2171
2172 2013-04-11  Doug Rupp  <rupp@adacore.com>
2173
2174         * gnatlink.adb: Fold program basename to lower case on VMS for
2175         consistency.
2176
2177 2013-04-11  Matthew Heaney  <heaney@adacore.com>
2178
2179         * a-rbtgbo.adb (Generic_Equal): Initialize Result variable before
2180         entering loop.
2181
2182 2013-04-11  Arnaud Charlet  <charlet@adacore.com>
2183
2184         * xgnatugn.adb: Remove dead code (handling of @ifset/@ifclear).
2185
2186 2013-04-11  Arnaud Charlet  <charlet@adacore.com>
2187
2188         * gnat_ugn.texi: Remove some use of ifset in menus. Not strictly
2189         needed, and seems to confuse some versions of makeinfo.
2190
2191 2013-04-11  Javier Miranda  <miranda@adacore.com>
2192
2193         * einfo.adb (Is_Thunk): Remove assertion.
2194         (Set_Is_Thunk): Add assertion.
2195         * einfo.ads (Is_Thunk): Complete documentation.
2196         * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Code cleanup.
2197         * exp_ch3.ad[sb] (Is_Variable_Size_Array): Moved to sem_util
2198         (Is_Variable_Size_Record): Moved to sem_util
2199         * exp_ch6.adb (Expand_Call): Code cleanup.
2200         (Expand_N_Extended_Return_Statement): Code cleanup.
2201         (Expand_Simple_Function_Return): Code cleanup.
2202         * exp_disp.adb Remove dependency on exp_ch3
2203         (Expand_Interface_Thunk): Add minimum decoration needed to set
2204         attribute Is_Thunk.
2205         * sem_ch3.ad[sb] (Is_Constant_Bound): moved to sem_util
2206         * sem_util.ad[sb] (Is_Constant_Bound): Moved from
2207         sem_ch3 (Is_Variable_Size_Array): Moved from exp_ch3
2208         (Is_Variable_Size_Record): Moved from exp_ch3
2209
2210 2013-04-11  Javier Miranda  <miranda@adacore.com>
2211
2212         * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Do
2213         not add cleanup actions in thunks associated with interface types.
2214         * exp_ch3.ad[sb] (Is_Variable_Size_Record): Move declaration to
2215         the package spec.
2216         * exp_ch4.adb (Tagged_Conversion): Update call to
2217         Expand_Interface_Conversion since the parameter Is_Static is no
2218         longer needed.
2219         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Adding
2220         assertion to ensure that interface thunks are never handled by
2221         this routine.
2222         (Expand_N_Simple_Function_Return): Do not rewrite this statement
2223         as an extended return statement in interface thunks, and do not
2224         perform copy in the secondary stack if the return statement is
2225         located in a thunk.
2226         * exp_disp.adb (Expand_Dispatching_Call): No longer displace
2227         the pointer to the returned object in functions returning interface
2228         types.
2229         (Expand_Interface_Thunk): For functions returning interface types
2230         displace the pointer to the returned object.
2231         (Expand_Interface_Conversion): Remove formal
2232         Is_Static since this subprogram can now evaluate it locally.
2233         * sem_ch3.adb (Add_Internal_Interface_Entities): For functions
2234         propagate the type returned by the covered interface primitive to
2235         the internal interface entity. Needed by the thunk to generate
2236         the code which displaces "this" to reference the corresponding
2237         secondary dispatch table.
2238         * sem_disp.adb (Propagate_Tag): Update call to
2239         Expand_Interface_Conversion since the parameter Is_Static is no
2240         longer needed.
2241         * sem_res.adb (Resolve_Type_Conversion): Update calls to
2242         Expand_Interface_Conversion since the parameter Is_Static is no
2243         longer needed plus code cleanup.
2244
2245 2013-04-11  Eric Botcazou  <ebotcazou@adacore.com>
2246
2247         * init.c (RETURN_ADDR_OFFSET): Delete as unused.
2248
2249 2013-04-11  Robert Dewar  <dewar@adacore.com>
2250
2251         * a-crbtgk.adb, a-ciorse.adb, a-crbtgo.adb, a-coorse.adb, a-rbtgbo.adb,
2252         a-cborse.adb, a-rbtgso.adb, exp_ch3.adb: Minor reformatting.
2253
2254 2013-04-11  Yannick Moy  <moy@adacore.com>
2255
2256         * exp_ch4.adb (Expand_N_Selected_Component): Do not expand
2257         discriminant check for Unchecked_Union.
2258         * sem_res.adb (Resolve_Selected_Component): Set flag
2259         Do_Discriminant_Check even when expansion is not performed.
2260         * sinfo.ads (Do_Discriminant_Check): Update documentation for the case
2261         of Unchecked_Union.
2262
2263 2013-04-11  Thomas Quinot  <quinot@adacore.com>
2264
2265         * sem_ch13.adb (Same_Representation): Two types with different scalar
2266         storage order never have the same representation.
2267
2268 2013-04-11  Arnaud Charlet  <charlet@adacore.com>
2269
2270         * xgnatugn.adb (Push_Conditional): Simplify handling,
2271         no longer need to keep track of "excluding" sections.
2272         (Currently_Excluding): Removed.
2273         (Process_Source_File):
2274         Set unw/vms flag so that texinfo can do the whole handling of
2275         @ifset/@ifclear sections.  Fix handling of nested @ifset/@ifclear
2276         sections.
2277         * gnat_ugn.texi: Add a section on performing unassisted install
2278         on Windows.
2279
2280 2013-04-11  Johannes Kanig  <kanig@adacore.com>
2281
2282         * debug.adb: Document usage of -gnatd.Q switch.
2283
2284 2013-04-11  Matthew Heaney  <heaney@adacore.com>
2285
2286         * a-crbtgk.adb (Ceiling, Find, Floor): Adjust locks
2287         before element comparisons.
2288         (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint):
2289         Ditto.
2290         * a-crbtgo.adb, a-rbtgbo.adb (Generic_Equal): Adjust locks before
2291         element comparisons.
2292         * a-rbtgso.adb (Difference, Intersection): Adjust locks
2293         before element comparisons.
2294         (Is_Subset, Overlap): Ditto
2295         (Symmetric_Difference, Union): Ditto
2296         * a-btgbso.adb (Set_Difference, Set_Intersection): Adjust locks
2297         before element comparisons.
2298         (Set_Subset, Set_Overlap): Ditto
2299         (Set_Symmetric_Difference, Set_Union): Ditto
2300         * a-coorse.adb, a-ciorse.adb, a-cborse.adb
2301         (Update_Element_Preserving_Key): Adjust locks before element
2302         comparisons (Replace_Element): Ditto
2303
2304 2013-04-11  Pascal Obry  <obry@adacore.com>
2305
2306         * prj-attr.adb, projects.texi, snames.ads-tmpl: Remove Build_Slaves
2307         attribute.
2308
2309 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2310
2311         * exp_ch3.adb (Build_Equivalent_Aggregate): Subsidiary of
2312         Expand_N_Object_Declaration, used to construct an aggregate
2313         with static components whenever possible, so that objects of a
2314         discriminated type can be initialized without calling the init.
2315         proc for the type.
2316
2317 2013-04-11  Vincent Celier  <celier@adacore.com>
2318
2319         * prj-makr.adb (Process_Directory): On VMS, always delete,
2320         then recreate the temporary file with Create_Output_Text_File,
2321         otherwise the output redirection does not work properly.
2322
2323 2013-04-11  Eric Botcazou  <ebotcazou@adacore.com>
2324
2325         * urealp.ads: Fix minor typo.
2326
2327 2013-04-11  Fabien Chouteau  <chouteau@adacore.com>
2328
2329         * cio.c (mktemp): Don't use tmpnam function from the
2330         system on VxWorks in kernel mode.
2331
2332 2013-04-11  Vincent Celier  <celier@adacore.com>
2333
2334         * make.adb (Compile): Clarify the error message reported
2335         when gnatmake refuses to compile a runtime source.
2336         (Start_Compile_If_Possible): Ditto.
2337
2338 2013-04-11  Vincent Celier  <celier@adacore.com>
2339
2340         * gnat_ugn.texi: Add documentation about -gnatc and gnatmake.
2341
2342 2013-04-11  Vincent Celier  <celier@adacore.com>
2343
2344         * switch-c.adb: Document internal switches.
2345         * usage.adb: Remove lines for internal switches: -gnatea, -gnateO,
2346         -gnatez and -gnateO.
2347
2348 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2349
2350         * par-ch6.adb (P_Subprogram): Attach aspects to subprogram stub.
2351         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Allow aspects on
2352         subprogram stubs.
2353         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze generated
2354         pre/post pragmas at once before analyzing the proper body.
2355         * sem_prag.adb (Chain_PPC): Handle pragma that comes from an
2356         aspect on a subprogram stub.
2357         * aspects.adb: Aspect specifications can appear on a
2358         subprogram_Body_Stub.
2359
2360 2013-04-11  Vincent Celier  <celier@adacore.com>
2361
2362         * gnatname.adb: Minor comment fix.
2363
2364 2013-04-11  Vincent Celier  <celier@adacore.com>
2365
2366         * prj-makr.adb (Process_Directory): Create a new temporary
2367         file for each invocation of the compiler, in directory pointed
2368         by environment variable TMPDIR if it exists.
2369
2370 2013-04-11  Arnaud Charlet  <charlet@adacore.com>
2371
2372         * gnat_ugn.texi: Minor editing/clean ups.
2373
2374 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2375
2376         * sem_ch6.adb (Analyze_Null_Procedure): New subprogram, mostly
2377         extracted from Analyze_Subprogram_Declaration, to handle null
2378         procedure declarations that in ada 2012 can be completions of
2379         previous declarations.
2380
2381 2013-04-11  Hristian Kirtchev  <kirtchev@adacore.com>
2382
2383         * sem_prag.adb (Entity_Of): Moved to Exp_Util.
2384         * exp_util.ads, exp_util.adb (Entity_Of): New routine.
2385
2386 2013-04-11  Robert Dewar  <dewar@adacore.com>
2387
2388         * g-spipat.ads: Minor comment fix.
2389
2390 2013-04-11  Robert Dewar  <dewar@adacore.com>
2391
2392         * sem_prag.adb, sem_util.adb, sem_res.adb, exp_ch4.adb: Minor
2393         reformatting.
2394
2395 2013-04-11  Thomas Quinot  <quinot@adacore.com>
2396
2397         * exp_util.ads (Fully_Qualified_Name_String): Document that the
2398         constructed literal is the entity name in all upper case.
2399
2400 2013-04-11  Thomas Quinot  <quinot@adacore.com>
2401
2402         * sem_util.adb (Set_Entity_With_Style_Check): Fix logic of
2403         check for implementation defined identifiers.
2404
2405 2013-04-11  Yannick Moy  <moy@adacore.com>
2406
2407         * checks.adb (Apply_Type_Conversion_Checks): Add an explanation
2408         of why range check and length are put on different nodes.
2409         * exp_ch4.adb (Apply_Type_Conversion_Checks): Remove check marks
2410         when doing their expansion.
2411
2412 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2413
2414         * sem_util.ads, sem_util.adb (Get_Incomplete_View_Of_Ancestor):
2415         New function to implement the notion introduced in RM 7.3.1
2416         (5.2/3): in a child unit, a derived type is within the derivation
2417         class of an ancestor declared in a parent unit, even if there
2418         is an intermediate derivation that does not see the full view
2419         of that ancestor.
2420         * sem_res.adb (Valid_Conversion): if all else fails, examine if an
2421         incomplete view of an ancestor makes a numeric conversion legal.
2422
2423 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2424
2425         * sem_ch6.adb: in Ada2012 operators can only have in
2426         parameters.
2427
2428 2013-04-11  Vincent Celier  <celier@adacore.com>
2429
2430         * makeutl.adb (Create_Binder_Mapping_File): Do not put into
2431         the mapping file ALI files of sources that have been replaced.
2432
2433 2013-04-11  Vincent Celier  <celier@adacore.com>
2434
2435         * projects.texi: Add subsection Duplicate Sources in Projects.
2436
2437 2013-04-11  Vincent Celier  <celier@adacore.com>
2438
2439         * gnat_ugn.texi: Add documentation for gnatmake switch -droot_dir/**
2440
2441 2013-04-11  Arnaud Charlet  <charlet@adacore.com>
2442
2443         * init.c (__gnat_install_handler): Only set up an alternate
2444         stack when installing a signal handler for SIGSEGV.
2445
2446 2013-04-11  Thomas Quinot  <quinot@adacore.com>
2447
2448         * g-socket.adb (Connect_Socket, timeout version): Call
2449         underlying connect operation directly, not through the 2-argument
2450         Connect_Socket thick binding, in order to avoid raising a junk
2451         exception for the EINPROGRESS return.
2452
2453 2013-04-11  Robert Dewar  <dewar@adacore.com>
2454
2455         * a-cdlili.adb: Minor addition of pragma Warnings (Off).
2456
2457 2013-04-11  Robert Dewar  <dewar@adacore.com>
2458
2459         * hostparm.ads: Minor reformatting.
2460
2461 2013-04-11  Hristian Kirtchev  <kirtchev@adacore.com>
2462
2463         * aspects.ads, aspects.adb: Add Aspect_Depends to all the relevant
2464         tables.
2465         * elists.ads, elists.adb (Contains): New routine.
2466         * par-prag.adb: Pragma Depends does not need any special treatment
2467         by the parser.
2468         * sem_ch13.adb (Analyze_Aspect_Specifications):
2469         Transform aspect Depends into a corresponding pragma.
2470         (Check_Aspect_At_Freeze_Point): Aspect Depends does not need
2471         inspection at its freeze point.
2472         * sem_prag.adb (Analyze_Pragma): Perform analysis and
2473         normalization of pragma Depends. Remove the use of function
2474         Is_Duplicate_Item. Use End_Scope to uninstalle the formal
2475         parameters of a subprogram. Add a value for pragma Depends in
2476         table Sig_Flags.
2477         (Is_Duplicate_Item): Removed.
2478         * snames.ads-tmpl: Add predefined name for Depends as well as
2479         a pragma identifier.
2480
2481 2013-04-11  Arnaud Charlet  <charlet@adacore.com>
2482
2483         * gnat1drv.adb: Minor code clean up.
2484
2485 2013-04-11  Arnaud Charlet  <charlet@adacore.com>
2486
2487         * debug.adb, sem_ch13.adb (Analyze_Enumeration_Representation_Clause):
2488         Ignore enumeration rep clauses by default in CodePeer mode, unless
2489         -gnatd.I is specified.
2490
2491 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2492
2493         * sem_util.adb (Safe_To_Capture_Value): If the node belongs to
2494         an expression that has been attached to the else_actions of an
2495         if-expression, the capture is not safe.
2496
2497 2013-04-11  Yannick Moy  <moy@adacore.com>
2498
2499         * checks.adb (Apply_Type_Conversion_Checks): Put check mark on type
2500         conversion for arrays.
2501
2502 2013-04-11  Robert Dewar  <dewar@adacore.com>
2503
2504         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting.
2505
2506 2013-04-11  Johannes Kanig  <kanig@adacore.com>
2507
2508         * adabkend.adb: Minor comment addition.
2509
2510 2013-04-11  Matthew Heaney  <heaney@adacore.com>
2511
2512         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb ("="): Increment
2513         lock counts before entering loop.
2514         (Find): Ditto.
2515         (Is_Sorted, Merge, Sort): Ditto.
2516         (Reverse_Find): Ditto.
2517         (Splice_Internal): Internal operation to refactor splicing logic.
2518         (Splice): Some logic moved into Splice_Internal.
2519
2520 2013-04-11  Johannes Kanig  <kanig@adacore.com>
2521
2522         * adabkend.adb (Scan_Compiler_Arguments): Do not call
2523         Set_Output_Object_File_Name in Alfa_Mode
2524         * gnat1drv.adb (Adjust_Global_Switches): Take Alfa_Mode into account.
2525         * opt.ads: Fix documentation.
2526
2527 2013-04-11  Robert Dewar  <dewar@adacore.com>
2528
2529         * sem_res.adb: Minor code reorganization and comment fixes.
2530         * sem_type.adb: Minor reformatting.
2531
2532 2013-04-11  Hristian Kirtchev  <kirtchev@adacore.com>
2533
2534         * exp_ch4.adb (Process_Transient_Object): Add new
2535         local variable Fin_Call. Remove and explain ??? comment. Use the
2536         Actions of logical operators "and then" and "or else" to insert
2537         the generated finalization call.
2538
2539 2013-04-11  Eric Botcazou  <ebotcazou@adacore.com>
2540
2541         * gnat_rm.texi: Fix typo.
2542
2543 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2544
2545         * sem_res.adb: Minor reformatting.
2546
2547 2013-04-11  Robert Dewar  <dewar@adacore.com>
2548
2549         * atree.h: Add declarations for Flag255-Flag289 Fix declaration
2550         of Field30 (was wrong, but no effect, since not yet referenced by
2551         back end) Add declarations for Field31-Field35 Add declarations
2552         for Node31-Node35.
2553         * einfo.ads, einfo.adb (Has_Invariants): No longer applies to
2554         procedures.
2555         (Has_Predicates): No longer applies to functions.
2556         (Is_Predicate_Function): New flag.
2557         (Is_Predicate_Function_M): New flag.
2558         (Is_Invariant_Procedure): New flag.
2559         (Predicate_Function_M): New function.
2560         (Set_Predicate_Function_M): New procedure.
2561         * exp_ch11.adb (Expand_N_Raise_Expression): Take care of special
2562         case of appearing in predicate used for membership test.
2563         * exp_ch3.adb (Insert_Component_Invariant_Checks): Set
2564         Is_Invariant_Procedure flag.
2565         * exp_ch4.adb (Expand_Op_In): Call special predicate function
2566         that takes care of raise_expression nodes in the predicate.
2567         * exp_util.ads, exp_util.adb (Make_Predicate_Call): Add argument Mem for
2568         membership case.
2569         * sem_ch13.adb (Build_Predicate_Functions): New name for
2570         Build_Predicate_Function.  Major rewrite to take care of raise
2571         expression in predicate for membership tests.
2572         * sem_res.adb (Resolve_Actuals): Include both predicate functions
2573         in defense against infinite predicate function loops.
2574         * sinfo.ads, sinfo.adb (Convert_To_Return_False): New flag.
2575
2576 2013-04-11  Robert Dewar  <dewar@adacore.com>
2577
2578         * sem_prag.adb: Minor reformatting.
2579
2580 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2581
2582         * lib-xref.adb: Generate reference for component of anonymous
2583         access type.
2584
2585 2013-04-11  Robert Dewar  <dewar@adacore.com>
2586
2587         * stand.ads: Minor reformatting.
2588
2589 2013-04-11  Matthew Heaney  <heaney@adacore.com>
2590
2591         * a-convec.adb, a-coinve.adb, a-cobove.adb ("="): Increment lock
2592         counts before entering loop.
2593         (Find, Find_Index): Ditto.
2594         (Is_Sorted, Merge, Sort): Ditto.
2595         (Reverse_Find, Reverse_Find_Index): Ditto.
2596
2597 2013-04-11  Robert Dewar  <dewar@adacore.com>
2598
2599         * exp_ch11.ads, exp_ch11.adb (Expand_N_Raise_Expression): New procedure.
2600         * exp_util.adb (Insert_Actions): Add entry for N_Raise_Expression.
2601         * expander.adb: Add call to Expand_N_Raise_Expression.
2602         * par-ch11.adb (P_Raise_Expression): New procedure.
2603         * par-ch4.adb (P_Relation): Handle Raise_Expression.
2604         * par.adb (P_Raise_Expression): New procedure.
2605         * sem.adb: Add handling for N_Raise_Expression.
2606         * sem_ch11.ads, sem_ch11.adb (Analyze_Raise_Expression): New procedure.
2607         * sem_res.adb (Resolve): Add handling for N_Raise_Expression.
2608         * sinfo.ads, sinfo.adb (N_Raise_Expression): New node.
2609         * sprint.adb (Sprint_Node_Actual): Add handling for N_Raise_Expression.
2610         * stand.ads (Any_Type): Document use with N_Raise_Expression.
2611
2612 2013-04-11  Vincent Celier  <celier@adacore.com>
2613
2614         * gnat_ugn.texi: Remove section "The Development Environments"
2615         now that all predefined attributes are documented, including
2616         those in package IDE.
2617
2618 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2619
2620         * sem_ch6.adb: Preserve parent link in copy of expression.
2621
2622 2013-04-11  Vincent Celier  <celier@adacore.com>
2623
2624         * projects.texi: Complete rewrite of the subsection Attributes
2625         in section "Project file Reference".
2626
2627 2013-04-11  Robert Dewar  <dewar@adacore.com>
2628
2629         * exp_ch4.adb: Minor reformatting.
2630
2631 2013-04-11  Robert Dewar  <dewar@adacore.com>
2632
2633         * exp_ch4.adb (Expand_Concatenate): Remove wrapping in
2634         expression-with-actions node. No longer needed given fix to
2635         sem_prag and caused loss of some useful warnings.
2636         * sem.ads: Minor reformatting.
2637         * sem_prag.adb (Check_Disabled): Removed, to be replaced by not
2638         Check_Enabled. These two routines were curiously incompatible
2639         causing confusion.
2640         (Analyze_Pragma, case Check): Make sure we do
2641         not expand the string argument if the check is disabled. Avoid
2642         use of Check_Disabled, which resulted in missing analysis in
2643         some cases.
2644         * sem_prag.ads (Check_Disabled): Removed, to be replaced by not
2645         Check_Enabled. These two routines were curiously incompatible
2646         causing confusion.
2647
2648 2013-04-11  Hristian Kirtchev  <kirtchev@adacore.com>
2649
2650         * exp_ch4.adb (Process_Transient_Object): Use
2651         an unchecked conversion when associating a transient controlled
2652         object with its "hook".
2653
2654 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2655
2656         * sem_prag.adb (Analyze_Pragma, case
2657         Preelaborable_Initialization): The pragma is legal if it comes
2658         from an aspect on the private view of the type, even though its
2659         analysis point takes place later at the freeze point.
2660
2661 2013-04-11  Robert Dewar  <dewar@adacore.com>
2662
2663         * sem_ch6.adb: Minor reformatting.
2664
2665 2013-04-11  Yannick Moy  <moy@adacore.com>
2666
2667         * ali-util.adb (Read_Withed_ALIs): Do not consider it an error to
2668         read ALI files with No_Object=True in Alfa mode.
2669         * gnat1drv.adb: Set appropriately Back_End_Mode in Alfa mode, whether
2670         this is during frame condition generation of translation to Why.
2671
2672 2013-04-11  Robert Dewar  <dewar@adacore.com>
2673
2674         * exp_ch4.adb: Minor code reorganization
2675         * types.ads: Minor reformatting.
2676
2677 2013-04-11  Johannes Kanig  <kanig@adacore.com>
2678
2679         * opt.ads New global boolean Frame_Condition_Mode to avoid
2680         referring to command line switch.
2681         * gnat1drv.adb (Gnat1drv) set frame condition mode when -gnatd.G
2682         is present, and disable Code generation in that case. Disable
2683         ALI file generation when switch is *not* present.
2684
2685 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2686
2687         * sem_ch6.adb (Analyze_Expression_Function): Perform the
2688         pre-analysis on a copy of the expression, to prevent downstream
2689         visbility issues involving operators and instantiations.
2690
2691 2013-04-11  Johannes Kanig  <kanig@adacore.com>
2692
2693         * debug.adb: Reservation and documentation for -gnatd.G switch.
2694         * gnat1drv.adb (Adjust_Global_Switches) Take into account -gnatd.G
2695         switch, and set ALI file generation accordingly.
2696
2697 2013-04-11  Robert Dewar  <dewar@adacore.com>
2698
2699         * exp_ch4.adb, exp_dist.adb: Minor reformatting.
2700         * gnat_rm.texi, gnat_ugn.texi: -020 Add documentation clarifying that
2701         check names introduced with pragma Check_Name are suppressed by -gnatp.
2702
2703 2013-04-11  Vincent Celier  <celier@adacore.com>
2704
2705         * gnat_ugn.texi, projects.texi: Move chapter "Tools Supporting Project
2706         Files" from projects.texi to gnat_ugn.texi.
2707
2708 2013-04-11  Arnaud Charlet  <charlet@adacore.com>
2709
2710         * gcc-interface/Make-lang.in: Update dependencies.
2711
2712 2013-04-11  Yannick Moy  <moy@adacore.com>
2713
2714         * gnat1drv.adb (Adjust_Global_Switches): Allow missing body in Alfa
2715         mode.
2716
2717 2013-04-11  Hristian Kirtchev  <kirtchev@adacore.com>
2718
2719         * exp_ch4.adb (Expand_N_Allocator): Detect the
2720         allocation of an anonymous controlled object where the type of
2721         the context is named. Use the pool and finalization master of
2722         the named access type to allocate the object.
2723
2724 2013-04-11  Vincent Celier  <celier@adacore.com>
2725
2726         * gnat_ugn.texi: Remove most mentions of gprbuild.
2727         * projects.texi: Remove all mentions of asociative array
2728         attributes.
2729
2730 2013-04-11  Robert Dewar  <dewar@adacore.com>
2731
2732         * sem_prag.adb, sem_attr.adb, gnat1drv.adb, prj-makr.adb,
2733         opt.ads, sem_ch13.adb: Minor reformatting.
2734         * debug.adb: Minor comment fix (remove junk .I doc).
2735
2736 2013-04-11  Thomas Quinot  <quinot@adacore.com>
2737
2738         * rtsfind.ads, exp_dist.adb, exp_dist.ads (Rtsfind.PCS_Version, case
2739         PolyORB): Bump to 6.
2740         (Exp_Dist.PolyORB_Support): Replace TC_Build with
2741         Build_Complex_TC.
2742
2743 2013-04-11  Arnaud Charlet  <charlet@adacore.com>
2744
2745         * debug.adb, sem_prag.adb, par-ch2.adb, sem_attr.adb, gnat1drv.adb,
2746         exp_disp.adb, opt.ads, sem_ch13.adb (Relaxed_RM_Semantics): New flag.
2747         Enable this flag in CodePeer mode, and also via -gnatd.M.
2748         Replace some uses of CodePeer_Mode by Relaxed_RM_Semantics.
2749
2750 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2751
2752         * sem_ch8.adb (Check_Constrained_Object): If a subtype is created
2753         from the renamed object in an object renaming declaration with
2754         an unconstrained nominal subtype, freeze the created subtype at
2755         once, to prevent order of elaboration issues in the backend.
2756
2757 2013-04-11  Arnaud Charlet  <charlet@adacore.com>
2758
2759         * exp_aggr.adb (Aggr_Size_OK): Refine setting of Max_Aggr_Size
2760         in particular in CodePeer mode.
2761
2762 2013-04-11  Vincent Celier  <celier@adacore.com>
2763
2764         * gnat_ugn.texi: Add documentation for backup copies of project
2765         files for gnatname.
2766
2767 2013-04-11  Tristan Gingold  <gingold@adacore.com>
2768
2769         * gnat_rm.texi: Add Detect_BLocking in the ravenscar profile
2770         pragma list.
2771
2772 2013-04-11  Vincent Celier  <celier@adacore.com>
2773
2774         * gnatname.adb (Scan_Args): Recognize new switch --no-backup
2775         (Usage): Add line for --no-backup.
2776         * opt.ads (No_Backup): New Boolean variable, initialized to False.
2777         (Ada_Version_Default): Switch to Ada 2012 by default.
2778         * prj-makr.adb (Initialize): Create a backup for an existing
2779         project file if gnatname is not invoked with --no-backup.
2780
2781 2013-04-11  Thomas Quinot  <quinot@adacore.com>
2782
2783         * exp_ch4.adb: Minor code improvement: replace various calls to
2784         Make_If_Statement in expansion with Make_Implicit_If_Statement.
2785
2786 2013-04-11  Eric Botcazou  <ebotcazou@adacore.com>
2787
2788         * ali.adb: Fix minor typo.
2789
2790 2013-04-11  Thomas Quinot  <quinot@adacore.com>
2791
2792         * exp_ch4.adb (Find_Enclosing_Context): Add missing case of
2793         N_Procedure_Call_Statement.
2794
2795 2013-04-11  Robert Dewar  <dewar@adacore.com>
2796
2797         * debug.adb: Minor comment fix.
2798
2799 2013-04-11  Johannes Kanig  <kanig@adacore.com>
2800
2801         * debug.adb: Remove comment for -gnatd.G.
2802
2803 2013-04-11  Thomas Quinot  <quinot@adacore.com>
2804
2805         * exp_ch4.adb (Expand_Record_Equality.Suitable_Element):
2806         Remove recursive routine, replace with...
2807         (Expand_Record_Equality.Element_To_Compare): New subroutine,
2808         implement iterative search for next element to compare.
2809         Add explanatory comment in the tagged case.
2810
2811 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2812
2813         * sem_ch5.adb: remove spurious warning from non-empty loop.
2814         * sem_ch8.adb (Enclosing_Instance): Make public to other routines
2815         in the package, in order to suppress redundant semantic checks
2816         on subprogram renamings in nested instantiations.
2817
2818 2013-04-11  Robert Dewar  <dewar@adacore.com>
2819
2820         * errout.ads: Minor reformatting.
2821         * sem_eval.adb (Why_Not_Static): Now issues continuation messages
2822         (Why_Not_Static): Test for aggregates behind string literals.
2823         * sem_eval.ads (Why_Not_Static): Now issues continuation messages.
2824
2825 2013-04-11  Robert Dewar  <dewar@adacore.com>
2826
2827         * exp_ch4.adb (Expand_Concatenation): Wrap expansion in
2828         Expressions_With_Actions.
2829
2830 2013-04-11  Ed Schonberg  <schonberg@adacore.com>
2831
2832         * sem_ch6.adb (Base_Types_Match): For an actual type in an
2833         instance, the base type may itself be a subtype, so find true
2834         base type to determine compatibility.
2835
2836 2013-04-11  Robert Dewar  <dewar@adacore.com>
2837
2838         * s-osprim-mingw.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb.
2839         makeutl.adb, sem_ch8.adb: Minor reformatting.
2840
2841 2013-04-11  Vincent Celier  <celier@adacore.com>
2842
2843         * gnat_ugn.texi: Minor fixes for VMS.
2844         * ug_words: Minor addition: -gnato? => /OVERFLOW_CHECKS=?.
2845
2846 2013-04-11  Robert Dewar  <dewar@adacore.com>
2847
2848         * usage.adb (Usage): Minor edit to -gnatW message
2849
2850 2013-04-11  Robert Dewar  <dewar@adacore.com>
2851
2852         * exp_aggr.adb (Expand_N_Aggregate): Add circuit for handling
2853         others for string literal case. Also add big ??? comment about
2854         this new code, which should be redundant, but is not.
2855         * sem_eval.adb (Eval_Concatenation): Handle non-static case
2856         properly (Eval_String_Literal): Handle non-static literal properly
2857
2858 2013-03-20  Tobias Burnus  <burnus@net-b.de>
2859
2860         * i-fortra.ads: Update comment, add Ada 2012's optional
2861         Star and Kind data types for enhanced interoperability.
2862
2863 2013-03-16  Eric Botcazou  <ebotcazou@adacore.com>
2864
2865         * gnatvsn.ads (Library_Version): Bump to 4.9.
2866
2867 2013-03-08  Cesar Strauss  <cestrauss@gmail.com>
2868
2869         PR ada/52123
2870         * seh_init.c (Raise_From_Signal_Handler): Declare as no-return.
2871         (__gnat_SEH_error_handler): Likewise.  Remove final return.
2872
2873 2013-03-06  Eric Botcazou  <ebotcazou@adacore.com>
2874
2875         * gcc-interface/trans.c (Attribute_to_gnu): Abort instead of erroring
2876         out for an unimplemented attribute.
2877
2878 2013-03-06  Eric Botcazou  <ebotcazou@adacore.com>
2879
2880         * gcc-interface/decl.c (gnat_to_gnu_field): Remove the wrapper around
2881         a misaligned integral type if a size is specified for the field.
2882
2883 2013-03-06  Eric Botcazou  <ebotcazou@adacore.com>
2884
2885         * gcc-interface/trans.c (Raise_Error_to_gnu) <CE_Index_Check_Failed>:
2886         Record the unpadded type of the index type on the RCI stack.
2887
2888 2013-03-06  Eric Botcazou  <ebotcazou@adacore.com>
2889
2890         * gcc-interface/trans.c (emit_range_check): Assert that the range type
2891         is a numerical type and remove useless local variables.
2892
2893 2013-02-25  Eric Botcazou  <ebotcazou@adacore.com>
2894
2895         * gcc-interface/ada-tree.h: Back out change accidentally committed.
2896
2897 2013-02-21  Jakub Jelinek  <jakub@redhat.com>
2898
2899         PR bootstrap/56258
2900         * gnat-style.texi (@title): Remove @hfill.
2901         * projects.texi: Avoid line wrapping inside of @pxref or @xref.
2902
2903 2013-02-14  Rainer Emrich  <rainer@emrich-ebersheim.de>
2904
2905         PR target/52123
2906         * tracebak.c: Cast from pointer via FARPROC.
2907
2908 2013-02-07  Simon Wright  <simon@pushface.org>
2909
2910         PR target/50678
2911         * init.c (__darwin_major_version): New function for x86-64/Darwin.
2912         (__gnat_adjust_context_for_raise) [Darwin]: Disable the workaround
2913         on Darwin 12 and above.
2914
2915 2013-02-06  Rainer Emrich  <rainer@emrich-ebersheim.de>
2916
2917         PR target/52123
2918         * adaint.c (__gnat_check_OWNER_ACL): Cast from pointer via
2919         SECURITY_DESCRIPTOR *
2920         (__gnat_set_OWNER_ACL): Cast from DWORD to ACCESS_MODE
2921         (__gnat_portable_spawn): Fix cast to char* const*
2922         (add_handle): Cast from pointer via void **
2923         (add_handle): Cast from pointer via int *
2924         (__gnat_locate_exec_on_path): Cast from pointer via TCHAR *
2925         (__gnat_locate_exec_on_path): Cast from pointer via char *
2926         * initialize.c (append_arg): Cast from pointer via LPWSTR
2927         (__gnat_initialize): Cast from pointer via LPWSTR
2928         * seh_init.c (__gnat_map_SEH): Cast from pointer via FARPROC
2929
2930 2013-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2931
2932         * gcc-interface/Make-lang.in: Enable System.Stack_Checking.Operations
2933         target pairs on VxWorks 5 only.
2934
2935 2013-02-06  Arnaud Charlet  <charlet@adacore.com>
2936
2937         * gcc-interface/Make-lang.in: Update dependencies.
2938
2939 2013-02-06  Vincent Celier  <celier@adacore.com>
2940
2941         * prj-proc.adb (Process_Aggregated_Projects): Use a new project
2942         node tree for each project tree rooted at an aggregated project.
2943
2944 2013-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
2945
2946         * sem_util.adb (Is_Interface_Conversion): New routine.
2947         (Object_Access_Level): Detect an interface conversion
2948         that has been rewritten into a different construct. Use the
2949         original form of the conversion to find the access level of
2950         the operand.
2951
2952 2013-02-06  Eric Botcazou  <ebotcazou@adacore.com>
2953
2954         * einfo.ads (Has_Pragma_No_Inline): New flag using Flag201.
2955         (Has_Pragma_No_Inline): Declare and mark as inline.
2956         (Set_Has_Pragma_No_Inline): Likewise.
2957         * einfo.adb (Has_Pragma_No_Inline): New function.
2958         (Set_Has_Pragma_No_Inline): New procedure.
2959         (Write_Entity_Flags): Handle Has_Pragma_No_Inline.
2960         * snames.ads-tmpl (Name_No_Inline): New pragma-related name.
2961         (Pragma_Id): Add Pragma_No_Inline value.
2962         * par-prag.adb (Prag): Handle Pragma_Inline.
2963         * sem_prag.adb (Inline_Status): New enumeration type.
2964         (Process_Inline): Change Active parameter
2965         to Inline_Status and add support for suppressed inlining.
2966         (Analyze_Pragma) <Pragma_Inline>: Adjust to above change.
2967         <Pragma_Inline_Always>: Likewise.
2968          <Pragma_No_Inline>: Implement new pragma No_Inline.
2969         (Sig_Flags): Add Pragma_No_Inline.
2970         * gnat_rm.texi (Implementation Defined Pragmas): Add No_Inline.
2971         * gnat_ugn.texi (Switches for gcc): Mention Pragma No_Inline.
2972
2973 2013-02-06  Pascal Obry  <obry@adacore.com>
2974
2975         * s-osprim-mingw.adb (Clock): Make sure we copy all data locally
2976         to avoid interleaved modifications that could happen from another
2977         task calling Get_Base_Data.
2978         (Get_Base_Data): Make it a critical section. Avoid updating if another
2979         task has already done it.
2980
2981 2013-02-06  Eric Botcazou  <ebotcazou@adacore.com>
2982
2983         * sem_prag.adb: Minor reformatting.
2984
2985 2013-02-06  Pascal Obry  <obry@adacore.com>
2986
2987         * s-tasloc.ads: Set System.Task_Lock to preelaborate.
2988
2989 2013-02-06  Eric Botcazou  <ebotcazou@adacore.com>
2990
2991         * snames.ads-tmpl (Name_Loop_Optimize, Name_No_Unroll,
2992         Name_Unroll, Name_No_Vector, Name_Vector): New pragma-related
2993         names.
2994         (Pragma_Id): Add Pragma_Loop_Optimize value.
2995         * par-prag.adb (Prag): Handle Pragma_Loop_Optimize.
2996         * sem_prag.adb (Check_Loop_Invariant_Variant_Placement): Rename to...
2997         (Check_Loop_Pragma_Placement): ...this.
2998         (Analyze_Pragma)
2999         <Pragma_Loop_Invariant>: Adjust to above renaming.
3000         <Loop_Variant>: Likewise.
3001          <Pragma_Loop_Optimize>: Implement new pragma Loop_Optimize.
3002         (Sig_Flags): Add Pragma_Loop_Optimize.
3003         * gnat_rm.texi (Implementation Defined Pragmas): Add Loop_Optimize.
3004         * gnat_ugn.texi (Vectorization of loops): Mention Loop_Optimize.
3005
3006 2013-02-06  Robert Dewar  <dewar@adacore.com>
3007
3008         * osint.ads: Minor fix of typo.
3009
3010 2013-02-06  Sergey Rybin  <rybin@adacore.com frybin>
3011
3012         * gnat_ugn.texi: gnatmetric: update the documentation of
3013         complexity metrics for Ada 2012.
3014
3015 2013-02-06  Javier Miranda  <miranda@adacore.com>
3016
3017         * exp_disp.adb (Make_Secondary_DT): Code cleanup:
3018         remove useless initialization.
3019
3020 2013-02-06  Ed Schonberg  <schonberg@adacore.com>
3021
3022         * sem_ch3.adb (Build_Discriminant_Constraints): Do not
3023         generate overflow checks on a discriminant expression if the
3024         discriminant constraint is applied to a private type that has
3025         a full view, because the check will be applied when the full
3026         view is elaborated.  Removing the redundant check is not just
3027         an optimization, but it prevents spurious assembler errors,
3028         because of the way the backend generates names for expressions
3029         that require overflow checking.
3030
3031 2013-02-06  Pascal Obry  <obry@adacore.com>
3032
3033         * s-osprim-mingw.adb: Removes workaround for an old GNU/Linker
3034         limitation on Windows.
3035         (DA): Removed.
3036         (LIA): Removed.
3037         (LLIA): Removed.
3038         (TFA): Removed.
3039         (BTA): Removed.
3040         (BMTA): Removed.
3041         (BCA): Removed.
3042         (BMCA): Removed.
3043         (BTiA): Removed.
3044         (Clock): Use variable corresponding to access.
3045         (Get_Base_Time): Likewise.
3046         (Monotonic_Clock): Likewise.
3047
3048 2013-02-06  Vincent Celier  <celier@adacore.com>
3049
3050         * make.adb (Gnatmake): When gnatmake is called with a project
3051         file, do not invoke gnatbind with -I-.
3052         * makeutl.adb (Create_Binder_Mapping_File): Rewrite function. Get
3053         the infos from all the sources.
3054
3055 2013-02-06  Ed Schonberg  <schonberg@adacore.com>
3056
3057         * snames.ads-tmpl: Add Name_Overriding_Renamings and pragma
3058         Overriding_Renamings.
3059         * par-prag.adb: Recognize pragma Overriding_Renamings.
3060         * opt.ads (Overriding_Renamings): flag to control compatibility
3061         mode with Rational compiler, replaces Rational_Profile flag.
3062         * sem_ch8.adb (Analyze_Subprogram_Renaming): When
3063         Overriding_Renamings is enabled, accept renaming declarations
3064         where the new subprogram renames and overrides a locally inherited
3065         operation. Improve error message for some illegal renamings.
3066         * sem_prag.adb (Analyze_Pragma): Add case for Overriding_Renamings.
3067         (Set_Rational_Profile): The Rational_Profile enables
3068         Overriding_Renamings, Implicit_Packing, and Use_Vads_Size.
3069
3070 2013-02-06  Ed Schonberg  <schonberg@adacore.com>
3071
3072         * sem_util.adb: Set parent of copied aggregate component, to
3073         prevent infinite loop.
3074
3075 2013-02-06  Robert Dewar  <dewar@adacore.com>
3076
3077         * sem_ch3.adb, sem_ch10.adb: Minor reformatting.
3078         * exp_disp.adb: Minor comment update.
3079         * comperr.ads, osint.ads, rtsfind.adb, sem_prag.adb: Minor addition of
3080         No_Return pragmas.
3081
3082 2013-02-06  Thomas Quinot  <quinot@adacore.com>
3083
3084         * targparm.ads, sem_ch13.adb (Support_Nondefault_SSO): New target
3085         parameter, defaulted to False for now, indicates targets where
3086         non-default scalar storage order may be specified.
3087
3088 2013-02-06  Thomas Quinot  <quinot@adacore.com>
3089
3090         * sprint.adb (Write_Itype): Treat E_Record_Subtype_With_Private
3091         same as E_Record_Subtype.  Display E_Class_Wide_Subtype as
3092         subtype, not type.
3093
3094 2013-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
3095
3096         * sem_ch3.adb (Complete_Private_Subtype): Inherit the
3097         Has_Unknown_Discriminants from the full view of the base type.
3098
3099 2013-02-06  Tristan Gingold  <gingold@adacore.com>
3100
3101         * raise-gcc.c: Remove useless includes (sys/stat.h, adaint.h)
3102         Enclosing debugging functions within #ifndef inhibit_libc to
3103         support builds without full C headers.
3104
3105 2013-02-06  Thomas Quinot  <quinot@adacore.com>
3106
3107         * gnat_rm.texi: Add a minimal example of Scalar_Storage_Order.
3108
3109 2013-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
3110
3111         * sem_ch10.adb (Install_Limited_Withed_Unit): Add a missing
3112         check to detect a parent-child relationship between two units in
3113         order to correctly bypass the installation of a limited view. In
3114         other words, the comment on the intended usage of the check was
3115         correct, but the code itself did not reflect the behavior.
3116
3117 2013-02-06  Javier Miranda  <miranda@adacore.com>
3118
3119         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate the
3120         runtime check on assignment to tagged types if compiling with checks
3121         suppressed.
3122
3123 2013-02-06  Robert Dewar  <dewar@adacore.com>
3124
3125         * exp_util.adb, checks.adb, sem_ch12.adb, sem_res.adb, prj-conf.adb,
3126         s-os_lib.adb: Minor reformatting
3127
3128 2013-02-06  Vincent Celier  <celier@adacore.com>
3129
3130         * ug_words: Add -gnateY = /IGNORE_STYLE_CHECKS_PRAGMAS.
3131
3132 2013-02-06  Ed Schonberg  <schonberg@adacore.com>
3133
3134         * snames.ads-tmpl: Add Name_Rational and pragma Rational.
3135         * par-prag.adb: Recognize pragma Rational.
3136         * opt.ads (Rational_Profile): flag to control compatibility mode
3137         with Rational compiler.
3138         * sem_ch8.adb (Analyze_Subprogram_Renaming): When Rational profile
3139         is enable, accept renaming declarations where the new subprogram
3140         and the renamed entity have the same name.
3141         * sem_prag.adb (analyze_pragma): Add pragma Rational, and recognize
3142         Rational as a profile.
3143
3144 2013-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
3145
3146         * exp_ch5.adb (Expand_Loop_Entry_Attributes): When
3147         dealing with a for loop that iterates over a subtype indication
3148         with a range, use the low and high bounds of the subtype.
3149
3150 2013-02-06  Nicolas Roche  <roche@adacore.com>
3151
3152         * s-os_lib.adb (Normalize_Arguments): Arguments containing tabs should
3153         be quoted
3154
3155 2013-02-06  Vincent Celier  <celier@adacore.com>
3156
3157         * prj-conf.adb (Process_Project_And_Apply_Config): New variable
3158         Conf_Project.  New recursive procedure Check_Project to find a non
3159         aggregate project and put its Project_Id in Conf_Project. Fails if
3160         no such project can be found.
3161         (Get_Or_Create_Configuration_File): New parameter Conf_Project.
3162          (Do_Autoconf): Use project directory of project Conf_Project to store
3163         the generated configuration project file.
3164         * prj-conf.ads (Get_Or_Create_Configuration_File): New parameter
3165         Conf_Project.
3166
3167 2013-02-06  Javier Miranda  <miranda@adacore.com>
3168
3169         * sem_res.adb (Resolve_Actuals): Generate a read
3170         reference for out-mode parameters in the cases specified by
3171         RM 6.4.1(12).
3172
3173 2013-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
3174
3175         * sem_attr.adb (Resolve_Attribute): Do not resolve the prefix of
3176         Loop_Entry, instead wait until the attribute has been expanded. The
3177         delay ensures that any generated checks or temporaries are inserted
3178         before the relocated prefix.
3179
3180 2013-02-06  Ed Schonberg  <schonberg@adacore.com>
3181
3182         * sem_ch12.adb: Code clean up.
3183
3184 2013-02-06  Ed Schonberg  <schonberg@adacore.com>
3185
3186         * checks.adb (Apply_Discriminant_Check): Look for discriminant
3187         constraint in full view of private type when needed.
3188         * sem_ch12.adb (Validate_Array_Type_Instance): Specialize
3189         previous patch to components types that are private and without
3190         discriminants.
3191
3192 2013-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
3193
3194         * exp_ch4.adb (Find_Enclosing_Context): Recognize
3195         a simple return statement as one of the cases that require special
3196         processing with respect to temporary controlled function results.
3197         (Process_Transient_Object): Do attempt to finalize a temporary
3198         controlled function result when the associated context is
3199         a simple return statement.  Instead, leave this task to the
3200         general finalization mechanism.
3201
3202 2013-02-06  Thomas Quinot  <quinot@adacore.com>
3203
3204         * einfo.ads: Minor reformatting.
3205         (Status_Flag_Or_Transient_Decl): Add ??? comment.
3206
3207 2013-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
3208
3209         * exp_ch4.adb (Expand_N_Expression_With_Actions): Rewritten. This
3210         routine should be able to properly detect controlled transient
3211         objects in its actions and generate the appropriate finalization
3212         actions.
3213         * exp_ch6.adb (Enclosing_Context): Removed.
3214         (Expand_Ctrl_Function_Call): Remove local subprogram and
3215         constant. Use routine Within_Case_Or_If_Expression to determine
3216         whether the lifetime of the function result must be extended to
3217         match that of the context.
3218         * exp_util.ads, exp_util.adb (Within_Case_Or_If_Expression): New
3219         routine.
3220
3221 2013-02-06  Ed Schonberg  <schonberg@adacore.com>
3222
3223         * sem_ch12.adb (Validate_Array_Type_Instance): Extend check
3224         for subtype matching of component type of formal array type,
3225         to avoid spurious error when component type is a separate actual
3226         in the instance, and there may be a discrepancy between private
3227         and full view of component type.
3228
3229 2013-02-06  Robert Dewar  <dewar@adacore.com>
3230
3231         * s-dim.ads, clean.adb: Minor reformatting.
3232
3233 2013-02-06  Javier Miranda  <miranda@adacore.com>
3234
3235         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Undo previous patch.
3236         (Can_Split_Unconstrained_Function): Only split the inlined function if
3237         the compiler generates the code of its body.
3238
3239 2013-02-06  Robert Dewar  <dewar@adacore.com>
3240
3241         * exp_prag.adb, sem_ch3.adb, exp_attr.adb, sem_prag.adb, sem_ch6.adb,
3242         exp_intr.adb, exp_dist.adb, sem_ch13.adb: Internal clean up for
3243         N_Pragma nodes.
3244
3245 2013-02-06  Robert Dewar  <dewar@adacore.com>
3246
3247         * gnat_rm.texi: Minor text updates for pragma Warning.
3248
3249 2013-02-06  Geert Bosch  <bosch@adacore.com>
3250
3251         * s-multip.adb (Number_Of_CPUs): Short-circuit in case of
3252         CPU'Last = 1.
3253
3254 2013-02-06  Vincent Celier  <celier@adacore.com>
3255
3256         * clean.adb (Delete): On VMS use host notation to delete all files.
3257
3258 2013-02-06  Robert Dewar  <dewar@adacore.com>
3259
3260         * sem_prag.adb, sem_ch6.adb, prj-conf.adb, erroutc.adb: Minor
3261         reformatting.
3262
3263 2013-02-06  Gary Dismukes  <dismukes@adacore.com>
3264
3265         * sem_ch6.adb (Check_For_Primitive_Subprogram): Test for
3266         the special case of a user-defined equality that overrides
3267         the predefined equality of a nonderived type declared in a
3268         declarative part.
3269         * sem_util.adb (Collect_Primitive_Operations): Add test for
3270         Is_Primitive when looping over the subprograms following a type,
3271         to catch the case of primitives such as a user-defined equality,
3272         which otherwise won't be found when the type is not a derived
3273         type and is declared in a declarative part.
3274
3275 2013-02-06  Vincent Celier  <celier@adacore.com>
3276
3277         * prj-conf.adb (Check_Target): Always return True when Target
3278         is empty (Get_Or_Create_Configuration_File.Get_Project_Target):
3279         New procedure to get the value of attribute Target in the main
3280         project.
3281         (Get_Or_Create_Configuration_File.Do_Autoconf): No
3282         need to get the value of attribute Target in the main project.
3283         (Get_Or_Create_Configuration_File): Call Get_Project_Target and
3284         use the target fom this call.
3285
3286 2013-02-06  Eric Botcazou  <ebotcazou@adacore.com>
3287
3288         * erroutc.adb (Validate_Specific_Warning): Do not issue the
3289         warning about an ineffective Pragma Warnings for -Wxxx warnings.
3290         * sem_prag.adb (Analyze_Pragma) <Warnings>: Accept -Wxxx warnings.
3291         * gnat_rm.texi (Pragma Warnings): Document coordination with
3292         warnings of the GCC back-end.
3293
3294 2013-02-06  Javier Miranda  <miranda@adacore.com>
3295
3296         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build the body
3297         of an inlined function if we do not generate code for the function.
3298
3299 2013-02-06  Pascal Obry  <obry@adacore.com>
3300
3301         * s-os_lib.adb (Locate_Exec_On_Path): Call Normalize_Pathname
3302         with Resolve_Links set to False.
3303
3304 2013-02-03  Eric Botcazou  <ebotcazou@adacore.com>
3305
3306         * gcc-interface/decl.c: Include diagnostic-core.h.
3307         (gnat_to_gnu_entity) <E_Array_Type>: Sorry if Reverse_Storage_Order
3308         is set on the entity.
3309         <E_Record_Type>: Likewise.
3310         * gcc-interface/Make-lang.in (ada/decl.o): Add $(DIAGNOSTIC_CORE_H).
3311
3312 2013-01-29  Ben Brosgol  <brosgol@adacore.com>
3313
3314         * gnat_rm.texi: Fixed typos. Minor edits.
3315
3316 2013-01-29  Bob Duff  <duff@adacore.com>
3317
3318         * a-convec.adb: Minor reformatting.
3319
3320 2013-01-29  Pascal Obry  <obry@adacore.com>
3321
3322         * tempdir.adb, tempdir.ads (Use_Temp_Dir): Set wether to use the temp
3323         directory.
3324
3325 2013-01-29  Ed Schonberg  <schonberg@adacore.com>
3326
3327         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Preserve loop
3328         identifier only if it comes from source.
3329         (Expand_N_Loop_Statement): If the domain of iteration is an
3330         enumeration type with a representation clause, remove from
3331         visibility the loop identifier before rewriting the loop as a
3332         block with a declaration for said identifier.
3333         * sem_util.adb (Remove_Homonym): Handle properly the default case.
3334
3335 2013-01-29  Vincent Celier  <celier@adacore.com>
3336
3337         * prj-proc.adb: Minor comment spelling fix.
3338
3339 2013-01-29  Pascal Obry  <obry@adacore.com>
3340
3341         * prj-proc.adb (Process_Expression_Variable_Decl): Prepend
3342         Project_Path to current environment.
3343
3344 2013-01-29  Thomas Quinot  <quinot@adacore.com>
3345
3346         * sprint.adb (Sprint_Node_Actual): Output freeze nodes for
3347         itypes even if Dump_Freeze_Null is not set.
3348
3349 2013-01-29  Robert Dewar  <dewar@adacore.com>
3350
3351         * sem_util.adb: Minor reformatting.
3352         * s-rident.ads: Minor comment fixes.
3353
3354 2013-01-29  Pascal Obry  <obry@adacore.com>
3355
3356         * prj-env.ads, prj-env.adb (Add_Directories): Add parameter to
3357         control if the path is prepended or appended.
3358
3359 2013-01-29  Ed Schonberg  <schonberg@adacore.com>
3360
3361         * sem_ch6.adb (Analyze_Expression_Function): An expression
3362         function declaration is not a subprogram declaration, and thus
3363         cannot appear in a protected definition.
3364
3365 2013-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
3366
3367         * exp_util.adb (Insert_Actions): When new
3368         actions come from the expression of the expression with actions,
3369         then they must be added to the list of existing actions.
3370
3371 2013-01-29  Eric Botcazou  <ebotcazou@adacore.com>
3372
3373         * sem_ch3.adb (Analyze_Subtype_Declaration) <Private_Kind>: For
3374         the subtype of a constrained private type with discriminants
3375         that has got a full view, show that the completion is a clone
3376         of the full view.
3377
3378 2013-01-29  Javier Miranda  <miranda@adacore.com>
3379
3380         * errout.ads, errout.adb (Get_Ignore_Errors): New subprogram.
3381         * opt.ads (Warn_On_Overlap): Update documentation.
3382         * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
3383         Check function writable actuals.
3384         * sem_ch3.adb (Build_Derived_Record_Type,
3385         Record_Type_Declaration): Check function writable actuals.
3386         * sem_ch4.adb (Analyze_Range): Check function writable actuals.
3387         * sem_ch5.adb (Analyze_Assignment): Remove code of the initial
3388         implementation of AI05-0144.
3389         * sem_ch6.adb (Analyze_Function_Return,
3390         (Analyze_Procedure_Call.Analyze_Call_And_Resolve): Remove code
3391         of the initial implementation of AI05-0144.
3392         * sem_res.adb (Resolve): Remove code of the initial implementation.
3393         (Resolve_Actuals): Call Check_Function_Writable_Actuals and remove call
3394         of the initial implementation.
3395         (Resolve_Arithmetic_Op, Resolve_Logical_Op,
3396         Resolve_Membership_Op): Check function writable actuals.
3397         * sem_util.ad[sb] (Actuals_In_Call): Removed
3398         (Check_Order_Dependence): Removed (Save_Actual): Removed
3399         (Check_Function_Writable_Actuals): New subprogram.
3400         * usage.adb (Usage): Update documentation.
3401         * warnsw.adb (Set_Warning_Switch): Enable warn_on_overlap when
3402         setting all warnings.
3403
3404 2013-01-29  Robert Dewar  <dewar@adacore.com>
3405
3406         * a-calend-vms.adb: Minor comment fix.
3407
3408 2013-01-29  Robert Dewar  <dewar@adacore.com>
3409
3410         * mlib-utl.adb, gnatlink.adb: Avoid reference to ASCII.Back_Slash
3411         because of casing issues.
3412         * sem_util.ads: Minor comment fix.
3413         * style.adb (Check_Identifier): Set proper casing for entities
3414         in ASCII.
3415         * styleg.adb: Minor comment improvement.
3416         * stylesw.ads (Style_Check_Standard): Fix bad comments.
3417
3418 2013-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
3419
3420         * sem_prag.adb: Add the grammar for pragmas Abstract_State and Global.
3421         (Analyze_Pragma): Push the scope of the related subprogram and install
3422         its formals once before starting the analysis of the [moded] global
3423         list.
3424
3425 2013-01-29  Pascal Obry  <obry@adacore.com>
3426
3427         * prj-proc.adb (Process_Expression_Variable_Decl): Always handle
3428         relative paths in Project_Path as relative to the aggregate
3429         project location. Note that this was what was documented.
3430
3431 2013-01-29  Vincent Celier  <celier@adacore.com>
3432
3433         * gnatcmd.adb: For "gnat stub -P ...", do not check the naming
3434         scheme for Ada, when Ada is not a language for the project.
3435
3436 2013-01-29  Ed Schonberg  <schonberg@adacore.com>
3437
3438         * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
3439         Is_Generic_Actual_Type flag in a nested instance.
3440         * sem_ch12.adb (Restore_Private_Views): Preserve
3441         Is_Generic_Actual_Type flag if actual is a Generic_Actual_Type
3442         of an enclosing instance.
3443         * sem_util.adb (Corresponding_Generic_Type): Handle generic actual
3444         which is an actual of an enclosing instance.
3445         * sem_type.adb (Real_Actual): If a generic_actual_type is the
3446         formal of an enclosing generic and thus renames the corresponding
3447         actual, use the actual of the enclosing instance to resolve
3448         spurious ambiguities in instantiations when two formals are
3449         instantiated with the same actual.
3450
3451 2013-01-29  Robert Dewar  <dewar@adacore.com>
3452
3453         * gnat_rm.texi: Document all Ada 2005 and Ada 2012 pragmas as
3454         being available as implementation-defined pragmas in earlier
3455         versions of Ada.
3456
3457 2013-01-29  Vincent Celier  <celier@adacore.com>
3458
3459         * clean.adb (Delete): On VMS, delete all versions of the file.
3460
3461 2013-01-29  Robert Dewar  <dewar@adacore.com>
3462
3463         * par-ch6.adb (No_Constraint_Maybe_Expr_Func): New procedure.
3464         * par-util.adb (No_Constraint): Undo special handling, moved
3465         to par-ch6.adb.
3466
3467 2013-01-29  Robert Dewar  <dewar@adacore.com>
3468
3469         * aspects.ads: Aspect Warnings is implementation defined Add
3470         some other missing entries to impl-defined list Mark Warnings
3471         as GNAT pragma in main list.
3472         * sem_ch8.adb: Process aspects for all cases of renaming
3473         declarations.
3474
3475 2013-01-29  Robert Dewar  <dewar@adacore.com>
3476
3477         * sem_ch6.adb (Analyze_Function_Call): Set In_Assertion flag.
3478         * sem_elab.adb (Check_Internal_Call_Continue): Do not issue
3479         warnings about possible elaboration error if call is within
3480         an assertion.
3481         * sinfo.ads, sinfo.adb (In_Assertion): New flag in N_Function_Call node.
3482
3483 2013-01-29  Robert Dewar  <dewar@adacore.com>
3484
3485         * a-calend-vms.adb, g-eacodu-vms.adb, g-trasym-vms-alpha.adb,
3486         * s-auxdec-vms-ia64.adb, s-mastop-vms.adb, s-osprim-vms.adb,
3487         s-tasdeb-vms.adb: Replace pragma Interface by pragma Import.
3488
3489 2013-01-29  Robert Dewar  <dewar@adacore.com>
3490
3491         * opt.ads (Ignore_Style_Checks_Pragmas): New flag.
3492         * par-prag.adb (Par, case Style_Checks): Recognize
3493         Ignore_Style_Checks_Pragmas.
3494         * sem_prag.adb (Analyze_Pragma, case Style_Checks): Recognize
3495         Ignore_Style_Checks_Pragmas.
3496         * switch-c.adb: Recognize -gnateY switch.
3497         * usage.adb: Add documentation for "-gnateY".
3498         * vms_data.ads: Add IGNORE_STYLE_CHECKS_PRAGMAS (-gnateY).
3499
3500 2013-01-29  Vincent Celier  <celier@adacore.com>
3501
3502         * clean.adb (Clean_Executables): Add Sid component when calling
3503         Queue.Insert.
3504         * make.adb: When inserting in the Queue, add the Source_Id
3505         (Sid) when it is known (Start_Compile_If_Possible): When the
3506         Source_Id is known (Sid), get the path name of the ALI file
3507         (Full_Lib_File) from it, to avoid finding old ALI files in other
3508         object directories.
3509         * makeutl.ads (Source_Info): New Source_Id component Sid in
3510         Format_Gnatmake variant.
3511
3512 2013-01-29  Robert Dewar  <dewar@adacore.com>
3513
3514         * gnat_ugn.texi: Document -gnateY.
3515
3516 2013-01-29  Doug Rupp  <rupp@adacore.com>
3517
3518         * s-osinte-vms.ads, s-taprop-vms.adb, system-vms_64.ads,
3519         system-vms-ia64.ads: Replace pragma Interface by pragma Import.
3520
3521 2013-01-29  Robert Dewar  <dewar@adacore.com>
3522
3523         * atree.ads, atree.adb (Node30): New function.
3524         (Set_Node30): New procedure.
3525         (Num_Extension_Nodes): Change to 5 (activate new fields/flags).
3526         * atree.h: Add macros for Field30 and Node30.
3527         * einfo.ads, einfo.adb: Move some fields to avoid duplexing.
3528         * treepr.adb (Print_Entity_Information): Print fields 30-35.
3529
3530 2013-01-29  Robert Dewar  <dewar@adacore.com>
3531
3532         * sem_prag.adb (Analyze_Pragma, case Interface): Consider to
3533         be a violation of No_Obsolescent_Features even in Ada 95. Also
3534         generates a warning in -gnatwj mode.
3535         (Analyze_Pragma, case Interface_Name): Generates a warning in -gnatwj
3536         mode.
3537         * gnat_ugn.texi: Additional documentation on -gnatwj and pragma
3538         Interface[_Name].
3539
3540 2013-01-29  Vincent Celier  <celier@adacore.com>
3541
3542         * snames.ads-tmpl: Add new standard name Trailing_Switches.
3543
3544 2013-01-29  Ed Schonberg  <schonberg@adacore.com>
3545
3546         * sem_disp.adb (Check_Controlling_Type): If a designated type T
3547         of an anonymous access type is a limited view of a tagged type,
3548         it can be a controlling type only if the subprogram is in the
3549         same scope as T.
3550
3551 2013-01-29  Vincent Celier  <celier@adacore.com>
3552
3553         * gnatcmd.adb: Use the project where the config pragmas file is
3554         declared to get its path.
3555
3556 2013-01-29  Vincent Celier  <celier@adacore.com>
3557
3558         * prj-attr.adb: New attribute Linker'Trailing_Switches.
3559
3560 2013-01-22  Eric Botcazou  <ebotcazou@adacore.com>
3561
3562         * gcc-interface/trans.c (gnat_to_gnu) <N_Expression_With_Actions>: Do
3563         not translate the Etype of the node before translating the Actions.
3564
3565 2013-01-22  Eric Botcazou  <ebotcazou@adacore.com>
3566
3567         * gcc-interface/trans.c (Pragma_to_gnu) <Name_Space>: Use optimize_size
3568         instead of optimize and adjust warning message.
3569         (Compilation_Unit_to_gnu): Process pragmas preceding the unit.
3570
3571 2013-01-22  Tristan Gingold  <gingold@adacore.com>
3572
3573         * gcc-interface/gigi.h (ADT_unhandled_except_decl,
3574         ADT_unhandled_others_decl): New.
3575         (unhandled_others_decl, unhandled_except_decl): Define.
3576         * gcc-interface/trans.c: Include common/common-target.h.
3577         (gigi): Initialize them.
3578         (Subprogram_Body_to_gnu): On SEH targets, wrap the body of the main
3579         function in a try/catch clause.
3580
3581 2013-01-11  Eric Botcazou  <ebotcazou@adacore.com>
3582
3583         * gcc-interface/Make-lang.in (COMMON_ADAFLAGS): Remove -gnata.
3584         (CHECKING_ADAFLAGS): New.
3585         (ALL_ADAFLAGS): Include CHECKING_ADAFLAGS.
3586
3587 2013-01-10  Eric Botcazou  <ebotcazou@adacore.com>
3588
3589         * gcc-interface/config-lang.in (boot_language_boot_flags): Delete.
3590         * gcc-interface/Make-lang.in (BOOT_ADAFLAGS): Likewise.
3591
3592 2013-01-07  Eric Botcazou  <ebotcazou@adacore.com>
3593
3594         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
3595         comment about type extension with discriminants.
3596         <E_Record_Subtype>: Remove useless test and reorder conditions.
3597         (elaborate_entity) <E_Record_Subtype>: Likewise.
3598
3599 2013-01-07  Richard Biener  <rguenther@suse.de>
3600
3601         PR ada/864
3602         * gcc-interface/Make-lang.in (ada.install-common): Always apply
3603         program_transform_name.
3604
3605 2013-01-06  Eric Botcazou  <ebotcazou@adacore.com>
3606
3607         * gnatvsn.ads (Current_Year): Bump to 2013.
3608
3609 2013-01-06  Olivier Hainque  <hainque@adacore.com>
3610
3611         * gcc-interface/decl.c (gnat_to_gnu_field): Emit a specialized
3612         diagnostic for component size mismatch wrt volatile requirements.
3613         Add a gcc_unreachable() at the end of the checks for size.  Split
3614         the check on volatile for positions into one check on atomic and
3615         a subsequent one on volatile.
3616
3617 2013-01-06  Eric Botcazou  <ebotcazou@adacore.com>
3618
3619         * gcc-interface/decl.c (elaborate_entity) <E_Record_Type>: Delete.
3620
3621 2013-01-06  Eric Botcazou  <ebotcazou@adacore.com>
3622
3623         * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
3624         pack the field of the record type made for a misaligned type.
3625
3626 2013-01-06  Eric Botcazou  <ebotcazou@adacore.com>
3627
3628         * gcc-interface/decl.c (annotate_value) <COMPONENT_REF>: Be prepared
3629         for discriminants inherited from parent record types.
3630
3631 2013-01-04  Robert Dewar  <dewar@adacore.com>
3632
3633         * warnsw.adb: Minor fixes to -gnatw.d handling.
3634
3635 2013-01-04  Robert Dewar  <dewar@adacore.com>
3636
3637         * einfo.adb, atree.adb: Enlarge entities to make 63 more flags, 6 more
3638         fields.
3639
3640 2013-01-04  Joel Brobecker  <brobecker@adacore.com>
3641
3642         * gnat_ugn.texi: Fix typo.
3643
3644 2013-01-04  Robert Dewar  <dewar@adacore.com>
3645
3646         * gnat_rm.texi: Document alignment choice for subtypes.
3647
3648 2013-01-04  Robert Dewar  <dewar@adacore.com>
3649
3650         * validsw.ads: Minor fix to comment.
3651
3652 2013-01-04  Doug Rupp  <rupp@adacore.com>
3653
3654         * Makefile.rtl (GNATRTL_NONTASKING_OBJS,
3655         GNATRTL_ALTIVEC_OBJS): Factor g-al* objects.
3656         * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Add g-al* sources.
3657         (GNATRTL_ALTIVEC_OBJS): Override to null for VMS.
3658         Rename leon vxworks toolchain as leon-wrs-vxworks.
3659         * gcc-interface/Make-lang.in: Update dependencies
3660
3661 2013-01-04  Pascal Obry  <obry@adacore.com>
3662
3663         * prj.ads (For_Each_Source): Add Locally_Removed parameter.
3664         (Source_Iterator): Add Locally_Removed field.
3665         * prj.adb (For_Each_Source): Ignore Locally_Removed files if needed.
3666         (Next): Likewise.
3667
3668 2013-01-04  Robert Dewar  <dewar@adacore.com>
3669
3670         * exp_attr.adb: Minor reformatting.
3671
3672 2013-01-04  Robert Dewar  <dewar@adacore.com>
3673
3674         * checks.adb (Insert_Valid_Check): Fix handling of renamed
3675         packed array element.
3676         * exp_ch4.adb (Expand_Concatenate): Fix some missing parent
3677         fields in generated code.
3678         * exp_util.adb (Side_Effect_Free): Improve detection of cases
3679         needing renaming.
3680
3681 2013-01-04  Robert Dewar  <dewar@adacore.com>
3682
3683         * sinfo.ads: Clean up order of N_xxx subtypes
3684
3685 2013-01-04  Vincent Celier  <celier@adacore.com>
3686
3687         * prj-conf.adb (Check_Target): Allow --autoconf= with no target.
3688
3689 2013-01-04  Robert Dewar  <dewar@adacore.com>
3690
3691         * types.ads, prj-conf.adb, par-tchk.adb: Minor reformatting.
3692
3693 2013-01-04  Robert Dewar  <dewar@adacore.com>
3694
3695         * par-ch6.adb (P_Subprogram): Better handling of missing IS
3696         after expression function.
3697         * par-util.adb (No_Constraint): Improve handling to avoid bad warnings.
3698
3699 2013-01-04  Robert Dewar  <dewar@adacore.com>
3700
3701         * exp_util.ads, exp_util.adb (Insert_Actions): In expression with
3702         actions case, new actions are appended to the sequence rather than
3703         prepended.
3704
3705 2013-01-04  Robert Dewar  <dewar@adacore.com>
3706
3707         * gnat_ugn.texi: Document -gnatw.d/w.D (does no apply in VMS mode).
3708         * usage.adb: Add lines for -gnatw.d/w.D switches.
3709         * warnsw.adb: Minor fixes (some missing cases of setting
3710         Warning_Doc_Switch). Reject -gnatw.d and -gnatw.D in VMS mode.
3711
3712 2013-01-04  Robert Dewar  <dewar@adacore.com>
3713
3714         * exp_util.adb (Remove_Side_Effects): Make sure scope suppress
3715         is restored on exit.
3716
3717 2013-01-04  Robert Dewar  <dewar@adacore.com>
3718
3719         * usage.adb: Document -gnateF (check overflow for predefined Float).
3720
3721 2013-01-04  Robert Dewar  <dewar@adacore.com>
3722
3723         * sem_res.adb (Resolve_Type_Conversion): Remove incorrect
3724         prevention of call to Apply_Type_Conversion_Checks, which resulted
3725         in missing check flags in formal mode.
3726
3727 2013-01-04  Vincent Celier  <celier@adacore.com>
3728
3729         * makeutl.ads (Db_Switch_Args): New table used by gprbuild.
3730         * prj-conf.adb (Check_Builder_Switches): Check for switches
3731         --config= (Get_Db_Switches): New procedure to get the --db
3732         switches so that they are used when invoking gprconfig in
3733         auto-configuration.
3734         (Do_Autoconf): When invoking gprconfig, use the --db switches, if any.
3735
3736 2013-01-04  Pascal Obry  <obry@adacore.com>
3737
3738         * prj-nmsc.adb: Minor reformatting.
3739
3740 2013-01-04  Vincent Celier  <celier@adacore.com>
3741
3742         * makeutl.ads (Root_Environment): New variable, moved rom
3743         gprbuild (Load_Standard_Base): New Boolean variable, moved
3744         from gprbuild.
3745         * prj-conf.adb (Check_Builder_Switches): New procedure to check
3746         for switch --RTS in package Builder. If a runtime specified
3747         by --RTS is a relative path name, but not a base name, then
3748         find the path on the Project Search Path.
3749         (Do_Autoconf): Call Check_Builder_Switches.
3750         (Locate_Runtime): New procedure, moved from gprbuild, to get the
3751         absolute paths of runtimes when they are not specified as a base name.
3752         * prj-conf.ads (Locate_Runtime): New procedure, moved from gprbuild.
3753
3754 2013-01-04  Ed Schonberg  <schonberg@adacore.com>
3755
3756         * sem_ch3.adb (Build_Private_Derived_Type): Set
3757         Has_Private_Ancestor on type derived from an untagged private
3758         type whose full view has discriminants
3759         * sem_aggr.adb (Resolve_Record_Aggregate): Reject non-extension
3760         aggregate for untagged record type with private ancestor.
3761
3762 2013-01-04  Thomas Quinot  <quinot@adacore.com>
3763
3764         * sem_elab.adb, sem_ch3.adb: Minor reformatting.
3765
3766 2013-01-04  Robert Dewar  <dewar@adacore.com>
3767
3768         * table.adb: Minor reformatting.
3769
3770 2013-01-04  Ed Schonberg  <schonberg@adacore.com>
3771
3772         * sem_ch10.adb (Check_Redundant_Withs): A with_clause that does
3773         not come from source does not generate a warning for redundant
3774         with_clauses.
3775
3776 2013-01-04  Hristian Kirtchev  <kirtchev@adacore.com>
3777
3778         * aspects.adb, aspects.ads: Add Aspect_Global to all relevant tables.
3779         * par-prag.adb: Add pragma Global to the list of pragmas that
3780         do not need special processing by the parser.
3781         * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect
3782         Global into a pragma without any form of legality checks. The
3783         work is done by Analyze_Pragma. The aspect and pragma are both
3784         marked as needing delayed processing.  Insert the corresponding
3785         pragma of aspect Abstract_State in the visible declarations of the
3786         related package.
3787         (Check_Aspect_At_Freeze_Point): Aspect Global
3788         does not need processing even though it is marked as delayed.
3789         Alphabetize the list on aspect names.
3790         * sem_prag.adb: Add a value for pragma Global in table Sig_Flags.
3791         (Analyze_Pragma): Add ??? comment about the grammar of pragma
3792         Abstract_State.  Move the error location from the pragma to the
3793         state to improve the quality of error placement.  Add legality
3794         checks for pragma Global.
3795         * snames.ads-tmpl Add the following specially recognized names
3796
3797 2013-01-04  Eric Botcazou  <ebotcazou@adacore.com>
3798
3799         * sem_ch3.adb: Fix minor typo.
3800
3801 2013-01-04  Ed Schonberg  <schonberg@adacore.com>
3802
3803         * par-ch13.adb (Aspect_Specifications_Present): In Strict mode,
3804         accept an aspect name followed by a comma, indicating a defaulted
3805         boolean aspect.
3806
3807 2013-01-04  Joel Brobecker  <brobecker@adacore.com brobecker>
3808
3809         * gnat_ugn.texi: Document procedure to codesign GDB on Darwin.
3810         Update doc on gnattest --separates switch.
3811
3812 2013-01-04  Thomas Quinot  <quinot@adacore.com>
3813
3814         * s-chepoo.ads: Minor reformatting.
3815
3816 2013-01-04  Arnaud Charlet  <charlet@adacore.com>
3817
3818         * usage.adb: Remove mention of -gnatN in usage.
3819
3820 2013-01-04  Robert Dewar  <dewar@adacore.com>
3821
3822         * exp_prag.adb, gnatcmd.adb, exp_util.adb, table.adb, sem_prag.adb,
3823         freeze.adb, sem_ch4.adb, sem_warn.adb, opt.ads, exp_aggr.adb,
3824         prj-conf.adb, sem_ch13.adb: Minor reformatting.
3825
3826 2013-01-04  Thomas Quinot  <quinot@adacore.com>
3827
3828         * sinfo.ads: Minor documentation update.
3829
3830 2013-01-04  Thomas Quinot  <quinot@adacore.com>
3831
3832         * sem_ch3.adb, einfo.adb (Analyze_Object_Declaration): Do not set Ekind
3833         before resolving initialization expression.
3834
3835 2013-01-04  Hristian Kirtchev  <kirtchev@adacore.com>
3836
3837         * checks.adb (Generate_Index_Checks): Delay the generation of
3838         the check for an indexed component where the prefix mentions
3839         Loop_Entry until the attribute has been properly expanded.
3840         * exp_ch5.adb (Expand_Loop_Entry_Attributes): Perform minor
3841         decoration of the constant that captures the value of Loop_Entry's
3842         prefix at the entry point into a loop.  Generate index checks
3843         for an attribute reference that has been transformed into an
3844         indexed component.
3845
3846 2013-01-04  Thomas Quinot  <quinot@adacore.com>
3847
3848         * exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb, exp_aggr.adb,
3849         sem_ch13.adb (Exp_Aggr.Collect_Initialization_Statements): Nothing to
3850         do if Obj is already frozen.
3851         (Exp_Util.Find_Init_Call): Rename to...
3852         (Exp_Util.Remove_Init_Call): New subprogram, renamed from
3853         Find_Init_Call.  Remove the initialization call from the enclosing
3854         list if found, and if it is from an Initialization_Statements
3855         attribute, reset it.
3856         (Exp_Util.Append_Freeze_Action): Minor code reorganization.
3857         (Exp_Util.Append_Freeze_Actions): Ensure a freeze node has been
3858         allocated (as is already done in Append_Freeze_Action).
3859         (Freeze.Freeze_Entity): For an object with captured
3860         Initialization_Statements and non-delayed freezeing, unwrap the
3861         initialization statements and insert and them directly in the
3862         enclosing list.
3863         (Sem_Ch13.Check_Address_Clause): For an object
3864         with Initialization_Statements and an address clause, unwrap the
3865         initialization statements when moving them to the freeze actions.
3866
3867 2013-01-03  Pascal Obry  <obry@adacore.com>
3868
3869         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package remote and
3870         corresponding attibutes.
3871
3872 2013-01-03  Thomas Quinot  <quinot@adacore.com>
3873
3874         * exp_aggr.adb: Minor comment improvement.
3875
3876 2013-01-03  Hristian Kirtchev  <kirtchev@adacore.com>
3877
3878         * aspects.adb, aspects.ads: Add Aspect_Abstract_State to all the
3879         relevant tables.
3880         * einfo.ads, einfo.adb: Add Integrity_Level and Refined_State to
3881         the description of fields (Abstract_States): New routine.
3882         (Integrity_Level): New routine.
3883         (Has_Property): New routine.
3884         (Is_Input_State): New routine.
3885         (Is_Null_State): New routine.
3886         (Is_Output_State): New routine.
3887         (Is_Volatile_State): New routine.
3888         (Refined_State): New routine.
3889         (Set_Abstract_States): New routine.
3890         (Set_Integrity_Level): New routine.
3891         (Set_Refined_State): New routine.
3892         (Write_Field8_Name): Add proper output for E_Abstract_State.
3893         (Write_Field9_Name): Add proper output for E_Abstract_State.
3894         (Write_Field25_Name): Add proper output for E_Package.
3895         * lib-xref.ads: Add new letter for an abstract state.
3896         * par-prag.adb: Add pragma Abstract_State to the list of pragma
3897         that do not need special processing by the parser.
3898         * sem_ch13.adb (Analyze_Aspect_Specifications): Convert
3899         aspect Abstract_State into a pragma without any form
3900         of legality checks. The work is done by Analyze_Pragma.
3901         (Check_Aspect_At_Freeze_Point): Aspect Abstract_State does not
3902         require delayed analysis.
3903         * sem_prag.adb: Add a value for pragma Abstract_State in table
3904         Sig_Flags.
3905         (Analyze_Pragma): Add legality checks for pragma
3906         Abstract_State. Analysis of individual states introduces a state
3907         abstraction entity into the visibility chain.
3908         * snames.ads-tmpl: Add new names for abstract state and
3909         integrity. Add new pragma id for abstract state.
3910
3911 2013-01-03  Bob Duff  <duff@adacore.com>
3912
3913         * table.adb (Reallocate): Calculate new Length in
3914         Long_Integer to avoid overflow.
3915
3916 2013-01-03  Thomas Quinot  <quinot@adacore.com>
3917
3918         * sem_ch3.adb, sinfo.ads, freeze.adb, sem_ch4.adb, exp_aggr.adb
3919         (Sem_Ch3.Analyze_Object_Declaration): Set Ekind early so that
3920         it is set properly when expanding the initialization expression.
3921         (Freeze.Check_Address_Clause): Transfer initialization expression
3922         to an assignment in the freeze actions, so that the object is
3923         initialized only after being elaborated by GIGI.
3924         (Sinfo (comments), Sem_Ch4.Analyze_Expression_With_Actions): Allow
3925         a Null_Statement as the expression in an Expression_With_Actions.
3926         (Exp_Aggr.Collect_Initialization_Statements): New subprogram
3927         shared by expansion of record and array aggregates, used to
3928         capture statements for an aggregate used to initalize an object
3929         into an Expression_With_Actions (which acts as a container for
3930         a list of actions).
3931         (Exp_Aggr.Convert_Aggr_In_Obj_Decl): Use the above to
3932         capture initialization statements, instead of the previously
3933         existing loop which left freeze nodes out of the capturing
3934         construct (causing out of order elaboration crashes in GIGI).
3935         (Exp_Aggr.Expand_Array_Aggregate):  Use the above to capture
3936         initialization statements (this was previously not done for
3937         arrays).  Also do not unconditionally prevent in place expansion
3938         for an object with address clause.
3939
3940 2013-01-03  Thomas Quinot  <quinot@adacore.com>
3941
3942         * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Check that
3943         a record extension has the same scalar storage order as the parent type.
3944
3945 2013-01-03  Thomas Quinot  <quinot@adacore.com>
3946
3947         * exp_ch4.adb: Add comment.
3948
3949 2013-01-03  Vincent Celier  <celier@adacore.com>
3950
3951         * prj.adb: Minor spelling error correction in comment.
3952
3953 2013-01-03  Vincent Celier  <celier@adacore.com>
3954
3955         * gnatcmd.adb (GNATCmd): If a single main has been specified
3956         as an absolute path, use its simple file name to find specific
3957         switches, instead of the absolute path.
3958
3959 2013-01-03  Javier Miranda  <miranda@adacore.com>
3960
3961         * sem_warn.adb (Warn_On_Overlapping_Actuals): For overlapping
3962         parameters that are record types or array types generate warnings
3963         only compiling under -gnatw.i
3964         * opt.ads (Extensions_Allowed): Restore previous documentation.
3965
3966 2013-01-03  Vincent Celier  <celier@adacore.com>
3967
3968         * prj-conf.adb (Do_Autoconf): If Target is specified in the
3969         main project, but not on the command line, use the Target in
3970         the project to invoke gprconfig in auto-configuration.
3971         * makeutl.ads (Default_Config_Name): New constant String.
3972
3973 2013-01-03  Arnaud Charlet  <charlet@adacore.com>
3974
3975         * usage.adb: Minor: fix typo in usage.
3976
3977 2013-01-03  Thomas Quinot  <quinot@adacore.com>
3978
3979         * sem_ch13.adb (Analyze_Record_Representation_Clause): Reject
3980         an illegal component clause for an inherited component in a
3981         record extension.
3982
3983 2013-01-03  Emmanuel Briot  <briot@adacore.com>
3984
3985         * xref_lib.adb (Parse_Identifier_Info): Fix handling of arrays, which
3986         have information in the ALI file for both the index and the component
3987         types.
3988
3989 2013-01-03  Emmanuel Briot  <briot@adacore.com>
3990
3991         * projects.texi: Fix error in documenting the project path
3992         computed for an aggregate project.
3993
3994 2013-01-03  Javier Miranda  <miranda@adacore.com>
3995
3996         * sem_warn.adb (Warn_On_Overlapping_Actuals): Adding documentation
3997         plus restricting the functionality of this routine to cover the
3998         cases described in the Ada 2012 reference manual. The previous
3999         extended support is now available under -gnatX.
4000         * s-tassta.adb (Finalize_Global_Tasks): Addition of a dummy
4001         variable to call Timed_Sleep.  Required to avoid warning on
4002         overlapping out-mode actuals.
4003         * opt.ads (Extensions_Allowed): Update documentation.
4004
4005 2013-01-03  Tristan Gingold  <gingold@adacore.com>
4006
4007         * s-arit64.ads: Use Multiply_With_Ovflo_Check as __gnat_mulv64.
4008         * arit64.c: Removed
4009         * gcc-interface/Makefile.in: Remove reference to arit64.c.
4010
4011 2013-01-03  Thomas Quinot  <quinot@adacore.com>
4012
4013         * checks.adb, checks.ads (Apply_Address_Clause_Check): The check must
4014         be generated at the start of the freeze actions for the entity, not
4015         before (or after) the freeze node.
4016
4017 2013-01-03  Thomas Quinot  <quinot@adacore.com>
4018
4019         * exp_aggr.adb (Exp_Aggr.Convert_Aggregate_In_Obj_Decl):
4020         Reorganize code to capture initialization statements in a block,
4021         so that freeze nodes are excluded from the captured block.
4022
4023 2013-01-03  Thomas Quinot  <quinot@adacore.com>
4024
4025         * exp_ch11.adb: Minor reformatting.
4026
4027 2013-01-03  Thomas Quinot  <quinot@adacore.com>
4028
4029         * exp_util.adb, einfo.adb, einfo.ads, freeze.adb, exp_aggr.adb,
4030         sem_ch13.adb (Einfo.Initialization_Statements,
4031         Einfo.Set_Initialization_Statements): New entity attribute
4032         for objects.
4033         (Exp_Util.Find_Init_Call): Handle case of an object initialized
4034         by an aggregate converted to a block of assignment statements.
4035         (Freeze.Check_Address_Clause): Do not clear Has_Delayed_Freeze
4036         even for objects that require a constant address, because the
4037         address expression might involve entities that have yet to be
4038         elaborated at the point of the object declaration.
4039         (Exp_Aggr.Convert_Aggregate_In_Obj_Decl): For a type that does
4040         not require a transient scope, capture the assignment statements
4041         in a block so that they can be moved down after elaboration of
4042         an address clause if needed.
4043         (Sem_Ch13.Check_Constant_Address_Clause.Check_Expr_Constants,
4044         case N_Unchecked_Conversion): Do not replace operand subtype with
4045         its base type as this violates a GIGI invariant if the operand
4046         is an identifier (in which case the etype of the identifier
4047         is expected to be equal to that of the denoted entity).
4048
4049 2013-01-03  Javier Miranda  <miranda@adacore.com>
4050
4051         * sem_util.ads, sem_util.adb (Denotes_Same_Object): Extend the
4052         functionality of this routine to cover cases described in the Ada 2012
4053         reference manual.
4054
4055 2013-01-03  Ed Schonberg  <schonberg@adacore.com>
4056
4057         * sem_elab.adb (Set_Elaboration_Constraint): Handle properly
4058         a 'Access attribute reference when the subprogram is called
4059         Initialize.
4060
4061 2013-01-03  Arnaud Charlet  <charlet@adacore.com>
4062
4063         * s-tpobop.adb (PO_Do_Or_Queue): Refine assertion, since a
4064         select statement may be called from a controlled (e.g. Initialize)
4065         operation and have abort always deferred.
4066
4067 2013-01-03  Robert Dewar  <dewar@adacore.com>
4068
4069         * sem_ch8.adb, einfo.ads, einfo.adb: Minor code reorganization.
4070
4071 2013-01-03  Javier Miranda  <miranda@adacore.com>
4072
4073         * exp_ch3.adb (Make_Controlling_Function_Wrappers): Exclude
4074         internal entities associated with interfaces and add minimum
4075         decoration to the defining entity of the generated wrapper to
4076         allow overriding interface primitives.
4077         * sem_disp.ads (Override_Dispatching_Operation): Addition of a
4078         new formal (Is_Wrapper).
4079         * sem_disp.adb (Override_Dispatching_Operation): When overriding
4080         interface primitives the new formal helps identifying that the
4081         new operation is not fully decorated.
4082
4083 2013-01-03  Thomas Quinot  <quinot@adacore.com>
4084
4085         * sem_ch7.adb, sem_ch10.adb, einfo.adb, einfo.ads, sem_ch12.adb,
4086         rtsfind.adb, sem_elab.adb, sem_ch4.adb, sem_ch8.adb
4087         (Einfo.Is_Visible_Child_Unit, Einfo.Set_Is_Visible_Child_Unit):
4088         Rename to Is_Visible_Lib_Unit, Set_Is_Visible_Lib_Unit, and
4089         update spec accordingly (now also applies to root library units).
4090         (Sem_Ch10.Analyze_Subunit.Analyze_Subunit_Context): Toggle above flag
4091         on root library units, not only child units.
4092         (Sem_Ch10.Install[_Limited]_Withed_Unit): Same.
4093         (Sem_Ch10.Remove_Unit_From_Visibility): Reset Is_Visible_Lib_Unit
4094         even for root library units.
4095         (Sem_Ch8.Find_Expanded_Name): A selected component form whose prefix is
4096         Standard is an expanded name for a root library unit.
4097
4098 2013-01-03  Thomas Quinot  <quinot@adacore.com>
4099
4100         * exp_ch3.adb: Minor reformatting.
4101
4102 2013-01-03  Olivier Hainque  <hainque@adacore.com>
4103
4104         * tracebak.c: Reinstate changes to support ppc-lynx178.
4105
4106 2013-01-03  Ed Schonberg  <schonberg@adacore.com>
4107
4108         * atree.ads: Minor reformatting and documentation enhancement.
4109
4110 2013-01-03  Ed Schonberg  <schonberg@adacore.com>
4111
4112         * exp_ch3.adb (Expand_N_Object_Declaration): If the object has
4113         a class-wide type and a renaming declaration is created for it,
4114         preserve entity chain, which already contains generated internal
4115         types. This ensures that freezing actions are properly generated
4116         for all objects declared subsequently in the same scope, and
4117         that debugging information is generated for them.
4118         * sem_util.adb, sem_util.ads (we): New debugging routine, to
4119         display entity chain of a given scope.
4120
4121 2013-01-03  Robert Dewar  <dewar@adacore.com>
4122
4123         * exp_intr.adb: Minor reformatting.
4124
4125 2013-01-03  Robert Dewar  <dewar@adacore.com>
4126
4127         * einfo.adb: Minor reformatting.
4128
4129 2013-01-03  Pascal Obry  <obry@adacore.com>
4130
4131         * adaint.c, adaint.h (__gnat_get_module_name): Removed.
4132         (__gnat_is_module_name_supported): Removed.
4133         * s-win32.ads: Add some needed definitions.
4134         * g-trasym.ads: Update comments.
4135
4136 2013-01-03  Robert Dewar  <dewar@adacore.com>
4137
4138         * layout.adb (Set_Composite_Alignment): Fix problems of
4139         interactions with Optimize_Alignment set to Space.
4140
4141 2013-01-03  Thomas Quinot  <quinot@adacore.com>
4142
4143         * exp_disp.adb: Minor reformatting.
4144
4145 2013-01-02  Richard Biener  <rguenther@suse.de>
4146
4147         PR bootstrap/55784
4148         * gcc-interface/Makefile.in: Add $(GMPINC) to includes.
4149
4150 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4151
4152         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Remove
4153         side effects from Tag_Arg early, doing it too late may cause a
4154         crash due to inconsistent Parent link.
4155         * sem_ch8.adb, einfo.ads: Minor reformatting.
4156
4157 2013-01-02  Robert Dewar  <dewar@adacore.com>
4158
4159         * einfo.ads, einfo.adb (Has_Independent_Components): New flag.
4160         * freeze.adb (Size_Known): We do not know the size of a packed
4161         record if it has atomic components, by reference type components,
4162         or independent components.
4163         * sem_prag.adb (Analyze_Pragma, case Independent_Components): Set new
4164         flag Has_Independent_Components.
4165
4166 2013-01-02  Yannick Moy  <moy@adacore.com>
4167
4168         * opt.ads (Warn_On_Suspicious_Contract): Set to True by default.
4169         * usage.adb (Usage): Update usage message.
4170
4171 2013-01-02  Pascal Obry  <obry@adacore.com>
4172
4173         * adaint.c (__gnat_is_module_name_supported): New constant.
4174
4175 2013-01-02  Ed Schonberg  <schonberg@adacore.com>
4176
4177         * sem_attr.adb (Check_Array_Type): Reject an attribute reference on an
4178         array whose component type does not have a completion.
4179
4180 2013-01-02  Geert Bosch  <bosch@adacore.com>
4181
4182         * a-nllcef.ads, a-nlcefu.ads, a-nscefu.ads: Make Pure.
4183
4184 2013-01-02  Robert Dewar  <dewar@adacore.com>
4185
4186         * par_sco.adb: Minor reformatting.
4187
4188 2013-01-02  Javier Miranda  <miranda@adacore.com>
4189
4190         * sem_aggr.adb (Resolve_Array_Aggregate): Remove dead code.
4191
4192 2013-01-02  Olivier Hainque  <hainque@adacore.com>
4193
4194         * a-exctra.ads (Get_PC): New function.
4195
4196 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4197
4198         * sem_ch8.adb: Minor reformatting.
4199
4200 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4201
4202         * sem_ch7.adb: Minor reformatting.
4203
4204 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4205
4206         * freeze.adb (Check_Component_Storage_Order): Do not crash on
4207         _Tag component.
4208
4209 2013-01-02  Robert Dewar  <dewar@adacore.com>
4210
4211         * gnat1drv.adb, targparm.adb, targparm.ads: Minor name change: add
4212         On_Target to Atomic_Sync_Default.
4213
4214 2013-01-02  Robert Dewar  <dewar@adacore.com>
4215
4216         * sem_warn.adb (Warn_On_Known_Condition): Suppress warning for
4217         comparison of attribute result with constant
4218         * a-ststio.adb, s-direio.adb, s-rannum.adb: Remove unnecessary pragma
4219         Warnings (Off, "..");
4220
4221 2013-01-02  Yannick Moy  <moy@adacore.com>
4222
4223         * sem_prag.ads: Minor correction of comment.
4224
4225 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4226
4227         * par_sco.adb (Traverse_Package_Declaration): The first
4228         declaration in a nested package is dominated by the preceding
4229         declaration in the enclosing scope.
4230
4231 2013-01-02  Pascal Obry  <obry@adacore.com>
4232
4233         * adaint.c, adaint.h (__gnat_get_module_name): Return the actual
4234         module containing a given address.
4235
4236 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4237
4238         * sem_ch3.adb: Minor reformatting.
4239
4240 2013-01-02  Pascal Obry  <obry@adacore.com>
4241
4242         * cstreams.c (__gnat_ftell64): New routine. Use _ftelli64 on
4243         Win64 and default to ftell on other platforms.
4244         (__gnat_fsek64): Likewise.
4245         * i-cstrea.ads: Add fssek64 and ftell64 specs.
4246         * s-crtl.ads: Likewise.
4247         * a-ststio.adb, s-direio.adb (Size): Use 64 bits version when required.
4248         (Set_Position): Likewise.
4249
4250 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4251
4252         * par_sco.adb: Generate X SCOs for default expressions in
4253         subprogram body stubs.  Do not generate any SCO for package,
4254         task, or protected body stubs.
4255
4256 2013-01-02  Ed Schonberg  <schonberg@adacore.com>
4257
4258         * sem_ch3.adb: Further improvement to ASIS mode for anonymous
4259         access to protected subprograms.
4260
4261 2013-01-02  Robert Dewar  <dewar@adacore.com>
4262
4263         * par_sco.adb, vms_data.ads: Minor reformatting.
4264
4265 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4266
4267         * par_sco.adb (Traverse_Declarations_Or_Statement): Function
4268         form, returning value of Current_Dominant upon exit, for chaining
4269         purposes.
4270         (Traverse_Declarations_Or_Statement.Traverse_One, case
4271         N_Block_Statement): First statement is dominated by last declaration.
4272         (Traverse_Subprogram_Or_Task_Body): Ditto.
4273         (Traverse_Package_Declaration): First private
4274         declaration is dominated by last visible declaration.
4275         (Traverse_Sync_Definition): Ditto.
4276
4277 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4278
4279         * gnat_rm.texi: Restrict the requirement for Scalar_Storage_Order
4280         matching Bit_Order to record types only, since array types do not
4281         have a Bit_Order.
4282
4283 2013-01-02  Vincent Celier  <celier@adacore.com>
4284
4285         * gnat_ugn.texi: Remove documentation of -gnateO, which is an
4286         internal switch.
4287         * usage.adb: Indicate that -gnateO is an internal switch.
4288
4289 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4290
4291         * par_sco.adb: Add SCO generation for task types and single
4292         task declarations.
4293         * get_scos.adb: When adding an instance table entry for a
4294         non-nested instantiation, make sure the Enclosing_Instance is
4295         correctly set to 0.
4296
4297 2013-01-02  Hristian Kirtchev  <kirtchev@adacore.com>
4298
4299         * sem_attr.adb (Analyze_Attribute): Skip the special _Parent
4300         scope generated for subprogram inlining purposes while trying
4301         to locate the enclosing function.
4302         * sem_prag.adb (Analyze_Pragma): Preanalyze the boolean
4303         expression of pragma Postcondition when the pragma comes from
4304         source and appears inside a subprogram body.
4305
4306 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4307
4308         * switch-c.adb, fe.h, back_end.adb: Enable generation of instantiation
4309         information in debug info unconditionally when using -fdump-scos,
4310         instead of relying on a separate command line switch -fdebug-instances.
4311         * gcc-interface/Make-lang.in: Update dependencies.
4312
4313 2013-01-02  Ed Schonberg  <schonberg@adacore.com>
4314
4315         * sem_ch12.adb: Additional refinement of predicate.
4316
4317 2013-01-02  Vincent Celier  <celier@adacore.com>
4318
4319         * vms_data.ads: Remove incorrect spaces at end of descriptions
4320         of qualifiers for single switch.
4321
4322 2013-01-02  Ben Brosgol  <brosgol@adacore.com>
4323
4324         * gnat_rm.texi: Minor edits / wordsmithing in section on pragma
4325         Check_Float_Overflow.
4326
4327 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4328
4329         * sprint.adb (Sprint_Node_Actual): Do not add extra parens for
4330         a conditional expression (CASE or IF expression) that already
4331         has parens. Also omit ELSE keyword for an IF expression without
4332         an ELSE part.
4333
4334 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4335
4336         * gnat1drv.adb (Adjust_Global_Switches): Adjust back-end
4337         flag_debug_instances here, after front-end switches have been
4338         processed.
4339
4340 2013-01-02  Vincent Celier  <celier@adacore.com>
4341
4342         * usage.adb: Minor reformatting.
4343
4344 2013-01-02  Arnaud Charlet  <charlet@adacore.com>
4345
4346         * opt.ads: Fix typo.
4347
4348 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4349
4350         * par_sco.adb: Generate P decision SCOs for SPARK pragmas
4351         Assume and Loop_Invariant.
4352
4353 2013-01-02  Robert Dewar  <dewar@adacore.com>
4354
4355         * vms_data.ads: Add entry for Float_Check_Valid (-gnateF).
4356         * ug_words: Add entry for Float_Check_Overflow.
4357         * usage.adb: Minor reformatting.
4358         * gnat_ugn.texi: Add documentation for -gnateF (Check_Float_Overflow).
4359
4360 2013-01-02  Vincent Celier  <celier@adacore.com>
4361
4362         * gnat_ugn.texi: Add documentation for switches -gnateA, -gnated,
4363         -gnateO=, -gnatet and -gnateV.
4364         * ug_words: Add qualifiers equivalent to -gnateA, -gnated,
4365         -gnatet and -gnateV.
4366         * usage.adb: Add lines for -gnatea, -gnateO and -gnatez.
4367         * vms_data.ads: Add new compiler qualifiers /ALIASING_CHECK
4368         (-gnateA), /DISABLE_ATOMIC_SYNCHRONIZATION (-gnated),
4369         /PARAMETER_VALIDITY_CHECK (-gnateV) and /TARGET_DEPENDENT_INFO
4370         (-gnatet).
4371
4372 2013-01-02  Robert Dewar  <dewar@adacore.com>
4373
4374         * checks.adb (Apply_Scalar_Range_Check): Implement Check_Float_Overflow.
4375         * opt.ads, opt.adb: Handle flags Check_Float_Overflow[_Config].
4376         * par-prag.adb: Add dummy entry for pragma Check_Float_Overflow.
4377         * sem_prag.adb: Implement pragma Check_Float_Overflow.
4378         * snames.ads-tmpl: Add entries for pragma Check_Float_Overflow.
4379         * switch-c.adb: Recognize -gnateF switch.
4380         * tree_io.ads: Update ASIS version number.
4381         * gnat_rm.texi: Add documentation of pragma Check_Float_Overflow.
4382
4383 2013-01-02  Robert Dewar  <dewar@adacore.com>
4384
4385         * checks.adb, exp_ch4.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
4386         exp_disp.adb, exp_dist.adb, exp_intr.adb, exp_prag.adb, exp_util.adb,
4387         freeze.adb, gnat1drv.adb, inline.adb, layout.adb, lib-xref.adb,
4388         par-ch10.adb, par-labl.adb, par-load.adb, par-util.adb, restrict.adb,
4389         sem_ch13.adb, sem_ch4.adb, sem_ch6.adb, sem_dim.adb, sem_elab.adb,
4390         sem_res.adb, sem_warn.adb, sinput-l.adb: Add tags to warning messages.
4391         * sem_ch6.ads, warnsw.ads, opt.ads: Minor comment updates.
4392
4393 2013-01-02  Robert Dewar  <dewar@adacore.com>
4394
4395         * err_vars.ads: Minor comment fix.
4396
4397 2013-01-02  Ed Schonberg  <schonberg@adacore.com>
4398
4399         * sem_ch12.adb: Refine predicate.
4400
4401 2013-01-02  Robert Dewar  <dewar@adacore.com>
4402
4403         * errout.ads: Minor comment fixes.
4404         * opt.ads: Minor comment additions.
4405         * exp_aggr.adb: Add tags to warning messages
4406         * exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_aggr.adb,
4407         sem_attr.adb, sem_case.adb, sem_cat.adb, sem_ch3.adb, sem_ch4.adb,
4408         sem_ch5.adb, sem_disp.adb, sem_dist.adb, sem_elab.adb, sem_eval.adb,
4409         sem_intr.adb, sem_mech.adb, sem_prag.adb, sem_res.adb, sem_util.adb,
4410         sem_warn.adb: Add tags to warning messages
4411
4412 2013-01-02  Doug Rupp  <rupp@adacore.com>
4413
4414         * init.c [VMS] Remove subtest on reason mask for ACCVIO that is a C_E.
4415
4416 2013-01-02  Ed Schonberg  <schonberg@adacore.com>
4417
4418         * sem_ch12.adb: Recover source name for renamed packagea.
4419
4420 2013-01-02  Robert Dewar  <dewar@adacore.com>
4421
4422         * errout.adb (Set_Msg_Insertion_Warning): Correct typo causing
4423         tests to fail if insertion sequence is at end of message string.
4424         * opt.ads: Minor comment fixes and additions.
4425         * sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_ch10.adb, sem_ch11.adb,
4426         sem_ch12.adb, sem_ch13.adb: Add tags to warning messages.
4427         * sem_ch6.ads, sem_ch6.adb (Cannot_Inline): Deal with warning message
4428         tags. Add tags to warning messages.
4429
4430 2013-01-02  Robert Dewar  <dewar@adacore.com>
4431
4432         * err_vars.ads (Warning_Doc_Switch): New flag.
4433         * errout.adb (Error_Msg_Internal): Implement new warning flag
4434         doc tag stuff (Set_Msg_Insertion_Warning): New procedure.
4435         * errout.ads: Document new insertion sequences ?? ?x? ?.x?
4436         * erroutc.adb (Output_Msg_Text): Handle ?? and ?x? warning doc
4437         tag stuff.
4438         * erroutc.ads (Warning_Msg_Char): New variable.
4439         (Warn_Chr): New field in error message object.
4440         * errutil.adb (Error_Msg): Set Warn_Chr in error message object.
4441         * sem_ch13.adb: Minor reformatting.
4442         * warnsw.adb: Add handling for -gnatw.d and -gnatw.D
4443         (Warning_Doc_Switch).
4444         * warnsw.ads: Add handling of -gnatw.d/.D switches (warning
4445         doc tag).
4446
4447 2013-01-02  Robert Dewar  <dewar@adacore.com>
4448
4449         * opt.ads: Minor reformatting.
4450
4451 2013-01-02  Doug Rupp  <rupp@adacore.com>
4452
4453         * init.c: Reorganize VMS section.
4454         (scan_condtions): New function for scanning condition tables.
4455         (__gnat_handle_vms_condtion): Use actual exception name for imported
4456         exceptions vice IMPORTED_EXCEPTION.
4457         Move condition table scanning into separate function. Move formerly
4458         special handled conditions to system condition table. Use SYS$PUTMSG
4459         output to fill exception message field for formally special handled
4460         condtions, in particular HPARITH to provide more clues about cause and
4461         location then raised from the translated image.
4462
4463 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4464
4465         * sem_ch13.adb (Analyze_Aspect_Specifications): For a Pre/Post
4466         aspect that applies to a library subprogram, prepend corresponding
4467         pragma to the Pragmas_After list, in order for split AND THEN
4468         sections to be processed in the expected order.
4469
4470 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4471
4472         * exp_prag.adb (Expand_Pragma_Check): The statements generated
4473         for the pragma must have the sloc of the pragma, not the
4474         sloc of the condition, otherwise this creates anomalies in the
4475         generated debug information that confuse coverage analysis tools.
4476
4477 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4478
4479         * sem_ch13.adb: Minor reformatting.
4480
4481 2013-01-02  Arnaud Charlet  <charlet@adacore.com>
4482
4483         * g-excact.ads (Core_Dump): Clarify that this subprogram does
4484         not dump cores under Windows.
4485
4486 2013-01-02  Ed Schonberg  <schonberg@adacore.com>
4487
4488         * sem_ch8.adb (Analyze_Primitive_Renamed_Operation): The prefixed
4489         view of a subprogram has convention Intrnnsic, and a renaming
4490         of a prefixed view cannot be the prefix of an Access attribute.
4491
4492 2013-01-02  Robert Dewar  <dewar@adacore.com>
4493
4494         * restrict.adb: Minor reformatting.
4495
4496 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4497
4498         * exp_prag.adb: Minor reformatting.
4499
4500 2013-01-02  Ed Schonberg  <schonberg@adacore.com>
4501
4502         * sem_ch12.adb (Get_Associated_Node): If the node is an
4503         identifier that denotes an unconstrained array in an object
4504         declaration, it is rewritten as the name of an anonymous
4505         subtype whose bounds are given by the initial expression in the
4506         declaration. When checking whether that identifier is global
4507         reference, use the original node, not the local generated subtype.
4508
4509 2013-01-02  Olivier Hainque  <hainque@adacore.com>
4510
4511         * tracebak.c: Revert previous change, incomplete.
4512
4513 2013-01-02  Ed Schonberg  <schonberg@adacore.com>
4514
4515         * sem_ch13.adb (Analyze_Aspect_Specifications): If the aspect
4516         appears on a subprogram body that acts as a spec, place the
4517         corresponding pragma in the declarations of the body, so that
4518         e.g. pre/postcondition checks can be generated appropriately.
4519
4520 2013-01-02  Robert Dewar  <dewar@adacore.com>
4521
4522         * sem_ch3.adb: Minor reformatting and code reorganization.
4523
4524 2013-01-02  Vincent Celier  <celier@adacore.com>
4525
4526         * switch-m.adb (Normalize_Compiler_Switches): Record the
4527         complete switch -fstack-check=specific instead of its shorter
4528         alias -fstack-check.
4529
4530 2013-01-02  Ed Schonberg  <schonberg@adacore.com>
4531
4532         * sem_ch3.adb (Derive_Subprogram): Enforce RM 6.3.1 (8):
4533         if the derived type is a tagged generic formal type with
4534         unknown discriminants, the inherited operation has convention
4535         Intrinsic. As such, the 'Access attribute cannot be applied to it.
4536
4537 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4538
4539         * sem_attr.adb: Minor reformatting.
4540
4541 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4542
4543         * par_sco.adb: Add SCO generation for S of protected types and
4544         single protected object declarations.
4545
4546 2013-01-02  Robert Dewar  <dewar@adacore.com>
4547
4548         * sem_eval.adb, osint.ads: Minor reformatting.
4549
4550 2013-01-02  Hristian Kirtchev  <kirtchev@adacore.com>
4551
4552         * sem_prag.adb (Analyze_Pragma): Check the legality of pragma Assume.
4553
4554 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4555
4556         * sem_eval.adb (Compile_Time_Compare): For static operands, we
4557         can perform a compile time comparison even if in preanalysis mode.
4558
4559 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4560
4561         * par_sco.adb (SCO_Record): Always use
4562         Traverse_Declarations_Or_Statements to process the library level
4563         declaration, so that SCOs are properly generated for its aspects.
4564
4565 2013-01-02  Thomas Quinot  <quinot@adacore.com>
4566
4567         * scos.ads (In_Decision): Add missing entry for 'a'.
4568         * sem_prag.adb (Analyze_Pragma, case pragma Check): Omit
4569         call to Set_SCO_Pragma_Enabled for Invariant and Predicate.
4570         * sem_ch13.adb: Minor comment update.
4571 \f
4572 Copyright (C) 2013 Free Software Foundation, Inc.
4573
4574 Copying and distribution of this file, with or without modification,
4575 are permitted in any medium without royalty provided the copyright
4576 notice and this notice are preserved.