OSDN Git Service

2011-08-30 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-08-30  Robert Dewar  <dewar@adacore.com>
2
3         * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
4
5 2011-08-30  Yannick Moy  <moy@adacore.com>
6
7         * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
8         exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
9         exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
10         gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
11         Revert change which introduced files for "light"
12         expansion, to be replaced by a single file for Alfa expansion.
13
14 2011-08-30  Robert Dewar  <dewar@adacore.com>
15
16         * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
17         Minor code reorg/reformatting.
18
19 2011-08-30  Yannick Moy  <moy@adacore.com>
20
21         * opt.adb, opt.ads (Full_Expander_Active): New function defines a
22         common shorthand for (Expander_Active and not ALFA_Mode) that can be
23         used for testing full expansion, that is active expansion not in the
24         reduced mode for Alfa
25         * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
26         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
27         of the verbose (Expander_Active and not ALFA_Mode)
28
29 2011-08-30  Tristan Gingold  <gingold@adacore.com>
30
31         * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
32         s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
33         s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
34         Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
35
36 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
37
38         * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
39         access conversions to check that the conversion is a rewritten node,
40         rather than just having Comes_From_Source set to False, which wasn't
41         sufficient.
42
43 2011-08-30  Robert Dewar  <dewar@adacore.com>
44
45         * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
46         g-socket.ads: Minor reformatting.
47
48 2011-08-30  Thomas Quinot  <quinot@adacore.com>
49
50         * sem_util.adb: Minor reformatting.
51
52 2011-08-30  Tristan Gingold  <gingold@adacore.com>
53
54         * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
55         to be compliant with the ABI.
56
57 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
58
59         * sem_ch12.adb (Check_Private_View): Exchange the private and full view
60         of a designated type when the related access type is an actual in an
61         instance. This ensures that the full view of designated type is
62         available when inside the body of the instance.
63
64 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
65
66         * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
67         in a position to be modified, a slice is treated like an indexed
68         component.
69
70 2011-08-30  Thomas Quinot  <quinot@adacore.com>
71
72         * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
73         field tv_sec in struct timeval.
74
75 2011-08-30  Yannick Moy  <moy@adacore.com>
76
77         * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
78         blocks of code doing full expansion, previously only guarded by
79         Expander_Active, by anding the test that ALFA_Mode is not set
80
81 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
82
83         * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
84         add the function to the list of private dependents, for subsequent
85         legality check on Taft amendment types.
86         * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
87         Private_Dependents, as for other incomplete types.
88         * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
89         Taft-amendment type is used as the return type of a function.
90
91 2011-08-30  Javier Miranda  <miranda@adacore.com>
92
93         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
94         which emits an error by a call to a new routine which report the error.
95         * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
96         entity does not cover an existing interface.
97         * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
98         code.
99         * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
100         protected procedures or entries whose mode is not conformant.
101         (Check_Synchronized_Overriding): Code cleanup: replace code which emits
102         an error by a call to a new routine which report the error.
103
104 2011-08-30  Robert Dewar  <dewar@adacore.com>
105
106         * gnat_rm.texi: Minor change.
107         * exp_attr_light.adb: Minor reformatting.
108
109 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
110
111         * sem_ch3.adb: Patch inheritance of aspects in
112         Complete_Private_Subtype, to avoid infinite loop.
113
114 2011-08-30  Javier Miranda  <miranda@adacore.com>
115
116         * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
117         been reported and a subprogram covering an interface primitive is not
118         found then skip generating the internal entity. Done to avoid crashing
119         the frontend.
120         (Check_Abstract_Overriding): Change text of error of wrong formal of
121         protected subprogram or entry. Done for consistency to emit exactly the
122         same error reported by Check_Synchronized_Overriding. In addition, the
123         error is restricted to protected types (bug found working on AI05-0090)
124
125 2011-08-30  Yannick Moy  <moy@adacore.com>
126
127         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
128         expansion in Alfa mode.
129         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
130         * exp_light.adb, exp_light.ads: New package defining light expansion.
131         * expander.adb (Expand): Call light expansion in Alfa mode
132         * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
133         constructs.
134         * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
135         constructs.
136         * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
137         * gnat1drv.adb (Adjust_Global_Switches): Comment
138
139 2011-08-30  Yannick Moy  <moy@adacore.com>
140
141         * lib-xref-alfa.adb: Minor refactoring.
142
143 2011-08-30  Yannick Moy  <moy@adacore.com>
144
145         * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
146         mode.
147         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
148         expansion in Alfa mode.
149         * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
150         mode.
151
152 2011-08-30  Robert Dewar  <dewar@adacore.com>
153
154         * debug_a.adb: Update comment.
155
156 2011-08-30  Robert Dewar  <dewar@adacore.com>
157
158         * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
159         sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
160         exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
161         sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
162
163 2011-08-30  Robert Dewar  <dewar@adacore.com>
164
165         * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
166         volatile.
167
168 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
169
170         * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
171         Build_Finalization_Master by supplying an insertion node and enclosing
172         scope. In its old version, the call did not generate a finalization
173         master.
174         (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
175         recognize anonymous access-to-controlled components. Rewrite the
176         machinery which creates finalization masters to service anonymous
177         access-to-controlled components of a record type. In its current state,
178         only one heterogeneous master is necessary to handle multiple anonymous
179         components.
180         (Freeze_Type): Comment reformatting.
181         * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
182         RE_Unit_Table.
183         * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
184         associates TSS primitive Finalize_Address with either the master itself
185         or with the internal hash table depending on the mode of operation of
186         the master.
187
188 2011-08-30  Javier Miranda  <miranda@adacore.com>
189
190         * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
191         interface type then do not generate code to compare this component.
192         Required since they have no components and their equality operator is
193         abstract.
194
195 2011-08-30  Steve Baird  <baird@adacore.com>
196
197         * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
198         of a saooaaat (i.e, a stand-alone object of an anonymous access type),
199         returns the (static) accessibility level of the object. Otherwise, the
200         same as Type_Access_Level.
201         (Dynamic_Accessibility_Level): New function; given an expression which
202         could occur as the rhs of an assignment to a saooaaat (i.e., an
203         expression of an access-to-object type), return the new value for the
204         saooaaat's associated Extra_Accessibility object.
205         (Effective_Extra_Accessibility): New function; same as
206         Einfo.Extra_Accessibility except that object renames are looked through.
207         * sem_util.adb 
208         (Deepest_Type_Access_Level): New function; see sem_util.ads description.
209         (Dynamic_Accessibility_Level): New function; see sem_util.ads
210         description.
211         (Effective_Extra_Accessibility): New function; see sem_util.ads
212         description.
213         * einfo.ads (Is_Local_Anonymous_Access): Update comments.
214         (Extra_Accessibility): Update comments.
215         (Init_Object_Size_Align): New procedure; same as Init_Size_Align
216         except RM_Size field (which is only for types) is unaffected.
217         * einfo.adb
218         (Extra_Accessibility): Expand domain to allow objects, not just formals.
219         (Set_Extra_Accessibility): Expand domain to allow objects, not just
220         formals.
221         (Init_Size): Add assertion that we are not trashing the
222         Extra_Accessibility attribute of an object.
223         (Init_Size_Align): Add assertion that we are not trashing the
224         Extra_Accessibility attribute of an object.
225         (Init_Object_Size_Align): New procedure; see einfo.ads description.
226         * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
227         differently for the type of a (non-library-level) saooaaat depending
228         whether Ada_Version < Ada_2012. This is the only point where Ada_Version
229         is queried in this set of changes - everything else (in particular,
230         setting of the Extra_Accessibility attribute in exp_ch3.adb) is
231         driven off of the setting of the Is_Local_Anonymous_Access attribute.
232         The special treatment of library-level saooaaats is an optimization,
233         not required for correctnesss. This is based on the observation that the
234         Ada2012 rules (static and dynamic) for saooaaats turn out to be
235         equivalent to the Ada2005 rules in the case of a library-level saooaaat.
236         * exp_ch3.adb
237         (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
238         false for the type of a saooaaat, declare and initialize its
239         accessibility level object and set the Extra_Accessibility attribute
240         of the saooaaat to refer to this object.
241         * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
242         * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
243         calls to Effective_Extra_Accessibility in order to support
244         renames of saooaaats.
245         (Expand_N_Type_Conversion): Add new local function,
246         Has_Extra_Accessibility, and call it when determining whether an
247         accessibility check is needed.
248         It returns True iff Present (Effective_Extra_Accessibility (Id)) would
249         evaluate to True (without raising an exception).
250         * exp_ch5.adb
251         (Expand_N_Assignment_Statement): When assigning to an Ada2012
252         saooaaat, update its associated Extra_Accessibility object (if
253         it has one). This includes an accessibility check.
254         * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
255         a saooaaat, update its Extra_Accessibility object too (if it
256         has one).
257         (Expand_Call): Replace a couple of calls to Type_Access_Level
258         with calls to Dynamic_Access_Level to handle cases where
259         passing a literal (any literal) is incorrect.
260         * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
261         checks associated with "Saooaat := Some_Object'Access;"; this must
262         be rejected if Some_Object is declared in a more nested scope
263         than Saooaat.
264         * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
265         assignment to a saooaaat even if Is_Local_Anonymous_Access
266         returns False for its type (indicating a 2012-style saooaaat).
267         * sem_ch8.adb
268         (Analyze_Object_Renaming): Replace a call to Init_Size_Align
269         (which is only appropriate for objects, not types) with a call
270         of Init_Object_Size_Align in order to avoid trashing the
271         Extra_Accessibility attribute of a rename (the two attributes
272         share storage).
273         * sem_res.adb
274         (Valid_Conversion) Replace six calls to Type_Access_Level with
275         calls to Deepest_Type_Access_Level. This is a bit tricky. For an
276         Ada2012 non-library-level saooaaat, the former returns library level
277         while the latter returns the (static) accessibility level of the
278         saooaaat. A type conversion to the anonymous type of a saooaaat
279         can only occur as part of an assignment to the saooaaat, so we
280         know that such a conversion must be in a lhs context, so Deepest
281         yields the result that we need. If such a conversion could occur,
282         say, as the operand of an equality operator, then this might not
283         be right. Also add a test so that static accessibilty checks are
284         performed for converting to a saooaaat's type even if
285         Is_Local_Anonymous_Access yields False for the type.
286
287 2011-08-30  Javier Miranda  <miranda@adacore.com>
288
289         * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
290         controls generation of a warning associated with late declaration of
291         dispatching functions. Required to avoid generating spurious
292         warnings.
293
294 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
295
296         * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
297         return object has an anonymous access type and the function's type is
298         a named access type.
299         * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
300         conversions on implicit conversions, since such conversions can occur
301         for anonymous access cases due to expansion. Issue error for attempt
302         to rename an anonymous expression as an object of a named access type.
303         * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
304         to indicate whether this function should report errors on invalid
305         conversions.
306         * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
307         the expression is of an anonymous access type and the expected type is
308         a named general access type, rewrite the expression as a type
309         conversion, unless this is an expression of a membership test.
310         (Valid_Conversion.Error_Msg_N): New procedure that conditions the
311         calling of Error_Msg_N on new formal Report_Errs.
312         (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
313         calling of Error_Msg_NE on new formal Report_Errs.
314         (Valid_Conversion): Move declaration of this function to the package
315         spec, to allow calls from membership test processing. For Ada 2012,
316         enforce legality restrictions on implicit conversions of anonymous
317         access values to general access types, disallowing such conversions in
318         cases where the expression has a dynamic accessibility level (access
319         parameters, stand-alone anonymous access objects, or a component of a
320         dereference of one of the first two cases).
321         * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
322         in the context of a named general access expected type.
323         * exp_ch4.adb Add with and use of Exp_Ch2.
324         (Expand_N_In): Add processing for membership tests applied to
325         expressions of an anonymous access type. First, Valid_Conversion is
326         called to check whether the test is statically False, and then the
327         conversion is expanded to test that the expression's accessibility
328         level is no deeper than that of the tested type. In the case of
329         anonymous access-to-tagged types, a tagged membership test is applied
330         as well.
331         (Tagged_Membership): Extend to handle access type cases, applying the
332         test to the designated types.
333         * exp_ch6.adb (Expand_Call): When creating an extra actual for an
334         accessibility level, and the actual is a 'Access applied to a current
335         instance, pass the accessibility level of the type of the current
336         instance rather than applying Object_Access_Level to the prefix. Add a
337         ??? comment, since this level isn't quite right either (will eventually
338         need to pass an implicit level parameter to init procs).
339
340 2011-08-30  Bob Duff  <duff@adacore.com>
341
342         * s-taskin.ads: Minor comment fix.
343
344 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
345
346         * sem_res.adb (Check_Parameterless_Call): If the node is a selected
347         component and the selector is a dispatching operation, check if it is
348         a prefixed call before rewriting as a parameterless function call.
349
350 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
351
352         * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
353         tsystem.h into $(RTSDIR) instead of rts.
354
355 2011-08-29  Robert Dewar  <dewar@adacore.com>
356
357         * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
358         reformatting.
359         * gcc-interface/Make-lang.in: Update dependencies.
360
361 2011-08-29  Yannick Moy  <moy@adacore.com>
362
363         * alfa.ads (Name_Of_Heap_Variable): New constant name.
364         * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
365         table to hold dereferences.
366         (Add_ALFA_Xrefs): Take into account dereferences as special
367         reads/writes to the variable "HEAP".
368         (Enclosing_Subprogram_Or_Package): Move subprogram here.
369         (Generate_Dereference): New procedure to store a read/write dereferencew
370         in the table Drefs.
371         * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
372         the special "HEAP" var.
373         * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
374         in ALFA mode.
375         * sem_util.adb (Note_Possible_Modification): Store write dereference
376         in ALFA mode.
377
378 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
379
380         * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
381         ensures that the level of the subpool access type is not deeper than
382         that of the pool object.
383         * sem_util.adb (Object_Access_Level): Expand to handle defining
384         identifiers.
385         * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
386         subpool handle name of a rewritten allocator.
387
388 2011-08-29  Robert Dewar  <dewar@adacore.com>
389
390         * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
391
392 2011-08-29  Thomas Quinot  <quinot@adacore.com>
393
394         * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
395         values, we generate multiple triples of parameters in the TypeCode.
396         Bump Choice_Index for each such triple so that a subsequent default
397         choice is associated with the correct index in the typecode.
398
399 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
400
401         * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
402         container.
403         (First, Last): Handle properly an iterator over a null container.
404
405 2011-08-29  Bob Duff  <duff@adacore.com>
406
407         * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
408         processing if we run across a node with no Scope. This can happen if
409         we're with-ing an library-level instance, and that instance got errors
410         that caused "instantiation abandoned".
411         * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
412         an exception instead of using Assert, so it won't go into an infinite
413         loop, even when assertions are turned off.
414
415 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
416
417         * a-coorse.adb: Proper handling of empty ordered sets.
418
419 2011-08-29  Johannes Kanig  <kanig@adacore.com>
420
421         * debug.adb: Add comments.
422
423 2011-08-29  Thomas Quinot  <quinot@adacore.com>
424
425         * a-except.adb, a-except-2005.adb: Minor comment rewording and
426         reformatting.
427
428 2011-08-29  Yannick Moy  <moy@adacore.com>
429
430         * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
431         declaration for Itypes in Alfa mode.
432
433 2011-08-29  Robert Dewar  <dewar@adacore.com>
434
435         * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
436         a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
437         a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
438         reformatting.
439
440 2011-08-29  Tristan Gingold  <gingold@adacore.com>
441
442         * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
443         package spec.
444         * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
445         * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
446         while raising PE.
447
448 2011-08-29  Robert Dewar  <dewar@adacore.com>
449
450         * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
451
452 2011-08-29  Javier Miranda  <miranda@adacore.com>
453
454         * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
455         renamings of formal subprograms when the actual for a formal type is
456         class-wide.
457
458 2011-08-29  Matthew Heaney  <heaney@adacore.com>
459
460         * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
461         to Target.
462
463 2011-08-29  Matthew Heaney  <heaney@adacore.com>
464
465         * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
466         components of record type.
467         * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
468         to Target.
469
470 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
471
472         * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
473         a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
474         container packages.
475
476 2011-08-29  Robert Dewar  <dewar@adacore.com>
477
478         * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
479         reformatting.
480
481 2011-08-29  Matthew Heaney  <heaney@adacore.com>
482
483         * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
484         components of record type.
485
486 2011-08-29  Bob Duff  <duff@adacore.com>
487
488         * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
489         by the termination handler.
490
491 2011-08-29  Yannick Moy  <moy@adacore.com>
492
493         * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
494         created in Alfa mode, instead of inserting artificial declarations of
495         non-Itypes in the tree.
496         * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
497         know if an Itype has a corresponding declaration, as defined in
498         itypes.ads.
499
500 2011-08-29  Yannick Moy  <moy@adacore.com>
501
502         * gnat1drv.adb: Minor rewrite.
503
504 2011-08-29  Bob Duff  <duff@adacore.com>
505
506         * s-tasuti.adb (Make_Passive): Work around race condition in
507         Make_Independent, which can cause Wait_Count to be zero. So instead of
508         asserting that Wait_Count > 0, and then decrementing it, decrement it
509         only if Wait_Count > 0.
510         * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
511         should be nonnegative, so declare them Natural instead of Integer.
512
513 2011-08-29  Robert Dewar  <dewar@adacore.com>
514
515         * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
516         sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
517         a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
518         a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
519         exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
520
521 2011-08-29  Tristan Gingold  <gingold@adacore.com>
522
523         * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
524
525 2011-08-29  Vadim Godunko  <godunko@adacore.com>
526
527         * s-parint.ads: Minor comment clarification.
528
529 2011-08-29  Vincent Celier  <celier@adacore.com>
530
531         * prj.adb (Initialize): Make sure that new reserved words after Ada 95
532         may be used as identifiers.
533
534 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
535
536         * a-coinho.ads: Minor reformating.
537
538 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
539
540         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
541         container of a derived type.
542
543 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
544
545         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
546         a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
547
548 2011-08-29  Pascal Obry  <obry@adacore.com>
549
550         * exp_disp.adb: Minor comment fix.
551         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
552         to avoid warnings when compiling with -Wall.
553         (Make_Disp_Conditional_Select_Body): Likewise.
554         (Make_Disp_Timed_Select_Body): Likewise.
555
556 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
557
558         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
559         an entity name, generate reference for it.
560
561 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
562
563         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
564         iterator form.
565         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
566         the class-wide type.
567         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
568
569 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
570
571         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
572         subtype for an object whose type is an unconstrained union.
573
574 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
575
576         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
577         is allowed in a component definition, by AI95-406.
578
579 2011-08-29  Matthew Heaney  <heaney@adacore.com>
580
581         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
582
583 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
584
585         * a-except-2005.adb: Alphabetize all routines.
586         (Triggered_By_Abort): New routine.
587         * a-except-2005.ads (Triggered_By_Abort): New routine.
588         * a-except.adb Alphabetize all routines.
589         (Triggered_By_Abort): New routine.
590         * a-except.ads (Triggered_By_Abort): New routine.
591         * exp_ch7.adb: Update all comments involving the detection of aborts in
592         finalization code.
593         (Build_Object_Declarations): Do not generate code to detect the
594         presence of an abort at the start of finalization code, use a runtime
595         routine istead.
596         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
597         RE_Unit_Table.
598         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
599         allocate a task on a subpool.
600         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
601         The flag disables all actions related to the maintenance of
602         Finalize_Address_Table when subpools are not in use.
603         (Allocate_Any_Controlled): Signal the machinery that subpools are in
604         use.
605         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
606         performs costly task locking when subpools are not in use.
607
608 2011-08-29  Yannick Moy  <moy@adacore.com>
609
610         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
611         types and dispatching calls in Alfa mode.
612         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
613         correspondance between body and spec scopes, to reuse utility functions
614         (Traverse_Declarations_Or_Statements): Protect access to body for stub
615         by testing the presence of the library unit for the body
616         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
617         mode the expansion of accept statements is skipped
618         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
619         the unique entity corresponding to the one returned by
620         Unique_Defining_Entity applied to the enclosing declaration of the
621         argument.
622
623 2011-08-29  Bob Duff  <duff@adacore.com>
624
625         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
626         gdb when x is not a node (it can be a node list, name_id, etc). pp is
627         an alias for pn. ppp is an alias for pt.
628
629 2011-08-29  Javier Miranda  <miranda@adacore.com>
630
631         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
632         aggregate to take a consistent decision on the need to convert into
633         assignments aggregates that initialize constant objects.
634
635 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
636
637         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
638         Build_Allocate_Deallocate_Proc in order to handle allocation of
639         non-controlled objects on subpools.
640         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
641         to be end-user visible.
642         * s-finmas.adb: Add with and use clause for System.HTable.
643         Add an instantiation of Simple_HTable which provides a mapping between
644         the address of a controlled object and the corresponding
645         Finalize_Address used to clean up the object. The table is used when a
646         master is operating in heterogeneous mode.
647         (Attach): Explain why the input node is not verified on being already
648         attached.
649         (Delete_Finalize_Address): New routine.
650         (Detach): Add pragma Assert which ensures that a node is already
651         attached.
652         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
653         since nodes are no longer removed on traversal. Explain why node
654         detachment is undesirable in this case.
655         (Get_Finalize_Address): New routine.
656         (Hash): New routine.
657         (Is_Empty_List): Removed.
658         (pm): Renamed to Print_Master. Add output for discriminant
659         Is_Homogeneous.
660         Comment reformatting.
661         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
662         * s-finmas.ads: Various comments additions / improvements.
663         Type Finalization_Master has a discriminant which determines the mode of
664         operation.
665         (Delete_Finalize_Address): New routine.
666         (Get_Finalize_Address): New routine.
667         (pm): Renamed to Print_Master.
668         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
669         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
670         use clause for System.IO.
671         (Allocate_Any_Controlled): Add machinery to set TSS primitive
672         Finalize_Address depending on the mode of allocation and the mode of
673         the master.
674         (Deallocate_Any_Controlled): Remove the relation pair object -
675         Finalize_Address regardless of the master mode. Add comment explaining
676         the reason.
677         (Detach): Ensure that fields Prev and Next are null after detachment.
678         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
679         scheme to check whether the list of subpools is empty. There is no
680         longer need to store the next subpool or advance the current pointer.
681         (Is_Empty_List): New routine.
682         (Print_Pool): New routine.
683         (Print_Subpool): New routine.
684         * s-stposu.ads: Various comments additions / improvements.
685         Field Master of type Root_Subpool is now a heterogeneous collection.
686         (Print_Pool): New routine.
687         (Print_Subpool): New routine.
688
689 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
690
691         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
692         forms, using aspects of container types.
693         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
694         Has_Implicit_Dereference flags, that may be set on the partial view.
695         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
696         container type with an indexing aspect.
697         (Analyze_Quantified_Expression): Analyze construct with expansion
698         disabled, because it will be rewritten as a loop during expansion.
699         (Try_Container_Indexing): The prefix itself may be a container type
700         with an indexing aspect, as with a vector of vectors.
701         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
702         the original doamin of iteration, for name capture.
703         (Analyze_Iterator_Specification): If the domain is an expression that
704         needs finalization, create a separate declaration for it.
705         For an iterator with "of" retrieve default iterator info from aspect of
706         container type. For "in" iterator, retrieve type of Iterate function.
707         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
708         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
709         analysis, to prevent spurious errors about late attributes.
710         * sprint.adb: Handle quantified expression with either loop or iterator
711         specification.
712         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
713         iterator.
714
715 2011-08-29  Vincent Celier  <celier@adacore.com>
716
717         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
718         Binder or Linker of the main project file.
719
720 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
721
722         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
723         unit.
724
725 2011-08-29  Yannick Moy  <moy@adacore.com>
726
727         * exp_ch9.adb: Partial revert of previous change for Alfa mode
728
729 2011-08-29  Yannick Moy  <moy@adacore.com>
730
731         * exp_ch11.adb: Minor expansion of comment.
732
733 2011-08-29  Yannick Moy  <moy@adacore.com>
734
735         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
736
737 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
738
739         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
740         interpretation, set the type before resolving the operands, because
741         legality checks on an exponention operand need to know the type of the
742         context.
743
744 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
745
746         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
747         cleanups on a master if the instance is within a generic unit.
748         Complement to the corresponding fix to inline.adb for K520-030.
749
750 2011-08-29  Tristan Gingold  <gingold@adacore.com>
751
752         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
753         occurrence.
754         * exp_intr.adb: Minor comment fix.
755
756 2011-08-29  Bob Duff  <duff@adacore.com>
757
758         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
759         Delay_Required was used as an uninitialized variable.
760
761 2011-08-29  Robert Dewar  <dewar@adacore.com>
762
763         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
764         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
765         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
766
767 2011-08-29  Thomas Quinot  <quinot@adacore.com>
768
769         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
770         Remove unused variables.
771
772 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
773
774         * sem_res.adb: Remove Build_Explicit_Dereference.
775         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
776         from sem_res.adb, used in analysis of additional constructs.
777         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
778         expansion of iterators.
779         (Is_Object_Reference): Recognize variables rewritten as explicit
780         dereferences in Ada2012.
781         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
782         Reversible_Iterator names, for expansion of Ada2012 iterators.
783         * aspects.ads, aspects.adb (Find_Aspect): Utility.
784         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
785         linked list container.
786         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
787         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
788
789 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
790
791         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
792         containers.
793
794 2011-08-29  Vincent Celier  <celier@adacore.com>
795
796         * make.adb (Gnatmake): Get the maximum number of simultaneous
797         compilation processes after the Builder switches has been scanned, as
798         there may include -jnn.
799
800 2011-08-29  Matthew Heaney  <heaney@adacore.com>
801
802         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
803
804 2011-08-29  Tristan Gingold  <gingold@adacore.com>
805
806         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
807         GNAT_DRIVER_COMMAND_LINE to 255.
808
809 2011-08-29  Pascal Obry  <obry@adacore.com>
810
811         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
812         reformatting and style fix (class attribute casing).
813
814 2011-08-29  Yannick Moy  <moy@adacore.com>
815
816         * exp_ch11.adb: Yet another case where expansion should be common
817         between CodePeer and Alfa.
818
819 2011-08-29  Yannick Moy  <moy@adacore.com>
820
821         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
822
823 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
824
825         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
826         incomplete type and its completion match.
827
828 2011-08-29  Yannick Moy  <moy@adacore.com>
829
830         * exp_ch13.adb: Adjust previous change.
831
832 2011-08-29  Robert Dewar  <dewar@adacore.com>
833
834         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
835         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
836         Minor reformatting.
837
838 2011-08-29  Emmanuel Briot  <briot@adacore.com>
839
840         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
841         initialize aggregated projects.
842
843 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
844
845         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
846         depth of candidates to resolve a potentially spurious ambiguity between
847         two visible subprograms.
848
849 2011-08-29  Yannick Moy  <moy@adacore.com>
850
851         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
852         Requires/Ensures.
853         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
854         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
855         Requires/Ensures.
856
857 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
858
859         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
860         Add comment.
861
862 2011-08-29  Thomas Quinot  <quinot@adacore.com>
863
864         * sem_res.adb: Minor reformatting.
865
866 2011-08-29  Johannes Kanig  <kanig@adacore.com>
867
868         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
869         mode.
870         * gnat1drv.adb (Adjust_Global_Switches): Set
871         Use_Expressions_With_Actions to False in ALFA mode.
872         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
873         ALFA mode.
874
875 2011-08-29  Yannick Moy  <moy@adacore.com>
876
877         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
878         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
879         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
880         tagged types and dispatching calls in Alfa mode.
881
882 2011-08-29  Javier Miranda  <miranda@adacore.com>
883
884         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
885         we do not report an error on an Empty node.
886
887 2011-08-29  Geert Bosch  <bosch@adacore.com>
888
889         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
890         a-nlrear.o and a-nurear.o.
891
892 2011-08-29  Robert Dewar  <dewar@adacore.com>
893
894         * freeze.adb: Minor code reorganization.
895         Minor reformatting.
896         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
897         sem_ch6.adb: Minor reformatting
898
899 2011-08-29  Tristan Gingold  <gingold@adacore.com>
900
901         * s-except.ads, s-except.adb: Provide dummy body.
902
903 2011-08-29  Yannick Moy  <moy@adacore.com>
904
905         * sem_warn.adb (Within_Postcondition): Take into account the case of
906         an Ensures component in a Test_Case.
907
908 2011-08-29  Tristan Gingold  <gingold@adacore.com>
909
910         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
911         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
912         System_Exceptions_Debug
913         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
914         * a-except.adb: With and use System.Exceptions_Debug instead of
915         System.Exceptions.
916         * a-except-2005.adb: Likewise.
917         * s-assert.adb: Likewise.
918         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
919         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
920         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
921         s-excdeb. Update dependencies.
922         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
923         as these no longer need external libraries.
924
925 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
926
927         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
928         exponentiation operator on universal values in a context that requires
929         a fixed-point type.
930
931 2011-08-29  Tristan Gingold  <gingold@adacore.com>
932
933         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
934         before calling notify_handled_exception.
935         * a-exextr.adb: Fix comment.
936
937 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
938
939         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
940         Finalize_Address of the access type's finalization master.
941         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
942         access type's finalization master. Add a guard to prevent
943         Associated_Storage_Pool from being set on .NET/JVM.
944         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
945         attribute Finalize_Address of the access type's finalization master.
946         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
947         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
948         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
949         RE_Unit_Table.
950         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
951         use clause for System.IO
952         (Detach): Relax the assertion, to be reinstated later.
953         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
954         Relax the assertion on Finalize_Address, to be reinstated later.
955         (Is_Empty_List): New routine.
956         (pm): New debug routine.
957         (Set_Finalize_Address): New routine.
958         * s-finmas.ads (pm): New debug routine.
959         (Set_Finalize_Address): New routine.
960         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
961
962 2011-08-29  Tristan Gingold  <gingold@adacore.com>
963
964         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
965         Remove convention C.
966
967 2011-08-29  Tristan Gingold  <gingold@adacore.com>
968
969         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
970         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
971         (Finalize_TCB): Remove its finalization.
972         (Initialize): Remove assignment of GET_Exc_Stack_Addr
973         * s-soflin.adb (NT_Exc_Stack): Remove
974         (Get_Exc_Stack_Addr_NT): Likewise.
975         (Get_Exc_Stack_Addr_Soft): Likewise.
976         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
977         (Get_Exc_Stack_Addr): Likewise.
978         (Get_Exc_Stack_Addr_Soft): Likewise
979         * s-taspri-vms.ads (Exc_Stack_T): Remove.
980         (Exc_Stack_Ptr_T): Likewise.
981         (Private_Data): Remove Exc_Stack_Ptr component.
982
983 2011-08-29  Tristan Gingold  <gingold@adacore.com>
984
985         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
986
987 2011-08-29  Tristan Gingold  <gingold@adacore.com>
988
989         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
990
991 2011-08-29  Geert Bosch  <bosch@adacore.com>
992
993         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
994         L2_Norm, Swap_Column): New generic subprograms
995         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
996         L2_Norm, Swap_Column): Implement new subprograms in order to
997         eliminate dependency on BLAS and LAPACK libraries in
998         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
999         version. Forward_Eliminate/Back_Substitute can be used to put a
1000         matrix in row echelon or reduced row echelon form using partial
1001         pivoting.
1002         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
1003         Swap_Column): Instantiate from System.Generic_Array_Operations.
1004         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
1005         (Sqrt): Local function for simple computation of square root without
1006         adding dependencies on Generic_Elementary_Functions.
1007         (Swap): New subprogram to exchange floating point numbers.
1008         (Inverse): Reimplement using Jordan-Gauss elimination.
1009         (Jacobi): New procedure implementing Jacobi's method for computation
1010         of eigensystems, based on Rutishauser's implementation.
1011         (L2_Norm): Implement directly using the inner product.
1012         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
1013         decreasing eigenvalue as required by the Ada RM.
1014         (Swap_Column): New helper procedure for Sort_Eigensystem.
1015         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
1016         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
1017         Sort_Eigensystems.
1018
1019 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1020
1021         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
1022         statements line.
1023
1024 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1025
1026         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
1027         than the current node.
1028         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
1029         Finalization_Master. The list headers have two fields instead of three.
1030         This should fix alignment issue but subpool allocations are now
1031         unusable. Alphabetize subprograms.
1032         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
1033         the size of the header when converting the beginning of the object to
1034         a FM_Node. Set the master's Finalize_Address attribute if not already
1035         set.
1036         (Deallocate_Any_Controlled): Use the offset rather than the size of the
1037         header when converting the beginning of the object to a FM_Node.
1038
1039 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
1040
1041         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
1042         reraise when compiling for CodePeer.
1043
1044 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1045
1046         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
1047         now needed by a-convec.adb. Fix warning.
1048
1049 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1050
1051         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
1052         processing of TSS routine Finalize_Address when compiling in
1053         CodePeer_Mode.
1054
1055 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1056
1057         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
1058         sem_warn.adb: Minor reformatting.
1059
1060 2011-08-29  Emmanuel Briot  <briot@adacore.com>
1061
1062         * prj-conf.adb (Get_Config_Switches): Also collect the list of
1063         languages from aggregated projects.
1064
1065 2011-08-29  Yannick Moy  <moy@adacore.com>
1066
1067         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
1068         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
1069         Traverse_Package_Declaration, Traverse_Subprogram_Body,
1070         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
1071         for stubs are traversed too when parameter is set
1072         (Traverse_All_Compilation_Units): Traverse without going inside stubs
1073         (Traverse_Declarations_Or_Statements): Do the special traversing for
1074         stubs when required.
1075         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
1076         return subprogram or package body from stub.
1077         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
1078         stubs without prior subprogram decl.
1079
1080 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
1081
1082         * gnat_ugn.texi: Fix typo.
1083
1084 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1085
1086         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
1087         which accounts for size vs alignment issues and calculates the size of
1088         the list header.
1089         (Deallocate_Any_Controlled): Ditto.
1090         (Nearest_Multiple_Rounded_Up): New routine.
1091
1092 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1093
1094         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
1095         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
1096         (Set_Exception_Msg): Ditto.
1097         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
1098         Private_Data.
1099         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
1100         Use Save_Occurrence instead of Save_Occurrence_No_Private.
1101         (Raise_With_Msg): Remove Cleanup_Flag.
1102         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
1103         Clean_Flag and Private_Data components.
1104
1105 2011-08-29  Yannick Moy  <moy@adacore.com>
1106
1107         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
1108         in CodePeer mode.
1109         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
1110         of an explicitly declared type, so that the base types of the original
1111         type and this generated type are the same, and a "type" (not a subtype
1112         like previously).
1113         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
1114         small" in Alfa mode, like in CodePeer mode.
1115         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
1116         clauses in Alfa mode.
1117
1118 2011-08-29  Javier Miranda  <miranda@adacore.com>
1119
1120         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
1121         function to the package spec.
1122         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
1123         internally generated bodies of null procedures locate the internally
1124         generated spec enforcing mode conformance.
1125         (Is_Interface_Conformant): Ensure that the controlling formal of the
1126         primitives match.
1127
1128 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1129
1130         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
1131         reject the pragma if it appears to apply to a formal subprogram.
1132
1133 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1134
1135         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
1136         inner expression, to prevent double evaluation.
1137
1138 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1139
1140         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
1141         they were unused.
1142         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
1143         * a-except-2005.adb (Propagate_Exception): Adjust spec.
1144         (Raise_Current_Excep): Adjust call.
1145         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
1146
1147 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1148
1149         * exp_disp.adb: Minor reformatting.
1150
1151 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1152
1153         * a-exexpr.adb (Setup_Exception): Removed.
1154         * a-exexpr-gcc.adb (Setup_Exception): Removed.
1155         * a-except.adb (Exception_Propagation): Removed.
1156         * a-except-2005.adb (Setup_Exception): Removed.
1157         (Reraise): Remove call to Setup_Exception.
1158         (Reraise_Occurrence): Ditto.
1159         (Reraise_Occurrence_Always): Ditto.
1160         (Reraise_Occurrence_No_Defer): Ditto.
1161         (Transfer_Occurrence): Ditto.
1162         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
1163         (Set_Exception_Msg): Ditto.
1164
1165 2011-08-29  Robert Dewar  <dewar@adacore.com>
1166
1167         * a-convec.adb, exp_disp.adb: Minor reformatting.
1168
1169 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1170
1171         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
1172
1173 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
1174
1175         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
1176         Exception_Handlers to No_List instead of Empty_List in the case where
1177         there are no handlers.
1178
1179 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1180
1181         * gcc-interface/gigi.h (enum standard_datatypes): Add
1182         ADT_reraise_zcx_decl
1183         (reraise_zcx_decl): New macro.
1184         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
1185         (gigi): Set reraise_zcx_decl.
1186         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
1187         (gnat_to_gnu): Handle N_Raise_Statement.
1188
1189 2011-08-29  Robert Dewar  <dewar@adacore.com>
1190
1191         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
1192         a-undesu.adb: Minor reformatting.
1193
1194 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1195
1196         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
1197         table, accept an unfrozen untagged component if it is an actual for a
1198         formal incomplete type.
1199         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
1200         provide new iterator forms over vectors.
1201         Introduce type Iterator in package body to implement operations of
1202         Reversible_Iterator interface.
1203         * a-iteint.ads: Make package pure so it is usable with new container
1204         packages, that are categorized Remote_Types.
1205
1206 2011-08-29  Robert Dewar  <dewar@adacore.com>
1207
1208         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
1209
1210 2011-08-29  Bob Duff  <duff@adacore.com>
1211
1212         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
1213         of <>, because this is the routine that checks for dimensionality
1214         errors (for example, for a two-dimensional array, (others => <>) should
1215         be (others => (others => <>)).
1216
1217 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1218
1219         * impunit.adb: Add new run-time units.
1220         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
1221         s-stposu.ads, s-stposu.adb: Code clean up.
1222         Handle protected class-wide or task class-wide types
1223         Handle C/C++/CIL/Java types.
1224         * s-spsufi.adb, s-spsufi.ads: New files.
1225
1226 2011-08-29  Yannick Moy  <moy@adacore.com>
1227
1228         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
1229         library-level subprogram.
1230         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
1231         placement.
1232         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
1233         component.
1234         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
1235         component.
1236         * gnat_rm.texi: Update doc for Test_Case pragma.
1237
1238 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1239
1240         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
1241         convention C.
1242         (GCC_Exception_Access): New type.
1243         (Unwind_DeleteException): New imported procedure
1244         (Foreign_Exception): Import it.
1245         (GNAT_GCC_Exception): Simply have the occurrence inside.
1246         (To_GCC_Exception): New function.
1247         (To_GNAT_GCC_Exception): New function.
1248         (GNAT_GCC_Exception_Cleanup): New procedure..
1249         (Propagate_GCC_Exception): New procedure.
1250         (Reraise_GCC_Exception): New procedure.
1251         (Setup_Current_Excep): New procedure.
1252         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
1253         (Unwind_RaiseException): Ditto.
1254         (Unwind_ForcedUnwind): Ditto.
1255         (Remove): Removed.
1256         (Begin_Handler): Change type of parameter.
1257         (End_Handler): Ditto. Now delete the exception if still present.
1258         (Setup_Key): Removed.
1259         (Is_Setup_And_Not_Propagated): Removed.
1260         (Set_Setup_And_Not_Propagated): Ditto.
1261         (Clear_Setup_And_Not_Propagated): Ditto.
1262         (Save_Occurrence_And_Private): Ditto.
1263         (EID_For): Add 'not null' constraint on parameter.
1264         (Setup_Exception): Does nothing.
1265         (Propagate_Exception): Simplified.
1266         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
1267         re-raise is not expanded anymore.
1268         * s-except.ads (Foreign_Exception): New exception - placeholder for
1269         non Ada exceptions.
1270         * raise-gcc.c (__gnat_setup_current_excep): Declare
1271         (CXX_EXCEPTION_CLASS): Define (not yet used)
1272         (GNAT_EXCEPTION_CLASS): Define.
1273         (is_handled_by): Handle foreign exceptions.
1274         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
1275
1276 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1277
1278         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
1279
1280 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1281
1282         * a-synbar-posix.adb: Minor reformatting.
1283
1284 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1285
1286         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
1287         a-exetim-default.ads (Interrupt_Clocks_Supported,
1288         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
1289         definitions to be compliant with AI-0171. The target systems do not
1290         support separate account for the execution time of interrupt handlers.
1291
1292 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1293
1294         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
1295         in the barrier to put first the easiest to evaluate (and the one which
1296         will be True more often). More efficient.
1297
1298 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
1299
1300         * s-atocou-x86.adb: Fix constraint in machine code insertion.
1301
1302 2011-08-29  Bob Duff  <duff@adacore.com>
1303
1304         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
1305         attributes that are now aspects, as specified by AI05-0229-1.
1306         * sem_ch13.adb (Analyze_Aspect_Specifications,
1307         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
1308         pragmas or attribute references, as appropriate.
1309
1310 2011-08-29  Robert Dewar  <dewar@adacore.com>
1311
1312         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
1313         a-synbar-posix.ads: Minor reformatting.
1314
1315 2011-08-29  Yannick Moy  <moy@adacore.com>
1316
1317         * snames.ads-tmpl: Add name Force.
1318
1319 2011-08-29  Pascal Obry  <obry@adacore.com>
1320
1321         * prj-nmsc.adb: Minor reformatting.
1322
1323 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1324
1325         * a-exetim.ads (Interrupt_Clocks_Supported,
1326         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
1327         definitions to be compliant with AI-0171.
1328
1329 2011-08-29  Robert Dewar  <dewar@adacore.com>
1330
1331         * a-ngelfu.adb: Add comments.
1332
1333 2011-08-29  Geert Bosch  <bosch@adacore.com>
1334
1335         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
1336         the closest machine number to Pi / 2.0.
1337
1338 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1339
1340         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
1341         package Ada.Synchronous_Barriers.
1342         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
1343         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
1344         default implementation using protected objects and another one
1345         a-synbar-posix using POSIX barriers as the underlying support.
1346         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
1347         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
1348         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
1349         Clean up dependencies.
1350         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
1351
1352 2011-08-29  Robert Dewar  <dewar@adacore.com>
1353
1354         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
1355         exp_dist.adb: Minor code reorganization.
1356         Minor reformatting.
1357
1358 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1359
1360         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
1361         primitive operation must support external streaming if it is not a
1362         controlling access result.
1363
1364 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1365
1366         * sinfo.ads, sem_ch7.adb: Minor reformatting.
1367
1368 2011-08-29  Bob Duff  <duff@adacore.com>
1369
1370         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
1371         restriction on allocators, as required by AI05-0013-1.
1372         * restrict.ads: Minor comment fix.
1373
1374 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1375
1376         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
1377         (To_Jmpbuf_Address): Ditto
1378         (builtin_longjmp): Ditto
1379
1380 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1381
1382         * sem_res.adb: Minor reformatting.
1383
1384 2011-08-29  Vincent Celier  <celier@adacore.com>
1385
1386         * make.adb (Gnatmake): Move special processing for VM targets after the
1387         call to Get_Target_Parameters.
1388
1389 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1390
1391         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
1392
1393 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1394
1395         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
1396         where an anonymous access discriminant of a limited designated type
1397         appears in a non-immutably limited discriminated type and issue an
1398         error message. Add local variable Desig_T and replace all occurrences
1399         of Designated_Type.
1400
1401 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1402
1403         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
1404         implementation is compliant to RM D.15(15/2) after the modification
1405         imposed by AI05-0094-1 (binding interpretation).
1406
1407 2011-08-29  Robert Dewar  <dewar@adacore.com>
1408
1409         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
1410         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
1411
1412 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1413
1414         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
1415         the scope name, do not report a missing label as a style violation (it
1416         will be diagnosed as an illegality).
1417         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
1418         variant records: Get_Enum_Lit_From_Pos already returns a usage
1419         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
1420         on Expr in Integer_Literal case so that it can be used by
1421         Build_To_Any_Call.
1422
1423 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1424
1425         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
1426         Adjust comment.
1427         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
1428         (Build_Abort_Block_Handler): New function to build an Abort_Signal
1429         exception handler.
1430         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
1431         Build_Abort_Block_Handler to build the exception handler. Do not
1432         undefer aborts for the Abort_Signal exception handler if back-end
1433         exception mechanism.
1434         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
1435         back_end exceptions for all others and abort_signal.
1436         * s-except.ads (ZCX_By_Default): New constant.
1437         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
1438         (Raise_Exception_Always): Ditto.
1439         (Raise_From_Signal_Handler): Ditto.
1440         (Raise_With_Location_And_Msg): Ditto.
1441         (Raise_With_Msg): Ditto.
1442         (Reraise): Ditto.
1443         (Reraise_Occurence): Ditto.
1444         (Reraise_Occurrence_Always): Ditto.
1445         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
1446         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
1447
1448 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1449
1450         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
1451
1452 2011-08-29  Robert Dewar  <dewar@adacore.com>
1453
1454         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
1455         Minor code reorganization.
1456
1457 2011-08-29  Bob Duff  <duff@adacore.com>
1458
1459         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
1460         2012, not just Ada 2005.
1461
1462 2011-08-29  Vincent Celier  <celier@adacore.com>
1463
1464         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
1465         with a project file or with gprbuid, if -gnatep= is specified, the
1466         builder may need to be invoked with -x.
1467
1468 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1469
1470         * a-exexpr-gcc.adb: Minor comment fix.
1471
1472 2011-08-29  Robert Dewar  <dewar@adacore.com>
1473
1474         * sem_ch8.adb: Minor reformatting.
1475
1476 2011-08-29  Bob Duff  <duff@adacore.com>
1477
1478         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
1479         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
1480         treating "some" as unreserved in earlier Ada versions. This is now
1481         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
1482         rather than Name_Some, since Tok_Some is now recognized as reserved.
1483         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
1484         reserved word.
1485         * scans.ads: Minor comment fixes.
1486         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
1487         for other language versions.
1488         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
1489         treating "some" as unreserved in earlier Ada versions. This is now
1490         handled in Snames.Is_Keyword_Name.
1491         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
1492         Ada 2012.
1493         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
1494         unreserved in earlier Ada versions. This is now handled in
1495         Snames.Is_Keyword_Name.
1496         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
1497         words as for other language versions.
1498         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
1499         Ada 2012, not just Ada 2005.
1500
1501 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1502
1503         * sem_ch13.adb: Additional semantic checks for aspects involved in
1504         iterators.
1505
1506 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1507
1508         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
1509         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
1510         Container parameter.
1511         (Ancestor_Find): ditto.
1512
1513 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1514
1515         * par-endh.adb: Minor reformatting.
1516
1517 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1518
1519         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
1520         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
1521         (Adjust_N_CLeanups_For): Remove.
1522         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
1523         stack is reached.
1524         (Propgate_Exception): Adjust.
1525         * raise-gcc.c: Add a few static/const.
1526         (Adjust_N_Cleanups_For): Remove declaration.
1527         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
1528
1529 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1530
1531         * sem_ch8.adb: Use type of function return when rewriting as object
1532         declaration.
1533
1534 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
1535
1536         * sem_type.adb: Minor reformatting.
1537
1538 2011-08-29  Robert Dewar  <dewar@adacore.com>
1539
1540         * makeutl.adb: Minor reformatting.
1541
1542 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1543
1544         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
1545         function call of a limited type, the expansion of the renaming is
1546         complicated by the presence of various temporaries and subtypes that
1547         capture constraints of the renamed object.
1548         Rewrite node as an object declaration, whose expansion is simpler.
1549         Given that the object is limited there is no copy involved and no
1550         performance hit.
1551
1552 2011-08-29  Robert Dewar  <dewar@adacore.com>
1553
1554         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
1555         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
1556
1557 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1558
1559         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
1560         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
1561         system-linux-hppa.ads, system-linux-s390.ads,
1562         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
1563         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
1564         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
1565         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
1566         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
1567         system-solaris-sparc.ads, system-lynxos-x86.ads,
1568         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
1569         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
1570         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
1571         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
1572         system-vxworks-x86.ads: Remove GCC_ZCX_Support
1573         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
1574         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
1575         * opt.ads: Adjust comment.
1576         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
1577         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
1578         * system.ads: Move GCC_ZCX_Support to obsolete entries.
1579
1580 2011-08-29  Emmanuel Briot  <briot@adacore.com>
1581
1582         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
1583         file name is specified on the gnatmake or gprbuild command line, and
1584         before we search for that file in the project.
1585
1586 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1587
1588         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
1589         used to determine whether a possible interpretation for an overloadable
1590         entity is declared within the current instantiation and should be
1591         included in the candidate set.
1592
1593 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
1594
1595         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
1596
1597 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1598
1599         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
1600         access subtype is access_to_subprogram, when applying checks for
1601         RM 3.10.2 (27).
1602
1603 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1604
1605         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
1606         for sibling when common parent.
1607
1608 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1609
1610         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
1611         "pragma_".
1612
1613 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1614
1615         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
1616         for the return type when in ASIS mode.
1617
1618 2011-08-29  Vincent Celier  <celier@adacore.com>
1619
1620         * make.adb (Gnatmake): Get the default search dirs, then the target
1621         parameters after getting the Builder switches, as the Builder switches
1622         may include --RTS= and that could change the default search dirs.
1623
1624 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1625
1626         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
1627         Make_Final_Call. Move the processing for class-wide types before the
1628         processing for derivations from [Limited_]Controlled.
1629         (Make_Final_Call): Move the processing for class-wide types before the
1630         processing for derivations from [Limited_]Controlled.
1631         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
1632         Add code to account for alignments larger than the list header. Add a
1633         comment illustrating the structure of the allocated object + padding +
1634         header.
1635         (Deallocate_Any_Controlled): Add code to account for alignments larger
1636         than the list header.
1637
1638 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1639
1640         * sinfo.ads, sinfo.adb: New node kind
1641         N_Formal_Incomplete_Type_Definition, related flags.
1642         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
1643         Parse formal incomplete types.
1644         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
1645         sem_ch12.
1646         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
1647         Formal incomplete types do not need completion.
1648         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
1649         Validate_Incomplete_Type_Instance): New procedures to handle formal
1650         incomplete types.
1651         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
1652         that corresponds to a formal incomplete type.
1653         * sprint.adb: Handle formal incomplete type declarations.
1654         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
1655         an insertion point.
1656
1657 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1658
1659         * a-fihema.ads, a-fihema.adb: Unit removed.
1660         * a-undesu.ads, a-undesu.adb: New unit implementing
1661         Ada.Unchecked_Deallocate_Subpool.
1662         * einfo.adb: Remove Associated_Collection from the node usage.
1663         Add Finalization_Master to the node usage.
1664         (Associated_Collection): Removed.
1665         (Finalization_Master): New routine.
1666         (Set_Associated_Collection): Removed.
1667         (Set_Finalization_Master): New routine.
1668         (Write_Field23_Name): Remove Associated_Collection from the output. Add
1669         Finalization_Master to the output.
1670         * einfo.ads: Remove attribute Associated_Collection and its uses in
1671         entities.
1672         Add new attribute Finalization_Master along with its uses in entitites.
1673         (Associated_Collection): Removed along with its pragma import.
1674         (Finalization_Master): New routine along with a pragma import.
1675         (Set_Associated_Collection): Removed along with its pragma import.
1676         (Set_Finalization_Master): New routine along with a pragma import.
1677         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
1678         Build_Finalization_Collection with Build_Finalization_Master.
1679         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
1680         before the bodies of the predefined routines. Add comment explaining
1681         this. Replace call to Build_Finalization_Collection with
1682         Build_Finalization_Master.
1683         (Freeze_Type): Replace call to Build_Finalization_Collection with
1684         Build_Finalization_Master.
1685         (Make_Finalize_Address_Body): Comment reformatting.
1686         (Make_Predefined_Primitive_Specs): Code reformatting.
1687         (Stream_Operation_OK): Update comment mentioning finalization
1688         collections. Replace RE_Finalization_Collection with
1689         RE_Finalization_Master.
1690         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
1691         Associated_Collection with Finalization_Master. Replace call to
1692         Build_Finalization_Collection with Build_Finalization_Master.
1693         (Expand_Allocator_Expression): Replace call to Associated_Collection
1694         with Finalization_Master. Replace call to Set_Associated_Collection with
1695         Set_Finalization_Master. Remove the generation of
1696         Set_Finalize_Address_Ptr.
1697         (Expand_N_Allocator): Replace call to Associated_Collection with
1698         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
1699         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
1700         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
1701         comment on usage. Replace call to Needs_BIP_Collection with
1702         Needs_BIP_Finalization_Master Remplace BIP_Collection with
1703         BIP_Finalization_Master. Update all comments which mention finalization
1704         collections. Replace Associated_Collection with
1705         Finalization_Master. Replace Build_Finalization_Collection with
1706         Build_Finalization_Master.
1707         (BIP_Formal_Suffix): Update BIP_Collection's case.
1708         (Build_Heap_Allocator): Update the related comment. Rename local
1709         variable Collect to Fin_Mas_Id and update its occurrences. Update
1710         comments which mention finalization collections. Replace
1711         Set_Associated_Collection with Set_Finalization_Master.
1712         (Expand_Call): Update the code which detects a special piece of library
1713         code for .NET/JVM.
1714         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
1715         Add_Collection_Actual_To_Build_In_Place_Call with
1716         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
1717         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
1718         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
1719         Add_Collection_Actual_To_Build_In_Place_Call with
1720         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1721         (Make_Build_In_Place_Call_In_Assignment): Replace call to
1722         Add_Collection_Actual_To_Build_In_Place_Call with
1723         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1724         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1725         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
1726         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1727         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
1728         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
1729         Replace call to Set_Associated_Collection with Set_Finalization_Master.
1730         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
1731         Replace the call to Associated_Collection with Finalization_Master.
1732         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
1733         Update the way finalization master names are generated. Update the
1734         retrieval of the correct access type which will carry the pool and
1735         master attributes.
1736         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
1737         (Make_Finalize_Address_Body): Abstract types do not need
1738         Finalize_Address. Code reformatting.
1739         (Make_Finalize_Address_Stmts): Update comment on usage.
1740         (Make_Set_Finalize_Address_Ptr_Call): Removed.
1741         (Process_Declarations): Update comments.
1742         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
1743         Build_Finalization_Master. Update associated comment.
1744         (Make_Set_Finalize_Address_Ptr_Call): Removed.
1745         * exp_ch13.adb: Update comments which mention finalization collections.
1746         (Expand_N_Free_Statement): Replace the call to Associated_Collection
1747         with Finalization_Master.
1748         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
1749         create calls to routines Allocate_Any_Controlled and
1750         Deallocate_Any_Controlled.
1751         (Find_Finalize_Address): New routine.
1752         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
1753         comparison.
1754         (Requires_Cleanup_Actions): Update the comment on freeze node
1755         inspection.
1756         * exp_util.ads: Remove comment on generated code for
1757         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
1758         is better to simply look in the body.
1759         * freeze.adb (Freeze_All): Update the comment of finalization
1760         collections. Replace the call to Associated_Collection with
1761         Finalization_Master. Replace the call to Build_Finalization_Collection
1762         with Build_Finalization_Master.
1763         * impunit.adb: Add a-undesu and s-stposu to the list of units.
1764         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
1765         a-fihema.
1766         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
1767         Ada.Finalization. Add processing for children of System.Storage_Pools.
1768         * rtsfind.ads: Remove the naming of second level children of
1769         Ada.Finalization.
1770         Remove Ada_Finalization_Heap_Management from the list of units.
1771         Remove subtype Ada_Finalization_Child.
1772         Remove the following subprogram entities:
1773         
1774            RE_Allocate
1775            RE_Deallocate
1776            RE_Finalization_Collection
1777            RE_Finalization_Collection_Ptr
1778            RE_Set_Finalize_Address_Ptr
1779         
1780         Add the naming of second level children of System.Storage_Pools.
1781         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
1782         the list of units.
1783         Add subtype System_Storage_Pools_Child.
1784         Add the following subprogram entities to System.Finalization_Masters:
1785         
1786            RE_Finalization_Master
1787            RE_Finalization_Master_Ptr
1788         
1789         Add the following subprogram entities to System.Storage_Pools.Subpools:
1790         
1791            RE_Allocate_Any_Controlled
1792            RE_Deallocate_Any_Controlled
1793            RE_Root_Storage_Pool_With_Subpools
1794            RE_Root_Subpool
1795            RE_Subpool_Handle
1796         
1797         Move the following subprogram entities from
1798         Ada.Finalization.Heap_Management to System.Finalization_Masters:
1799         
1800            RE_Add_Offset_To_Address
1801            RE_Attach
1802            RE_Base_Pool
1803            RE_Detach
1804         
1805         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
1806         Set_Associated_Collection with Set_Finalization_Master.
1807         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
1808         BIP_Finalization_Master is created.
1809         * s-finmas.adb: New unit System.Finalization_Masters.
1810         * s-finmas.ads: New unit System.Finalization_Masters.
1811         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
1812         * s-stposu.ads, s-stposu.adb: New unit implementing
1813         System.Storage_Pools.Subpools.
1814
1815 2011-08-29  Bob Duff  <duff@adacore.com>
1816
1817         * tbuild.adb: Add assertion.
1818
1819 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1820
1821         * s-pooglo.adb: Minor reformatting.
1822
1823 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1824
1825         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
1826         an indexed component of a packed array whose element type is a record
1827         with a representation clause different from that of the right-hand
1828         side, generate a temporary to minimuze the number of bit-field
1829         operations generated.
1830
1831 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1832
1833         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
1834         declarations, and thus are likely insertion points for actions.
1835
1836 2011-08-29  Bob Duff  <duff@adacore.com>
1837
1838         * einfo.ads: Minor comment fix.
1839
1840 2011-08-29  Robert Dewar  <dewar@adacore.com>
1841
1842         * frontend.adb, gnat1drv.adb: Minor reformatting.
1843
1844 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1845
1846         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
1847         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
1848         space in front of the header.
1849
1850 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1851
1852         * frontend.adb (Frontend): Exit after creating Standard package when
1853         -gnatd.H is present.
1854         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
1855         present.
1856
1857 2011-08-29  Robert Dewar  <dewar@adacore.com>
1858
1859         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
1860         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
1861         snames.ads-tmpl: Minor reformatting.
1862
1863 2011-08-29  Philippe Gil  <gil@adacore.com>
1864
1865         * prj.adb (Reset_Units_In_Table): New procedure.
1866         Reset units to avoid access to freed memory.
1867
1868 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1869
1870         * get_scos.adb: When reading a P statement SCO without a pragma name
1871         (from an older ALI file), ensure that the Pragma_Name component is set
1872         to Unknown_Pragma (not left uninitialized).
1873
1874 2011-08-29  Vincent Celier  <celier@adacore.com>
1875
1876         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
1877         modified to compute correctly the object path of a SAL project that is
1878         extending another library project.
1879         (Write_Path_File): New procedure.
1880         * makeutl.ads (Directories): New table moved from Buildgpr
1881         (Get_Directories): New procedure moved from Buildgpr
1882         (Write_Path_File): New procedure
1883         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
1884         paths before binding SALs, instead of Set_Ada_Paths.
1885         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
1886         Prj.
1887         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
1888         (Current_Source_Path_File_Of): New function
1889         (Set_Current_Object_Path_File_Of): New procedure
1890         (Current_Source_Object_File_Of): New function
1891         (Set_Current_Object_Path_File_Of): New procedure
1892         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
1893         (Current_Source_Path_File_Of): New function
1894         (Set_Current_Object_Path_File_Of): New procedure
1895         (Current_Source_Object_File_Of): New function
1896         (Set_Current_Object_Path_File_Of): New procedure
1897
1898 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1899
1900         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
1901         packed entity, use a bit-field assignment only if there is no change of
1902         representation.
1903
1904 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1905
1906         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
1907         Is_RTU instead of using Chars comparisons.
1908
1909 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1910
1911         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
1912         temporary object if the actual is constrained, and the discriminants
1913         read from the stream don't match.
1914
1915 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1916
1917         * sem_attr.adb, exp_attr.adb: Add handling of
1918         Attribute_System_Allocator_Alignment
1919         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
1920         Attribute_System_Allocator_Alignment.
1921         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
1922         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
1923         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
1924         get_target_system_allocator_alignment.
1925
1926 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1927
1928         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1929         dependencies.
1930
1931 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1932
1933         * exp_ch3.adb (In_Runtime): Fix typo.
1934
1935 2011-08-29  Bob Duff  <duff@adacore.com>
1936
1937         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
1938
1939 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1940
1941         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
1942         and a separate tag assignment is generated, ensure that the tag
1943         assignment is analyzed.
1944
1945 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1946
1947         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
1948         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
1949         of statement lists that may contain local declarations.
1950         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
1951         duplicate the triggering statements needed for the expansion of this
1952         construct, when the trigger is a dispatching call to a synchronized
1953         primitive.
1954
1955 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1956
1957         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
1958         * bindgen.adb: Add comments.
1959         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
1960         in CodePeer mode.
1961
1962 2011-08-29  Robert Dewar  <dewar@adacore.com>
1963
1964         * exp_attr.adb: Minor reformatting.
1965         Minor code reorganization and commenting.
1966         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
1967         reformatting.
1968
1969 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1970
1971         * get_scos.adb: Ignore chaining indicators not currently supported
1972         by Ada.
1973
1974 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1975
1976         * system.ads: Minor editing.
1977
1978 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1979
1980         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
1981         CodePeer mode.
1982         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
1983         Attribute_Elab_Subp_Body.
1984         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
1985         * sem_util.adb: Update comments.
1986
1987 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1988
1989         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
1990         pragma name for each SCO statement corresponding to a pragma.
1991
1992 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1993
1994         * opt.ads: Minor editing.
1995
1996 2011-08-29  Yannick Moy  <moy@adacore.com>
1997
1998         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
1999         that only made sense for CodePeer mode.
2000
2001 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
2002
2003         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
2004         which is no longer used.
2005         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
2006         handling of the 64-bit division check.
2007         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
2008         division available.
2009         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
2010         longer used.
2011
2012 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2013
2014         * get_scos.adb: Minor reformatting.
2015
2016 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
2017
2018         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
2019         statement list is wrapped in a block, the block is explicitly analyzed
2020         in order to properly redecorate the entities and create a servicing
2021         finalizer.
2022
2023 2011-08-29  Tristan Gingold  <gingold@adacore.com>
2024
2025         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
2026         (Set_Zero_Cost_Handling): Remove.
2027
2028 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2029
2030         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
2031
2032 2011-08-29  Geert Bosch  <bosch@adacore.com>
2033
2034         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
2035         instruction, as the latter may produce -0.0, which is not a valid VAX
2036         F float number.
2037         (Neg_G): Likewise for VAX F float.
2038
2039 2011-08-29  Robert Dewar  <dewar@adacore.com>
2040
2041         * exp_util.adb: Minor reformatting.
2042
2043 2011-08-29  Yannick Moy  <moy@adacore.com>
2044
2045         * sem_ch3.adb: Minor comment update.
2046
2047 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2048
2049         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
2050         the operand type.
2051
2052 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2053
2054         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
2055         current statement sequence on a generic instantiation or a subprogram
2056         declaration.
2057
2058 2011-08-29  Robert Dewar  <dewar@adacore.com>
2059
2060         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
2061         Minor reformatting.
2062
2063 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
2064
2065         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2066         Correct the check which involves the freeze node of a controlled or
2067         access-to-controlled type.
2068
2069 2011-08-29  Geert Bosch  <bosch@adacore.com>
2070
2071         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
2072         statements.
2073         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
2074         Asm statements.
2075
2076 2011-08-29  Yannick Moy  <moy@adacore.com>
2077
2078         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
2079         for every index type and component type that is not a subtype_mark.
2080         (Process_Subtype): Set Etype of subtype.
2081
2082 2011-08-29  Robert Dewar  <dewar@adacore.com>
2083
2084         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
2085         reorganization.  Minor reformatting.
2086
2087 2011-08-29  Steve Baird  <baird@adacore.com>
2088
2089         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
2090         for CodePeer and ALFA modes.
2091
2092 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2093
2094         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
2095         that comes from an enclosing scope if it is not the renaming of an
2096         actual, to handle properly a spurious ambiguity in an instance.
2097
2098 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
2099
2100         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
2101         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
2102         use it instead of the Esize of the first parameter.
2103         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
2104         above change.
2105         <Size>: Likewise.  Call it for composite types on the RM size.
2106
2107 2011-08-29  Yannick Moy  <moy@adacore.com>
2108
2109         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
2110         * sem_util.adb (Unique_Name): Correct behaviour for names of
2111         compilation units.
2112
2113 2011-08-29  Yannick Moy  <moy@adacore.com>
2114
2115         * sem_prag.adb (Check_Precondition_Postcondition): In formal
2116         verification mode, analyze pragma expression for correctness, for
2117         pre/post on library-level subprogram, as it is not expanded later.
2118
2119 2011-08-29  Yannick Moy  <moy@adacore.com>
2120
2121         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
2122         in formal verification.
2123
2124 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2125
2126         * sem_util.adb: Minor reformatting.
2127         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
2128         there's no pragma.
2129         * par_sco.ads, par_sco.adb: Update comments.
2130
2131 2011-08-29  Yannick Moy  <moy@adacore.com>
2132
2133         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
2134         associated getter/setter.
2135         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
2136
2137 2011-08-29  Vincent Celier  <celier@adacore.com>
2138
2139         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
2140         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
2141         with declarations for Language_Kind and Dependency_Kind for Ada.
2142         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
2143         (Process_Compiler): Take into account the new attributes Dependency_Kind
2144         and Language_Kind.
2145         (Check_Configuration): Check if language kind is unit based, not if the
2146         language name is Ada.
2147         (Process_Exceptions_Unit_Based): Ditto
2148         (Add_Language): Remove default additions of language and dependency kind
2149         * prj.ads: Minor comment change
2150         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
2151
2152 2011-08-29  Johannes Kanig  <kanig@adacore.com>
2153
2154         * debug.adb: Update comments.
2155
2156 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
2157
2158         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
2159         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
2160         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
2161         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
2162         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
2163
2164 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2165
2166         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
2167         (GNATLIBCFLAGS_FOR_C): Replace
2168         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
2169         (gnatlib-shared-default, gnatlib-shared-dual-win32)
2170         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
2171         (gnatlib-sjlj, gnatlib-zcx): Likewise.
2172
2173 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
2174
2175         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
2176
2177         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
2178
2179         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
2180
2181 2011-08-05  Nicolas Roche  <roche@adacore.com>
2182
2183         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
2184         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
2185         canadian cross.
2186         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
2187
2188 2011-08-05  Matthew Heaney  <heaney@adacore.com>
2189
2190         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
2191         subprogram bodies declared out-of-order.
2192
2193 2011-08-05  Yannick Moy  <moy@adacore.com>
2194
2195         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
2196         entities directly in package Standard, otherwise skip the standard
2197         prefix.
2198
2199 2011-08-05  Robert Dewar  <dewar@adacore.com>
2200
2201         * a-cbmutr.adb: Minor reformatting
2202         (Allocate_Node): refactor node allocation algorithm
2203
2204 2011-08-05  Robert Dewar  <dewar@adacore.com>
2205
2206         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
2207         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
2208         mode.
2209         (Analyze_Pragma, case Check_Policy): Ditto.
2210         * sem_prag.ads (Check_Disabled): New function
2211         * snames.ads-tmpl: Add Name_Disable.
2212
2213 2011-08-05  Robert Dewar  <dewar@adacore.com>
2214
2215         * gnat_rm.texi: Document implementation-defined policy DISABLE for
2216         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
2217
2218 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2219
2220         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
2221         that appears in a generic formal part and applies to a formal
2222         subprogram.
2223
2224 2011-08-05  Robert Dewar  <dewar@adacore.com>
2225
2226         * a-cbmutr.ads: Minor reformatting.
2227
2228 2011-08-05  Matthew Heaney  <heaney@adacore.com>
2229
2230         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
2231         to check count, check sign of value instead.
2232         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
2233         (Copy_Subtree): allocate copy of source element
2234         (Equal_Subtree): compare elements, not access objects
2235
2236 2011-08-05  Vincent Celier  <celier@adacore.com>
2237
2238         * gnat_ugn.texi: Fix VMS alternative.
2239
2240 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2241
2242         * sem_ch11.adb: Add comment.
2243
2244 2011-08-05  Robert Dewar  <dewar@adacore.com>
2245
2246         * exp_util.adb: Minor comment fix.
2247
2248 2011-08-05  Robert Dewar  <dewar@adacore.com>
2249
2250         * scng.adb (Error_Unterminated_String): Improve flag position when
2251         comma present.
2252
2253 2011-08-05  Matthew Heaney  <heaney@adacore.com>
2254
2255         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
2256         tree containers).
2257         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
2258         multiway tree containers.
2259
2260 2011-08-05  Robert Dewar  <dewar@adacore.com>
2261
2262         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
2263         * stylesw.adb: Implement -gnatyC to control comment spacing
2264         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
2265         -gnatyc/C).
2266         * usage.adb: Add line for -gnatyC.
2267
2268 2011-08-05  Robert Dewar  <dewar@adacore.com>
2269
2270         * gnat_ugn.texi: Document -gnatyC.
2271         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
2272         synonym for COMMENTS2).
2273
2274 2011-08-05  Robert Dewar  <dewar@adacore.com>
2275
2276         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
2277         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
2278         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
2279         a-comutr.ads, lib-xref.adb: Minor reformatting.
2280
2281 2011-08-05  Robert Dewar  <dewar@adacore.com>
2282
2283         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
2284         warning if there is an exception handler present.
2285
2286 2011-08-05  Pascal Obry  <obry@adacore.com>
2287
2288         * a-iteint.ads: Fix copyright year.
2289
2290 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2291
2292         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
2293         statement SCO for a USE clause or a representation clause.
2294
2295 2011-08-05  Yannick Moy  <moy@adacore.com>
2296
2297         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
2298         between body and spec for stub.
2299         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
2300         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
2301         pragma precondition or postcondition, for which the enclosing
2302         subprogram or package in the AST is not the desired one, return empty.
2303
2304 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2305
2306         * g-expect.adb: Minor reformatting.
2307
2308 2011-08-05  Bob Duff  <duff@adacore.com>
2309
2310         * a-fihema.adb: Comment out OS_Lib.
2311
2312 2011-08-05  Matthew Heaney  <heaney@adacore.com>
2313
2314         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
2315         (unbounded multiway tree containers) and a-iteint.ads.
2316         * a-comutr.ads, a-comutr.adb:
2317         This is the new Ada 2012 unit for unbounded multiway tree containers
2318         * a-cimutr.ads, a-cimutr.adb
2319         This is the new Ada 2012 unit for indefinite multiway tree containers
2320         * a-iteint.ads: New file.
2321
2322 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2323
2324         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
2325
2326 2011-08-05  Bob Duff  <duff@adacore.com>
2327
2328         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
2329         subpools.
2330         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
2331
2332 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2333
2334         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
2335         general indexing aspects of Ada2012. Called when analyzing indexed
2336         components when other interpretations fail.
2337         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
2338         in an expression context where overloading is meaningful. This excludes
2339         the occurrence in an aspect specification (efficiency only).
2340         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
2341         related to iterators can be set by an attribute specification, but
2342         cannot be queried.
2343         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
2344         Constant_Indexing and Variable_Indexing.
2345         (Check_Indexing_Functions): New procedure to perform legality checks.
2346         Additional semantic checks at end of declarations.
2347
2348 2011-08-05  Sergey Rybin  <rybin@adacore.com>
2349
2350         * tree_io.ads: Update ASIS_Version_Number because of the change of the
2351         order of calling Tree_Write/Tree_Read routines made for aspects.
2352
2353 2011-08-05  Bob Duff  <duff@adacore.com>
2354
2355         * a-fihema.adb (Finalize): Fix race condition.
2356
2357 2011-08-05  Yannick Moy  <moy@adacore.com>
2358
2359         * sem_ch12.adb (Analyze_Package_Instantiation,
2360         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
2361         mode.
2362
2363 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2364
2365         * sem_type.adb (Specific_Type): in an instance, the type-specific
2366         operand of an equality check that involves null may have a private
2367         type. Use full view to determine legality of construct.
2368
2369 2011-08-05  Vincent Celier  <celier@adacore.com>
2370
2371         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2372         delete or close the file when the call to gnatmake was successful.
2373
2374 2011-08-05  Yannick Moy  <moy@adacore.com>
2375
2376         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
2377         Global_Discard_Names.
2378
2379 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2380
2381         * sinfo.ads: comments on use of entity field for aspect specifications.
2382
2383 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2384
2385         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
2386         node is not itself an entity but a selected component, it is a
2387         rewritten parameterless call to an en enclosing synchronized operation,
2388         and this expansion will be performed again in the instance, so there is
2389         no global information to preserve.
2390
2391 2011-08-05  Javier Miranda  <miranda@adacore.com>
2392
2393         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
2394         for renamings of predefined primitives.
2395         (In_Predef_Prims_DT): New subprogram.
2396
2397 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2398
2399         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
2400         possible interpretation of name is a reference type, add an
2401         interpretation that is the designated type of the reference
2402         discriminant of that type.
2403         * sem_res.adb (resolve): If the interpretation imposed by context is an
2404         implicit dereference, rewrite the node as the deference of the
2405         reference discriminant.
2406         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
2407         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
2408         parent type or base type.
2409         * sem_ch4.adb (Process_Indexed_Component,
2410         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
2411         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
2412         Check for implicit dereference.
2413         (List_Operand_Interps): Indicate when an implicit dereference is
2414         ambiguous.
2415         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
2416
2417 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2418
2419         * scos.ads: Update documentation of SCO table. Pragma statements can now
2420         be marked as disabled (using 'p' instead of 'P' as the statement kind).
2421         * par_sco.ads, par_sco.adb: Implement the above change.
2422         (Process_Decisions_Defer): Generate a P decision for the first parameter
2423         of a dyadic pragma Debug.
2424         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
2425         necessary.
2426         * put_scos.adb: Code simplification based on above change.
2427
2428 2011-08-05  Robert Dewar  <dewar@adacore.com>
2429
2430         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
2431         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
2432         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
2433         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
2434
2435 2011-08-05  Bob Duff  <duff@adacore.com>
2436
2437         * a-stunau.ads, g-spipat.adb: Update comments.
2438
2439 2011-08-05  Bob Duff  <duff@adacore.com>
2440
2441         * a-fihema.ads: Minor comment fix.
2442         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
2443         correct.
2444         (Attach, Detach): Remove some unnecessary code.
2445         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
2446
2447 2011-08-05  Bob Duff  <duff@adacore.com>
2448
2449         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
2450         allocation for Objects component. This simplifies the code somewhat. It
2451         is also a little more efficient in the not-so-unusual case where there
2452         are no controlled objects allocated.
2453         Make Finalization_Started flag atomic.
2454         (Finalize): Avoid unnecessary detachment of items from the list.
2455         (pcol): Minor cleanup.
2456
2457 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2458
2459         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
2460         package whose name is the same as that of the generic unit, or its
2461         ultimate prefix.
2462
2463 2011-08-05  Bob Duff  <duff@adacore.com>
2464
2465         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
2466         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
2467         Minor comment fixes.
2468
2469 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
2470
2471         * make.adb (Linking_Phase): No longer need to set source search path
2472         before calling gnatlink in CodePeer mode.
2473         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
2474         gcc in CodePeer mode, since the binder generated file no longer has a
2475         'with Main'.
2476         * switch.ads, switch.adb (Is_Language_Switch): Removed.
2477         * switch-c.adb: Update comment.
2478
2479 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2480
2481         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
2482
2483 2011-08-05  Nicolas Roche  <roche@adacore.com>
2484
2485         * gnat_ugn.texi: Fix minor syntax error issue.
2486
2487 2011-08-05  Vincent Celier  <celier@adacore.com>
2488
2489         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2490         delete or close the file when the call to gnatmake returns a non
2491         successful return code.
2492
2493 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2494
2495         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
2496         check, indicate that the copy of the original node does not come from
2497         source, to prevent an infinite recursion of the expansion.
2498
2499 2011-08-05  Johannes Kanig  <kanig@adacore.com>
2500
2501         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
2502         VC generation for subprogram bodies.
2503
2504 2011-08-05  Yannick Moy  <moy@adacore.com>
2505
2506         * einfo.ads: Typo.
2507         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
2508         the base type with the smallest allowed base type.
2509
2510 2011-08-05  Sergey Rybin  <rybin@adacore.com>
2511
2512         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
2513         aspects.
2514
2515 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2516
2517         * sem_ch12.ads: minor comment updates.
2518
2519 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2520
2521         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
2522         instantiation and a formal package the compiler generates a package
2523         renaming declaration so that the generic name within the declaration
2524         is interpreted as a renaming of the instance. At the end of a formal
2525         package declaration, this renaming must become invisible.
2526
2527 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2528
2529         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
2530         comparison and rely on concrete entities instead.
2531
2532 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2533
2534         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
2535         and discriminants, to indicate that the type has an access discriminant
2536         that supports implicit dereference.
2537         * snames.ads-tmpl: Add names of aspects and attributes related to
2538         Ada2012 iterators: constant_indexing, default_iterator,
2539         iterator_element, implicit_dereference, variable_indexing.
2540         * aspects.ads, aspects.adb: entries for iterator-related aspects.
2541         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
2542         iterator-related aspects.
2543         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
2544
2545 2011-08-05  Sergey Rybin  <rybin@adacore.com>
2546
2547         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
2548         metrics in gnatmetric to cover new kinds of coupling mentrics.
2549
2550 2011-08-05  Steve Baird  <baird@adacore.com>
2551
2552         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2553         of calling the user-defined main subprogram.
2554         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
2555         is set) Call_Main_Subprogram ahead of, as opposed to
2556         inside of, Main.
2557         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
2558         generation of a "with" of the user-defined main subprogram.
2559         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
2560         (which is now called from Gen_Main instead).
2561
2562 2011-08-05  Emmanuel Briot  <briot@adacore.com>
2563
2564         * projects.texi: Added reference to the Makefile package.
2565
2566 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2567
2568         * exp_ch7.adb: Minor comment rewording.
2569
2570 2011-08-05  Ed Falis  <falis@adacore.com>
2571
2572         * env.c: Fix comment.
2573
2574 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2575
2576         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
2577         character comparison and rely on concrete entities instead.
2578
2579 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2580
2581         * sem_ch3.adb: (Check_Private_Overriding): better error message,
2582         suggested by AI95-0068.
2583
2584 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2585
2586         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
2587         the two potential initialization calls. This accounts for any
2588         access-before-elaboration checks which may precede the initialization
2589         calls.
2590         (Next_Suitable_Statement): New routine. Returns the next real statement
2591         after the input node while skipping generated checks.
2592         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
2593         with comment on usage.
2594         Do not generate Elaborate_All when the trigger is a finalization call
2595         coming from a type init proc.
2596         (Check_Elab_Call): Propagate the initialization procedure context to
2597         subsequent calls to Check_A_Call.
2598         (Check_Internal_Call_Continue): Propagate the initialization procedure
2599         context to subsequent calls to Check_Elab_Call.
2600         (Is_Finalization_Procedure): New routine. Returns True if the input
2601         entity denotes a [Deep_]Finalize routine.
2602         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
2603         along with comment on usage.
2604
2605 2011-08-05  Vadim Godunko  <godunko@adacore.com>
2606
2607         * s-atocou.ads: Add list of supported platforms.
2608
2609 2011-08-05  Yannick Moy  <moy@adacore.com>
2610
2611         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
2612
2613         * opt.ads (Disable_ALI_File): new Boolean flag
2614         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
2615
2616 2011-08-05  Ed Falis  <falis@adacore.com>
2617
2618         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
2619         environ is properly defined.
2620
2621 2011-08-05  Vincent Celier  <celier@adacore.com>
2622
2623         * make.adb (Compilation_Phase): Exit immediately when all objects have
2624         been found up to date, to avoid multiple exit messages.
2625         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
2626         same project for languages with no compiler.
2627         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
2628         -eI.
2629 2011-08-05  Robert Dewar  <dewar@adacore.com>
2630
2631         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
2632         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
2633         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
2634         s-atocou-builtin.adb: Minor reformatting.
2635
2636 2011-08-05  Yannick Moy  <moy@adacore.com>
2637
2638         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
2639         if the node to wrap is a pragma check, this node and enclosed
2640         expression are not expanded, so do not apply any transformations here.
2641         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
2642         introducing transient scopes.
2643
2644 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
2645
2646         * adaint.c (__gnat_set_writable, __gnat_set_readable,
2647         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
2648         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
2649         routine is available, so we use the default implementation of these
2650         functions.
2651         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
2652         support for copying attributes on VxWorks 6.
2653
2654 2011-08-05  Yannick Moy  <moy@adacore.com>
2655
2656         * debug.adb: Remove use of -gnatd.D.
2657         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
2658         * opt.ads: Simplify variables for ALFA mode, to keep one only
2659         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
2660         to ALFA mode.
2661
2662 2011-08-05  Vincent Celier  <celier@adacore.com>
2663
2664         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
2665         Builder'Default_Switches.
2666
2667 2011-08-05  Vincent Celier  <celier@adacore.com>
2668
2669         * makeusg.adb: Add lines for --create-map-file switches.
2670
2671 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2672
2673         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
2674         profile is incomplete and the full view is available, replace it with
2675         the full view.
2676         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
2677         incomplete, freezing the subprogram is delayed until the full view is
2678         frozen.
2679         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
2680         fixed-point multiplication operator and the predefined operator is
2681         resolved in favor of the user-defined one.
2682
2683 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2684
2685         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
2686         CONST_CAST.
2687
2688 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2689
2690         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
2691         whether a type lacks user-defined Read or Write operations, or has a
2692         component that lacks them.
2693         * sem_attr.adb (Check_Stream_Attribute): if restriction
2694         No_Default_Stream_Attributes is active, verify that all subcomponent
2695         types of the target have user-defined stream operations, and report
2696         error otherwise.
2697         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
2698         * exp_strm.adb: Build_Elementary_Input_Call,
2699         Build_Elementary_Write_Call): remove checks for restriction
2700         No_Default_Stream_Attributes, now checked in semantics.
2701
2702 2011-08-04  Vincent Celier  <celier@adacore.com>
2703
2704         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
2705         switches on the command line, look for all valid --RTS switches in the
2706         Builder switches and for each language use the first runtime name found
2707         to invoke gprconfig.
2708         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
2709         command line and there is no auto-configuration.
2710         (Runtime_Name_Set_For): New function.
2711
2712 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2713
2714         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
2715         elaborate initialization expression for variable Abort when processing
2716         a package body or a declaration.
2717         (Create_Finalizer): Propagate the package context when creating the
2718         exception-related variables.
2719         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
2720         For_Package along with usage comment.
2721
2722 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2723
2724         * gcc-interface/Makefile.in: Clean up targets.
2725         Enable new package for atomic counters and copy-on-write implementation
2726         of unbounded strings on x86 platforms.
2727         * gcc-interface/Make-lang.in: Update dependencies.
2728
2729 2011-08-04  Robert Dewar  <dewar@adacore.com>
2730
2731         * exp_ch7.adb: Minor reformatting.
2732
2733 2011-08-04  Robert Dewar  <dewar@adacore.com>
2734
2735         * exp_strm.adb: Minor reformatting.
2736
2737 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2738
2739         * s-atocou.adb: Replace by dummy version and use on targets where atomic
2740         operations are not supported.
2741         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
2742         * s-atocou-x86.adb: New file.
2743         * Makefile.rtl: Add s-atocou.o file
2744
2745 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2746
2747         * make.adb (Compile): Move setting of CodePeer_Mode to ...
2748         (Compilation_Phase): ... here.
2749         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
2750
2751 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2752
2753         * Make-generated.in: Fix minor typo in comment.
2754
2755 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2756
2757         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
2758         the project path.
2759
2760 2011-08-04  Robert Dewar  <dewar@adacore.com>
2761
2762         * a-coinho.adb: Minor reformatting.
2763
2764 2011-08-04  Robert Dewar  <dewar@adacore.com>
2765
2766         * a-coinho.ads: Minor reformatting.
2767
2768 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2769
2770         * s-atocou.ads, s-atocou.adb: New files.
2771         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
2772         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
2773         direct use of GCC's atomic builtins and replace them by use of new
2774         atomic counter package.
2775
2776 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2777
2778         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
2779
2780 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2781
2782         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
2783         with a call to Get_External_Tag.
2784         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
2785         subprogram usage. Remove the guard against package declarations and
2786         bodies since Build_Cleanup_Statements is no longer invoked in that
2787         context.
2788         (Build_Components): Initialize Tagged_Type_Stmts when the context
2789         contains at least one library-level tagged type.
2790         (Build_Finalizer): New local variables Has_Tagged_Types and
2791         Tagged_Type_Stmts along with associated comments on usage. Update the
2792         logic to include tagged type processing.
2793         (Create_Finalizer): Insert all library-level tagged type unregistration
2794         code before the jump block circuitry.
2795         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
2796         (Expand_N_Package_Declaration): Remove the call to
2797         Build_Cleanup_Statements.
2798         (Process_Tagged_Type_Declaration): New routine. Generate a call to
2799         unregister the external tag of a tagged type.
2800         (Processing_Actions): Reimplemented to handle tagged types.
2801         (Process_Declarations): Detect the declaration of a library-level
2802         tagged type and carry out the appropriate actions.
2803         (Unregister_Tagged_Types): Removed. The machinery has been directly
2804         merged with Build_Finalizer.
2805
2806 2011-08-04  Robert Dewar  <dewar@adacore.com>
2807
2808         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
2809         gnatls.adb, exp_ch3.adb: Minor reformatting.
2810
2811 2011-08-04  Marc Sango  <sango@adacore.com>
2812
2813         * sem_attr.adb (Analyze_Attribute): Replace the message
2814         "invisible attribute of}" of the spark restriction violation in
2815         attribute reference by the simple message "invisible attribute of type".
2816         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
2817         two insertion characters: '&' and '}'.
2818
2819 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2820
2821         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
2822         * a-coinho.ads, a-coinho.adb: New file.
2823         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
2824
2825 2011-08-04  Nicolas Roche  <roche@adacore.com>
2826
2827         * alfa_test.adb: Not all ali files are containing alfa information even
2828         if compiled with -gnatd.F. So suppress warning about missing ALFA
2829         information.
2830
2831 2011-08-04  Yannick Moy  <moy@adacore.com>
2832
2833         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
2834         scope.
2835         * put_alfa.adb: Check that scope name is not empty.
2836
2837 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2838
2839         * exp_ch3.adb (Stream_Operation_Ok): new predicate
2840         Needs_Elementary_Stream_Operation, to determine whether user-defined
2841         Read and Write attributes are available for the elementary components
2842         of the given type. If only the predefined attributes are available,
2843         then when restriction No_Default_Stream_Attributes is active the
2844         predefined stream attributes for the composite type cannot be created.
2845
2846 2011-08-04  Robert Dewar  <dewar@adacore.com>
2847
2848         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
2849         Put routines in alpha order
2850
2851 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
2852
2853         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
2854         * gcc-interface/Make-lang.in: Update dependencies.
2855
2856 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2857
2858         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
2859         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
2860         gnat1why).
2861
2862 2011-08-04  Robert Dewar  <dewar@adacore.com>
2863
2864         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
2865         lib-xref-alfa.adb: Minor reformatting.
2866
2867 2011-08-04  Marc Sango  <sango@adacore.com>
2868
2869         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
2870         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
2871         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
2872         mode.
2873
2874 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2875
2876         * bindgen.adb (Gen_Adainit_C): Remove.
2877         (Gen_Adafinal_C): Ditto.
2878         (Gen_Elab_Externals_C): Ditto.
2879         (Gen_Elab_Calls_C): Ditto.
2880         (Gen_Elab_Order_C): Ditto.
2881         (Gen_Elab_Defs_C): Ditto.
2882         (Gen_Finalize_Library_C): Ditto.
2883         (Gen_Finalize_Library_Defs_C): Ditto.
2884         (Gen_Main_C): Ditto.
2885         (Gen_Output_File_C): Ditto.
2886         (Gen_Restrictions_C): Ditto.
2887         (Gen_Versions_C): Ditto.
2888         (Write_Info_Ada_C): Ditto.
2889         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
2890         (Gen_Output_File): Do not force Ada_Bind_File anymore.
2891         Always call Gen_Output_File_Ada.
2892         * gnatlink.adb (Begin_Info): Now a constant.
2893         (End_Info): Ditto.
2894         (Ada_Bind_File): Remove
2895         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
2896         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
2897         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
2898         * opt.ads (Ada_Bind_File): Remove.
2899
2900 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2901
2902         * projects.texi: Document target-specific directory in default project
2903         path for gnatmake.
2904
2905 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2906
2907         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
2908         path in all cases .
2909
2910 2011-08-04  Yannick Moy  <moy@adacore.com>
2911
2912         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
2913         opt.ads, lib-xref.ads: Code clean up.
2914
2915 2011-08-04  Yannick Moy  <moy@adacore.com>
2916
2917         * gnat_rm.texi: Update description of Test_Case
2918         * gnat_ugn.texi: Typo.
2919
2920 2011-08-04  Ed Falis  <falis@adacore.com>
2921
2922         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
2923
2924 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2925
2926         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
2927         it is of type Root_Controlled. This action eliminates fields Prev and
2928         Next from type equality.
2929
2930 2011-08-04  Yannick Moy  <moy@adacore.com>
2931
2932         * lib-xref-alfa.adb: Correct typo.
2933
2934 2011-08-04  Matthew Heaney  <heaney@adacore.com>
2935
2936         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
2937         component.
2938
2939 2011-08-04  Yannick Moy  <moy@adacore.com>
2940
2941         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
2942         (Analyze_Pragma): allow static string expression for name of Test_Case,
2943         instead of simply string literals.
2944         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
2945         expressions.
2946
2947 2011-08-04  Vincent Celier  <celier@adacore.com>
2948
2949         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
2950         case suffixes to find truncated main sources.
2951
2952 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2953
2954         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
2955         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
2956         (Compute_Current_Task): Ditto.
2957
2958 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2959
2960         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
2961
2962 2011-08-04  Yannick Moy  <moy@adacore.com>
2963
2964         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
2965         library-level constant.
2966         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
2967         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
2968         used as selector of parameter association, in ALFA mode.
2969
2970 2011-08-04  Robert Dewar  <dewar@adacore.com>
2971
2972         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
2973         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
2974         reformatting.
2975
2976 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2977
2978         * make.adb (Linking_Phase): Set source search path before calling
2979         gnatlink in CodePeer mode.
2980
2981 2011-08-04  Javier Miranda  <miranda@adacore.com>
2982
2983         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
2984         Remove code which takes care of building TSDs.
2985         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
2986         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
2987         the accessibility check in VM targets.
2988         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
2989         (Building_Static_DT): Now returns false for VM targets.
2990         (Build_VM_TSDs): Removed.
2991         (Expand_Interface_Conversion): Generate missing runtime check for
2992         conversions to interface types whose target type is unknown at compile
2993         time.
2994         (Make_VM_TSD): Add missing code to disable the generation of calls to
2995         Check_TSD if the tagged type is not defined at library level, or not
2996         has a representation clause specifying its external tag, or -gnatdQ is
2997         active.
2998         * exp_disp.ads (Build_VM_TSDs): Removed.
2999         (Make_VM_TSDs): Spec relocated from exp_disp.adb
3000         * sem_disp.adb (Check_Dispatching_Operation): No code required to
3001         register primitives in the dispatch tables in VM targets.
3002         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
3003         initialization of class-wide interface objects in VM targets.
3004         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
3005         of Make_DT).
3006
3007 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3008
3009         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
3010         when dotnet-ld cannot be found.
3011
3012 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3013
3014         * bindgen.adb: Simplify significantly generation of binder body file in
3015         CodePeer mode.
3016         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
3017         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
3018         not expanded).
3019
3020 2011-08-04  Yannick Moy  <moy@adacore.com>
3021
3022         * sem_prag.adb, sem.ads: Code cleanup.
3023
3024 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3025
3026         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
3027         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
3028         results if possible.
3029         * s-stusta.adb (Print): Adjust after changes in s-stausa.
3030         * gnat_ugn.texi: Update dynamic stack usage section.
3031
3032 2011-08-04  Steve Baird  <baird@adacore.com>
3033
3034         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
3035         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
3036         contains only a call to the user-defined main subprogram.
3037         (Gen_Main_Ada) - If CodePeer_Mode is set, then
3038         call the "wrapper" subprogram instead of directly
3039         calling the user-defined main subprogram.
3040
3041 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3042
3043         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
3044         alternatives of a case statement for controlled objects. Rename local
3045         variable A to Dead_Alt.
3046         (Expand_N_If_Statement): Check the then and else statements of an if
3047         statement for controlled objects. Check the then statements of all
3048         elsif parts of an if statement for controlled objects.
3049         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
3050         objects.
3051         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
3052         detects a loop associated with the expansion of an array object.
3053         Augment the processing of the loop statements to account for a possible
3054         wrap done by Process_Statements_For_Controlled_Objects.
3055         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
3056         statements and abortable part of an asynchronous select for controlled
3057         objects.
3058         (Expand_N_Conditional_Entry_Call): Check the else statements of a
3059         conditional entry call for controlled objects.
3060         (Expand_N_Selective_Accept): Check the alternatives of a selective
3061         accept for controlled objects.
3062         (Expand_N_Timed_Entry_Call): Check the entry call and delay
3063         alternatives of a timed entry call for controlled objects.
3064         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
3065         exception handler for controlled objects.
3066         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3067         Add formal parameter Nested_Constructs along with its associated
3068         comment.
3069         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
3070         Requires_Cleanup_Actions.
3071         (Process_Statements_For_Controlled_Objects): New routine.
3072         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
3073         routine. Inspect a node which contains a non-handled sequence of
3074         statements for controlled objects. If such an object is found, the
3075         statements are wrapped in a block.
3076
3077 2011-08-04  Bob Duff  <duff@adacore.com>
3078
3079         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
3080         need to compare with Class_Wide_Type (T2), in order to get at the
3081         original class-wide type node.
3082         * sem_type.ads (Covers): Improve the comment.
3083         * einfo.ads (Class_Wide_Type): Improve the comment.
3084         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
3085         the type of the Deref.
3086
3087 2011-08-04  Yannick Moy  <moy@adacore.com>
3088
3089         * gnat_rm.texi: Document that Test_Case pragma can only appear on
3090         separate declarations.
3091         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
3092         check identifier of pragma argument.
3093         (Chain_TC): check that no other test case associated to the same entity
3094         share the same name.
3095         (Check_Test_Case): disallow test case inside subprogram body
3096         (Analyze_Pragma): correct call to check identifier and not argument
3097         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
3098         function gets name from test case pragma.
3099
3100 2011-08-04  Yannick Moy  <moy@adacore.com>
3101
3102         * gnat_rm.texi: Document new pragma and aspect.
3103         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
3104         (No_Duplicates_Allowed): new constant array defining whether duplicates
3105         aspects of each kind can appear on the same declaration.
3106         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
3107         field, which points to a node holding the previous Spec_PPC_List.
3108         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
3109         through the indirection with Contract.
3110         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
3111         * par-prag.adb (Prag): do nothing on Test_Case pragma
3112         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
3113         be called directly.
3114         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
3115         component Ensures of Test_Case.
3116         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
3117         (Analyze_Generic_Subprogram_Declaration,
3118         Analyze_Subprogram_Instantiation,
3119         Analyze_Abstract_Subprogram_Declaration,
3120         Analyze_Subprogram_Body_Helper,
3121         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
3122         insert contract in subprogram node at point of definition
3123         * sem_ch13.adb
3124         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
3125         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
3126         corresponding pragma
3127         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
3128         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
3129         similar to the analysis of pre/post
3130         (Derive_Subprogram): insert contract in subprogram node at point of
3131         derivation.
3132         * sem_prag.adb, sem_prag.ads
3133         (Check_Arg_Is_String_Literal, Check_Identifier):
3134         new checking procedures to be called in treatment of pragmas
3135         (Check_Test_Case): new procedure to check that a Test_Case aspect or
3136         pragma is well-formed. This does not check currently that 'Result is
3137         used only in the Ensures component of a Test_Case.
3138         (Analyze_Pragma): add case for Test_Case
3139         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
3140         components of a Test_Case.
3141         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
3142         expressions in the 3rd (and 4th if present) arguments of a Test_Case
3143         pragma, treated as spec expressions.
3144         (Sig_Flags): add value -1 for Test_Case.
3145         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
3146         Get_Requires_From_Test_Case_Pragma): getters for both expression
3147         components of a Test_Case.
3148         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
3149         indirection between an entry or [generic] subprogram entity and its
3150         pre/post + test-cases.
3151         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
3152         get/set for fields of an N_Contract node.
3153         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
3154         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
3155         names and pragma for Test_Case.
3156         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
3157
3158 2011-08-04  Vincent Celier  <celier@adacore.com>
3159
3160         * gnat_ugn.texi: Improve documentation of gnatmake switch
3161         --source-info-file=.
3162
3163 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3164
3165         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
3166         type). Initialize Atyp to the appropriate type which is later checked
3167         for completion. Rewrite the assertion associated with private type
3168         completion.
3169
3170 2011-08-04  Ed Falis  <falis@adacore.com>
3171
3172         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
3173         initialize the number of CPUs.
3174
3175 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3176
3177         * sem_type.adb (Disambiguate): New subsidiary routine
3178         In_Same_Declaration_List, to implement AI05-0020: a user-defined
3179         equality on an anonymous access type whose designated type is private
3180         does not lead to an ambiguity with the universal access equality
3181         operator in the body or child units of the defining package. The same
3182         is true for a multiplication operator on a private type completed with
3183         a fixed-point-type.
3184
3185 2011-08-04  Javier Miranda  <miranda@adacore.com>
3186
3187         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
3188         (Normalize_Scalars_Config): Removed.
3189         * opt.adb
3190         (Register_Opt_Config_Switches): Remove registering config values of
3191         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
3192         (Restore_Opt_Config_Switches): Remove code which restores the values of
3193         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3194         Init_Or_Norm_Scalars.
3195         (Save_Opt_Config_Switches): Remove code which saves values of
3196         Init_Or_Norm_Scalars and Normalize_Scalars.
3197         (Set_Opt_Config_Switches): Remove code which restores config values of
3198         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3199         Init_Or_Norm_Scalars.
3200
3201 2011-08-04  Yannick Moy  <moy@adacore.com>
3202
3203         * frontend.adb (Frontend): remove previous patch to avoid full
3204         qualification in ALFA mode.
3205         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
3206         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
3207         unique name for an entity, which could be used to identify the entity
3208         across compilation units.
3209
3210 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3211
3212         * prj-env.adb
3213         (Initialize_Default_Project_Path): Add target specific directory
3214         ($prefix/$target/lib/gnat) in front of project path in all cases
3215         (making gnatmake's behaviour consistent with gprbuild).
3216         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
3217         Pass target name from Sdefault to project subsystem.
3218         * gnatls.adb: Show new target specific default project directory.
3219
3220 2011-08-04  Johannes Kanig  <kanig@adacore.com>
3221
3222         * cstand.adb: Add Information to Identifier in Standard
3223         (Identifer_For): Set Entity to the corresponding entity
3224
3225 2011-08-04  Sergey Rybin  <rybin@adacore.com>
3226
3227         * gnat_ugn.texi: Update doc on gnatcheck.
3228
3229 2011-08-04  Yannick Moy  <moy@adacore.com>
3230
3231         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
3232         xrefs in a scope.
3233
3234 2011-08-04  Yannick Moy  <moy@adacore.com>
3235
3236         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
3237         performing expansion.
3238         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
3239         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
3240         it is not called in ALFA mode.
3241
3242 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3243
3244         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
3245         after all, so removed.
3246
3247 2011-08-04  Sergey Rybin  <rybin@adacore.com>
3248
3249         * vms_data.ads: Add missing VMS qualifiers.
3250
3251 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3252
3253         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
3254         the list of files on the command line after processing it through
3255         Complete_Mains.
3256
3257 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3258
3259         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
3260         processing for .NET/JVM. These targets can now benefit from
3261         Raise_From_Controlled_Operation and they share the same processing with
3262         standard targets.
3263         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
3264         These targets need transient scopes in order to properly finalize short
3265         lived controlled objects.
3266         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
3267          NET/JVM. These targets can now benefit from
3268         Raise_From_Controlled_Operation and they share the same processing with
3269         standard targets.
3270
3271 2011-08-04  Geert Bosch  <bosch@adacore.com>
3272
3273         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
3274
3275 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3276
3277         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
3278         Expand_Record_Aggregate, to determine whether aggregate must be
3279         expanded into assignments. This is the case if the ancestor part is
3280         private, regarless of the setting of the flag Has_Private_Ancestor.
3281
3282 2011-08-04  Ed Falis  <falis@adacore.com>
3283
3284         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
3285
3286 2011-08-04  Bob Duff  <duff@adacore.com>
3287
3288         * sinfo.ads: Fix comment.
3289
3290 2011-08-04  Steve Baird  <baird@adacore.com>
3291
3292         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
3293         choose a package name in much the same way as is
3294         done for JGNAT when VM_Target /= No_VM, except that
3295         a slightly more distinctive prefix string is used.
3296
3297 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3298
3299         * makeutl.adb (Complete_Mains): no longer accept unit names on the
3300         gnatmake command line.
3301         This behavior was never documented (and was supported only because of
3302         an early bug in the code). This case might lead to ambiguous cases
3303         (between unit names and truncated base names without suffixes).
3304
3305 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3306
3307         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
3308         Remove the external tag of a tagged type from the internal hash table.
3309         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
3310         expanded usage of the routine. Strenghten the check for Is_Master. Add
3311         processing for tagged types.
3312         (Build_Finalizer): Create all the necessary lists used in finalizer
3313         creation when the processed context is a package that may contain
3314         tagged types.
3315         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
3316         Requires_Cleanup_Actions.
3317         (Expand_N_Package_Body): Package bodies may need clean up code
3318         depending on whether they contain tagged types.
3319         (Expand_N_Package_Declaration): Package declarations may need clean up
3320         code depending on whether they contain tagged types.
3321         (Unregister_Tagged_Types): New routine. Search through a list of
3322         declarations or statements, looking for non-abstract Ada tagged types.
3323         For each such type, generate code to unregister the external tag.
3324         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
3325         Requires_Cleanup_Actions.
3326         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
3327         through a list of declarations or statements looking for non-abstract
3328         Ada tagged types or controlled objects.
3329         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
3330         Requires_Cleanup_Actions.
3331         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
3332         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
3333         RE_Unit_Table.
3334
3335 2011-08-04  Vincent Celier  <celier@adacore.com>
3336
3337         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
3338         has Ada sources, not project Project, because if the root project
3339         Project has no sources of its own, all projects will be deemed without
3340         sources.
3341
3342 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3343
3344         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
3345         of the No_Param_Proc acc-to-subp type used for initialization of
3346         __gnat_finalize_library_objects so that it's declared at library level
3347         rather than nested inside of the adainit routine.
3348
3349 2011-08-04  Javier Miranda  <miranda@adacore.com>
3350
3351         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
3352         if the tagged type has a representation clause which specifies its
3353         external tag.
3354
3355 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3356
3357         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
3358         Remove previous procedure with that name.
3359         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
3360         when appropriate.
3361         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
3362         subtype mark, the ancestor cannot have unknown discriminants.
3363         (Resolve_Record_Aggregate): if the type has invisible components
3364         because of a private ancestor, the aggregate is illegal.
3365
3366 2011-08-04  Vincent Celier  <celier@adacore.com>
3367
3368         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
3369         account switches -gnat2005, -gnat12 and -gnat2012.
3370
3371 2011-08-04  Bob Duff  <duff@adacore.com>
3372
3373         * s-tasdeb.ads: Minor comment fix.
3374
3375 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3376
3377         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
3378         CodePeer mode.
3379         * switch.ads, switch.adb (Is_Language_Switch): New function.
3380
3381 2011-08-04  Vincent Celier  <celier@adacore.com>
3382
3383         * switch-c.adb: Minor comment addition.
3384
3385 2011-08-04  Vincent Celier  <celier@adacore.com>
3386
3387         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
3388         ending with '=' is followed by a space (missing file name).
3389
3390 2011-08-04  Pascal Obry  <obry@adacore.com>
3391
3392         * g-regist.ads: Fix size of HKEY on x86_64-windows.
3393
3394 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3395
3396         * sem_ch12.adb (Analyze_Associations): New routine
3397         Check_Overloaded_Formal_Subprogram to reject a formal package when
3398         there is a named association or a box initialisation for an overloaded
3399         formal subprogram of the corresponding generic.
3400
3401 2011-08-04  Yannick Moy  <moy@adacore.com>
3402
3403         * alfa.ads (ALFA_Xref_Record): add component for type of entity
3404         * get_alfa.adb, put_alfa.adb: Read and write new component of
3405         cross-reference.
3406         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
3407
3408 2011-08-04  Pascal Obry  <obry@adacore.com>
3409
3410         * urealp.adb: Minor reformatting.
3411
3412 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3413
3414         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
3415         Handle the case when Cleanup_Protected_Object returns Empty.
3416
3417 2011-08-04  Yannick Moy  <moy@adacore.com>
3418
3419         * frontend.adb (Frontend): only qualify names in non-ALFA mode
3420
3421 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3422
3423         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
3424         call, ignore functions.
3425
3426 2011-08-04  Geert Bosch  <bosch@adacore.com>
3427
3428         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
3429         point.
3430
3431 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3432
3433         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
3434         as an index for Builder'Switches. This conforms to the documentation.
3435         * make.adb (Insert_Project_Sources): avoid duplicate code
3436
3437 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3438
3439         * makeutl.adb (Complete_Mains): if the user has passed a relative file
3440         name on the command line (for instance "../dummy"), never assume it can
3441         be a unit name.
3442
3443 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3444
3445         * bindgen.adb: Remove code the reference or create the
3446         Break_Start/__gnat_break_start procedure.
3447         * s-stalib.adb (Break_Start): Removed.
3448
3449 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3450
3451         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
3452         shared with gprbuild.
3453
3454 2011-08-04  Yannick Moy  <moy@adacore.com>
3455
3456         * par-ch4.adb (P_Primary): preferentially issue an error message about
3457         a missing parenthesis arount a conditional or case expression in Ada
3458         2012 mode, if we detect that the alignment is not correct for a
3459         statement.
3460
3461 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3462
3463         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
3464         tag-to-class-wide conversion as needing finalization actions.
3465         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
3466         a tag-to-class-wide conversion as needing finalization actions.
3467         (Is_Finalizable_Transient): The result of a tag-to-class-wide
3468         conversion does not need finalization actions.
3469         (Is_Tag_To_CW_Conversion): New routine.
3470         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
3471         whether an object is the result of a tag-to-class-wide conversion.
3472
3473 2011-08-04  Yannick Moy  <moy@adacore.com>
3474
3475         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
3476         the left-hand-side and right-hand-side of a conjunct are inserted when
3477         translating a pre- or postcondition
3478         * sem_ch6.adb: Correct typo in comment
3479
3480 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3481
3482         * gnat_rm.texi: Ravenscar does not prohibit dependence on
3483         Unchecked_Conversion and Unchecked_Deallocation.
3484
3485 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3486
3487         * make.adb: Minor reformatting.
3488
3489 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3490
3491         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
3492         sources in the project and its imported projects, but not in the whole
3493         tree.
3494
3495 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3496
3497         * make.adb: Remove debug trace.
3498
3499 2011-08-04  Vincent Celier  <celier@adacore.com>
3500
3501         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
3502         path in canonical form, to be able to compare path names on platforms
3503         such as Windows or Darwin.
3504
3505 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3506
3507         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
3508         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
3509         * scos.ads: Update documentation accordingly.
3510         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
3511         pragmas.
3512
3513 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3514
3515         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
3516         attribute only if prefix type is scalar.
3517
3518 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3519
3520         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
3521         in gnatmake for specifying mains on the command line that do not belong
3522         to the main project. These mains must currently all belong to the same
3523         project, though.
3524         (Ultimate_Extension_Of): removed, since duplicated
3525         Ultimate_Extending_Project.
3526
3527 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3528
3529         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
3530         instead.
3531         (CodePeer_Mode_String): New.
3532         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
3533         CodePeer mode.
3534         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
3535         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
3536         mode, since no useful elaboration subprogram is needed by CodePeer.
3537         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
3538         In this mode, compile binder file with -gnatC and do stop after this
3539         step.
3540
3541 2011-08-04  Vincent Celier  <celier@adacore.com>
3542
3543         * exp_ch7.adb: Minor comment fix.
3544
3545 2011-08-04  Robert Dewar  <dewar@adacore.com>
3546
3547         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
3548         exp_ch4.adb, makeutl.adb: Minor reformatting.
3549
3550 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3551
3552         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
3553         Create several new subprograms to move code out of Make. This makes the
3554         code more readable, removes code duplication, and is a preparation work
3555         for adding support for aggregate projects.
3556
3557 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3558
3559         * s-po32gl.ads, s-po32gl.adb: New files.
3560         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
3561         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
3562         (Build_Finalization_Collection): Use it.
3563         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
3564         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
3565         literals.
3566         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
3567         * gcc-interface/Make-lang.in: Update dependencies.
3568
3569 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3570
3571         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
3572         the command line.
3573
3574 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3575
3576         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
3577         command line is not a file name, also check whether it could be a unit
3578         name.
3579
3580 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3581
3582         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
3583         the header of the finalization routine.
3584         If the unit has no finalizer but is a body whose spec has one, then
3585         generate the decrement of the elaboration entity only.
3586         If the unit has a finalizer and is a spec, then do not generate the
3587         decrement of the elaboration entity.
3588         (Gen_Finalize_Library_C): Likewise.
3589
3590 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3591
3592         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
3593         (Bounds_Size_Expression): Removed.
3594         (Double_Alignment_Of): New subsidiary routine.
3595         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
3596         for a hole in the dope vector of unconstrained arrays due to different
3597         index and element alignments.
3598
3599 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3600
3601         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
3602         raise program_error because body has not been seen yet.
3603
3604 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3605
3606         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
3607         an unresolved name.
3608
3609 2011-08-04  Vincent Celier  <celier@adacore.com>
3610
3611         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
3612
3613 2011-08-04  Yannick Moy  <moy@adacore.com>
3614
3615         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
3616         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
3617
3618 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3619
3620         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
3621         instantiation in RCI.
3622
3623 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3624
3625         * make.adb: Share more code with gprbuild
3626
3627 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3628
3629         * projects.texi: Added documentation for the IDE'Gnat project file
3630         attribute.
3631
3632 2011-08-04  Nicolas Roche  <roche@adacore.com>
3633
3634         * gnat_rm.texi: Minor editing.
3635
3636 2011-08-04  Javier Miranda  <miranda@adacore.com>
3637
3638         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
3639         and the library case for VM targets.
3640         (Gen_Adainit_Ada): Likewise.
3641
3642 2011-08-04  Robert Dewar  <dewar@adacore.com>
3643
3644         * g-altive.ads: Minor comment updates.
3645         * prj-nmsc.adb: Minor reformatting.
3646
3647 2011-08-04  Javier Miranda  <miranda@adacore.com>
3648
3649         * opt.ads
3650         (Normalize_Scalars_Config): Value of the configuration switch set by
3651         pragma Normalize_Scalars when it appears in the gnat.adc file.
3652         (Normalize_Scalars): New field for record Config_Switches_Type. Used
3653         to save and restore settings of this pragma.
3654         * opt.adb
3655         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
3656         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
3657
3658 2011-08-04  Vincent Celier  <celier@adacore.com>
3659
3660         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
3661
3662 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3663
3664         * makeutl.adb: Minor reformatting.
3665
3666 2011-08-04  Olivier Hainque  <hainque@adacore.com>
3667
3668         * g-altive.ads: Update comments to reflect that only the soft
3669         binding is available today.
3670
3671 2011-08-04  Robert Dewar  <dewar@adacore.com>
3672
3673         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
3674         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
3675         * gcc-interface/Make-lang.in: Update dependencies.
3676
3677 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3678
3679         * prj-env.adb: Remove local debug traces.
3680
3681 2011-08-04  Yannick Moy  <moy@adacore.com>
3682
3683         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
3684         was used instead of Hi_OK, which could cause a read of an uninitialized
3685         value later on. Detected while working on the new warning.
3686         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
3687         to local variable.
3688         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
3689         in more cases, in order to detect more unreferenced values.
3690         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
3691         object for expression, if any.
3692
3693 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3694
3695         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
3696         the operand types instead of the Esize.
3697
3698 2011-08-04  Steve Baird  <baird@adacore.com>
3699
3700         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
3701         enable CodePeer_Mode.
3702         * bindusg.adb (Display): Add help message describing -P binder switch.
3703         * gnat_ugn.texi: Document -P binder switch.
3704         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
3705         user-defined main program directly.
3706         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
3707         user-defined main program in the context clause of the package body.
3708
3709 2011-08-04  Yannick Moy  <moy@adacore.com>
3710
3711         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
3712         duplicate of Defining_Entity
3713         (Get_Unique_Entity_For_Decl): rename function into
3714         Unique_Defining_Entity
3715         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
3716         (Formal_Proof_On): remove synthesized flag
3717         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3718         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
3719         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
3720         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
3721         Annotate (Formal_Proof)
3722
3723 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3724
3725         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
3726         source files with non-standard naming schemes, in imported projects
3727
3728 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3729
3730         * makeutl.adb (Complete_Mains): when a multi-unit source file is
3731         specified on the gprbuild command line, we need to compile all units
3732         within that file, not just the first one we find
3733         Fix error message for mains that are not found.
3734
3735 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3736
3737         * sem_ch6.adb: Update comment.
3738         * sem_ch12.adb: Minor reformatting.
3739
3740 2011-08-04  Bob Duff  <duff@adacore.com>
3741
3742         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
3743         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
3744         race condition whose symptom is to fail to lock Parent. That, in turn,
3745         causes Parent.Awake_Count to be accessed without locking Parent, which
3746         causes another race condition whose symptom is that Parent.Awake_Count
3747         can be off by 1 (either too high or too low). The solution is to lock
3748         Parent unconditionally, and then lock Acceptor, before reading
3749         Acceptor.Terminate_Alternative.
3750
3751 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3752
3753         * debug.adb: Update comment.
3754
3755 2011-08-04  Robert Dewar  <dewar@adacore.com>
3756
3757         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
3758         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
3759         exp_ch6.adb: Minor reformatting.
3760
3761 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3762
3763         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
3764         checks for -gnateE.
3765
3766 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3767
3768         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
3769
3770 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3771
3772         * sinfo.ads: Minor reformatting.
3773
3774 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3775
3776         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
3777         even if there is no location.
3778
3779 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3780
3781         * sem_res.adb, sem_ch4.adb: move check for restriction
3782         No_Task_Hierarchy to resolve_allocator.
3783
3784 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3785
3786         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
3787         This flag of N_Pragma nodes is not used, remove it as well as all of
3788         the associated circuitry.
3789
3790 2011-08-04  Javier Miranda  <miranda@adacore.com>
3791
3792         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
3793         runtime check on duplicated externa tags
3794         * debug.adb Document switch -gnatdQ.
3795
3796 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3797
3798         * a-fihema.ads: Minor typo fix.
3799
3800 2011-08-04  Yannick Moy  <moy@adacore.com>
3801
3802         * sem_ch10.adb: Minor comment update.
3803
3804 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3805
3806         * einfo.adb: Update the node field usage to reflect the renaming of
3807         Return_Flag to Return_ Flag_Or_Transient_Decl.
3808         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
3809         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
3810         (Write_Field15_Name): Change Return_Flag to
3811         Return_Flag_Or_Transient_Decl.
3812         * einfo.ads: Rename node field Return_Flag to
3813         Return_Flag_Or_Transient_Decl. Update the associated comment and all
3814         occurrences in entities.
3815         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
3816         associated Inline pragma.
3817         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
3818         associated Inline pragma.
3819         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
3820         routine.
3821         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
3822         Return_Flag and Set_Return_Flag.
3823         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
3824         objects generated for controlled transients declared inside an
3825         Exception_With_Actions. Update the calls to Return_Flag.
3826         (Process_Object_Declaration): Add code to add a null guard for hook
3827         objects generated for controlled transients declared inside an
3828         Exception_With_Actions. Update related comment.
3829         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
3830         objects generated for controlled transients declared inside an
3831         Exception_With_Actions. Update the calls to Return_Flag.
3832         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
3833
3834 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3835
3836         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
3837         positional aggregate.
3838
3839 2011-08-04  Vincent Celier  <celier@adacore.com>
3840
3841         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
3842         SLOC only for pragmas.
3843
3844 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3845
3846         * projects.texi: Minor typo fix.
3847
3848 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3849
3850         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
3851         on case-sensitive file systems.
3852
3853 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3854
3855         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
3856         nested in a disabled pragma.
3857         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
3858         enclosing pragma, if any, for X decisions.
3859
3860 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3861
3862         * sem_prag.adb: Minor reformatting.
3863
3864 2011-08-04  Vincent Celier  <celier@adacore.com>
3865
3866         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
3867         allowed in no run time mode.
3868
3869 2011-08-04  Vincent Celier  <celier@adacore.com>
3870
3871         * make.adb (Check): When -gnatc is used, check for the source file
3872         inside the ALI file with a canonical case file name.
3873
3874 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3875
3876         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
3877         overriding the separator.
3878
3879 2011-08-04  Robert Dewar  <dewar@adacore.com>
3880
3881         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
3882         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
3883
3884 2011-08-04  Robert Dewar  <dewar@adacore.com>
3885
3886         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
3887
3888 2011-08-04  Yannick Moy  <moy@adacore.com>
3889
3890         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
3891         'Result only appears in postcondition of function.
3892
3893 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3894
3895         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
3896         external tag, include the value of the external tag in the exception
3897         message.
3898
3899 2011-08-04  Yannick Moy  <moy@adacore.com>
3900
3901         * sem_attr.adb (Result): modify error message for misplaced 'Result
3902
3903 2011-08-04  Sergey Rybin  <rybin@adacore.com>
3904
3905         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
3906         clear that the second argument must be an identifier.
3907
3908 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3909
3910         * exp_ch9.adb (Build_Barrier_Function): When compiling with
3911         -fpreserve-control-flow, insert an IF statement on the barrier
3912         condition to ensure that a conditional branch instruction is generated.
3913
3914 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3915
3916         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
3917         (Processing_Flags.Ignore_Missing_With): new flag.
3918
3919 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3920
3921         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
3922         Source_List_File on case-insensitive systems where the file is actually
3923         on a case-sensitive file system (NFS,...).
3924
3925 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3926
3927         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
3928         function return contains a controlled [extension] aggregate and the
3929         return statement is not part of a handled sequence of statements, wrap
3930         the return in a block. This ensures that all controlled temporaries
3931         generated during aggregate resolution will be picked up by the
3932         finalization machinery.
3933
3934 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3935
3936         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
3937         components, freeze type before resolution, to ensure that default
3938         initializations are present for all components.
3939         * sem_res.adb (Resolve_Actuals): the designated object of an
3940         accces-to-constant type is a legal actual in a call to an
3941         initialization procedure.
3942
3943 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3944
3945         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
3946         N_Unchecked_Type_Conversion to the possible containers of a renamed
3947         transient variable.
3948
3949 2011-08-04  Yannick Moy  <moy@adacore.com>
3950
3951         * par-ch13.adb (Aspect_Specifications_Present): recognize
3952         "with Identifier'Class =>" as an aspect, so that a meaningful warning
3953         is issued in Strict mode.
3954         * par.adb: Fix typos in comments.
3955
3956 2011-08-04  Yannick Moy  <moy@adacore.com>
3957
3958         * sem_attr.adb (Result): modify error message to take into account Post
3959         aspect when compiling Ada 2012 (or newer) code.
3960
3961 2011-08-04  Nicolas Roche  <roche@adacore.com>
3962
3963         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
3964         remove need for GCC exceptions.
3965
3966 2011-08-04  Vincent Celier  <celier@adacore.com>
3967
3968         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
3969         project, not the source file name.
3970         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
3971         excluded, continue looking. This excluded source will only be returned
3972         if there is no other source with the same base name that is not locally
3973         removed.
3974
3975 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3976
3977         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
3978         private and one of the operands is a real literal, use a qualified
3979         expression rather than a conversion which is not meaningful to the
3980         back-end.
3981
3982 2011-08-04  Yannick Moy  <moy@adacore.com>
3983
3984         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
3985         corresponding aspect X'Class are allowed, proceed with analysis of the
3986         aspect instead of skipping it.
3987
3988 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3989
3990         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
3991         This will allow to have an Ada implementation for the subprogram.
3992
3993 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3994
3995         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
3996         completion and aspects are present, apply them to the entity for the
3997         type which is currently the partial view, but which is the one that
3998         will be frozen.
3999         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
4000         applies to a partial view, indicate that the full view has predicates
4001         and delayed aspects.
4002         (Replace_Type_Reference): Handle properly predicates that apply to the
4003         full view of a private completion.
4004
4005 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4006
4007         * layout.adb (Layout_Type): For composite types, do not set Esize.
4008         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
4009         set Esize.
4010         (Size_Known): Look at the RM size of components instead of the Esize.
4011         (Freeze_Record_Type): Look at the RM size instead of the Esize to
4012         issue warning and activate Implicit_Packing.
4013         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
4014         if the Esize is not known.
4015         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
4016         for elementary types only.
4017         (Analyze_Record_Representation_Clause): Look at the RM size instead
4018         of the Esize to issue errors.
4019         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
4020         is not known.
4021         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
4022         obsolete block.
4023         Look at the RM size instead of the Esize for types if the latter is
4024         not known.
4025         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
4026
4027 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4028
4029         * sem_type.adb: proper handling of equality not involving anonymous
4030         access types.
4031
4032 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4033
4034         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
4035         Vis_Decls. When creating a library-level finalizer for a package spec,
4036         both the declaration and body of the finalizer are inserted either in
4037         the visible or private declarations of the package spec.
4038
4039 2011-08-04  Javier Miranda  <miranda@adacore.com>
4040
4041         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
4042         use of the full-view of a type when invoking Is_Ancestor.
4043         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
4044         the full-view of private parents is requested, then use also the
4045         full-view of the parent of the first derivation.
4046
4047 2011-08-04  Tristan Gingold  <gingold@adacore.com>
4048
4049         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
4050         instead of the locally imported procedure.
4051         * s-taprop-mingw.adb (Enter_Task): Ditto.
4052         * s-valrea.adb (Scan_Real): Ditto.
4053         * s-imgrea.adb (Set_Image_Real): Ditto.
4054         * s-flocon.ads: Make the package pure.
4055
4056 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4057
4058         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
4059         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
4060         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
4061         New subprogram, moved here from...
4062         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
4063         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
4064         rewriting of the last argument into a procedure call statement here...
4065         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
4066         instead.
4067
4068 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4069
4070         * par_sco.adb: Minor reformatting.
4071
4072 2011-08-04  Robert Dewar  <dewar@adacore.com>
4073
4074         * erroutc.adb: Minor reformatting.
4075
4076 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4077
4078         * par_sco.adb: Comment update.
4079
4080 2011-08-04  Tristan Gingold  <gingold@adacore.com>
4081
4082         * s-flocon.ads: New file.
4083         * g-flocon.ads: Now a renaming of s-flocon.
4084         * Makefile.rtl: Add s-flocon.o
4085
4086 2011-08-04  Javier Miranda  <miranda@adacore.com>
4087
4088         * exp_strm.adb (Build_Array_Input_Function): if the array type is
4089         constrained, do not attempt to build a subtype of it.
4090
4091 2011-08-04  Yannick Moy  <moy@adacore.com>
4092
4093         * errout.ads Change comments: remove 'R'M as an example where quotes
4094         are needed; add ALFA as another case where quotes are not needed
4095         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
4096         case where quotes are not needed.
4097         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4098         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
4099         Remove all occurrences of 'A'L'F'A
4100
4101 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4102
4103         * sem_ch13.adb: check legality of invariant pragma.
4104
4105 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4106
4107         * bindgen.adb: Add comments.
4108
4109 2011-08-04  Yannick Moy  <moy@adacore.com>
4110
4111         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
4112         synthesized flag.
4113         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
4114         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
4115
4116 2011-08-04  Robert Dewar  <dewar@adacore.com>
4117
4118         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
4119         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
4120         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
4121
4122 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4123
4124         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
4125
4126 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4127
4128         PR ada/47880
4129         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
4130         allocated object.
4131
4132 2011-08-04  Robert Dewar  <dewar@adacore.com>
4133
4134         * einfo.ads, exp_ch4.adb: Minor reformatting.
4135
4136 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
4137
4138         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
4139
4140 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4141
4142         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
4143         type in all cases to compute list of primitive operations, because full
4144         view may be an itype that is not attached to the list of declarations.
4145
4146 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4147
4148         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
4149         library has already been finalized.
4150         (Gen_Adafinal_C): Likewise.
4151         (Gen_Adainit_Ada): Generate an early return if the library has
4152         already been elaborated.
4153         (Gen_Adainit_C): Likewise.
4154         (Gen_Output_File_Ada): Generate an elaboration flag.
4155         (Gen_Output_File_C): Likewise.
4156
4157 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4158
4159         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
4160         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
4161         built in the first place.
4162         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
4163         for CodePeer because Finalize_Address was not built to begin with.
4164         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
4165
4166 2011-08-04  Pascal Obry  <obry@adacore.com>
4167
4168         * adaint.c (__gnat_tmp_name): Use current process id to create temp
4169         filenames, this ensures unicity of filenames across processes.
4170
4171 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4172
4173         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
4174         Raise_Controlled to Raise_From_Controlled_Operation. Update the
4175         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
4176         Add False as the actual to From_Abort in the generated call to
4177         Raise_From_Controlled_Operation.
4178
4179 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
4180
4181         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
4182         so that the ali file name can be retrieved from outside of this package.
4183         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
4184         doing nothing in the general case, but used to update the object file
4185         timestamp if directly generated by the backend.
4186         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
4187         to a later time than the ali file one.
4188
4189 2011-08-04  Yannick Moy  <moy@adacore.com>
4190
4191         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
4192         entities whose body contains an Annotate pragma which forces formal
4193         proof on this body.
4194         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4195         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
4196         Mark_Non_ALFA_Subprogram to pass in a message and node.
4197         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
4198         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
4199         surrounding subprogram.
4200         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
4201         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
4202         as not in ALFA is annotated with Formal_Proof being On, then an error
4203         is issued based on the additional parameters for message and node.
4204         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
4205         * gcc-interface/Make-lang.in: Update dependencies.
4206
4207 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4208
4209         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
4210         Finalize_Address when CodePeer is enabled.
4211
4212 2011-08-04  Pascal Obry  <obry@adacore.com>
4213
4214         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
4215         the latter returns a pointer to a static buffer which is deallocated
4216         at the end of the routine.
4217
4218 2011-08-04  Yannick Moy  <moy@adacore.com>
4219
4220         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
4221         after index creation; mark unconstrained base array type generated as
4222         being in/not in ALFA as well
4223         (Make_Index): mark subtype created as in/not in ALFA
4224         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
4225         over a loop as in/not in ALFA, depending on its type and form of loop
4226         iteration.
4227
4228 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4229
4230         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
4231         directly to False on .NET and JVM.
4232
4233 2011-08-04  Yannick Moy  <moy@adacore.com>
4234
4235         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
4236         constraint that subtype must come from source code to be in ALFA, so
4237         that anonymous subtypes can be in ALFA too.
4238
4239 2011-08-04  Yannick Moy  <moy@adacore.com>
4240
4241         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
4242         reference for ALFA mode.
4243         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
4244         procedure public so as to use it from formal verification back-end.
4245
4246 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
4247
4248         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
4249         invalid checks of the Parameter, making Remove_Switch not working
4250         correctly.
4251
4252 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
4253
4254         * targparm.ads: Update header: no run-time exception is needed on this
4255         file.
4256
4257 2011-08-04  Vincent Celier  <celier@adacore.com>
4258
4259         * a-fihema.adb: Use System.IO instead of GNAT.IO
4260
4261 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4262
4263         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
4264         are forbidden in Compiler_Unit mode.
4265
4266 2011-08-04  Robert Dewar  <dewar@adacore.com>
4267
4268         * sem_util.adb: Minor reformatting.
4269
4270 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4271
4272         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
4273         library-level finalizers.
4274         (Gen_Finalize_Library_C): Update the import string for library-level
4275         finalizers.
4276         (Gen_Finalize_Library_Defs_C): Update the definition name of a
4277         library-level finalizer.
4278         * exp_ch7.adb: Remove with and use clauses for Stringt.
4279         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
4280         Spec_Decl. Add local variable Body_Id. The names of library-level
4281         finalizers are now manually fully qualified and are no longer external.
4282         A single name is now capable of servicing .NET, JVM and non-VM targets.
4283         Pragma Export is no longer required to provide visibility for the name.
4284         (Create_Finalizer_String): Removed.
4285         (New_Finalizer_Name): New routine which mimics New_..._Name.
4286
4287 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4288
4289         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
4290         elaboration counter to Standard_Short_Integer.
4291         * sem_util.adb (Build_Elaboration_Entity): Likewise.
4292         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
4293         (Gen_Elab_Externals_C): Likewise.
4294
4295 2011-08-04  Ed Falis  <falis@adacore.com>
4296
4297         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
4298         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
4299         system-vxworks-mips.ads, system-vxworks-x86.ads
4300         (Always_Compatible_Rep): set to False for all VxWorks targets.
4301
4302 2011-08-04  Robert Dewar  <dewar@adacore.com>
4303
4304         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
4305         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
4306         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
4307         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
4308         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
4309         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
4310         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
4311         Minor reformatting and code reorganization.
4312
4313 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4314
4315         * projects.texi: Added doc for aggregate projects.
4316
4317 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4318
4319         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
4320         Add support for overriding the Project_Path in aggregate projects.
4321
4322 2011-08-04  Robert Dewar  <dewar@adacore.com>
4323
4324         * a-cofove.ads: Minor reformatting.
4325
4326 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4327
4328         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
4329         on the generated code.
4330         (Build_Finalize_Statements): Update the comment on the generated code.
4331         (Build_Initialize_Statements): Update the comment on the generated code.
4332         (Build_Object_Declarations): Add local variable Result. The object
4333         declarations are now built in sequence.
4334         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
4335         RE_Unit_Table.
4336
4337 2011-08-04  Robert Dewar  <dewar@adacore.com>
4338
4339         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
4340
4341 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4342
4343         * einfo.ads (Elaboration_Entity): Document new definition and use.
4344         (Elaboration_Entity_Required): Adjust to above change.
4345         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
4346         * exp_ch12.adb: And with and use for Snames.
4347         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
4348         * exp_util.adb (Set_Elaboration_Flag): Likewise.
4349         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
4350         <Check_Unit_Name>: Deal with N_Expanded_Name.
4351         <Attribute_Elaborated>: Extend to all unit names.
4352         * sem_elab.adb: And with and use for Uintp.
4353         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
4354         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
4355         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
4356         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
4357         from Gen_Adainit_Ada.
4358         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
4359         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
4360         case, do not call System.Standard_Library.Adafinal; instead call
4361         finalize_library if needed.
4362         (Gen_Adafinal_C): Likewise.
4363         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
4364         non-main program case.
4365         (Gen_Adainit_C): Generate a couple of external declarations here.
4366         In the main program case, set SSL.Finalize_Library_Objects.
4367         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
4368         (Gen_Elab_Calls_C): Likewise.
4369         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
4370         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
4371         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
4372         objects here.
4373         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
4374         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
4375         Gen_Adafinal_Ada.
4376         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
4377         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
4378         of external declarations.  Call Gen_Finalize_Library_C.
4379
4380 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4381
4382         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
4383         Compute_Compilation_Phases): new subprogram.
4384         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
4385         The number of mains as well as the various compilation phases that
4386         need to be run are now project tree specific, since various
4387         aggregated trees might have different requirements. In particular,
4388         they do not all require bind or link phases.
4389
4390 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4391
4392         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
4393         (Project_Tree_Appdata): New type.
4394         It is now possible to associate application-specific data to a project
4395         tree. In particular, this is used in the gprbuild builder to avoid a
4396         number of global tables and htables, especially now that there can be
4397         several project trees loaded at once because of aggregate projects.
4398         (Debug_Name): new procedure.
4399         * projects.texi: Clarify syntax of "**" for Source_Dirs
4400
4401 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4402
4403         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
4404         the "roots" for a main.
4405         (Fill_From_Project): add support for aggregate projects. Main units
4406         in aggregated projects are now automatically added in the list of
4407         files to build (although this fails later on in gprbuild, because
4408         these files are not using the root proejct tree, so this needs
4409         further cleanup)
4410         * gcc-interface/Make-lang.in: Update dependencies.
4411
4412 2011-08-03  Yannick Moy  <moy@adacore.com>
4413
4414         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
4415         conditional expression in ALFA.
4416         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
4417         expressions as not in ALFA.
4418
4419 2011-08-03  Robert Dewar  <dewar@adacore.com>
4420
4421         * a-cofove.adb: Minor reformatting.
4422
4423 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4424
4425         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
4426         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
4427         gprbuild sources.
4428         These packages are more logically placed in the Queue package, since
4429         they manipulate the queue. It is also likely that they can be adapted
4430         for gnatmake, thus sharing more code.
4431         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
4432         that we could move the above.
4433
4434 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4435
4436         * errutil.adb (Finalize): clean up the list of error messages on exit.
4437         Calling this subprogram multiple times will no longer show duplicate
4438         error messages on stderr.
4439
4440 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4441
4442         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
4443         Getopt_Switches when we have already define a command line
4444         configuration.
4445
4446 2011-08-03  Yannick Moy  <moy@adacore.com>
4447
4448         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
4449         in ALFA. Instead, they are considered as assertions to prove.
4450         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
4451         nodes as not in ALFA. Instead, include conditional expressions in ALFA
4452         if they have no ELSE part, or if they occur in pre- and postconditions,
4453         where the Condition cannot have side-effects in ALFA
4454         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
4455         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
4456         Instead, include type conversion between scalar types in ALFA.
4457         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
4458         if-and-only-if its type is in ALFA.
4459
4460 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4461
4462         * scos.adb, get_scos.adb, put_scos.adb
4463         New code letter for decisions: G (entry guard)
4464         * par_sco.adb
4465         (Traverse_Subprogram_Body): Rename to...
4466         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
4467         (Traverse_Protected_Body): New subprogram
4468         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
4469         protected bodies and entry bodies.
4470
4471 2011-08-03  Yannick Moy  <moy@adacore.com>
4472
4473         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
4474         entities with get/set subprograms, which is set on procedure entities
4475         generated by the compiler for a postcondition.
4476         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
4477         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
4478         entity for a declaration
4479         (Get_Unique_Entity_For_Decl): new function returning an entity which
4480         represents a declaration, so that matching spec and body have the same
4481         entity.
4482
4483 2011-08-03  Robert Dewar  <dewar@adacore.com>
4484
4485         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
4486         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
4487
4488 2011-08-03  Yannick Moy  <moy@adacore.com>
4489
4490         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
4491         library-level because retriction No_Implicit_Dynamic_Code in the
4492         front-end prevents its definition as a local subprogram
4493         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
4494         for reuse in other contexts
4495         (Traverse_Declarations_Or_Statements,
4496         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4497         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
4498         procedures take a callback parameter to be called on all declarations
4499         * lib-xref.ads
4500         (Traverse_All_Compilation_Units): new generic function to traverse a
4501         compilation unit and call a callback parameter on all declarations
4502
4503 2011-08-03  Javier Miranda  <miranda@adacore.com>
4504
4505         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
4506         in Java since they are always enclosed in a namespace that
4507         differentiates them, and overloaded entities are supported by the VM.
4508
4509 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4510
4511         * checks.adb (Determine_Range): If a computed bound of an operation is
4512         outside the range of the base type of the expression, and overflow
4513         checks are enabled, the result is unknown and cannot be used for any
4514         subsequent constant folding.
4515         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
4516         unknown, so is the result of the comparison.
4517
4518 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4519
4520         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
4521         From_Abort. When finalization was triggered by an abort, propagate
4522         Standard'Abort_Signal rather than Program_Error.
4523         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
4524         From_Abort.
4525         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
4526         From_Abort. When finalization was triggered by an abort, propagate
4527         Standard'Abort_Signal rather than Program_Error.
4528         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
4529         From_Abort.
4530         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
4531         Abort_Id. Update the calls to Build_Object_Declarations and
4532         Build_Raise_Statement to include Abort_Id.
4533         (Build_Adjust_Statements): New local variable Abort_Id. Update the
4534         calls to Build_Object_Declarations and Build_Raise_Statement to include
4535         Abort_Id.
4536         (Build_Finalize_Statements): New local variable Abort_Id. Update the
4537         calls to Build_Object_Declarations and Build_Raise_Statement to include
4538         Abort_Id.
4539         (Build_Components): Create an entity for Abort_Id when exceptions are
4540         allowed on the target.
4541         (Build_Finalizer): New local variable Abort_Id.
4542         (Build_Initialize_Statements): New local variable Abort_Id. Update the
4543         calls to Build_Object_Declarations and Build_Raise_Statement to include
4544         Abort_Id.
4545         (Build_Object_Declarations): Add new formal Abort_Id. Create the
4546         declaration of flag Abort_Id to preserve the original abort status
4547         before finalization code is executed.
4548         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
4549         runtime routine Raise_From_Controlled_Operation.
4550         (Create_Finalizer): Update the call to Build_Raise_Statement to include
4551         Abort_Id. Update the call to Build_Object_Declarations to include
4552         Abort_Id. Update the layout of the finalizer body.
4553         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
4554         (Process_Transient_Objects): New local variable Abort_Id. Remove the
4555         clunky code to create all flags and objects related to
4556         exception propagation and replace it with a call to
4557         Build_Object_Declarations. Update the call to Build_Raise_Statement to
4558         include Abort_Id.
4559         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
4560         Add new formal Abort_Id and associated comment on its use.
4561         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
4562         on its use.
4563         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
4564         Remove the clunky code to create all flags and objects related to
4565         exception propagation and replace it with a call to
4566         Build_Object_Declarations. Update the call to Build_Raise_Statement.
4567
4568 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4569
4570         * s-tassta.adb: Fix minor typos.
4571
4572 2011-08-03  Robert Dewar  <dewar@adacore.com>
4573
4574         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
4575         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
4576
4577 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4578
4579         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
4580         to packages. This ensures that the finalizer body will not end up
4581         inside the freeze node.
4582         (Process_Declarations): Add code to detect whether a freeze node has a
4583         nested finalization collection.
4584
4585 2011-08-03  Pascal Obry  <obry@adacore.com>
4586
4587         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
4588         (Current_Session): Return a not null access to Session_Type.
4589         (Default_Session): Likewise.
4590
4591 2011-08-03  Robert Dewar  <dewar@adacore.com>
4592
4593         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
4594         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
4595
4596 2011-08-03  Pascal Obry  <obry@adacore.com>
4597
4598         * g-awk.ads: Minor comment fix.
4599
4600 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4601
4602         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4603         the tree structure related to discriminant constraints.
4604         Original_Discriminant cannot be used any more for computing the
4605         defining name for the reference to a discriminant.
4606
4607 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4608
4609         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
4610         function is not visibly tagged, this is not a dispatching call and
4611         therfore is not Tag_Indeterminate, even if the function is marked as
4612         dispatching on result.
4613
4614 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4615
4616         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
4617         (Expand_N_Free_Statement): Add a guard to protect against run-times
4618         which do not support controlled types.
4619         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
4620         against run-times which do not support controlled types.
4621         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
4622         against run-times which do not support controlled types.
4623         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
4624         against run-times which do not support controlled types.
4625         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
4626         protect against run-times which do not support controlled types.
4627
4628 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4629
4630         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
4631         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
4632
4633 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4634
4635         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
4636         modified in the source, to prevent spurious warnings when compiling
4637         with -gnatg.
4638
4639 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4640
4641         * a-except-2005.adb: Minor reformatting.
4642
4643 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4644
4645         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
4646         is a renaming declaration in the private part of a package, do not emit
4647         a warning that the with_clause could be moved because the renaming may
4648         be used in the body or in a child unit.
4649
4650 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4651
4652         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4653         Propagate the Comes_From_Source attribute from the original return
4654         object to the renaming.
4655
4656 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4657
4658         * exp_ch7.adb (Build_Raise_Statement): Do not call
4659         Raise_From_Controlled_Operation when this routine is not present in
4660         the run-time library.
4661         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
4662         libraries (Ravenscar), tasks are non-terminating, and protected objects
4663         and tasks can only appear at library level, so we do not want
4664         finalization of protected objects nor tasks.
4665         * exp_intr.adb: Minor clarification in comment.
4666         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
4667         Gen_Output_File_C): Remove references to finalization of library-level
4668         objects when using restricted run-time libraries.
4669
4670 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4671
4672         * sem_ch3.adb (Build_Discriminant_Constraints): Set
4673         Original_Discriminant only if the parent type is a generic formal.
4674
4675 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4676
4677         * exp_ch13.adb: Add with and use clause for Targparm;
4678         (Expand_N_Free_Statement): Prevent the generation of a custom
4679         Deallocate on .NET/JVM targets since this requires pools and address
4680         arithmetic.
4681         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
4682         .NET/JVM targets, attach the newly allocated object to the access
4683         type's finalization collection. Do not generate a call to
4684         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
4685         exist in the runtime.
4686         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
4687         create a custom Allocate for object that do not require initialization.
4688         Attach a newly allocated object to the access type's finalization
4689         collection on .NET/JVM.
4690         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
4691         assignment of controlled types on .NET/JVM. The two hidden pointers
4692         Prev and Next and stored and later restored after the assignment takes
4693         place.
4694         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
4695         kludge for .NET/JVM to recognize a particular piece of code coming from
4696         Heap_Management and change the call to Finalize into Deep_Finalize.
4697         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
4698         finalization collections on .NET/JVM only for types derived from
4699         Controlled. Separate the association of storage pools with a collection
4700         and only allow it on non-.NET/JVM targets.
4701         (Make_Attach_Call): New routine.
4702         (Make_Detach_Call): New routine.
4703         (Process_Object_Declarations): Suppress the generation of
4704         build-in-place return object clean up code on .NET/JVM since it uses
4705         pools.
4706         * exp_ch7.ads (Make_Attach_Call): New routine.
4707         (Make_Detach_Call): New routine.
4708         * exp_intr.adb Add with and use clause for Targparm.
4709         (Expand_Unc_Deallocation): Detach a controlled object from a collection
4710         on .NET/JVM targets.
4711         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
4712         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
4713         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
4714         names used in finalization.
4715
4716 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4717
4718         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
4719         (Attach, Detach): Lock the current task when chaining an object onto a
4720         collection.
4721
4722 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4723
4724         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
4725         Rewritten to create the message strings when the exception is not
4726         raised by an abort during finalization.
4727         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
4728         Raise_From_Controlled_Operation and update its associated comment.
4729         * a-fihema.ads, a-fihema.adb: New GNAT unit.
4730         Ada.Finalization.Heap_Management provides key functionality
4731         associated with controlled objects on the heap, their creation,
4732         finalization and reclamation. Type Finalization_Collection is
4733         effectively a wrapper which sits ontop of a storage pool and performs
4734         all necessary bookkeeping for all the objects it contains. Each
4735         access-to-controlled or access-to-class-wide type receives a collection
4736         as part of its expansion. The compiler generates buffer code and
4737         invokes Allocate / Deallocate to create and destroy allocated
4738         controlled objects.
4739         * a-finali.adb ("="): Removed.
4740         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
4741         fields Prev and Next.
4742         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
4743         A library unit with at least one controlled object on the library level
4744         has a special finalizer which is invoked by the binder. To signal this,
4745         ali files carry field PF.
4746         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
4747         associated comment on field usage.
4748         * a-tags.adb (Get_RC_Offset): Removed.
4749         (Needs_Finalization): New routine.
4750         * a-tags.ads: Update the structure of the GNAT dispatch tables.
4751         Dispatch tables now carry field Needs_Finalization which provides
4752         runtime indication whether a type is controlled or has controlled
4753         components or both. Remove field RC_Offset.
4754         (Get_RC_Offset): Removed along with its associated pragma Export.
4755         Since tagged types with controlled components no longer carry hidden
4756         field _controller, the special mechanism to retrieve its location is no
4757         longer needed.
4758         (Needs_Finalization): New routine.
4759         * atree.ads, atree.adb (Elist24): New routine.
4760         (Set_Elist24): New routine.
4761         * atree.h: Add a define clause for Elist24.
4762         * bindgen.adb New library-level variable Lib_Final_Built.
4763         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
4764         presence of a VM target, the routine generates calls to the proper
4765         library finalization routine.
4766         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
4767         targets. Set the correct library finalization routine depending on
4768         whether the library has controlled objects or this is a VM compilation.
4769         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
4770         to library-level finalizers of compiled units in reverse order of
4771         elaboration. It also produces exception management code and reraises a
4772         potential exception after all units have been finalized.
4773         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
4774         library-level finalizers of compiled units in reverse order of
4775         elaboration.
4776         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
4777         definitions of all library-level finalizers available to the compilation
4778         (Gen_Main_Ada): Directly call Adafinal which now contails all target
4779         dependent code.
4780         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
4781         System.Standard_Library.Adafinal directly. If the library needs
4782         finalization actions, create the sequence of finalization calls.
4783         (Gen_Output_File_Ada): Alphabetize local variables and constants.
4784         Generate a with clause for System.Soft_Links when compiling for a VM.
4785         Remove the code which imports System.Standard_Library.Adafinal as
4786         Do_Finalize. Generate the library finalization routine.
4787         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
4788         If the library needs finalization actions, create all the definitions
4789         of library- level finalizers.
4790         (Has_Finalizer): New routine. Determines whether at least one compiled
4791         unit has a library-level finalizer.
4792         Add type Qualification_Mode.
4793         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
4794         * einfo.adb: New usage of field 15 as Return_Flag.
4795         Remove Finalization_Chain_Entity from the usages of field 19.
4796         Remove Associated_Final_Chain from the usages of field 23.
4797         New usage of field 23 as Associated_Collection.
4798         New usage of field 24 as Finalizer.
4799         New usage of flag 252 as Is_Processed_Transient.
4800         (Associated_Final_Chain): Removed.
4801         (Associated_Collection): New routine.
4802         (Finalization_Chain_Entity): Removed.
4803         (Finalizer): New routine.
4804         (Is_Finalizer): New routine.
4805         (Is_Processed_Transient): New routine.
4806         (Return_Flag): New routine.
4807         (Set_Associated_Final_Chain): Removed.
4808         (Set_Associated_Collection): New routine.
4809         (Set_Finalization_Chain_Entity): Removed.
4810         (Set_Finalizer): New routine.
4811         (Set_Is_Processed_Transient): New routine.
4812         (Set_Return_Flag): New routine.
4813         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
4814         displayed flags.
4815         (Write_Field8_Name): Alphabetize the output.
4816         (Write_Field11_Name): Alphabetize the output.
4817         (Write_Field12_Name): Alphabetize the output.
4818         (Write_Field13_Name): Alphabetize the output.
4819         (Write_Field14_Name): Alphabetize the output.
4820         (Write_Field15_Name): Alphabetize the output.
4821         (Write_Field16_Name): Alphabetize the output.
4822         (Write_Field17_Name): Alphabetize the output.
4823         (Write_Field18_Name): Alphabetize the output.
4824         (Write_Field19_Name): Alphabetize the output. Remove the output of
4825         Finalization_Chain_Entity.
4826         (Write_Field20_Name): Alphabetize the output.
4827         (Write_Field21_Name): Alphabetize the output.
4828         (Write_Field22_Name): Alphabetize the output.
4829         (Write_Field23_Name): Alphabetize the output. Remove the output of
4830         Associated_Final_Chain. Add output for Associated_Collection.
4831         (Write_Field24_Name): Alphabetize the output.
4832         (Write_Field25_Name): Add output for Finalizer.
4833         (Write_Field26_Name): Alphabetize the output.
4834         (Write_Field27_Name): Alphabetize the output.
4835         (Write_Field28_Name): Alphabetize the output.
4836         * einfo.ads: Add new field description for Associated_Collection and
4837         its uses in nodes.
4838         Remove Associated_Final_Chain and its uses in nodes.
4839         Remove Finalization_Chain_Entity and its uses in nodes.
4840         Add new field description for Finalizer and its uses in nodes.
4841         Add new synthesized attribute Is_Finalizer.
4842         Add new flag description for Is_Processed_Transient and its uses in
4843         nodes.
4844         Add new field description for Return_Flag and its uses in nodes.
4845         (Associated_Final_Chain): Removed along with its pragma Inline.
4846         (Associated_Collection): New routine and pragma Inline.
4847         (Finalization_Chain_Entity): Removed along with its pragma Inline.
4848         (Finalizer): New routine and pragma Inline.
4849         (Is_Finalizer): New routine and pragma Inline.
4850         (Is_Processed_Transient): New routine and pragma Inline.
4851         (Return_Flag): New routine and pragma Inline.
4852         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
4853         (Set_Associated_Collection): New routine and pragma Inline.
4854         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
4855         (Set_Finalizer): New routine and pragma Inline.
4856         (Set_Is_Processed_Transient): New routine and pragma Inline.
4857         (Set_Return_Flag): New routine and pragma Inline.
4858         * exp_aggr.adb: Alphabetize subprograms.
4859         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
4860         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
4861         associated comments. Remove local variables External_Final_List and
4862         Attach.
4863         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
4864         Ancestor. Remove the retrieval of finalization lists. Update the call to
4865         Make_Adjust_Call.
4866         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
4867         lists. Update the call to Late_Expansion.
4868         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
4869         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
4870         (Gen_Assign): Remove the retrieval of the finalization list used to
4871         build the assignment. Update the calls to Make_Init_Call and
4872         Make_Adjust_Call.
4873         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
4874         Remove the mechanism to determine attachment levels and finalization
4875         list retrieval. Remove the processing for coextensions.
4876         (Init_Controller): Removed. Controllers no longer exist.
4877         (Late_Expansion): Remove formals Flist and Obj along with their
4878         associated comments. Update the calls to Build_Record_Aggr_Code and
4879         Build_Array_Aggr_Code.
4880         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
4881         (Expand_N_Freeze_Entity): Add special processing for finalizers which
4882         appear in entry bodies, protected subprograms and task bodies.
4883         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
4884         * exp_ch3.adb (Add_Final_Chain): Removed.
4885         (Build_Array_Init_Proc): Alphabetize local variables.
4886         (Build_Assignment): Alphabetize local variables. Update the call to
4887         Maked_Adjust_Call.
4888         (Build_Class_Wide_Master): Rename local variables to better reflect
4889         their role.
4890         (Build_Discriminant_Assignments): Code reformatting.
4891         (Build_Init_Call_Thru): Code reformatting.
4892         (Build_Init_Procedure): Code reformatting. Generate a special version
4893         of Deep_Finalize which is capable of finalizing all initialized
4894         components and ignore the rest.
4895         (Build_Init_Statements): Rename local variables to better reflect their
4896         role.
4897         Reimplement the mechanism to include the creation and update of an index
4898         variable called a "counter". It is used as a bookmark for tracing
4899         initialized and non-initialized components.
4900         (Build_Initialization_Call): Remove local variable Controller_Typ.
4901         Alphabetize all local variables. Remove the initialization of the
4902         record controller and update the call to Make_Init_Call.
4903         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
4904         New local variable Counter.
4905         (Constrain_Array): Alphabetize.
4906         (Expand_Freeze_Array_Type): Create a collection instead of a
4907         finalization list.
4908         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
4909         Finalize_Address which is used in conjunction with allocated controlled
4910         objects.
4911         (Expand_N_Object_Declaration): Remove the creation of a finalization
4912         list for anonymous access types. Update the calls to Make_Init_Call and
4913         Make_Adjust_Call.
4914         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
4915         retrieval of finalization lists. Remove the expansion of the record
4916         controller. Create TSS primitive Finalize_Address used in conjunction
4917         with controlled objects on the heap. Create finalization collections
4918         for access-to-controlled record components.
4919         (Expand_Record_Controller): Removed.
4920         (Freeze_Type): Remove the freezing of record controllers. Freezing of
4921         class-wide types now requires additional processing. Create
4922         finalization collections for access-to-controlled types.
4923         (Increment_Counter): New routine.
4924         (Make_Counter): New routine.
4925         (Make_Eq_If): Remove the mention of Name_uController.
4926         (Make_Predefined_Primitive_Specs): There is no longer need to skip
4927         types coming from System.Finalization_Root.
4928         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
4929         (Predefined_Primitive_Bodies): There is no longer need to skip types
4930         coming from System.Finalization_Root.
4931         (Stream_Operation_OK): Do not generate stream routines for
4932         type Ada.Finalization.Heap_Management.Finalization_Collection.
4933         * exp_ch3.ads: Alphabetize subprograms.
4934         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
4935         Add with and use clause for Lib.
4936         (Complete_Coextension_Finalization): Removed.
4937         (Complete_Controlled_Allocation): New routine. Create a finalization
4938         collection for anonymous access-to-controlled types. Create a custom
4939         Allocate which interfaces with the back end and the machinery in
4940         Heap_Management.
4941         (Expand_Allocator_Expression): Add necessary calls to
4942         Complete_Controlled_Allocation. Remove the retrieval of finalization
4943         lists. Update the calls to Make_Adjust_Call. Generate a call to
4944         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4945         the associated collection.
4946         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
4947         Code clean up. Remove the retrieval of finalization lists and
4948         attachment levels.
4949         Update the call to Make_Init_Call. Generate a call to
4950         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4951         the associated collection.
4952         (Get_Allocator_Final_List): Removed. Finalization lists are not
4953         available.
4954         (Suitable_Element): Remove the mention of Name_uController.
4955         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
4956         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
4957         the left hand side, carry out the assignment and adjust the left hand
4958         side.
4959         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
4960         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
4961         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
4962         BIP_Collection and BIPcollection.
4963         (Build_Heap_Allocator): New routine used to allocate the return object
4964         of a build-in-place function onto a collection.
4965         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
4966         (Expand_Call): Do not replace direct calls to Deep routines with their
4967         aliases.
4968         (Expand_N_Extended_Return_Statement): Give all variables shorter names
4969         and update their occurrences. Add a special return flag to monitor the
4970         [ab]normal execution of the function. The flag is set right before the
4971         return statement.
4972         Rewrite the mechanism used to allocate a build-in-place return object
4973         on the heap or on a storage pool.
4974         (Is_Direct_Deep_Call): New routine.
4975         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
4976         build-in-place function call instead of a final list. Build a call to
4977         Set_Finalize_Address_Ptr to decorate the associated collection.
4978         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
4979         order to name the build-in-place function call's result for later
4980         finalization. Add a collection to a build-in-place function call
4981         instead of a final list.
4982         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
4983         build-in-place function call instead of a final list. Remove the code
4984         which moves one final list and transforms it into the actual in a
4985         nested build-in-place call.
4986         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
4987         build-in-place function call instead of a final list.
4988         (Move_Final_List): Removed.
4989         (Needs_BIP_Collection): New routine.
4990         (Needs_BIP_Final_List): Removed.
4991         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
4992         enumeration type BIP_Formal_Kind.
4993         Update the related comment.
4994         (Needs_BIP_Collection): New routine.
4995         (Needs_BIP_Final_List): Removed.
4996         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
4997         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
4998         majority of subprograms in this unit. Add Name_Finalize_Address to
4999         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
5000         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
5001         statements for an array type.
5002         (Build_Adjust_Statements): Create the adjust statements for a record
5003         type.
5004         (Build_Cleanup_Statements): New routine. A procedure which given any
5005         construct containing asynchronous calls, references to _master, or is a
5006         task body, a task allocation or a protected body produces the necessary
5007         runtime calls to clean up these constructs.
5008         (Build_Exception_Handler): New routine.
5009         (Build_Final_List): Removed.
5010         (Build_Finalization_Collection): New routine. A core procedure which
5011         creates a collection to service heap allocated controlled objects
5012         associated with an access-to-controlled type.
5013         (Build_Finalize_Statements): Create the finalization statements for a
5014         record types.
5015         (Build_Finalizer): New routine. A core procedure which given any
5016         construct with declarations and/or statements detects all objects which
5017         need any type of clean up (controlled objects, protected objects) and
5018         generates all necessary code to clean up the said objects in the proper
5019         order.
5020         (Build_Finalizer_Call): New routine.
5021         (Build_Initialize_Statements): Create the initialization statements for
5022         an array type. The generated routine contains code to finalize partially
5023         initialized arrays.
5024         (Build_Object_Declarations): New routine.
5025         (Build_Raise_Statement): New routine.
5026         (Clean_Simple_Protected_Objects): Removed.
5027         (Controller_Component): Removed.
5028         (Enclosing_Function): New routine.
5029         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
5030         either declarations or statements or both.
5031         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
5032         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
5033         package.
5034         (Find_Final_List): Removed.
5035         (Global_Flist_Ref): Removed.
5036         (In_Finalization_Root): Removed.
5037         (Insert_Actions_In_Scope_Around): Determine the range of the transient
5038         scope in terms of tree nodes. Process all transient variables within
5039         that range.
5040         (Make_Adjust_Call): Rewritten. There is no longer an attach call
5041         generated after the adjust.
5042         (Make_Attach_Call): Removed.
5043         (Make_Call): New routine.
5044         (Make_Clean): Removed.
5045         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
5046         build routines.
5047         (Make_Deep_Proc): Rewritten to generate the new profile signature used
5048         in Deep routines.
5049         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
5050         build routines.
5051         (Make_Final_Call): Modified to simply create a call to either
5052         Deep_Finalize or Finalize.
5053         (Make_Finalize_Address_Body): New routine.
5054         (Make_Finalize_Address_Stmts): New routine. A function which produces
5055         TSS primitive Finalize_Address used in conjunction with heap allocated
5056         controlled objects.
5057         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
5058         (Make_Init_Call): Rewritten. There is no longer an attach call
5059         generated after initialization.
5060         (Make_Local_Deep_Finalize): New routine.
5061         (Make_Set_Finalize_Address_Ptr_Call): New routine.
5062         (Make_Transient_Block): Remove the finalization list retrieval and
5063         manipulation.
5064         (Needs_Finalization): Moved to Exp_Util.
5065         (Parent_Field_Type): New routine.
5066         (Preprocess_Components): New routine.
5067         (Process_Transient_Objects): New routine.
5068         (Wrap_HSS_In_Block): New routine.
5069         (Wrap_Transient_Declaration): Remove finalization list management and
5070         controller insertion.
5071         (Wrap_Transient_Expression): Code reformatting.
5072         (Wrap_Transient_Statement): Code reformatting.
5073         * exp_ch7.ads (Build_Final_List): Removed.
5074         (Build_Finalization_Collection): New routine.
5075         (Build_Raise_Statement): New routine.
5076         (Controller_Component): Removed.
5077         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
5078         (Find_Final_List): Removed.
5079         (In_Finalization_Root): Removed.
5080         (Is_Simple_Protected_Type): Update related comment.
5081         (Make_Adjust_Call): New parameter profile and associated comments.
5082         (Make_Attach_Call): Removed.
5083         (Make_Final_Call): New parameter profile and associated comments.
5084         (Make_Finalize_Address_Body): New routine.
5085         (Make_Init_Call): New parameter profile and associated comments.
5086         (Make_Local_Deep_Finalize): New routine.
5087         (Make_Set_Finalize_Address_Ptr_Call): New routine.
5088         (Needs_Finalization): Moved to Exp_Util.
5089         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
5090         (Expand_N_Protected_Body): Remove the handling of finalization lists.
5091         (Find_Protection_Type): Moved to Exp_Util.
5092         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
5093         (Make_DT): Update sequence of dispatch table initialization. Remove the
5094         initialization of field RC_Offset. Add initialization of field Needs_
5095         Finalization.
5096         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
5097         Reimplement how an object is first finalized, then deallocated.
5098         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
5099         Code reformatting.
5100         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
5101         Register TSS_Finalize_Address with type TSS_Names.
5102         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
5103         procedure provides the interface between an allocation / deallocation
5104         and the support machinery in Ada.Finalization.Heap_Management.
5105         (Find_Init_Call): Code reformatting.
5106         (Find_Init_Call_In_List): Code reformatting.
5107         (Find_Protection_Type): Moved from Exp_Ch9.
5108         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
5109         (Has_Controlled_Coextensions): Removed.
5110         (Has_Controlled_Objects): New routine.
5111         (In_Library_Level_Package_Body): New routine.
5112         (Insert_Action_After): New routine.
5113         (Is_Finalizable_Transient): New routine. This predicate determines
5114         whether an object declaration is one of the many variants of controlled
5115         transients.
5116         (Is_Null_Access_BIP_Func_Call): New routine.
5117         (Is_Non_BIP_Func_Call): New routine.
5118         (Is_Related_To_Func_Return): New routine.
5119         (Needs_Finalization): Moved from Exp_Ch7.
5120         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
5121         (Find_Protection_Type): Moved from Exp_Ch9.
5122         (Has_Controlled_Coextensions): Removed.
5123         (Has_Controlled_Objects): New routine.
5124         (In_Library_Level_Package_Body): New routine.
5125         (Insert_Action_After): New routine.
5126         (Is_Finalizable_Transient): New routine.
5127         (Is_Null_Access_BIP_Func_Call): New routine.
5128         (Is_Non_BIP_Func_Call): New routine.
5129         (Is_Related_To_Func_Return): New routine.
5130         (Needs_Finalization): Moved from Exp_ch7.
5131         * expander.adb (Expand): Add a case for N_Free_Statement.
5132         * freeze.adb (Freeze_All): Replace the generation of a finalization
5133         list with a collection for access-to-controlled types.
5134         (Freeze_Entity): Code reformatting.
5135         (Freeze_Record_Type): Remove the freezing of a record controller
5136         component.
5137         (Freeze_Subprogram): Code reformatting.
5138         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
5139         finalization list.
5140         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
5141         has a library-level finalizer.
5142         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
5143         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
5144         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
5145         files. Add a-fihema to the list of object files.
5146         * par-ch4.adb:
5147         Alphabetize the associations in type Is_Parameterless_Attribute.
5148         * rtsfind.ads: Ada.Finalization_List.Controller and
5149         System.Finalization_Implementation are no longer a GNAT unit.
5150         Update the range of type Ada_Finalization_Child. Remove the following
5151         recoverable entities:
5152
5153            RE_Attach_To_Final_List
5154            RE_Deep_Tag_Attach
5155            RE_Finalize_List
5156            RE_Finalize_One
5157            RE_Finalizable_Ptr_Ptr
5158            RE_Global_Final_List
5159            RE_Limited_Record_Controller
5160            RE_List_Controller
5161            RE_Move_Final_List
5162            RE_Record_Controller
5163            RE_Simple_List_Controller
5164
5165         Add the following recoverable entities:
5166
5167            RE_Add_Offset_To_Address
5168            RE_Allocate
5169            RE_Base_Pool
5170            RE_Deallocate
5171            RE_Exception_Identity
5172            RE_Finalization_Collection
5173            RE_Finalization_Collection_Ptr
5174            RE_Needs_Finalization
5175            RE_Save_Library_Occurrence
5176            RE_Set_Finalize_Address_Ptr
5177            RE_Set_Storage_Pool_Ptr
5178            RE_Storage_Count
5179         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
5180         Name_uController.
5181         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
5182         (First_Stored_Discriminant): Remove the mention of Name_uController.
5183         * sem_aux.ads: Comment reformatting.
5184         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
5185         to redecorate an already existing class-wide type.
5186         (Decorate_Tagged_Type): New parameter profile and associated comment.
5187         Create a "shadow class-wide type" for a shadow entity.
5188         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
5189         of the final chain along with the associated comment.
5190         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
5191         Full_Desig and set it to the full view of the designated type.
5192         Initialize the finalization collection to empty.
5193         (Build_Derived_Record_Type): Alphabetize local variables. Code
5194         reformatting.
5195         (Collect_Fixed_Components): Remove the mention of Name_uController.
5196         (Create_Constrained_Components): Remove the mention of Name_uController.
5197         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
5198         class-wide type of a shadow entity.
5199         (Process_Full_View): Update the machinery which marks type
5200         Limited_Controlled's entity as limited.
5201         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
5202         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
5203         list, instead make a collection build-in-place formal.
5204         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
5205         a designated type in order to establish a match between the renaming
5206         and the renamed entity.
5207         (Find_Selected_Component): Add guard to prevent spurious exceptions
5208         from being raised on .NET/JVM.
5209         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
5210         to the list of primitive that need special processing. Update arrays
5211         C_Names and D_Names.
5212         (Replace_Types): Handle class-wide types.
5213         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
5214         different parameter profile, look at the first formal.
5215         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
5216         use clauses for Exp_Util.
5217         * sem_res.adb: Remove with and use clauses for Elists.
5218         (Propagate_Coextensions): Removed.
5219         (Resolve_Allocator): Do not propagate the list of coextensions from one
5220         allocator to another.
5221         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
5222         Deaccessed_T to Desig_Typ.
5223         (Enter_Name): Remove the mention of Name_uController.
5224         (Gather_Components): Remove the mention of Name_uController.
5225         (Incomplete_Or_Private_View): New routine.
5226         (Is_Coextension_Root): Removed.
5227         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
5228         * sem_util.ads (Incomplete_Or_Private_View): New routine.
5229         (Is_Coextension_Root): Removed.
5230         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
5231         Controlled types are now derived from a null tagged record. Remove
5232         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
5233         * sinfo.adb (Coextensions): Removed.
5234         (Set_Coextensions): Removed.
5235         * sinfo.ads: Remove Coextensions from the explanation of node fields
5236         and its uses in nodes.
5237         Update the field usage of N_Allocator.
5238         (Coextensions): Removed along with its pragma Inline.
5239         (Set_Coextensions): Removed along with its pragma Inline.
5240         * snames.ads-tmpl: Remove names
5241
5242           Name_uClean
5243           Name_uController
5244           Name_uFinal_List
5245           Name_uLocal_Final_List
5246           Name_Finalization_Root
5247           Name_Next
5248           Name_Prev
5249
5250         Add names
5251
5252           Name_uFinalizer
5253           Name_Finalize_Address
5254         * s-pooglo.adb (Allocate): Add overriding indicator.
5255         (Deallocate): Add overriding indicator.
5256         (Storage_Size): Add overriding indicator.
5257         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
5258         than Finalize_Global_List.
5259         (Null_Finalize_Global_List): Removed.
5260         (Save_Library_Occurrence): New routine.
5261         * s-soflin.ads: Remove variable Finalize_Global_List along with its
5262         initialization. Add variable Finalize_Library_Objects along with its
5263         pragma Export. Add variables Library_Exception and
5264         Library_Exception_Set along with their pragma Export.
5265         (Null_Finalize_Global_List): Removed.
5266         (Save_Library_Occurrence): New routine.
5267         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
5268         rather than Finalize_Global_List.
5269         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
5270         of the constructed node.
5271
5272 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5273
5274         * link.c: Include "auto-host.h" before system headers.
5275
5276 2011-08-03  Vincent Celier  <celier@adacore.com>
5277
5278         * make.adb (Gnatmake): Add to table Library_Projs only library projects
5279         that are not extended. Do not check if a library project that is
5280         extended should be regenerated. Do not add to table Library_Paths the
5281         libraries that are in extended projects. Link only with libraries that
5282         are in libray projects that are not extended.
5283         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
5284         for a library project that is extended.
5285
5286 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5287
5288         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
5289         conforming subprogram renamings that appear to be completions if they
5290         are not fully conformant.
5291         Such renamings are homographs but not completions.
5292         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
5293         names in a subprogram renaming that appears in an instance.
5294
5295 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5296
5297         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
5298         not immutably limited, build actual subtype from expression to provide
5299         proper bounds to caller.
5300
5301 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5302
5303         * sem_ch8.adb: Minor comment correction.
5304
5305 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5306
5307         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
5308         returning a limited array, use an extended return statement.
5309
5310 2011-08-03  Vincent Celier  <celier@adacore.com>
5311
5312         * make.adb (Initialize): If --subdirs= is used, but no project file is
5313         specified, attempt to create the specify subdir if it does not already
5314         exist and use it as the object directory as if -D had been specified.
5315
5316 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5317
5318         * s-tpopsp-vms.adb: New file.
5319         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
5320         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
5321
5322 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5323
5324         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
5325         package.
5326
5327 2011-08-03  Yannick Moy  <moy@adacore.com>
5328
5329         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
5330         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
5331         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
5332         detect that an array has static bounds.
5333
5334 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5335
5336         * exp_dist.adb: Minor reformatting.
5337
5338 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5339
5340         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
5341         (ATCB_Key): Removed, not always used.
5342
5343 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5344
5345         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
5346         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
5347         most remaining global variables.
5348
5349 2011-08-03  Robert Dewar  <dewar@adacore.com>
5350
5351         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
5352         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
5353         reformatting.
5354
5355 2011-08-03  Javier Miranda  <miranda@adacore.com>
5356
5357         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
5358         that must be passed by copy in VM targets.
5359
5360 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5361
5362         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
5363         duplicates a similar htable now in the project tree.
5364
5365 2011-08-03  Claire Dross  <dross@adacore.com>
5366
5367         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
5368         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
5369         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
5370         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
5371         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
5372         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
5373         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
5374         update.
5375
5376 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5377
5378         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
5379         (ATCB_Key): Removed, not always used.
5380         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
5381         s-taprop-posix.adb.
5382         * s-tpopsp-tls.adb: New file.
5383         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
5384         x86/x64/ia64/powerpc/sparc Linux.
5385
5386 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5387
5388         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
5389         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
5390
5391 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5392
5393         * rtsfind.ads, exp_dist.adb, exp_dist.ads
5394         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
5395         Fix type selection for mapping integer types to PolyORB types.
5396
5397 2011-08-03  Bob Duff  <duff@adacore.com>
5398
5399         * sem_ch7.adb: Minor comment clarification.
5400
5401 2011-08-03  Bob Duff  <duff@adacore.com>
5402
5403         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
5404         an error analyzing a choice, skip further processing. Further
5405         processing could cause a crash or cascade errors.
5406
5407 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5408
5409         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
5410         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
5411         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
5412         prj-env.ads (Shared_Project_Tree_Data): new type
5413         An aggregate project and its aggregated trees need to share the common
5414         data structures used for lists of strings, packages,... This makes the
5415         code simpler since otherwise we have to pass the root tree (also used
5416         for the configuration file data) in addition to the current project
5417         tree. This also avoids ambiguities as to which tree should be used.
5418         And finally this saves a bit of memory.
5419         (For_Every_Project_Imported): new parameter Tree.
5420         Since aggregated projects are using a different tree, we need to let
5421         the caller know which tree to use to manipulate the returned project.
5422
5423 2011-08-03  Robert Dewar  <dewar@adacore.com>
5424
5425         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
5426         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
5427         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
5428         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
5429
5430 2011-08-03  Javier Miranda  <miranda@adacore.com>
5431
5432         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
5433         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
5434
5435 2011-08-03  Bob Duff  <duff@adacore.com>
5436
5437         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
5438         the Base_Type.
5439
5440 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
5441
5442         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
5443         g-sehash.ads: Fix typo. Update header.
5444
5445 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5446
5447         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
5448         expansion.
5449
5450 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5451
5452         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
5453         prefixes of private types along with records, since the selector may be
5454         a discriminant.
5455         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
5456         private types along with records, since the selector may be a
5457         discriminant.
5458
5459 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5460
5461         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
5462
5463 2011-08-03  Javier Miranda  <miranda@adacore.com>
5464
5465         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
5466         Tagged_Type_Expansion.
5467
5468 2011-08-03  Yannick Moy  <moy@adacore.com>
5469
5470         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
5471         violation when the argument of concatenation is the name of a
5472         constant.
5473
5474 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5475
5476         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
5477         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
5478         (Process_Declarative_Items): new parameter Child_Env.
5479
5480 2011-08-03  Yannick Moy  <moy@adacore.com>
5481
5482         * alfa.ads: Update format of ALFA section in ALI file in order to
5483         add a mapping from bodies to specs when both are present.
5484         (ALFA_Scope_Record): Add components for spec file/scope.
5485         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
5486         present.
5487         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
5488         collected, fill in the spec information when relevant.
5489         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
5490         present.
5491
5492 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5493
5494         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
5495         code unit to decide whether to add internally generated subprograms.
5496
5497 2011-08-03  Javier Miranda  <miranda@adacore.com>
5498
5499         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
5500         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
5501         be handled by copy in VM targets.
5502
5503 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5504
5505         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
5506         code with Makeutl.Get_Switches.
5507         * prj-tree.adb: Update comment.
5508
5509 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5510
5511         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
5512         subprogram with a limited formal that does not support external
5513         streaming.
5514
5515 2011-08-03  Yannick Moy  <moy@adacore.com>
5516
5517         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
5518         continuation line
5519         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
5520         not from current unit in two phases, because it is not possible to
5521         change the table while iterating over its content.
5522         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
5523
5524 2011-08-03  Sergey Rybin  <rybin@adacore.com>
5525
5526         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
5527         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
5528
5529 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5530
5531         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
5532         and the component type is composite, this is ambiguous for predefined
5533         concatenation, but if the node is not overloaded and the entity is a use
5534         -defined function its profile can be used to resolve that aggregate.
5535
5536 2011-08-03  Robert Dewar  <dewar@adacore.com>
5537
5538         * exp_ch4.adb: Minor code cleanup.
5539
5540 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5541
5542         * exp_dist.adb: Do not generate distribution stubs if serious errors
5543         have been diagnosed.
5544
5545 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5546
5547         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
5548         the first formal of a primitive operation, go to the base type to
5549         handle properly an access to a derived type with constrained
5550         discriminants.
5551         * sem_type.adb (Disambiguate): an immediately visible operator hides a
5552         user-defined function that is only use-visible.
5553
5554 2011-08-03  Robert Dewar  <dewar@adacore.com>
5555
5556         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
5557         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
5558         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
5559         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
5560         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
5561         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
5562         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
5563         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
5564
5565 2011-08-03  Robert Dewar  <dewar@adacore.com>
5566
5567         * repinfo.adb (List_Mechanism): Add handling of
5568         Convention_Ada_Pass_By_XXX.
5569         * sem_mech.adb (Set_Mechanism): Ditto.
5570         * sem_prag.adb (Process_Convention): Add entries for
5571         Convention_Ada_Pass_By_XXX.
5572         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
5573
5574 2011-08-03  Pascal Obry  <obry@adacore.com>
5575
5576         * makeutl.adb: Minor reformatting.
5577
5578 2011-08-03  Vincent Celier  <celier@adacore.com>
5579
5580         * fname-uf.adb
5581         (Get_File_Name) If the file cannot be found when there are no config
5582         pragmas file and May_Fail is True, return No_File instead of the file
5583         name, to be consistent.
5584
5585 2011-08-03  Pascal Obry  <obry@adacore.com>
5586
5587         * adaint.c (__gnat_is_executable_file_attr): Avoid access
5588         to null pointer.
5589
5590 2011-08-03  Javier Miranda  <miranda@adacore.com>
5591
5592         * sem_ch13.adb
5593         (Same_Representation): In VM targets the representation of arrays with
5594         aliased components differs from arrays with non-aliased components.
5595
5596 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5597
5598         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
5599         not systematically lower case attribute indexes that contain no "."
5600         Fix definition of several Naming attributes, which take
5601         a unit name as index and therefore should be case insensitive.
5602         Minor refactoring (reduce length of variable names).
5603
5604 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5605
5606         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
5607
5608 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5609
5610         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
5611         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
5612         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
5613         prj-tree.ads (Prj.Tree.Environment): new type.
5614
5615 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5616
5617         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
5618         prj-tree.adb, prj-tree.ads (Environment): new type.
5619
5620 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5621
5622         * prj-tree.ads: Remove unused variable.
5623
5624 2011-08-03  Yannick Moy  <moy@adacore.com>
5625
5626         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
5627         issuing messages related to SPARK restriction violation.
5628
5629 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5630
5631         * sem_ch6.adb: guard against error nodes in return statements.
5632
5633 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5634
5635         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
5636         a warning can only appear on a configuration file, so emit warning
5637         without further checks.
5638
5639 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5640
5641         * s-interr.ads: add overriding keyword.
5642
5643 2011-08-03  Geert Bosch  <bosch@adacore.com>
5644
5645         * exp_attr.adb: Fix minor typo.
5646
5647 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5648
5649         * par-ch4.adb: improve error recovery.
5650
5651 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5652
5653         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
5654         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
5655         to Errout_Handling.
5656
5657 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5658
5659         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
5660         "external" as an attribute name in aggregate projects.
5661
5662 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
5663
5664         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
5665         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
5666         from 0, so we need to adjust.
5667
5668 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5669
5670         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
5671         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
5672
5673 2011-08-03  Yannick Moy  <moy@adacore.com>
5674
5675         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
5676         restriction on overloaded entity if the entity is not an operator.
5677
5678 2011-08-03  Yannick Moy  <moy@adacore.com>
5679
5680         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
5681         restrict.ads: Rename remaining Check_Formal_Restriction* into
5682         Check_SPARK_Restriction*.
5683
5684 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5685
5686         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
5687         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
5688         qualifier.
5689         (Project_Empty): removed
5690         (Empty_Project): new parameter Qualifier
5691         This is used to have fields specific to aggregate projects, cleaner
5692         New field to store the list of aggregated projects.
5693         (Check_Aggregate_Project): removed
5694         (Process_Aggregated_Projects, Free): new subprograms.
5695
5696 2011-08-03  Olivier Hainque  <hainque@adacore.com>
5697
5698         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
5699
5700 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5701
5702         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
5703         explicit dereference of an unconstrained type, create a constrained
5704         subtype for it, as is done for function calls that return an
5705         unconstrained type.
5706
5707 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5708
5709         * g-pehage.adb (Finalize): Avoid possible double-free.
5710
5711 2011-08-03  Steve Baird  <baird@adacore.com>
5712
5713         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
5714         Elab_Spec/Body attrs in CodePeer_Mode.
5715
5716 2011-08-03  Javier Miranda  <miranda@adacore.com>
5717
5718         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
5719         low bound is not known at compile time but they have no others choice.
5720         Done because in this case the bounds can be obtained directly from the
5721         aggregate.
5722
5723 2011-08-03  Ed Falis  <falis@adacore.com>
5724
5725         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
5726         on VxWorks SMP. Remove unusable constant ANY_CPU.
5727
5728 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5729
5730         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
5731         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
5732         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
5733         Prj.Env.Initialize_Empty): new subprograms
5734         (Get_Env, Find_Project): remove parameter Target_Name.
5735
5736 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5737
5738         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
5739         as a condition for the delayed call to Derived_Subprograms done for the
5740         case of the rewriting of a derived type that constrains the
5741         discriminants of its parent type.
5742         Avoids redundant subprogram derivations for private subtype derivations.
5743
5744 2011-08-03  Javier Miranda  <miranda@adacore.com>
5745
5746         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
5747         Build_Record_Aggr_Code.
5748         (Build_Record_Aggr_Code): Add missing support to initialize hidden
5749         discriminants in extension aggregates.
5750
5751 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5752
5753         * prj-pp.adb (Print): also output project qualifiers, since in
5754         particular "aggregate" is mandatory in an aggregate project.
5755
5756 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5757
5758         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
5759         (Debug_Output): new function.
5760
5761 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5762
5763         * gnat_ugn.texi: Document -Wstack-usage.
5764         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
5765
5766 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5767
5768         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
5769         have keyword LIMITED.
5770
5771 2011-08-03  Yannick Moy  <moy@adacore.com>
5772
5773         * alfa.adb, alfa.ads, alfa_test.adb: New files.
5774         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
5775         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
5776         section (does not happen in compiler, only if code directly calls
5777         Scan_ALI).
5778         * get_alfa.adb, get_alfa.ads: New files.
5779         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
5780         needed.
5781         * lib-xref-alfa.adb: New file.
5782         * lib-xref.adb, lib-xref.ads
5783         (Xref_Entry): redefine information needed in cross-references for ALFA.
5784         Push ALFA treatments in separated local package.
5785         (Enclosing_Subpragram_Or_Package): treat specially subprogram
5786         identifiers. Return entity of package body instead of spec. Return
5787         Empty for a scope with no location.
5788         (Generate_Reference): adapt to new components for ALFA information.
5789         Remove the need for D references on definitions.
5790         (Is_Local_Reference): moved to ALFA local package
5791         (Output_References): extract subfunction as Extract_Source_Name
5792         (Output_Local_References): remove procedure, replaced by filtering of
5793         cross-references in package ALFA and printing in Put_ALFA.
5794         (Write_Entity_Name): remove procedure
5795         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
5796         print exact name of entity as it appears in source file
5797         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
5798         * put_alfa.adb, put_alfa.ads: New files.
5799         * xref_lib.adb (Search_Xref): protect read of cross-references against
5800         reading other sections of the ALI file, in gnatxref
5801         (Search): protect read of cross-references against reading other
5802         sections of the ALI file, in gnatfind.
5803         * gcc-interface/Make-lang.in: Update dependencies.
5804
5805 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5806
5807         * sem_ch3.adb: Minor reformatting.
5808
5809 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
5810
5811         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
5812         raising an exception.
5813
5814 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5815
5816         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
5817         type, always use 1 as the lower bound or string, even if lower bound of
5818         context is not static, to handle properly null strings in a non-static
5819         context.
5820
5821 2011-08-03  Bob Duff  <duff@adacore.com>
5822
5823         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
5824         always legal on the right-hand side of an assignment statement; there
5825         is always an applicable index constraint in this case. Therefore, the
5826         check for Pkind = N_Assignment_Statement is now unconditional -- it
5827         doesn't depend on whether Is_Constrained (Typ).
5828
5829 2011-08-03  Robert Dewar  <dewar@adacore.com>
5830
5831         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
5832
5833 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5834
5835         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
5836         for an itype created within a generic unit.
5837
5838 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5839
5840         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
5841         suppresses all inlining.
5842
5843 2011-08-03  Robert Dewar  <dewar@adacore.com>
5844
5845         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
5846         exp_aggr.adb: Minor reformatting.
5847
5848 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5849
5850         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
5851         tagged assignment when discriminant checks are suppressed. This is
5852         useless and extremely costly in terms of static stack usage.
5853
5854 2011-08-03  Bob Duff  <duff@adacore.com>
5855
5856         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
5857         of generics, because this leads to the wrong entity in the wrong scope,
5858         causing (e.g.) pragma Export_Procedure to get an error if the entity is
5859         an instance.
5860         (Process_Interface_Name): Follow Alias for instances of generics, to
5861         correct for the above change.
5862
5863 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5864
5865         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
5866         is an integer literal it is always safe to replace the reference. In
5867         addition, if the reference appears in the generated code for an object
5868         declaration it is necessary to copy because otherwise the reference
5869         might be to the uninitilized value of the discriminant of the object
5870         itself.
5871
5872 2011-08-03  Pascal Obry  <obry@adacore.com>
5873
5874         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
5875         ACL used, in this case we want to check for ending .exe, not .exe
5876         anywhere in the path.
5877
5878 2011-08-03  Sergey Rybin  <rybin@adacore.com>
5879
5880         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5881         the tree structure (semantic decoration of references to record
5882         discriminants).
5883
5884 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5885
5886         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
5887         choices of a named array aggregate, bail out when any choices are
5888         marked as Errors_Posted.
5889
5890 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5891
5892         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
5893         in which entity is frozen, to handle properly loop variables in
5894         iterators.
5895
5896 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5897
5898         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
5899         subtype is not static, compute the upper bound using attributes, to
5900         handle properly index types that are not integer types.
5901
5902 2011-08-03  Bob Duff  <duff@adacore.com>
5903
5904         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
5905         Update copyright notice.
5906
5907 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5908
5909         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
5910         Original_Discriminant if within an instance.
5911         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
5912
5913 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5914
5915         * einfo.ads: Minor reformatting.
5916
5917 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5918
5919         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
5920         composite type with an unfrozen subcomponent, in the profile of a
5921         primitive operation.
5922
5923 2011-08-03  Robert Dewar  <dewar@adacore.com>
5924
5925         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5926
5927 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5928
5929         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
5930         unconstrained type with discriminants is initialized with an aggregate,
5931         use the constrained subtype of the aggregate as the type of the object,
5932         because it is immutable, and this allows the back-end to generate no
5933         code for the object declaration.
5934
5935 2011-08-03  Robert Dewar  <dewar@adacore.com>
5936
5937         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
5938         comparison operand is variable, and turns out to be zero or negative.
5939
5940 2011-08-03  Javier Miranda  <miranda@adacore.com>
5941
5942         * exp_intr.adb
5943         (Expand_Dispatching_Constructor_Call): Disable expansion of
5944         code required for native targets. Done to avoid generating
5945         references to unavailable runtime entities in VM targets.
5946         * exp_ch3.adb
5947         (Expand_N_Object_Declaration): Add missing support to handle
5948         the explicit initialization of class-wide interface objects.
5949         Fix documentation.
5950
5951 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5952
5953         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
5954
5955 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5956
5957         * a-cbdlli.adb (Splice): move source items from first to last
5958
5959 2011-08-03  Yannick Moy  <moy@adacore.com>
5960
5961         * sem_util.ads: comment added.
5962
5963 2011-08-03  Javier Miranda  <miranda@adacore.com>
5964
5965         * exp_aggr.adb
5966         (Expand_Record_Aggregate): In VM targets disable the expansion into
5967         assignments of aggregates whose type is not known at compile time.
5968
5969 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5970
5971         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
5972         protected entries and task entries, to build the proper renaming
5973         declaration for entry formals, used in debugging.
5974         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
5975         parameters in the same way.
5976
5977 2011-08-02  Robert Dewar  <dewar@adacore.com>
5978
5979         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
5980         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
5981         code reorganization.
5982
5983 2011-08-02  Robert Dewar  <dewar@adacore.com>
5984
5985         * debug.adb: Debug flag d.P to suppress length comparison optimization
5986         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
5987         comparison of Length by comparing First/Last instead.
5988
5989 2011-08-02  Matthew Heaney  <heaney@adacore.com>
5990
5991         * a-cobove.ads: Code clean up.
5992
5993 2011-08-02  Vincent Celier  <celier@adacore.com>
5994
5995         * adaint.c (file_names_case_sensitive_cache): New static int.
5996         (__gnat_get_file_names_case_sensitive): Cache the return value in
5997         file_names_case_sensitive_cache at the first invocation, to avoid
5998         multiple calls to getenv.
5999
6000 2011-08-02  Bob Duff  <duff@adacore.com>
6001
6002         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
6003
6004 2011-08-02  Yannick Moy  <moy@adacore.com>
6005
6006         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
6007         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
6008         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
6009         indicate that we are in a precondition or postcondition. This is used in
6010         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
6011         decide whether to flag the spec or body of the current subprogram as
6012         not in ALFA.
6013
6014 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
6015
6016         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
6017         list.
6018         * a-extiin.ads: New file.
6019
6020 2011-08-02  Bob Duff  <duff@adacore.com>
6021
6022         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
6023         now raises Name_Error instead of Use_Error in certain cases. The other
6024         parts of this AI were already implemented properly.
6025
6026 2011-08-02  Vincent Celier  <celier@adacore.com>
6027
6028         * link.c: Only import "auto-host.h" when building the gnattools.
6029
6030 2011-08-02  Yannick Moy  <moy@adacore.com>
6031
6032         * sem_util.adb: Inter-unit inlining does not work for a subprogram
6033         which calls a local subprogram, so extract subprogram
6034         from Mark_Non_ALFA_Subprogram_Body.
6035
6036 2011-08-02  Javier Miranda  <miranda@adacore.com>
6037
6038         * exp_ch9.adb
6039         (Extract_Dispatching_Call): If the type of the dispatching object is an
6040         access type then return an explicit dereference in the Object out-mode
6041         parameter.
6042
6043 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6044
6045         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
6046         compatibility checks for all indexes of an array subtype, not just the
6047         first. Reset Has_Dynamic_Range_Check on the subtype before each
6048         potential check to ensure that Insert_Range_Checks will not elide any
6049         of the dynamic checks.
6050
6051 2011-08-02  Yannick Moy  <moy@adacore.com>
6052
6053         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
6054         SPARK restriction at parsing time.
6055         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
6056         directive only if the SPARK restriction is set for this unit.
6057
6058 2011-08-02  Yannick Moy  <moy@adacore.com>
6059
6060         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
6061         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
6062         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
6063         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
6064         Mark_Non_ALFA_Subprogram_Body.
6065         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
6066         inlined.
6067
6068 2011-08-02  Yannick Moy  <moy@adacore.com>
6069
6070         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
6071         might be costly.
6072
6073 2011-08-02  Robert Dewar  <dewar@adacore.com>
6074
6075         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
6076         exp_ch3.adb: Minor reformatting.
6077
6078 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6079
6080         * adaint.c (__gnat_locate_exec_on_path): only returns executable
6081         files, not any regular file.
6082         (__gnat_locate_file_with_predicate): new subprogram.
6083
6084 2011-08-02  Yannick Moy  <moy@adacore.com>
6085
6086         * sinfo.adb, sinfo.ads: Restrict the use of flags
6087         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
6088         nodes, plus N_Subtype_Declaration for the 2nd one.
6089
6090 2011-08-02  Sergey Rybin  <rybin@adacore.com>
6091
6092         * gnat_rm.texi: Ramification of pragma Eliminate documentation
6093          - fix bugs in the description of Source_Trace;
6094          - get rid of UNIT_NAME;
6095
6096 2011-08-02  Javier Miranda  <miranda@adacore.com>
6097
6098         * exp_ch9.adb
6099         (Build_Dispatching_Requeue): Adding support for VM targets
6100         since we cannot directly reference the Tag entity.
6101         * exp_sel.adb (Build_K): Adding support for VM targets.
6102         (Build_S_Assignment): Adding support for VM targets.
6103         * exp_disp.adb
6104         (Default_Prim_Op_Position): In VM targets do not restrict availability
6105         of predefined interface primitives to compiling in Ada 2005 mode.
6106         (Is_Predefined_Interface_Primitive): In VM targets this service is not
6107         restricted to compiling in Ada 2005 mode.
6108         (Make_VM_TSD): Generate code that declares and initializes the OSD
6109         record. Needed to support dispatching calls through synchronized
6110         interfaces.
6111         * exp_ch3.adb
6112         (Make_Predefined_Primitive_Specs): Enable generation of predefined
6113         primitives associated with synchronized interfaces.
6114         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6115         primitives associated with synchronized interfaces.
6116
6117 2011-08-02  Yannick Moy  <moy@adacore.com>
6118
6119         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6120         statements hidden in SPARK if preceded by the HIDE directive
6121         (Parse_Exception_Handlers): mark each exception handler in a sequence of
6122         exception handlers as hidden in SPARK if preceded by the HIDE directive
6123         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6124         if starting with the HIDE directive
6125         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6126         starting with the HIDE directive; mark the declarations in a private
6127         part as hidden in SPARK if the private part starts with the HIDE
6128         directive
6129         * restrict.adb, restrict.ads
6130         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6131         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6132         argument node belongs to a part which is hidden in SPARK
6133         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6134         parts in SPARK; protect the possibly costly call to
6135         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6136         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6137         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6138         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6139         Tok_SPARK_Hide.
6140         (Scan): recognize special comment starting with '#' and followed by
6141         SPARK keyword "hide" as a HIDE directive.
6142
6143 2011-08-02  Yannick Moy  <moy@adacore.com>
6144
6145         * types.ads, erroutc.ads: Minor reformatting.
6146
6147 2011-08-02  Vincent Celier  <celier@adacore.com>
6148
6149         * link.c: Add response file support for cross platforms.
6150
6151 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6152
6153         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
6154         in an association, set parent field of copy before partial analysis.
6155         * sem_res.adb (Resolve_Slice): create reference to itype only when
6156         expansion is enabled.
6157
6158 2011-08-02  Yannick Moy  <moy@adacore.com>
6159
6160         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
6161         for new flag denoting which subprogram bodies are in ALFA
6162         * restrict.adb, sem_ch7.adb: Update comment
6163         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6164         sem_ch9.adb, sem_res.adb: Add calls to
6165         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
6166         * sem_ch6.adb (Analyze_Function_Return): add calls to
6167         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
6168         middle of the body, and extended return.
6169         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
6170         False when missing return.
6171         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
6172         to True for subprograms whose spec is in ALFA. Remove later on the flag
6173         on the entity used for a subprogram body when there exists a separate
6174         declaration.
6175         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
6176         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
6177         False, otherwise do nothing.
6178
6179 2011-08-02  Robert Dewar  <dewar@adacore.com>
6180
6181         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6182
6183 2011-08-02  Yannick Moy  <moy@adacore.com>
6184
6185         * sem_ch4.ads: minor formatting.
6186
6187 2011-08-02  Yannick Moy  <moy@adacore.com>
6188
6189         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
6190         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
6191         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
6192         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
6193         opt.ads: cleanup of SPARK mode
6194
6195 2011-08-02  Yannick Moy  <moy@adacore.com>
6196
6197         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
6198         types.
6199         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
6200         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
6201         * sem_ch3.adb
6202         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
6203         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
6204         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
6205         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
6206         types.
6207         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
6208         non-static range.
6209         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
6210         functions whose return type is not in ALFA.
6211         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
6212         specifications.
6213         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
6214         parameter's type is not in ALFA.
6215         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
6216         types are in ALFA.
6217
6218 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6219
6220         * sem_ch6 (Analyze_Expression_Function): treat the function as
6221         Inline_Always, and introduce a subprogram declaration for it when it is
6222         not a completion.
6223         * inline.adb (Add_Inlined_Body): recognize bodies that come from
6224         expression functions, so that the back-end can determine whether they
6225         can in fact be inlined.
6226         * sem_util.adb (Is_Expression_Function): predicate to determine whether
6227         a function body comes from an expression function.
6228
6229 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6230
6231         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
6232         null exclusions to test Can_Never_Be_Null on the anonymous access types
6233         of the formals rather than testing the formals themselves. Exclude this
6234         check in cases where the Old_Formal is marked as a controlling formal,
6235         to avoid issuing spurious errors for bodies completing dispatching
6236         operations (due to the flag not getting set on controlling access
6237         formals in body specs).
6238         (Find_Corresponding_Spec): When checking full and subtype conformance of
6239         subprogram bodies in instances, pass Designated and E in that order, for
6240         consistency with the expected order of the formals (New_Id followed by
6241         Old_Id).
6242
6243 2011-08-02  Robert Dewar  <dewar@adacore.com>
6244
6245         * sem_ch8.adb: Minor reformatting.
6246
6247 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6248
6249         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
6250         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
6251         primitive operations of class-wide actuals.
6252
6253 2011-08-02  Javier Miranda  <miranda@adacore.com>
6254
6255         * exp_atag.ads, exp_atag.adb
6256         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
6257         since its value is implicitly passed in argument Typ.
6258         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
6259         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
6260         Build_Common_Dispatching_Select_Statements.
6261
6262 2011-08-02  Robert Dewar  <dewar@adacore.com>
6263
6264         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
6265         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
6266         Minor reformatting.
6267
6268 2011-08-02  Robert Dewar  <dewar@adacore.com>
6269
6270         * sem_res.adb: Minor reformatting.
6271         * sem_prag.adb: Minor reformatting.
6272
6273 2011-08-02  Javier Miranda  <miranda@adacore.com>
6274
6275         * exp_atag.adb, exp_atags.ads
6276         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
6277         by the tagged type Entity. Required to use this routine in the VM
6278         targets since we do not have available the Tag entity in the VM
6279         platforms.
6280         * exp_ch6.adb
6281         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
6282         Ada.Tags has not been previously loaded.
6283         * exp_ch7.adb
6284         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
6285         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
6286         * sem_aux.adb
6287         (Enclosing_Dynamic_Scope): Add missing support to handle the full
6288         view of enclosing scopes. Required to handle enclosing scopes that
6289         are synchronized types whose full view is a task type.
6290         * exp_disp.adb
6291         (Build_VM_TSDs): Minor code improvement to avoid generating and
6292         analyzing lists with empty nodes.
6293         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
6294         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
6295         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
6296         (Make_Disp_Timed_Select_Body): Add support for VM targets.
6297         (Make_Select_Specific_Data_Table): Add support for VM targets.
6298         (Make_VM_TSD): Generate code to initialize the SSD structure of
6299         the TSD.
6300
6301 2011-08-02  Yannick Moy  <moy@adacore.com>
6302
6303         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
6304         cross-references section in ALI.
6305         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
6306         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
6307         Sub).
6308         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
6309         subprogram or package entity of a node
6310         (Is_Local_Reference_Type): new function returns True for references
6311         selected in local cross-references.
6312         (Lt): function extracted from Lt in Output_References
6313         (Write_Entity_Name): function extracted from Output_References
6314         (Generate_Definition): generate reference with type 'D' for definition
6315         of objects (object declaration and parameter specification), with
6316         appropriate locations and units, for use in local cross-references.
6317         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
6318         references of type 'I' for initialization in object definition.
6319         (Output_References): move part of function Lt and procedure
6320         Write_Entity_Name outside of the body. Ignore references of types 'D'
6321         and 'I' introduced for local cross-references.
6322         (Output_Local_References): new procedure to output the local
6323         cross-references sections.
6324         (Lref_Entity_Status): new array defining whether an entity is a local
6325         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
6326         with 'I' type when initialization expression is present.
6327         * get_scos.adb, get_scos.ads: Correct comments and typos
6328
6329 2011-08-02  Javier Miranda  <miranda@adacore.com>
6330
6331         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
6332         the JVM target.
6333         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
6334         the JVM target.
6335         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
6336         TSD support.
6337
6338 2011-08-02  Vincent Celier  <celier@adacore.com>
6339
6340         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
6341         (No_Space_Img): New function
6342         (Find_Excluded_Sources): When reading from a file, record the file name
6343         and the line number for each excluded source.
6344         (Mark_Excluded_Sources): When reporting an error, if the excluded
6345         sources were read from a file, include file name and line number in
6346         the error message.
6347
6348 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6349
6350         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
6351
6352 2011-08-02  Robert Dewar  <dewar@adacore.com>
6353
6354         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
6355
6356 2011-08-02  Javier Miranda  <miranda@adacore.com>
6357
6358         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
6359         generation of TSDs to the DOTNET compiler.
6360         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
6361         generation of TSDs to the DOTNET compiler.
6362
6363 2011-08-02  Javier Miranda  <miranda@adacore.com>
6364
6365         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
6366         record of all the tagged types declared inside library level package
6367         declarations, library level package bodies or library level subprograms.
6368         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
6369         associated with a given tagged type.
6370         (Build_VM_TSDs): New subprogram.
6371         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
6372         compilation units that are subprograms.
6373         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
6374         compilation units that are package bodies.
6375         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
6376         units that are a package declaration or a package instantiation.
6377         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
6378         reorganization to improve the error generated by the frontend when the
6379         function Ada.Tags.Secondary_Tag is not available.
6380         * rtsfind.ads (RE_Register_TSD): New runtime entity.
6381         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
6382
6383 2011-08-02  Javier Miranda  <miranda@adacore.com>
6384
6385         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
6386
6387 2011-08-02  Robert Dewar  <dewar@adacore.com>
6388
6389         * s-imenne.ads: Minor reformatting.
6390
6391 2011-08-02  Robert Dewar  <dewar@adacore.com>
6392
6393         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
6394         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
6395         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
6396
6397 2011-08-02  Robert Dewar  <dewar@adacore.com>
6398
6399         * einfo.ads (Materialize_Entity): Document this is only for renamings
6400         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
6401         required debug information in the case where we transform the object
6402         declaration into a renaming declaration.
6403         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
6404         object
6405         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
6406         Materialize_Entity.
6407
6408 2011-08-02  Robert Dewar  <dewar@adacore.com>
6409
6410         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
6411         Suppress_Init_Procs.
6412         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
6413         Suppress_Initialization/Initialization_Suppressed.
6414         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
6415         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
6416         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
6417         * sem_prag.adb: New processing for pragma Suppress_Initialization.
6418
6419 2011-08-02  Robert Dewar  <dewar@adacore.com>
6420
6421         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
6422         Minor reformatting.
6423
6424 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6425
6426         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
6427         only have inheritable classwide pre/postconditions.
6428
6429 2011-08-02  Javier Miranda  <miranda@adacore.com>
6430
6431         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
6432         * rtsfind.ads (RE_Check_TSD): New runtime entity.
6433         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
6434         checks if the external tag of a type is the same as the external tag
6435         of some other declaration.
6436
6437 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6438
6439         * s-taskin.ads: Minor reformatting.
6440
6441 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6442
6443         * g-comlin.adb (Display_Help): swap the order in which it prints the
6444         short help and the general usage.
6445
6446 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6447
6448         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
6449         the aspect declarations and attach them to the generic copy for
6450         subsequent analysis.
6451         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
6452         declarations of the generic tree to the new subprogram declarations.
6453         * sem_attr.adb (Check_Precondition_Postcondition): recognize
6454         conditions that apply to a subprogram instance.
6455
6456 2011-08-02  Robert Dewar  <dewar@adacore.com>
6457
6458         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
6459
6460 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6461
6462         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
6463         private type with a tagged full view is not derived in the immediate
6464         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
6465
6466 2011-08-02  Robert Dewar  <dewar@adacore.com>
6467
6468         * exp_ch4.adb: Minor reformatting.
6469
6470 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6471
6472         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
6473         Ada2012 iterator, the loop will be rewritten during expansion into a
6474         while loop with a cursor and an element declaration. Do not analyze the
6475         body in this case, because if the container is for indefinite types the
6476         actual subtype of the elements will only be determined when the cursor
6477         declaration is analyzed.
6478
6479 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6480
6481         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
6482         size/alignment related attributes in CodePeer_Mode.
6483
6484 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6485
6486         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
6487         Prepend_Element, since this can result in the operation getting the
6488         wrong slot in the full type's dispatch table if the full type has
6489         inherited operations. The incomplete type's operation will get added
6490         to the proper position in the full type's primitives
6491         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
6492         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
6493         dispatching operations, since there are cases where nonprimitive
6494         subprograms can get added to the list of incomplete dependents (such
6495         as subprograms in nested packages).
6496         * sem_ch6.adb (Process_Formals): First, remove test for being in a
6497         private part when determining whether to add a primitive with a
6498         parameter of a tagged incomplete type to the Private_Dependents list.
6499         Such primitives can also occur in the visible part, and should not have
6500         been excluded from being private dependents.
6501         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
6502         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
6503         list of a Taft-amendment incomplete type is a primitive before issuing
6504         an error that the full type must appear in the same unit. There are
6505         cases where nonprimitives can be in the list (such as subprograms in
6506         nested packages).
6507         * sem_disp.adb (Derives_From): Use correct condition for checking that
6508         a formal's type is derived from the type of the corresponding formal in
6509         the parent subprogram (the condition was completely wrong). Add
6510         checking that was missing for controlling result types being derived
6511         from the result type of the parent operation.
6512
6513 2011-08-02  Yannick Moy  <moy@adacore.com>
6514
6515         * errout.adb (First_Node): minor renaming
6516         * restrict.adb (Check_Formal_Restriction): put restriction warning on
6517         first node.
6518
6519 2011-08-02  Yannick Moy  <moy@adacore.com>
6520
6521         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
6522         before accessing operands.
6523         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
6524         decide whether an initialization expression respects SPARK rules, as
6525         the plain node is the expanded one. This allows for more valid warnings
6526         to be issued.
6527         * gnat_rm.texi: Minor update.
6528
6529 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6530
6531         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
6532         previous change.
6533
6534 2011-08-02  Robert Dewar  <dewar@adacore.com>
6535
6536         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
6537
6538 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6539
6540         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
6541         loop statements and the element renaming declaration with a block when
6542         the element type is controlled.
6543
6544 2011-08-02  Yannick Moy  <moy@adacore.com>
6545
6546         * sinfo.ads: Minor formatting.
6547
6548 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6549
6550         * sem_aggr.adb (Add_Association): if the association has a box and no
6551         expression, use the Sloc of the aggregate itself for the new
6552         association.
6553         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
6554         the Original_Node.
6555
6556 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6557
6558         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
6559         When a container is provided via a function call, generate a renaming
6560         of the function result. This avoids the creation of a transient scope
6561         and the premature finalization of the container.
6562         * exp_ch7.adb (Is_Container_Cursor): Removed.
6563         (Wrap_Transient_Declaration): Remove the supression of the finalization
6564         of the list controller when the declaration denotes a container cursor,
6565         it is not needed.
6566
6567 2011-08-02  Yannick Moy  <moy@adacore.com>
6568
6569         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
6570         node is from source, instead of the original node being from source.
6571         * sem_aggr.adb
6572         (Resolve_Array_Aggregate): refine the check for a static expression, to
6573         recognize also static ranges
6574         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
6575         Array_Type_Declaration): postpone the test for the type being a subtype
6576         mark after the type has been resolved, so that component-selection and
6577         expanded-name are discriminated.
6578         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
6579         to distinguish the case of an iteration scheme, so that an error is
6580         issed on a non-static range in SPARK except in an iteration scheme.
6581         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
6582         In_Iter_Schm = True.
6583         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
6584         user-defined operators so that they are allowed in renaming
6585         * sem_ch8.adb
6586         (Find_Selected_Component): refine the check for prefixing of operators
6587         so that they are allowed in renaming. Move the checks for restrictions
6588         on selector name after analysis discriminated between
6589         component-selection and expanded-name.
6590         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
6591         concatenation argument of string type if it is static.
6592         * sem_util.adb, sem_util.ads
6593         (Check_Later_Vs_Basic_Declarations): add a new function
6594         Is_Later_Declarative_Item to decice which declarations are allowed as
6595         later items, in the two different modes Ada 83 and SPARK. In the SPARK
6596         mode, add that renamings are considered as later items.
6597         (Enclosing_Package): new function to return the enclosing package
6598         (Enter_Name): correct the rule for homonyms in SPARK
6599         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
6600         from source (result of expansion) to avoid issuing wrong warnings.
6601
6602 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6603
6604         * errout.adb: On anything but an expression First_Node returns its
6605         argument.
6606
6607 2011-08-02  Pascal Obry  <obry@adacore.com>
6608
6609         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6610
6611 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6612
6613         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6614         Set the associated loop as the related expression of internally
6615         generated cursors.
6616         * exp_ch7.adb (Is_Container_Cursor): New routine.
6617         (Wrap_Transient_Declaration): Supress the finalization of the list
6618         controller when the declaration denotes a container cursor.
6619
6620 2011-08-02  Yannick Moy  <moy@adacore.com>
6621
6622         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6623         command line now.
6624         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6625         expression is a simple expression. This check cannot be performed in
6626         the semantics, so just drop it.
6627         (P_Index_Or_Discriminant_Constraint): move check that the index or
6628         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6629         semantics. Other cases were previously checked in the semantics.
6630         * par-ch4.adb (P_Name): move checks that a selector name is not
6631         character literal or an operator symbol to Find_Selected_Component in
6632         the semantics
6633         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6634         declarations are not placed after later declarations in a separate
6635         procedure in Sem_Util (possibly not the best choice?), to be used both
6636         during parsing, for Ada 83 mode, and during semantic analysis, for
6637         SPARK mode.
6638         * par-endh.adb (Check_End): move check that end label is not missing
6639         to Process_End_Label in the semantics
6640         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6641         the special case for SPARK restriction
6642         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6643         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6644         parameter Force to issue the error message even on internal node (used
6645         for generated end label). Call Check_Restriction to check when an error
6646         must be issued. In SPARK mode, issue an error message even if the
6647         restriction is not set.
6648         (Check_Restriction): new procedure with an additional out parameter to
6649         inform the caller that a message has been issued
6650         * sem_aggr.adb: Minor modification of message
6651         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6652         instead of issuing an error message directly
6653         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6654         declarations are not placed after later declarations, by calling
6655         Check_Later_Vs_Basic_Declarations
6656         (Analyze_Subtype_Declaration): move here the check that an index or
6657         discriminant constraint must be a subtype mark. Change the check that
6658         a subtype of String must start at one so that it works on subtype marks.
6659         * sem_ch4.adb (Analyze_Call): move here the check that a named
6660         association cannot follow a positional one in a call
6661         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6662         instead of issuing an error message directly
6663         * sem_ch8.adb (Find_Selected_Component): move here the check that a
6664         selector name is not a character literal or an operator symbol. Move
6665         here the check that the prefix of an expanded name cannot be a
6666         subprogram or a loop statement.
6667         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6668         procedure called from parsing and semantics to check that basic
6669         declarations are not placed after later declarations
6670         (Process_End_Label): move here the check that end label is not missing
6671
6672 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6673
6674         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
6675         representation clause in codepeer mode, since it confuses CodePeer and
6676         does not bring useful info.
6677
6678 2011-08-02  Ed Falis  <falis@adacore.com>
6679
6680         * init.c: initialize fp hw on MILS.
6681
6682 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6683
6684         * errout.adb (First_Node): for bodies, return the node itself (small
6685         optimization). For other nodes, do not check source_unit if the node
6686         comes from Standard.
6687
6688 2011-08-02  Robert Dewar  <dewar@adacore.com>
6689
6690         * exp_ch3.adb: Minor comment additions.
6691         * sem_ch13.adb: Minor reformatting.
6692
6693 2011-08-02  Pascal Obry  <obry@adacore.com>
6694
6695         * make.adb, makeutl.adb: Removes some superfluous directory separator.
6696
6697 2011-08-02  Robert Dewar  <dewar@adacore.com>
6698
6699         * sem_attr.adb: Minor reformatting.
6700
6701 2011-08-02  Robert Dewar  <dewar@adacore.com>
6702
6703         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
6704         (Has_Default_Component_Value): Removed
6705         * einfo.ads Comment updates
6706         (Has_Default_Aspect): Replaces Has_Default_Value
6707         (Has_Default_Component_Value): Removed
6708         * exp_ch13.adb
6709         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
6710         * exp_ch3.adb
6711         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
6712         (Get_Simple_Init_Val): Handle Default_Value aspect
6713         (Needs_Simple_Initialization): Handle Default_Value aspect
6714         * exp_ch3.ads: Needs_Simple_Initialization
6715         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
6716         * par-prag.adb (Pragma_Default[_Component]Value) Removed
6717         * sem_ch13.adb
6718         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
6719         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
6720         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
6721
6722 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6723
6724         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
6725         package containing iteration primitives.
6726         exp_ch5.adb (Expand_Iterator_Loop): ditto.
6727
6728 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6729
6730         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
6731         "of", pre-analyze expression in case it is a function call with
6732         finalization actions that must be placed ahead of the loop.
6733         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
6734         on an Ada2012 iterator, insert them ahead of the rewritten loop.
6735
6736 2011-08-02  Geert Bosch  <bosch@adacore.com>
6737
6738         * cstand.adb (Create_Float_Types): Only consider C's long double for
6739         Long_Long_Float, in addition to double.
6740
6741 2011-08-02  Robert Dewar  <dewar@adacore.com>
6742
6743         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
6744         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
6745         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
6746         Minor reformatting.
6747
6748 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6749
6750         * sem_attr.adb: handle properly 'Result when it is a prefix of an
6751         indexed component.
6752
6753 2011-08-02  Javier Miranda  <miranda@adacore.com>
6754
6755         * einfo.ads, einfo.adb
6756         (Original_Access_Type): Move this attribute to Node26 since there was
6757         an undocumented use of Node21 in E_Access_Subprogram_Type entities
6758         which causes conflicts and breaks the generation of the .NET compiler.
6759         (Interface_Name): Add missing documentation on JGNAT only uses of
6760         this attribute.
6761
6762 2011-08-02  Geert Bosch  <bosch@adacore.com>
6763
6764         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
6765         (Find_Back_End_Float_Type): Likewise
6766         (Create_Back_End_Float_Types): Likewise
6767         (Create_Float_Types): Likewise
6768         (Register_Float_Type): Likewise
6769         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6770         Nlist and split out type selection in new local Find_Base_Type function.
6771         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6772         Nlist
6773         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6774
6775 2011-08-02  Robert Dewar  <dewar@adacore.com>
6776
6777         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6778         alpha order).
6779         * opt.ads: Minor comment change.
6780         * sem_ch12.adb: Minor code reorganization.
6781
6782 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6783
6784         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6785         subtype's list of rep items to the list on the full subtype in the case
6786         where the lists are the same.
6787
6788 2011-08-02  Geert Bosch  <bosch@adacore.com>
6789
6790         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6791         using the one from System.Strings, which also deallocates all strings.
6792
6793 2011-08-02  Geert Bosch  <bosch@adacore.com>
6794
6795         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6796         function.
6797         * gcc-interface/Make-lang.in: Update dependencies.
6798
6799 2011-08-02  Olivier Hainque  <hainque@adacore.com>
6800
6801         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6802         end_locus.
6803
6804 2011-08-02  Javier Miranda  <miranda@adacore.com>
6805
6806         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6807         associated with anonymous access to subprograms.
6808
6809 2011-08-02  Geert Bosch  <bosch@adacore.com>
6810
6811         * opt.ads
6812         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6813         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6814         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6815         (Add_Symbol_Definition): Move to switch-c.adb
6816         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6817         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6818         (Add_Symbol_Definition): Move to switch-c.adb.
6819         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6820         * sem_warn.adb
6821         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6822         Move to warnsw.adb.
6823         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6824         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6825         Move to warnsw.adb.
6826         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6827         (Add_Symbol_Definition): Moved from Prepcomp.
6828         * switch-c.ads: Update copyright notice. Use String_List instead of
6829         Argument_List, removing dependency on System.OS_Lib.
6830
6831 2011-08-02  Yannick Moy  <moy@adacore.com>
6832
6833         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6834         mode on initialization expression which does not respect SPARK
6835         restrictions.
6836         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6837         if the tree referenced by its argument represents an initialization
6838         expression in SPARK, suitable for initializing an object in an object
6839         declaration.
6840
6841 2011-08-02  Javier Miranda  <miranda@adacore.com>
6842
6843         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6844         internally generated access to subprogram with its associated protected
6845         subprogram type.
6846         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6847
6848 2011-08-02  Geert Bosch  <bosch@adacore.com>
6849
6850         * cstand.adb (Register_Float_Type): Print information about type to
6851         register, if the Debug_Flag_Dot_B is set.
6852         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6853         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6854         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6855         with a requested precision of more than Max_Digits digits and no more
6856         than Max_Base_Digits digits, if a range specification is present and the
6857         Predefined_Float_Types list has a suitable type to derive from.
6858         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6859         case of type completion with pragma Import
6860         * sem_prag.adb
6861         (Process_Import_Predefined_Type): Processing to complete a type
6862         with pragma Import. Currently supports floating point types only.
6863         (Set_Convention_From_Pragma): Do nothing without underlying type.
6864         (Process_Convention): Guard against absence of underlying type,
6865         which may happen when importing incomplete types.
6866         (Process_Import_Or_Interface): Handle case of importing predefined
6867         types. Tweak error message.
6868
6869 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6870
6871         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6872         functions to previous change.  Reorganize code slightly.
6873
6874 2011-08-02  Geert Bosch  <bosch@adacore.com>
6875
6876         * back_end.ads (Register_Type_Proc): New call back procedure type for
6877         allowing the back end to provide information about available types.
6878         (Register_Back_End_Types): New procedure to register back end types.
6879         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6880         available types.
6881         * cstand.adb (Back_End_Float_Types): New list for floating point types
6882         supported by the back end.
6883         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6884         (Copy_Float_Type): New procedure to make new copies of predefined types.
6885         (Register_Float_Type): New call back procedure to populate the BEFT list
6886         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6887         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6888         (Create_Float_Types): New procedure to create entities for floating
6889         point types predefined in Standard, and put these and any remaining
6890         BEFTs on the Predefined_Float_Types list.
6891         * stand.ads (Predefined_Float_Types): New list for predefined floating
6892         point types that do not have declarations in package Standard.
6893
6894 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6895
6896         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
6897         entity node for the unit containing the parameter.
6898         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6899         (Add_Inlined_Subprogram): Likewise.
6900         * gcc-interface/Make-lang.in: Update dependencies.
6901
6902 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6903
6904         * s-stusta.adb (Print): Make sure Pos is always initialized to a
6905         suitable value.
6906
6907 2011-08-02  Geert Bosch  <bosch@adacore.com>
6908
6909         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6910
6911 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6912
6913         * sem_type.adb (Covers): Move trivial case to the top and reuse the
6914         computed value of Base_Type.
6915
6916 2011-08-02  Yannick Moy  <moy@adacore.com>
6917
6918         * restrict.adb (Check_Restriction): issue an error for any use of
6919         class-wide, even if the No_Dispatch restriction is not set.
6920         * sem_aggr.adb: Correct typos in comments and messages in formal mode
6921         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6922         when completing a private extension, the type named in the private part
6923         is not the same as that named in the visible part.
6924         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6925         of an inherited primitive operations of a tagged type or type extension
6926         that returns the tagged type.
6927         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6928         function which returns True for an implicit operation inherited by the
6929         derived type declaration for the argument type.
6930         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6931         order.
6932
6933 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6934
6935         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6936         Process_Bounds, to perform analysis with expansion of a range or an
6937         expression that is the iteration scheme for a loop.
6938         (Analyze_Iterator_Specification): If domain of iteration is given by a
6939         function call with a controlled result, as is the case if call returns
6940         a predefined container, ensure that finalization actions are properly
6941         generated.
6942         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6943
6944 2011-08-02  Javier Miranda  <miranda@adacore.com>
6945
6946         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6947         * gcc-interface/Make-lang.in: Update dependencies.
6948
6949 2011-08-02  Javier Miranda  <miranda@adacore.com>
6950
6951         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6952         determine if the analysis is performed using N or Original_Node (N).
6953         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6954         functionality of routine Is_Variable avoids code duplication.
6955         * checks.adb (Determine_Range): Handle temporaries generated by
6956         Remove_Side_Effects.
6957
6958 2011-08-02  Javier Miranda  <miranda@adacore.com>
6959
6960         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6961         expansion of the condition. Required since the previous analysis was
6962         done with expansion disabled (see Resolve_Quantified_Expression) and
6963         hence checks were not inserted and record comparisons have not been
6964         expanded.
6965
6966 2011-08-02  Ed Falis  <falis@adacore.com>
6967
6968         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6969         Update header.
6970
6971 2011-08-02  Bob Duff  <duff@adacore.com>
6972
6973         * opt.ads: Minor comment fix.
6974
6975 2011-08-02  Bob Duff  <duff@adacore.com>
6976
6977         * sem_ch12.adb (Analyze_Package_Instantiation,
6978         Analyze_Subprogram_Instantiation): Turn off style checking while
6979         analyzing an instance. Whatever style checks that apply to the generic
6980         unit should apply, so it makes no sense to apply them in an instance.
6981         This was causing trouble when compiling an instance of a runtime
6982         unit that violates the -gnatyO switch.
6983         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6984         one of the two case statements, causing spurious errors.
6985
6986 2011-08-02  Robert Dewar  <dewar@adacore.com>
6987
6988         * uname.adb: Minor reformatting.
6989         * gnatcmd.adb: Minor reformatting.
6990         * exp_attr.adb: Minor reformatting.
6991
6992 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6993
6994         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6995         No_Dispatching_Calls, do not look for the Assign primitive, because
6996         predefined primitives are not created in this case.
6997
6998 2011-08-02  Bob Duff  <duff@adacore.com>
6999
7000         * stylesw.ads: Minor comment fixes.
7001
7002 2011-08-02  Robert Dewar  <dewar@adacore.com>
7003
7004         * freeze.adb (Add_To_Result): New procedure.
7005
7006 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
7007
7008         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7009         time, if the specific run-time routines for handling streams of strings
7010         are not available, use the default mechanism.
7011
7012 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7013
7014         * s-regpat.ads: Fix typo.
7015
7016 2011-08-02  Vincent Celier  <celier@adacore.com>
7017
7018         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7019         not null, call it to create the in memory config project file without
7020         parsing an existing default config project file.
7021
7022 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7023
7024         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7025
7026 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7027
7028         * sem_elim.adb: an abstract subprogram does not need an eliminate
7029         pragma for its descendant to be eliminable.
7030
7031 2011-08-02  Ed Falis  <falis@adacore.com>
7032
7033         * init.c: revert to handling before previous checkin for VxWorks
7034         * s-intman-vxworks.adb: delete unnecessary declarations related to
7035         using Ada interrupt facilities for handling signals.
7036         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7037         * s-intman-vxworks.ads: Import __gnat_install_handler as
7038         Initialize_Interrupts.
7039         * s-taprop-vxworks.adb: Delete Signal_Mask.
7040         (Abort_Handler): change construction of mask to unblock exception
7041         signals.
7042
7043 2011-08-02  Jerome Guitton  <guitton@adacore.com>
7044
7045         * a-except-2005.adb (Raise_From_Signal_Handler): Call
7046         Debug_Raise_Exception before propagation starts.
7047
7048 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7049
7050         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7051         to Restriction_Check_Required.
7052         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7053         * sem_res.adb (Resolve_Call): Likewise.
7054         * sem_attr.adb (Check_Stream_Attribute): Likewise.
7055
7056 2011-08-02  Bob Duff  <duff@adacore.com>
7057
7058         * stylesw.ads: Update comment.
7059         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7060         * errout.ads: Remove obsolete comment.
7061
7062 2011-08-02  Javier Miranda  <miranda@adacore.com>
7063
7064         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7065         (Set_Is_Safe_To_Reevaluate): new procedure.
7066         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7067         assignment is allowed on safe-to-reevaluate variables.
7068         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7069         temporary created to remove side effects in expressions that use
7070         the secondary stack as safe-to-reevaluate.
7071         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7072         variables that are not true constants.
7073
7074 2011-08-02  Robert Dewar  <dewar@adacore.com>
7075
7076         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7077         sem_res.adb, sem_ch6.adb: Minor reformatting.
7078
7079 2011-08-02  Jerome Guitton  <guitton@adacore.com>
7080
7081         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7082
7083 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7084
7085         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7086         not set Overridden_Operation if subprogram is an initialization
7087         procedure.
7088
7089 2011-08-02  Yannick Moy  <moy@adacore.com>
7090
7091         * par-ch6.adb: Correct obsolete name in comments
7092         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7093         which takes two message arguments (existing function takes one), with
7094         second message used for continuation.
7095         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7096         block statements that originate from a source block statement, not
7097         generated block statements
7098         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7099         symmetry with procedure case
7100         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7101         function to issue an error in formal mode if a package specification
7102         contains more than one tagged type or type extension.
7103         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7104         parameters matching formals of tagged types are objects (or ancestor
7105         type conversions of objects), not general expressions. Issue an error
7106         on view conversions that are not involving ancestor conversion of an
7107         extended type.
7108         (Resolve_Type_Conversion): in formal mode, issue an error on the
7109         operand of an ancestor type conversion which is not an object
7110         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7111         procedure so that it works also for actuals of function calls
7112         (Is_Actual_Tagged_Parameter): new function which determines if its
7113         argument is an actual parameter of a formal of tagged type in a
7114         subprogram call
7115         (Is_SPARK_Object_Reference): new function which determines if the tree
7116         referenced by its argument represents an object in SPARK
7117
7118 2011-08-02  Robert Dewar  <dewar@adacore.com>
7119
7120         * sem_ch3.adb: Minor reformatting
7121         Minor comment addition
7122         Minor error msg text change
7123
7124 2011-08-02  Javier Miranda  <miranda@adacore.com>
7125
7126         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7127         function. Used to be more precise when we generate a variable plus one
7128         assignment to remove side effects in the evaluation of the Bound
7129         expressions.
7130         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7131         of the bound expression to force its re-analysis and thus expand the
7132         associated transient scope (if required). Code cleanup replacing the
7133         previous code that declared the constant entity by an invocation to
7134         routine Force_Evaluation which centralizes this work in the frontend.
7135
7136 2011-08-02  Robert Dewar  <dewar@adacore.com>
7137
7138         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7139         (Base_Type): Now uses improved Is_Base_Type function
7140         * einfo.ads (Base_Type): Inline this function
7141
7142 2011-08-02  Robert Dewar  <dewar@adacore.com>
7143
7144         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7145         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7146
7147 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7148
7149         * gcc-interface/Make-lang.in: Update dependencies.
7150         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7151         targets.
7152
7153 2011-08-02  Yannick Moy  <moy@adacore.com>
7154
7155         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
7156         non-simple expression used in delta constraint
7157         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
7158         index constraint which is not a subtype mark
7159         * par.adb: With and use Restrict
7160         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
7161         mode on component type which is not a subtype mark and default
7162         expression on component
7163         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
7164         of string which does not have a lower index bound equal to 1
7165         (Array_Type_Declaration): issue an error in formal mode on index or
7166         component type which is not a subtype mark, and on aliased keyword on
7167         component
7168         (Derived_Type_Declaration): issue an error in formal mode on interface,
7169         limited or abstract type
7170         (Record_Type_Declaration): issue an error in formal mode on interface
7171         (Record_Type_Definition): issue an error in formal mode on tagged types
7172         and type extensions not declared in the specification of a library unit
7173         package; on null non-tagged record; on variant part
7174
7175 2011-08-02  Vincent Celier  <celier@adacore.com>
7176
7177         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
7178         not declared for qualified library project when Library_Name is not
7179         declared, but Library_Dir is.
7180
7181 2011-08-02  Robert Dewar  <dewar@adacore.com>
7182
7183         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
7184         pragmas (affects aspects [Component_]Default_Value
7185         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
7186         component type for the resolution
7187
7188 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7189
7190         * einfo.adb (Base_Type): Tune implementation for speed.
7191
7192 2011-08-02  Robert Dewar  <dewar@adacore.com>
7193
7194         * freeze.adb: Minor reformatting.
7195
7196 2011-08-02  Thomas Quinot  <quinot@adacore.com>
7197
7198         * scos.ads: Update comments.
7199
7200 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7201
7202         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
7203         base type, because the parent may be a subtype of a private type whose
7204         convention is established in a private part.
7205
7206 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
7207
7208         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
7209         statement in a block when the expansion of the return expression has
7210         created a finalization chain.
7211         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
7212         with the parent node.
7213         Add N_Extended_Return_Statement to handle the case where a transient
7214         object declaration appears in the Return_Object_Declarations list of
7215         an extended return statement.
7216
7217 2011-08-02  Matthew Gingell  <gingell@adacore.com>
7218
7219         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
7220         unused parameter 'name'.
7221
7222 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7223
7224         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
7225         inherited operation, check whether its alias, which is the source
7226         operastion that it renames, has been marked eliminated.
7227
7228 2011-08-02  Javier Miranda  <miranda@adacore.com>
7229
7230         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
7231         in-mode parameter whose type is an access type since it can be used to
7232         modify its designated object. Enforce code that handles as safe an
7233         access type that is not access-to-constant but it is the result of a
7234         previous removal of side-effects.
7235         (Remove_Side_Effects): Minor code reorganization of cases which require
7236         no action. Done to incorporate documentation on new cases uncovered
7237         working in this ticket: no action needed if this routine was invoked
7238         too early and the nodes are not yet decorated.
7239         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
7240         to routine Remove_Side_Effects by calls to Force_Evaluation since they
7241         were issued with actuals that are implicitly provided by
7242         Force_Evaluation.
7243
7244 2011-08-02  Robert Dewar  <dewar@adacore.com>
7245
7246         * sem_ch3.adb, sem_res.adb: Minor reformatting.
7247
7248 2011-08-02  Yannick Moy  <moy@adacore.com>
7249
7250         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
7251         to issue an error in formal mode on attribute not supported in this mode
7252         (Analyze_Attribute): issue errors on standard attributes not supported
7253         in formal mode.
7254         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
7255         comment, and issue error in formal mode on modulus which is not a power
7256         of 2.
7257         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
7258         range.
7259         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
7260         subtype mark.
7261         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
7262         operator on modular type (except 'not').
7263
7264 2011-08-02  Robert Dewar  <dewar@adacore.com>
7265
7266         * gnat_rm.texi: Minor reformatting.
7267
7268 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7269
7270         * s-osinte-linux.ads: Minor comment update and reformatting.
7271         * i-cexten.ads: Make this unit pure, as for its parent.
7272         Will allow its usage in more contexts if needed.
7273
7274 2011-08-02  Robert Dewar  <dewar@adacore.com>
7275
7276         * s-utf_32.ads: Minor comment fix.
7277
7278 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7279
7280         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
7281         operation of a tagged synchronized type, handle the case where the
7282         controlling argument is overloaded.
7283
7284 2011-08-02  Yannick Moy  <moy@adacore.com>
7285
7286         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
7287         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
7288         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
7289         SPARK mode and formal verification mode on processing SPARK restriction
7290         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
7291         requiring consistency checking.
7292
7293 2011-08-02  Robert Dewar  <dewar@adacore.com>
7294
7295         * sem_res.adb: Minor reformatting.
7296
7297 2011-08-02  Robert Dewar  <dewar@adacore.com>
7298
7299         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7300         a-cforse.ads: Remove unneeded with of Ada.Containers
7301         Remove commented out pragma Inline's
7302         Move specifications of new subprograms to the actual specs
7303
7304 2011-08-02  Yannick Moy  <moy@adacore.com>
7305
7306         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7307         a-cforse.ads: Update comments.
7308
7309 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7310
7311         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
7312
7313 2011-08-02  Robert Dewar  <dewar@adacore.com>
7314
7315         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7316         a-cforse.ads, a-cofove.ads: Minor reformatting.
7317
7318 2011-08-02  Claire Dross  <dross@adacore.com>
7319
7320         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
7321         a-cofove.ads: Add comments.
7322
7323 2011-08-02  Yannick Moy  <moy@adacore.com>
7324
7325         * gnat_rm.texi: Document formal containers.
7326
7327 2011-08-02  Emmanuel Briot  <briot@adacore.com>
7328
7329         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
7330         are empty sections.
7331
7332 2011-08-02  Robert Dewar  <dewar@adacore.com>
7333
7334         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
7335         reformatting.
7336
7337 2011-08-02  Robert Dewar  <dewar@adacore.com>
7338
7339         * aspects.adb: New aspects Default_Value and Default_Component_Value
7340         New format of Aspect_Names table checks for omitted entries
7341         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
7342         handling of boolean aspects for derived types.
7343         New aspects Default_Value and Default_Component_Value
7344         New format of Aspect_Names table checks for omitted entries
7345         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
7346         (Has_Default_Value): New flag
7347         (Has_Default_Component_Value): New flag
7348         (Has_Default_Value): New flag
7349         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
7350         table.
7351         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
7352         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
7353         Default_Value and Default_Component_Value
7354         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
7355         New aspects Default_Value and Default_Component_Value
7356         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
7357         * sprint.adb: Print N_Aspect_Specification node when called from gdb
7358
7359 2011-08-02  Vincent Celier  <celier@adacore.com>
7360
7361         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
7362         inherit library kind.
7363
7364 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7365
7366         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
7367         Minor reformatting.
7368
7369 2011-08-02  Robert Dewar  <dewar@adacore.com>
7370
7371         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
7372
7373 2011-08-02  Yannick Moy  <moy@adacore.com>
7374
7375         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
7376
7377 2011-08-02  Robert Dewar  <dewar@adacore.com>
7378
7379         * impunit.adb: Add comment.
7380
7381 2011-08-02  Yannick Moy  <moy@adacore.com>
7382
7383         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
7384         qualification of aggregates in formal mode
7385         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
7386         another aggregate
7387         (Resolve_Aggregate): complete the test that an aggregate is adequately
7388         qualified in formal mode
7389
7390 2011-08-02  Pascal Obry  <obry@adacore.com>
7391
7392         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
7393         * mlib-prj.adb: Supress warning when compiling binder generated file.
7394         (Build_Library): Supress all warnings when compiling the binder
7395         generated file.
7396
7397 2011-08-02  Yannick Moy  <moy@adacore.com>
7398
7399         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
7400         from here...
7401         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
7402         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
7403         Add with/use clauses to make Check_Formal_Restriction visible
7404
7405 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7406
7407         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
7408         in-parameters when type of the generic formal is private in the generic
7409         spec and non-private in the body.
7410
7411 2011-08-02  Claire Dross  <dross@adacore.com>
7412
7413         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
7414         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
7415         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
7416         * impunit.adb, Makefile.rtl: Take new files into account.
7417
7418 2011-08-02  Robert Dewar  <dewar@adacore.com>
7419
7420         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
7421         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7422
7423 2011-08-02  Yannick Moy  <moy@adacore.com>
7424
7425         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
7426         formal mode
7427         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
7428         matching static array bounds, taking into account the special case of
7429         string literals
7430         * sem_ch3.adb: Typo in comment.
7431
7432 2011-08-02  Yannick Moy  <moy@adacore.com>
7433
7434         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
7435         which issues an error in formal mode if its argument node is originally
7436         from source
7437         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
7438         has a discriminant specification so that it does not include the case
7439         of derived types
7440         (Derived_Type_Declaration): move here the test that a derived type has a
7441         discriminant specification
7442         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
7443         first element of a component association before accessing its choices
7444         (presence of component association is not enough)
7445         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
7446         declaration is a library item before accessing the next element in a
7447         list, as library items are not member of lists
7448         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
7449         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
7450         Check_Formal_Restriction whenever possible.
7451
7452 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7453
7454         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
7455         reference when needed.
7456
7457 2011-08-02  Bob Duff  <duff@adacore.com>
7458
7459         * gnat_ugn.texi: Fix typo.
7460
7461 2011-08-02  Vincent Celier  <celier@adacore.com>
7462
7463         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
7464         archive file name. Do not use the full path name of archives for Open
7465         VMS.
7466
7467 2011-08-02  Robert Dewar  <dewar@adacore.com>
7468
7469         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
7470         Analyze_Aspect_Specifications
7471         * sem_ch13.adb
7472         (Analyze_Aspect_Specifications): New handling for boolean aspects
7473         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
7474         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
7475         sequence for Analyze_Aspect_Specifications
7476         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
7477         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
7478
7479 2011-08-02  Robert Dewar  <dewar@adacore.com>
7480
7481         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
7482         aspects, since these no longer exist.
7483
7484 2011-08-02  Robert Dewar  <dewar@adacore.com>
7485
7486         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
7487         semicolon, do not try to see if there are aspects following it.
7488         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
7489         aspect spec.
7490
7491 2011-08-02  Robert Dewar  <dewar@adacore.com>
7492
7493         * sem_ch8.adb, aspects.ads: Minor reformatting.
7494
7495 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7496
7497         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
7498         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
7499         extracted from...
7500         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
7501
7502 2011-08-02  Yannick Moy  <moy@adacore.com>
7503
7504         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
7505         mode on subprogram declaration outside of package specification, unless
7506         it is followed by a pragma Import
7507         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
7508         Access_Type_Declaration): issue error in formal mode on access type
7509         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
7510         incomplete type
7511         (Analyze_Object_Declaration): issue error in formal mode on object
7512         declaration which does not respect SPARK restrictions
7513         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
7514         declaration which does not respect SPARK restrictions
7515         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
7516         error in formal mode on digits or delta constraint
7517         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
7518         decimal fixed point type
7519         (Derived_Type_Declaration): issue error in formal mode on derived type
7520         other than type extensions of tagged record types
7521         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
7522         with check on access definition
7523         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
7524         mode on protected definition.
7525         (Analyze_Task_Definition): issue error in formal mode on task definition
7526
7527 2011-08-02  Robert Dewar  <dewar@adacore.com>
7528
7529         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
7530
7531 2011-08-02  Javier Miranda  <miranda@adacore.com>
7532
7533         * sem_ch6.adb (Can_Override_Operator): New function.
7534         (Verify_Overriding_Indicator): Add missing code to check overriding
7535         indicator in operators. Fixes regression.
7536         (Check_Overriding_Indicator): Minor reformating after replacing the
7537         code that evaluates if the subprogram can override an operator by
7538         invocations to the above new function.
7539         * einfo.adb
7540         (Write_Field26_Name): Add missing code to ensure that, following
7541         the documentation in einfo.ads, this field is not shown as attribute
7542         "Static_Initialization" on non-dispatching functions.
7543
7544 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
7545
7546         * sem_res.adb (Resolve_Call): A call to
7547         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
7548         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
7549         i.e., when the second parameter is of type Time_Span.
7550
7551 2011-08-02  Vincent Celier  <celier@adacore.com>
7552
7553         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
7554         with an archive instead of -L<library dir> -l<library name>.
7555
7556 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7557
7558         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
7559         mark the base types In_Use in addition to making the operations
7560         use_visible.
7561
7562 2011-08-02  Ed Falis  <falis@adacore.com>
7563
7564         * init.c: add and setup __gnat_signal_mask for the exception signals
7565         * s-inmaop-vxworks.adb: new file.
7566         * s-intman-vxworks.adb: remove unnecessary initializations and
7567         simplify remaining
7568         * s-intman-vxworks.ads: remove unnecessary variable
7569         * s-taprop-vxworks.adb: simplify signal initialization
7570
7571 2011-08-02  Robert Dewar  <dewar@adacore.com>
7572
7573         * sem_ch8.adb: Minor code reorganization, comment updates.
7574
7575 2011-08-02  Robert Dewar  <dewar@adacore.com>
7576
7577         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
7578         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
7579         here from Sem_Res.
7580         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
7581         (Matching_Static_Array_Bounds): Moved here from Sem_Res
7582
7583 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7584
7585         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
7586         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
7587         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
7588         use_type_clauses, to handle more efficiently use_type and use_all_type
7589         constructs.
7590         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
7591         Ada2012 Use_All_Type clause.
7592         (Use_Class_Wide_Operations): new procedure.
7593
7594 2011-08-02  Robert Dewar  <dewar@adacore.com>
7595
7596         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
7597         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
7598         expression to expression function.
7599
7600 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7601
7602         * sem_ch4.adb: transform simple Ada2012 membership into equality only
7603         if types are compatible.
7604
7605 2011-08-02  Yannick Moy  <moy@adacore.com>
7606
7607         * sem_res.adb (Matching_Static_Array_Bounds): new function which
7608         returns True if its argument array types have same dimension and same
7609         static bounds at each index.
7610         (Resolve_Actuals): issue an error in formal mode on actuals passed as
7611         OUT or IN OUT paramaters which are not view conversions in SPARK.
7612         (Resolve_Arithmetic_Op): issue an error in formal mode on
7613         multiplication or division with operands of fixed point types which are
7614         not qualified or explicitly converted.
7615         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7616         Boolean or array type (except String) operands.
7617         (Resolve_Equality_Op): issue an error in formal mode on equality
7618         operators for array types other than String with non-matching static
7619         bounds.
7620         (Resolve_Logical_Op): issue an error in formal mode on logical operators
7621         for array types with non-matching static bounds. Factorize the code in
7622         Matching_Static_Array_Bounds.
7623         (Resolve_Qualified_Expression): issue an error in formal mode on
7624         qualified expressions for array types with non-matching static bounds.
7625         (Resolve_Type_Conversion): issue an error in formal mode on type
7626         conversion for array types with non-matching static bounds
7627
7628 2011-08-02  Robert Dewar  <dewar@adacore.com>
7629
7630         * par-ch10.adb: Minor code reorganization (use Nkind_In).
7631
7632 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7633
7634         * par-ch9.adb: save location of entry for proper error message.
7635
7636 2011-08-02  Javier Miranda  <miranda@adacore.com>
7637
7638         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7639         (Use_Full_View) which permits this routine to climb through the
7640         ancestors using the full-view of private parents.
7641         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7642         Use_Full_View to true in calls to Is_Ancestor.
7643         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7644         true in call to Is_Ancestor.
7645         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7646         Use_Full_View to true in call to Is_Ancestor.
7647         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7648         call to Is_Ancestor.
7649         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7650         Use_Full_View to true in calls to Is_Ancestor.
7651         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7652         Make_Select_Specific_Data_Table, Register_Primitive,
7653         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7654         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7655         to true in call to Is_Ancestor.
7656         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7657         Use_Full_View to true in calls to Is_Ancestor.
7658         * exp_cg.adb
7659         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7660         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7661
7662 2011-08-02  Robert Dewar  <dewar@adacore.com>
7663
7664         * gnat_rm.texi: Minor reformatting.
7665         * sem_prag.adb: Minor reformatting.
7666
7667 2011-08-02  Tristan Gingold  <gingold@adacore.com>
7668
7669         * vms_data.ads: Add VMS qualifier for -gnateP.
7670
7671 2011-08-02  Robert Dewar  <dewar@adacore.com>
7672
7673         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7674         * par-ch7.adb (P_Package): Proper placement of aspects for package
7675         decl/instantiation.
7676         * par-endh.adb (Check_End): Ad Is_Sloc parameter
7677         (End_Statements): Add Is_Sloc parameterr
7678         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
7679         (Check_End): Ad Is_Sloc parameter
7680         (End_Statements): Add Is_Sloc parameterr
7681
7682 2011-08-02  Vincent Celier  <celier@adacore.com>
7683
7684         * ug_words: Add VMS qualifier equivalent to -gnateP:
7685         /SYMBOL_PREPROCESSING.
7686
7687 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
7688
7689         * gnat-style.texi: For hexadecimal numeric literals the typical
7690         grouping of digits is 4 to represent 2 bytes.
7691         A procedure spec which is split into several lines is indented two
7692         characters.
7693
7694 2011-08-02  Yannick Moy  <moy@adacore.com>
7695
7696         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
7697         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
7698         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
7699         properly qualified
7700         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
7701         choice in array aggregate
7702         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
7703         mark as ancestor
7704         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
7705         positional and named aggregate for record, or others in record
7706         aggregate, or multiple choice in record aggregate
7707         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
7708         array operands to logical operations AND, OR and XOR do not have the
7709         same static lower and higher bounds
7710         * sem_ch5.adb, sinfo.ads: Correct typos in comments
7711
7712 2011-08-01  Robert Dewar  <dewar@adacore.com>
7713
7714         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
7715         Replaces Last_Source_Node_In_Sequence.
7716         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
7717         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
7718         parens and blank in string (this was inconsistently implemented).
7719         * errout.ads
7720         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
7721         blank in string (this was inconsistently implemented).
7722         * gnat1drv.adb
7723         (Set_Global_Switches): Set formal mode switches appropriately
7724         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
7725         * par-prag.adb
7726         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
7727         call Set_Error_Msg_Lang to set "spark" as language name.
7728         * par.adb: Remove unnecessary call to set formal language for errout
7729         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
7730         appropriately and call Set_Error_Msg_Lang to set "spark" as language
7731         name.
7732         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
7733         calls to it, moved after resolution so that types are known
7734         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
7735         result of concatenation is not of type String
7736         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
7737         concatenation is not properly restricted
7738         * gnat_rm.texi: Add doc on pragma Spark_95.
7739         * gcc-interface/Makefile.in: Remove obsolete target pairs for
7740         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
7741         * gcc-interface/Make-lang.in: Update dependencies.
7742
7743 2011-08-01  Javier Miranda  <miranda@adacore.com>
7744
7745         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
7746         condition that detects if the overridden operation must replace an
7747         existing entity.
7748
7749 2011-08-01  Javier Miranda  <miranda@adacore.com>
7750
7751         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
7752         code declarations inserted by Insert_Actions in each alternative of the
7753         N_Case_Expression node.
7754
7755 2011-08-01  Robert Dewar  <dewar@adacore.com>
7756
7757         * sem_ch6.adb: Minor code reorganization.
7758         * sem_util.adb: Minor reformatting.
7759
7760 2011-08-01  Pascal Obry  <obry@adacore.com>
7761
7762         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
7763         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
7764
7765 2011-08-01  Yannick Moy  <moy@adacore.com>
7766
7767         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7768         literal or operator symbol which is prefixed
7769         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7770         mode on access attributes.
7771         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7772         that concatenation operands are properly restricted in formal mode
7773         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7774         Analyze_Concatenation_Operand. Issue an error in formal mode if the
7775         result of the concatenation has a type different from String.
7776         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7777         Analyze_Quantified_Expression, Analyze_Slice,
7778         Analyze_Null): issue an error in formal mode on unsupported constructs
7779         * sem_ch5.adb
7780         (Analyze_Block_Statement): only issue error on source block statement
7781         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7782         function which returns the last node in a list of nodes for which
7783         Comes_From_Source returns True, if any
7784         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7785         Last_Source_Node_In_Sequence
7786         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7787         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7788         mode on unsupported constructs
7789         * sem_ch9.adb Do not return after issuing error in formal mode, as the
7790         rest of the actions may be needed later on since the error is marked as
7791         not serious.
7792         * sinfo.ads: Typos in comments.
7793
7794 2011-08-01  Pascal Obry  <obry@adacore.com>
7795
7796         * projects.texi: Minor editing.
7797
7798 2011-08-01  Yannick Moy  <moy@adacore.com>
7799
7800         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7801         insertion character ~~
7802         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7803         (Set_Error_Msg_Lang): new procedure which fixes the language for use
7804         with insertion character ~~
7805         (Set_Msg_Text): treat insertion character ~~
7806         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7807         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7808         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7809         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7810         errors related to the formal language restriction not serious
7811         (insertion character |).
7812         * par.adb (Par): set formal language for error messages if needed
7813         * sem_ch6.adb (Check_Missing_Return): take into account possible
7814         generated statements at the end of the function
7815         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7816         enumeration value to define a new pragma SPARK_95
7817         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7818         SPARK_Version): new type and variables to store the SPARK version
7819         (none by default).
7820         (SPARK_Mode): return True when SPARK_Version is set
7821         * par-prag.adb: Correct indentation
7822         (Prag): take Pragma_SPARK_95 into account
7823         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7824         into account.
7825
7826 2011-08-01  Robert Dewar  <dewar@adacore.com>
7827
7828         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7829         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7830         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7831
7832 2011-08-01  Pascal Obry  <obry@adacore.com>
7833
7834         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7835         Target_Name to Get_Path call.
7836         (Parse_Single_Project): Likewise.
7837         (Post_Parse_Context_Clause): Likewise.
7838         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7839         Call Initialise_Project_Path with the proper Target_Name.
7840         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7841         search path.
7842         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7843         with the proper Target_Name.
7844         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7845         Part.Parse routine.
7846         (Parse_Project_And_Apply_Config): Likewise.
7847         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7848         This is fine as this part of the code is supporting only native
7849         compilation.
7850         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7851         is fine as this part of the code is supporting only native compilation.
7852
7853 2011-08-01  Yannick Moy  <moy@adacore.com>
7854
7855         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7856         of homonym, unless the homonym is one of the cases allowed in SPARK
7857         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7858         package declaration occurring after a body.
7859
7860 2011-08-01  Robert Dewar  <dewar@adacore.com>
7861
7862         * checks.adb, exp_ch4.adb: Minor reformatting.
7863
7864 2011-08-01  Javier Miranda  <miranda@adacore.com>
7865
7866         * einfo.ads (Access_Disp_Table): Fix documentation.
7867         (Dispatch_Table_Wrappers): Fix documentation.
7868
7869 2011-08-01  Pascal Obry  <obry@adacore.com>
7870
7871         * prj-env.adb, prj-env.ads: Minor reformatting.
7872
7873 2011-08-01  Yannick Moy  <moy@adacore.com>
7874
7875         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7876         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7877         procedures out of these packages.
7878         * errout.ads, errout.adb
7879         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7880         procedures in of this package
7881         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7882         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7883         on misplaced later vs initial declarations, like in Ada 83
7884         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7885         formal mode on attribute of private type whose full type declaration
7886         is not visible
7887         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7888         package declaration inside a package specification
7889         (Analyze_Full_Type_Declaration): issue error in formal mode on
7890         controlled type or discriminant type
7891         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7892         user-defined operator means that it should come from the source
7893         (New_Overloaded_Entity): issue error in formal mode on overloaded
7894         entity.
7895         * sem_ch6.ads, sem_ch13.ads: typos in comments.
7896
7897 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7898
7899         * atree.adb: Minor reformatting.
7900         * checks.adb: Minor reformatting.
7901
7902 2011-08-01  Vincent Celier  <celier@adacore.com>
7903
7904         * s-parame-vms-ia64.ads: Fix typo in comment
7905         Minor reformatting
7906         * s-parame-vms-restrict.ads: Removed, unused.
7907
7908 2011-08-01  Javier Miranda  <miranda@adacore.com>
7909
7910         * exp_ch3.adb
7911         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7912         * sem_ch3.adb
7913         (Constrain_Index): Remove side effects in the evaluation of the bounds.
7914         * sem_ch3.ads, sem_ch3.adb
7915         (Is_Constant_Bound): New extended version of the subprogram that was
7916         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7917         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7918         * sem_aux.ads (Constant_Value): Fix typo in comment.
7919         * checks.adb (Generate_Index_Checks): New implementation which, for
7920         array objects with constant bounds, generates the runtime check
7921         referencing the bounds of the array type. For other cases this routine
7922         provides its previous behavior obtaining such values from the array
7923         object.
7924         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7925         parent type.
7926         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7927         we cannot have semantic interpretations of the new node.
7928
7929 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7930
7931         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7932         expressions.
7933
7934 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7935
7936         * sem_ch8.adb: Minor code editing.
7937         * s-vxwext.adb: Remove trailing space.
7938         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7939         consistency with other files.
7940
7941 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7942
7943         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7944
7945 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7946
7947         * par-ch10.adb: reject parameterized expressions as compilation unit.
7948         * sem_ch4.adb: handle properly conditional expression with overloaded
7949         then_clause and no else_clause.
7950
7951 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7952
7953         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7954         like done by System.Aux_DEC.
7955         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7956
7957 2011-08-01  Yannick Moy  <moy@adacore.com>
7958
7959         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7960         missing label at end of declaration (subprogram or package)
7961         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7962         of positional and named parameter association
7963         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7964         Error_Msg_SP which adds a prefix to the error message giving the name
7965         of the formal language analyzed
7966         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7967         access result type in subprogram, unconstrained array as result type,.
7968         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7969         procedure
7970         * sem_ch8.adb: Code clean up.
7971
7972 2011-08-01  Javier Miranda  <miranda@adacore.com>
7973
7974         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7975         * einfo.ads (Access_Disp_Table): Fix documentation.
7976         (Dispatch_Table_Wrappers): Fix documentation.
7977         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7978         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7979         to enforce the documentation of this attribute.
7980         (Set_Is_Interface): Cleanup the assertion.
7981         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7982         the Underlying_Type entity before reading attribute Access_Disp_Table.
7983         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7984         Locate the Underlying_Type before reading attribute Access_Disp_Table.
7985         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7986         the Underlying_Type entity before reading attribute Access_Disp_Table.
7987         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7988         Locate the Underlying_Type entity before reading attribute
7989         Access_Disp_Table.
7990
7991 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7992
7993         * s-poosiz.ads: Additional overriding indicators.
7994
7995 2011-08-01  Yannick Moy  <moy@adacore.com>
7996
7997         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7998         formal mode.
7999         (Analyze_Iteration_Scheme): issue error in formal mode when loop
8000         parameter specification does not include a subtype mark.
8001         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8002         formal mode on abstract subprogram.
8003         (Analyze_Subprogram_Specification): issue error in formal mode on
8004         user-defined operator.
8005         (Process_Formals): issue error in formal mode on access parameter and
8006         default expression.
8007         * sem_ch9.adb (Analyze_Abort_Statement,
8008         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8009         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8010         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8011         Analyze_Requeue, Analyze_Selective_Accept,
8012         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8013         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8014         issue error in formal mode on user-defined raise statement.
8015
8016 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8017
8018         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8019         declaration being hidden when overriding an implicit inherited
8020         subprogram.
8021         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8022         (-gnats), do not complain about a source file that contains only a
8023         pragma No_Body.
8024
8025 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8026
8027         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8028         variable if already set.
8029
8030 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
8031
8032         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8033         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8034         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8035         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8036         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8037         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8038         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8039         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8040         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8041         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8042         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8043         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8044         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8045         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8046         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8047         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8048         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8049         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8050         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8051         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8052         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8053         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8054         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8055         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8056         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8057         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8058         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8059         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8060         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8061         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8062         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8063         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8064         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8065         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8066         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8067         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8068         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8069         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8070         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8071         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8072         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8073         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8074         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8075         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8076         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8077         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8078         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8079         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8080         s-osinte-mingw.ads: Update to GPLv3 run-time license.
8081         Use GNAT instead of GNARL.
8082
8083 2011-08-01  Bob Duff  <duff@adacore.com>
8084
8085         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8086         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8087         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8088         reformatting.
8089
8090 2011-08-01  Yannick Moy  <moy@adacore.com>
8091
8092         * debug.adb (d.D) reverve flag for the SPARK mode
8093         (d.E) reverve flag for SPARK generation mode
8094         (d.F) reverve flag for Why generation mode
8095         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8096         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
8097         functions which return True when the corresponding modes are set
8098         (Formal_Language): return "spark" or "alfa" when in formal verification
8099         mode.
8100         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8101         Error_Msg to prefix the error message with a tag giving the formal
8102         language
8103         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8104         message with a tag giving the formal language
8105         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8106         block statement
8107         (Analyze_Case_Statement): issue error in formal mode on case statement
8108         with a single "others" case alternative
8109         (Analyze_Exit_Statement): issue errors in formal mode on exit
8110         statements which do not respect SPARK restrictions
8111         (Analyze_Goto_Statement): issue error in formal mode on goto statement
8112         (Check_Unreachable_Code): always issue an error (not a warning) in
8113         formal mode on unreachable code (concerns both code after an infinite
8114         loop and after an unconditional jump, both not allowed in SPARK)
8115         * sem_ch6.adb (Analyze_Return_Statement): add call to
8116         Set_Return_Present for a procedure containing a return statement
8117         (already done for functions in Analyze_Function_Return)
8118         (Analyze_Function_Return): issue error in formal mode on extended
8119         return or if return is not last statement in function
8120         (Check_Missing_Return): issue error in formal mode if function does
8121         not end with return or if procedure contains a return
8122         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8123         function to detect if there is an inner scope of its parameter S which
8124         is a loop.
8125
8126 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8127
8128         * sem_ch6.ads: Minor reformatting.
8129
8130 2011-08-01  Javier Miranda  <miranda@adacore.com>
8131
8132         * sem_util.adb (Abstract_Interface_List): Complete condition when
8133         processing private type declarations to avoid reading unavailable
8134         attribute.
8135         (Is_Synchronized_Tagged_Type): Complete condition when processing
8136         private extension declaration nodes to avoid reading unavailable
8137         attribute.
8138
8139 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8140
8141         * sem_ch3.adb: Minor reformatting.
8142
8143 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8144
8145         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8146         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8147         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8148         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8149         for VMS, instead parametrize the common implementation with
8150         System.Parameters declarations.
8151
8152 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
8153
8154         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
8155
8156 2011-08-01  Tristan Gingold  <gingold@adacore.com>
8157
8158         * seh_init.c: Fix SEH handler installation on win64.
8159
8160 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8161
8162         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
8163         double analysis of an anonymous access to subprogram, because it can
8164         lead to improper sharing of profiles and a back-end crash.
8165
8166 2011-08-01  Robert Dewar  <dewar@adacore.com>
8167
8168         * make.adb, sem_ch4.adb: Minor reformatting.
8169         * gcc-interface/Make-lang.in: Update dependencies.
8170         * sem_util.adb, exp_ch5.adb: Minor reformatting.
8171
8172 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
8173
8174         * gnat_rm.texi: Fix definition of Long_Integer.
8175
8176 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8177
8178         * exp_aggr.adb: check limit size of static aggregate unconditionally,
8179         to prevent storage exhaustion.
8180         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
8181         finalized is a function body, insert the cleanup code before the final
8182         return statement, to prevent spurious warnings.
8183         * s-pooglo.ads: add overriding indicator.
8184
8185 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8186
8187         * sem_ch4.adb (Operator_Check): improve error message when both a
8188         with_clause and a use_clause are needed to make operator usage legal.
8189         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
8190         determine whether a compilation unit is visible within an other,
8191         either through a with_clause in the current unit, or a with_clause in
8192         its library unit or one one of its parents.
8193
8194 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8195
8196         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
8197         over an arbitrary expression of an array or container type.
8198         * lib-xref.adb: clarify comment.
8199
8200 2011-08-01  Bob Duff  <duff@adacore.com>
8201
8202         * einfo.ads: Minor reformatting.
8203         * debug.adb: Minor comment improvement.
8204
8205 2011-08-01  Javier Miranda  <miranda@adacore.com>
8206
8207         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
8208         consider hidden subprograms as valid candidates.
8209
8210 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
8211
8212         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
8213
8214 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
8215
8216         * gnat_ugn.texi: Fix typo.
8217
8218 2011-08-01  Robert Dewar  <dewar@adacore.com>
8219
8220         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
8221         lib-xref.adb: Minor reformatting
8222
8223 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
8224
8225         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
8226         when to generate a call to Move_Final_List.
8227         (Has_Controlled_Parts): Remove this function.
8228
8229 2011-08-01  Geert Bosch  <bosch@adacore.com>
8230
8231         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
8232         "," in choice list.
8233
8234 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8235
8236         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
8237         explicit raise of a predefined exception as Comes_From_Source if the
8238         original N_Raise_Statement comes from source.
8239
8240 2011-08-01  Robert Dewar  <dewar@adacore.com>
8241
8242         * sinfo.ads: Add comment.
8243         * sem_ch6.adb: Minor reformatting.
8244
8245 2011-08-01  Robert Dewar  <dewar@adacore.com>
8246
8247         * freeze.adb (Freeze_Entity): Refine check for bad component size
8248         clause to avoid rejecting confirming clause when atomic/aliased present.
8249
8250 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8251
8252         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
8253         better determine whether an entity reference is a write.
8254         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
8255         subcomponent.
8256         * lib-xref.adb (Output_References): Do no suppress a read reference at
8257         the same location as an immediately preceeding modify-reference, to
8258         handle properly in-out actuals.
8259
8260 2011-08-01  Tristan Gingold  <gingold@adacore.com>
8261
8262         * env.c (__gnat_setenv) [VMS]: Refine previous change.
8263
8264 2011-08-01  Quentin Ochem  <ochem@adacore.com>
8265
8266         * i-cstrin.adb (New_String): Changed implementation, now uses only the
8267         heap to compute the result.
8268
8269 2011-08-01  Robert Dewar  <dewar@adacore.com>
8270
8271         * atree.ads: Minor reformatting.
8272
8273 2011-08-01  Emmanuel Briot  <briot@adacore.com>
8274
8275         * g-expect.adb (Get_Command_Output): Fix memory leak.
8276
8277 2011-08-01  Geert Bosch  <bosch@adacore.com>
8278
8279         * cstand.adb (P_Float_Type): New procedure to print the definition of
8280         predefined fpt types.
8281         (P_Mixed_Name): New procedure to print a name using mixed case
8282         (Print_Standard): Use P_Float_Type for printing floating point types
8283         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
8284         precision IEEE float.
8285
8286 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8287
8288         * sem_ch3.adb: Minor reformatting.
8289
8290 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8291
8292         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
8293         the completion of a generic function, insert the new body rather than
8294         rewriting the original.
8295
8296 2011-08-01  Yannick Moy  <moy@adacore.com>
8297
8298         * sinfo.ads, errout.ads: Typos in comments.
8299
8300 2011-08-01  Robert Dewar  <dewar@adacore.com>
8301
8302         * par-endh.adb: Minor reformatting.
8303
8304 2011-08-01  Robert Dewar  <dewar@adacore.com>
8305
8306         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
8307         (Pre_Post_Aspects): New subtype.
8308         * par-ch12.adb (P_Generic): New syntax for aspects in packages
8309         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
8310         * par-ch7.adb (P_Package): Remove Decl parameter
8311         (P_Package): Handle new syntax for aspects (before IS)
8312         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
8313         new aspect syntax
8314         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
8315         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
8316         (P_Package): Remove Decl parameter
8317         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
8318         aspects
8319         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
8320         specs
8321         * sem_util.ads, sem_util.adb (Static_Boolean): New function
8322         * sinfo.ads: Document new syntax for aspects in packages etc.
8323         * sprint.adb: Handle new syntax of aspects before IS in package
8324
8325 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8326
8327         * atree.ads: Minor reformatting.
8328         * sem_prag.adb: Minor reformatting.
8329
8330 2011-08-01  Robert Dewar  <dewar@adacore.com>
8331
8332         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
8333         case expr alternative.
8334
8335 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8336
8337         * sem_ch12.adb: Fix typo.
8338
8339 2011-08-01  Geert Bosch  <bosch@adacore.com>
8340
8341         * sem_prag.adb (Check_No_Link_Name): New procedure.
8342         (Process_Import_Or_Interface): Use Check_No_Link_Name.
8343         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
8344         instead of Standard_Long_Long_Float_Size global. Preparation for
8345         eventual removal of per type constants.
8346         * exp_util.ads (Get_Stream_Size): New function returning the stream
8347         size value of subtype E.
8348         * exp_util.adb (Get_Stream_Size): Implement new function.
8349         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
8350         function.
8351         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
8352         * einfo.adb:
8353         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
8354
8355 2011-08-01  Geert Bosch  <bosch@adacore.com>
8356
8357         * cstand.adb: Fix comments.
8358         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
8359         count of arguments.
8360
8361 2011-08-01  Robert Dewar  <dewar@adacore.com>
8362
8363         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
8364
8365 2011-08-01  Geert Bosch  <bosch@adacore.com>
8366
8367         * atree.ads: Fix comment.
8368
8369 2011-08-01  Robert Dewar  <dewar@adacore.com>
8370
8371         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
8372         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
8373         * par.adb: Add with for Namet.Sp.
8374         * par-tchk.adb: Minor reformatting.
8375
8376 2011-08-01  Vincent Celier  <celier@adacore.com>
8377
8378         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
8379         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
8380         of the init procedure of a SAL.
8381         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
8382         New procedure.
8383
8384 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8385
8386         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
8387         reformatting.
8388
8389 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8390
8391         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
8392
8393 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8394
8395         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
8396         conformant with its spec (return True only for types that have
8397         an overriding Initialize primitive operation that prevents them from
8398         having preelaborable initialization).
8399         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
8400         initialization for controlled types in Ada 2005 or later mode.
8401
8402 2011-08-01  Robert Dewar  <dewar@adacore.com>
8403
8404         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
8405         Postcondition.
8406         (Same_Aspect): New function.
8407         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
8408         Type_Invariant, Precondition, Postcondition.
8409         * snames.ads-tmpl: Add Name_Type_Invariant.
8410
8411 2011-08-01  Robert Dewar  <dewar@adacore.com>
8412
8413         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
8414         here.
8415         (Freeze_All_Ent): Fix error in handling inherited aspects.
8416         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
8417         already analyzed, but don't skip entire processing of a declaration,
8418         that's wrong in some cases of declarations being rewritten.
8419         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
8420         Don't delay for integer, string literals
8421         Treat predicates in usual manner for delay, remove special case code,
8422         not needed.
8423         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
8424         (Build_Predicate_Function): Update saved expression in aspect
8425         (Build_Invariant_Procedure): Update saved expression in aspect
8426         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
8427         of replacement of discriminant references if the reference is simple.
8428
8429 2011-08-01  Robert Dewar  <dewar@adacore.com>
8430
8431         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
8432         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
8433         Static_Predicate and Dynamic_Predicate.
8434         (Build_Predicate_Function): Add processing for Static_Predicate
8435         and Dynamic_Predicate.
8436         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
8437         (From_Static_Predicate): New flag
8438         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
8439
8440 2011-08-01  Robert Dewar  <dewar@adacore.com>
8441
8442         * usage.adb: Documentation cleanup for Ada version modes in usage.
8443         * expander.adb: Minor reformatting.
8444
8445 2011-08-01  Robert Dewar  <dewar@adacore.com>
8446
8447         * atree.ads: Minor comment fix.
8448         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
8449         a-witeio.ads, sem_prag.adb: Minor reformatting.
8450
8451 2011-08-01  Doug Rupp  <rupp@adacore.com>
8452
8453         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
8454         pointers. Use descrip.h header file for convenience. Add some
8455         comments.
8456
8457 2011-08-01  Robert Dewar  <dewar@adacore.com>
8458
8459         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
8460         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
8461         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
8462         New procedure.
8463         (Check_Aspect_At_End_Of_Declarations): New procedure
8464         (Analye_Aspect_Specification): Minor changes for above procedures
8465         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
8466         specification node as well.
8467
8468 2011-08-01  Pascal Obry  <obry@adacore.com>
8469
8470         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
8471         Windows files. Use GetFilesAttributes() in this case to check for file
8472         existence instead of returning with an error code.
8473
8474 2011-08-01  Vincent Celier  <celier@adacore.com>
8475
8476         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
8477         High is above Source length.
8478
8479 2011-08-01  Robert Dewar  <dewar@adacore.com>
8480
8481         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
8482
8483 2011-08-01  Robert Dewar  <dewar@adacore.com>
8484
8485         * aspects.ads (Boolean_Aspects): New subtype.
8486         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
8487         for derived types in cases where the parent type and derived type have
8488         aspects.
8489         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
8490         with aspects when parent type also has aspects.
8491         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
8492         boolean expression at this point).
8493         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
8494         accordance with final decision on the Ada 2012 feature.
8495         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
8496
8497 2011-08-01  Matthew Heaney  <heaney@adacore.com>
8498
8499         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
8500
8501 2011-08-01  Pascal Obry  <obry@adacore.com>
8502
8503         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
8504         Fix Replace_Slice when High is above current string size.
8505         (Replace_Slice): Fix DL computation when High is above current
8506         string length.
8507
8508 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
8509
8510         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
8511
8512 2011-08-01  Matthew Heaney  <heaney@adacore.com>
8513
8514         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
8515         of node.
8516
8517 2011-08-01  Pascal Obry  <obry@adacore.com>
8518
8519         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
8520         reformatting.
8521
8522 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8523
8524         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
8525         access to protected subprograms in generic bodies.
8526         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
8527         protected type, indicate that the convention of the subprogram is
8528         Convention_Protected, because it may be used in subsequent declarations
8529         within the protected declaration.
8530
8531 2011-08-01  Vincent Celier  <celier@adacore.com>
8532
8533         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
8534         and "final" procedures when the name of the library is "ada", to avoid
8535         duplicate symbols "adainit" and "adafinal" in executables.
8536
8537 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8538
8539         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
8540         quantified expression that appears within a postcondition and uses the
8541         Ada2012 'Result attribute.
8542
8543 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8544
8545         * init.c (__gnat_error_handler): Cast reason to int.
8546         (__gnat_install_handler): Explain sa_sigaction use.
8547
8548 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8549
8550         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
8551         subprogram has copy-in copy-out parameters, try to promote the mode of
8552         the return type if it is passed in registers.
8553
8554 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8555
8556         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
8557         left operand as addressable.
8558
8559 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8560
8561         * gcc-interface/gigi.h (build_function_stub): Remove.
8562         (build_return_expr): Likewise.
8563         (convert_vms_descriptor): Declare.
8564         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
8565         (build_function_stub): Move to...
8566         * gcc-interface/utils2.c (build_return_expr): Move to...
8567         * gcc-interface/trans.c (build_function_stub): ...here.
8568         (build_return_expr): ...here.
8569         (Subprogram_Body_to_gnu): Add local variable for language_function.
8570         Disconnect the parameter attributes cache, if any, once done with it.
8571         Call end_subprog_body only after setting the end_locus.
8572         Build the stub associated with the function, if any, at the very end.
8573         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
8574         variables and streamline control flow.
8575
8576 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
8577
8578         PR ada/49819
8579         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
8580         g-trasym-dwarf.adb.
8581
8582 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8583
8584         PR bootstrap/49794
8585         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
8586         Assign to act.sa_sigaction.
8587         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
8588         current->return_address to char * before arithmetic.
8589
8590 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8591
8592         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
8593         Correct argument types.
8594         Extract code from reason.
8595         (__gnat_install_handler): Assign to act.sa_sigaction.
8596
8597 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
8598
8599         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
8600         (GNAT1_OBJS): ...here.
8601
8602 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
8603
8604         PR ada/48711
8605         * g-socthi-mingw.adb (Fill): Fix formatting.
8606
8607         * gcc-interface/gigi.h: Move around comment.
8608
8609 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
8610
8611         PR ada/46350
8612         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8613
8614 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
8615
8616         PR ada/48711
8617         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8618
8619 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
8620
8621         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8622         range comparison if Pmode is SImode.
8623
8624 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
8625             Eric Botcazou  <ebotcazou@adacore.com>
8626
8627         * adadecode.c: Wrap up in extern "C" block.
8628         * adadecode.h: Likewise.
8629         * adaint.c: Likewise.  Remove 'const' keyword.
8630         * adaint.h: Likewise.
8631         * argv.c: Likewise.
8632         * atree.h: Likewise.
8633         * cio.c: Likewise.
8634         * cstreams.c: Likewise.
8635         * env.c: Likewise.
8636         * exit.c: Likewise.
8637         * fe.h: Likewise.
8638         * final.c: Likewise.
8639         * init.c: Likewise.
8640         * initialize.c: Likewise.
8641         * link.c: Likewise.
8642         * namet.h: Likewise.
8643         * nlists.h: Likewise.
8644         * raise.c: Likewise.
8645         * raise.h: Likewise.
8646         * repinfo.h: Likewise.
8647         * seh_init.c: Likewise.
8648         * targext.c: Likewise.
8649         * tracebak.c: Likewise.
8650         * uintp.h: Likewise.
8651         * urealp.h: Likewise.
8652         * xeinfo.adb: Wrap up generated C code in extern "C" block.
8653         * xsinfo.adb: Likewise.
8654         * xsnamest.adb: Likewise.
8655         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8656         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8657         * gcc-interface/misc.c: Likewise.
8658         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8659         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
8660         ada/targext.o here...
8661         (GNAT_ADA_OBJS): ...and not here.
8662         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8663         (GNATBIND_OBJS): Reorder.
8664
8665 2011-07-07  Richard Henderson  <rth@redhat.com>
8666
8667         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8668         dwarf2out_frame_init.
8669
8670 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
8671
8672         * gcc-interface/misc.c (gnat_init): Tweak previous change.
8673
8674 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8675
8676         PR target/39150
8677         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
8678
8679 2011-07-06  Richard Guenther  <rguenther@suse.de>
8680
8681         * gcc-interface/misc.c (gnat_init): Merge calls to
8682         build_common_tree_nodes and build_common_tree_nodes_2.
8683         Re-initialize boolean_false_node.
8684
8685 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
8686             Olivier Hainque  <hainque@adacore.com>
8687             Nicolas Setton  <setton@adacore.com>
8688
8689         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
8690         the type according to the ARTIFICIAL_P parameter.
8691         (create_type_decl): Likewise.
8692         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
8693
8694 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
8695
8696         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
8697         (gnatbind): Likewise.
8698
8699 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8700
8701         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
8702
8703 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8704
8705         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
8706         local variable throughout.  Remove useless call to Base_Type.
8707         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
8708         Take it also into account for the volatileness of the field.  Set the
8709         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
8710
8711 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8712
8713         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
8714         on a dereference built for a by-ref object if it has an address clause.
8715
8716 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8717
8718         * einfo.ads (Address_Taken): Document use for the second argument of
8719         Asm_Input and Asm_Output attributes.
8720         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
8721         argument is an entity name, then set Address_Taken on it.
8722         <Attribute_Asm_Output>: Likewise.
8723         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
8724         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
8725         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
8726         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
8727
8728 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
8729
8730         PR middle-end/46500
8731         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
8732
8733 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
8734
8735         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
8736         (ada/utils.o): Update dependencies.
8737         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
8738         ../../../libcpp/libcpp.a.
8739         * gcc-interface/utils.c: Include common/common-target.h.
8740         (process_attributes): Use targetm_common.have_named_sections.
8741
8742 2011-06-07  Richard Guenther  <rguenther@suse.de>
8743
8744         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
8745         set_sizetype.
8746
8747 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8748
8749         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
8750         TREE_THIS_NOTRAP flag.
8751
8752 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8753
8754         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
8755         Fix thinko.
8756
8757 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8758
8759         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
8760         constants whose full view has discriminants specially.
8761
8762 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8763
8764         * gcc-interface/utils.c: Include diagnostic.h.
8765         (gnat_write_global_declarations): Output debug information for all
8766         global type declarations before finalizing the compilation unit.
8767         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8768
8769 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
8770
8771         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8772
8773 2011-05-25  Kai Tietz  <ktietz@redhat.com>
8774
8775         * adaint.c (__gnat_to_canonical_file_list_next): Use array
8776         initialization instead of const/none-const pointer assignment.
8777
8778 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
8779
8780         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8781         $(EXTRA_GNAT1_OBJS).
8782         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8783         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8784         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8785         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8786         libcommon-target.a instead of prefix.o.
8787
8788 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
8789
8790         PR ada/49097
8791         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8792
8793 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
8794
8795         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8796         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8797         instead of version.o.
8798
8799 2011-05-18  Kai Tietz <ktietz@redhat.com>
8800
8801         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8802         boolean_false_node instead of integer_zero_node.
8803         (convert_with_check): Likewise.
8804         * gcc-interface/decl.c (choices_to_gnu): Likewise.
8805
8806 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
8807
8808         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8809         type of the parameter is an unconstrained array, convert the actual to
8810         the type of the formal in the In Out and Out cases as well.
8811
8812 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
8813
8814         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8815         call build_function_type_array or build_varargs_function_type_array
8816         instead.
8817         (create_subprog_type): Don't call build_function_type; call
8818         build_function_type_vec instead.
8819
8820 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
8821
8822         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8823         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8824         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8825
8826 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
8827
8828         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8829
8830         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8831         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8832
8833 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
8834
8835         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8836
8837 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
8838
8839         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8840         instead of accessing TYPE_ARG_TYPES directly.
8841         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8842
8843 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8844
8845         PR ada/48844
8846         * gcc-interface/gigi.h (get_variant_part): Declare.
8847         * gcc-interface/decl.c (get_variant_part): Make global.
8848         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8849         types have the same constant size, are record types and T1 has a
8850         variant part while T2 doesn't.
8851
8852 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8853
8854         * gcc-interface/utils.c (begin_subprog_body): Do not call
8855         get_pending_sizes.
8856         (end_subprog_body): Likewise.
8857
8858 2011-05-04  Richard Guenther  <rguenther@suse.de>
8859
8860         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8861         int_const_binop.
8862         (pos_to_constructor): Likewise.
8863
8864 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
8865             Eric Botcazou  <ebotcazou@adacore.com>
8866
8867         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8868         of build_function_type.  Adjust calls to...
8869         (build_raise_check): ...this.  Do not take a void_tree parameter.
8870         Call build_function_type_list instead of build_function_type.
8871         Fix head comment and swap couple of conditional blocks.
8872
8873 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
8874
8875         * gnatvsn.ads (Library_Version): Bump to 4.7.
8876         (Current_Year): Bump to 2011.
8877
8878 2011-04-29  Michael Matz  <matz@suse.de>
8879
8880         * gcc-interface/misc.c (gnat_handle_option): Set
8881         warn_maybe_uninitialized.
8882
8883 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
8884
8885         * gnat_ugn.texi (Complexity Metrics Control): Update link to
8886         the Watson/McCabe paper.
8887
8888 2011-04-23  Jim Meyering  <meyering@redhat.com>
8889
8890         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8891
8892 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8893
8894         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8895         onto the new type.
8896
8897 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8898
8899         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8900         parameter.
8901         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
8902         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8903         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8904         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8905         <all>: Do not set flags on the reused DECL node coming from an alias.
8906         Set DECL_IGNORED_P on the DECL node built for subprograms if they
8907         don't need debug info here...
8908         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8909         (gigi): Adjust calls to create_subprog_decl.
8910         (build_raise_check): Likewise.
8911         (establish_gnat_vms_condition_handler): Likewise.
8912         (Compilation_Unit_to_gnu): Likewise.
8913         (gnat_to_gnu): Likewise.
8914
8915 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
8916
8917         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8918         (NO_REORDER_ADAFLAGS): New variable.
8919         (EXTRA_GNATTOOLS): Always define.
8920         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8921         Clean up and adjust list of files compiled with special options.
8922         * gcc-interface/Make-lang.in: Likewise.
8923         (ada/decl.o): Cosmetical change.
8924         (ada/misc.o): Remove dependency on $(PLUGIN_H).
8925
8926 2011-04-20  Jim Meyering  <meyering@redhat.com>
8927
8928         * initialize.c (__gnat_initialize): Remove useless if-before-free.
8929
8930 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8931
8932         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8933         $(CFLAGS) on the link line.
8934
8935 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8936
8937         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8938         padded type built for the return type if it is unconstrained.
8939
8940 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
8941
8942         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8943
8944 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
8945
8946         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8947         before calling TREE_CHAIN.
8948         * gcc-interface/misc.c (gnat_init_ts): New function.
8949         (LANG_HOOKS_INIT_TS): Define.
8950
8951 2011-04-12  Martin Jambor  <mjambor@suse.cz>
8952
8953         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8954         instead of cgraph_node.
8955
8956 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8957
8958         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8959         alignment on fields of the RETURN type built for the Copy-In Copy-Out
8960         mechanism.
8961
8962 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8963
8964         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8965         of aggregate types that contain a placeholder.
8966
8967 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
8968
8969         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8970         TYPE_ARG_TYPES.
8971         (handle_type_generic_attribute): Likewise.
8972
8973 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
8974
8975         PR ada/47163
8976         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8977
8978 2011-04-04  Kai Tietz  <ktietz@redhat.com>
8979
8980         PR ada/47163
8981         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8982         to flag value.
8983
8984 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8985
8986         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8987         type case, do not strip a padding type around the array type.
8988
8989 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8990
8991         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8992         types.
8993
8994 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8995
8996         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8997         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8998         code for -feliminate-unused-debug-types.
8999         (gnat_post_options): Likewise.
9000
9001 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9002
9003         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9004         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9005         distinct copy.
9006
9007 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9008
9009         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9010         DECL_ARTIFICIAL flag on enumeration types.
9011
9012 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9013
9014         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9015         fat pointer types artificial unconditionally.
9016         <E_Array_Subtype>: Attach the base array type as a parallel type if it
9017         isn't artificial.
9018
9019 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9020
9021         * gcc-interface/gigi.h (get_dummy_type): Declare.
9022         (build_dummy_unc_pointer_types): Likewise.
9023         (finish_fat_pointer_type): Likewise.
9024         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9025         fat pointer type has been built, complete it in place.
9026         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9027         and thin pointers.  Remove useless variable.
9028         (finish_fat_pointer_type): Make global and move to...
9029         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9030         (get_dummy_type): New function.
9031         (build_dummy_unc_pointer_types): Likewise.
9032         (gnat_pushdecl): Propage the name to the anonymous variants only.
9033         (update_pointer_to): Only adjust the pointer types in the unconstrained
9034         array case.
9035
9036 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9037
9038         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9039         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9040         if this is a Taft amendment type and the full declaration is available.
9041         * gcc-interface/trans.c (process_type): Likewise.
9042         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9043         (process_freeze_entity): Likewise.
9044         * gcc-interface/utils.c (dummy_global): New static variable.
9045         (gnat_write_global_declarations): If there are types declared as used
9046         at the global level, insert them in the global hash table.
9047
9048 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9049
9050         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9051         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9052         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9053         copy.
9054         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
9055         flag of the type accordingly.
9056         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9057
9058 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9059
9060         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9061         finalizing types when updating the pointers to the designated type.
9062         <all>: Finalize the deferred types even if we didn't defer processing
9063         of incomplete types in this invocation.
9064
9065 2011-04-01  Olivier Hainque  <hainque@adacore.com>
9066             Nicolas Setton  <setton@adacore.com>
9067             Eric Botcazou  <ebotcazou@adacore.com>
9068
9069         * gcc-interface/misc.c (gnat_descriptive_type): New function.
9070         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9071
9072 2011-03-28  Kai Tietz  <ktietz@redhat.com>
9073
9074         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9075         Windows targets.
9076         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9077         * system-mingw.ads (System): Change ZCX_By_Default default to True.
9078
9079         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9080
9081 2011-03-28  Tristan Gingold  <gingold@adacore.com>
9082
9083         PR ada/44431
9084         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9085         Use ada output of gnatbind.
9086         (ada/b_gnatb.adb): Ditto.
9087         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9088         (ada.mostlyclean, ada.stage1)
9089         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9090         (ada.stagefeedback): Adjust.
9091         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9092         Use ada output of gnatbind.
9093         (b_gnatm.adb): Ditto.
9094         (b_gnatl.o, b_gnatm.o): New rules.
9095
9096 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
9097
9098         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9099         for the padded type built to support a specified size or alignment.
9100
9101 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
9102
9103         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9104         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9105         unconditionally to the end of the unit when the designated type is
9106         limited_with'ed.
9107         <all>: Rename local variable.  Attempt to un-defer types only and do it
9108         for limited_with'ed types as well.
9109         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
9110         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9111         consistently and remove redundant call to finalize_from_with_types.
9112
9113 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
9114
9115         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9116         subprograms without a previous spec declared in the same unit.
9117         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9118         subprograms at the end of the unit instead of at the beginning.
9119         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9120         isn't public for the special handling of non-inline functions nested
9121         inside inline external functions.
9122
9123 2011-03-25  Jeff Law  <law@redhat.com>
9124
9125         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9126
9127 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
9128
9129         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9130         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9131         to compute Set_Size_Depends_On_Discriminant.
9132         (Layout_Type): Call it on array types in back-end layout mode.
9133         * sem_util.adb (Requires_Transient_Scope): Return true for array
9134         types only if the size depends on the value of discriminants.
9135         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9136         type if the RHS is a call to a function that returns an unconstrained
9137         type with default discriminant.
9138
9139 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
9140
9141         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9142         non-conversion to the nominal result type at the end.
9143
9144 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
9145
9146         * gcc-interface/trans.c (create_temporary): New function taken from...
9147         (create_init_temporary): ...here.  Call it.
9148         (call_to_gnu): Create the temporary for the return value early, if any.
9149         Create it for a function with copy-in/copy-out parameters if there is
9150         no target; in other cases of copy-in/copy-out, use another temporary.
9151         Push the new binding level lazily.  Add and rename local variables.
9152
9153 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
9154
9155         * gcc-interface/decl.c (validate_size): Improve comments and tweak
9156         error message.
9157         (set_rm_size): Likewise.
9158
9159 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
9160
9161         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9162         for the padded type built in order to support a specified alignment.
9163         Fix incorrect formatting.
9164
9165 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
9166
9167         PR bootstrap/48216
9168         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
9169
9170 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
9171
9172         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
9173         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
9174         to the end of the list.  Adjust recursive call.  Rename local variable.
9175         If REORDER is true, reorder components of the record type.
9176         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
9177         components_to_record and adjust the parameter list.
9178
9179 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
9180
9181         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
9182         disabled, use the variable for bounds of loop iteration scheme.
9183
9184 2011-03-21  Kai Tietz  <ktietz@redhat.com>
9185
9186         PR target/12171
9187         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
9188
9189 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
9190
9191         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
9192         out whether the expression is read-only.  Short-circuit placeholder
9193         case and rename a couple of local variables.
9194
9195 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
9196
9197         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
9198         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
9199         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
9200         (convert): Deal with conversions from a smaller form type specially.
9201
9202 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
9203
9204         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
9205         its argument, except for the special -I- switch.
9206
9207 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
9208
9209         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
9210         "Ada Issues".
9211
9212 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
9213
9214         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
9215
9216 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
9217
9218         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
9219         GNAT_FORMAL.
9220         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
9221         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
9222         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
9223         Do not generate the check directly, instead instantiate the template
9224         check present in the descriptor.
9225         (make_descriptor_field): Move around.
9226         (build_vms_descriptor32): Build a template check in the POINTER field.
9227         (build_vms_descriptor): Remove useless suffixes.
9228         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
9229
9230 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
9231
9232         PR bootstrap/47467
9233         * targext.c: Include target files if IN_RTS is defined.
9234
9235 2011-01-26  Richard Guenther  <rguenther@suse.de>
9236
9237         PR bootstrap/47467
9238         * targext.c: Include config.h.
9239         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
9240         dependency.
9241
9242 2011-01-04  Pascal Obry  <obry@adacore.com>
9243             Eric Botcazou  <ebotcazou@adacore.com>
9244
9245         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
9246
9247 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
9248
9249         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
9250         end-of-case on the end label and its associated gotos, if any.
9251
9252 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
9253
9254         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
9255         expressions of the parameter cache within the statement group of
9256         the CICO mechanism.
9257
9258 2011-01-04  Olivier Hainque  <hainque@adacore.com>
9259             Eric Botcazou  <ebotcazou@adacore.com>
9260
9261         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
9262         (set_end_locus_from_node): New function.
9263         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
9264         make and the function end_locus.
9265         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
9266         for the elaboration subprogram.
9267         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
9268         set the end_locus of the expression as well.
9269
9270 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
9271
9272         PR ada/47131
9273         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
9274         variables that are referenced in exception handlers volatile.
9275
9276
9277 \f
9278 Copyright (C) 2011 Free Software Foundation, Inc.
9279
9280 Copying and distribution of this file, with or without modification,
9281 are permitted in any medium without royalty provided the copyright
9282 notice and this notice are preserved.
9283
9284         * gnat_rm.texi: Ramification of pragma Eliminate documentation
9285          - fix bugs in the description of Source_Trace;
9286          - get rid of UNIT_NAME;
9287
9288 2011-08-02  Javier Miranda  <miranda@adacore.com>
9289
9290         * exp_ch9.adb
9291         (Build_Dispatching_Requeue): Adding support for VM targets
9292         since we cannot directly reference the Tag entity.
9293         * exp_sel.adb (Build_K): Adding support for VM targets.
9294         (Build_S_Assignment): Adding support for VM targets.
9295         * exp_disp.adb
9296         (Default_Prim_Op_Position): In VM targets do not restrict availability
9297         of predefined interface primitives to compiling in Ada 2005 mode.
9298         (Is_Predefined_Interface_Primitive): In VM targets this service is not
9299         restricted to compiling in Ada 2005 mode.
9300         (Make_VM_TSD): Generate code that declares and initializes the OSD
9301         record. Needed to support dispatching calls through synchronized
9302         interfaces.
9303         * exp_ch3.adb
9304         (Make_Predefined_Primitive_Specs): Enable generation of predefined
9305         primitives associated with synchronized interfaces.
9306         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9307         primitives associated with synchronized interfaces.
9308
9309 2011-08-02  Yannick Moy  <moy@adacore.com>
9310
9311         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9312         statements hidden in SPARK if preceded by the HIDE directive
9313         (Parse_Exception_Handlers): mark each exception handler in a sequence of
9314         exception handlers as hidden in SPARK if preceded by the HIDE directive
9315         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9316         if starting with the HIDE directive
9317         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9318         starting with the HIDE directive; mark the declarations in a private
9319         part as hidden in SPARK if the private part starts with the HIDE
9320         directive
9321         * restrict.adb, restrict.ads
9322         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9323         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9324         argument node belongs to a part which is hidden in SPARK
9325         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9326         parts in SPARK; protect the possibly costly call to
9327         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9328         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9329         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9330         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9331         Tok_SPARK_Hide.
9332         (Scan): recognize special comment starting with '#' and followed by
9333         SPARK keyword "hide" as a HIDE directive.
9334
9335 2011-08-02  Yannick Moy  <moy@adacore.com>
9336
9337         * types.ads, erroutc.ads: Minor reformatting.
9338
9339 2011-08-02  Vincent Celier  <celier@adacore.com>
9340
9341         * link.c: Add response file support for cross platforms.
9342
9343 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9344
9345         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9346         in an association, set parent field of copy before partial analysis.
9347         * sem_res.adb (Resolve_Slice): create reference to itype only when
9348         expansion is enabled.
9349
9350 2011-08-02  Yannick Moy  <moy@adacore.com>
9351
9352         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9353         for new flag denoting which subprogram bodies are in ALFA
9354         * restrict.adb, sem_ch7.adb: Update comment
9355         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9356         sem_ch9.adb, sem_res.adb: Add calls to
9357         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9358         * sem_ch6.adb (Analyze_Function_Return): add calls to
9359         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9360         middle of the body, and extended return.
9361         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9362         False when missing return.
9363         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9364         to True for subprograms whose spec is in ALFA. Remove later on the flag
9365         on the entity used for a subprogram body when there exists a separate
9366         declaration.
9367         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9368         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9369         False, otherwise do nothing.
9370
9371 2011-08-02  Robert Dewar  <dewar@adacore.com>
9372
9373         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9374
9375 2011-08-02  Yannick Moy  <moy@adacore.com>
9376
9377         * sem_ch4.ads: minor formatting.
9378
9379 2011-08-02  Yannick Moy  <moy@adacore.com>
9380
9381         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9382         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9383         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9384         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9385         opt.ads: cleanup of SPARK mode
9386
9387 2011-08-02  Yannick Moy  <moy@adacore.com>
9388
9389         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9390         types.
9391         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9392         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9393         * sem_ch3.adb
9394         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9395         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9396         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9397         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9398         types.
9399         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9400         non-static range.
9401         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9402         functions whose return type is not in ALFA.
9403         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9404         specifications.
9405         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9406         parameter's type is not in ALFA.
9407         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9408         types are in ALFA.
9409
9410 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9411
9412         * sem_ch6 (Analyze_Expression_Function): treat the function as
9413         Inline_Always, and introduce a subprogram declaration for it when it is
9414         not a completion.
9415         * inline.adb (Add_Inlined_Body): recognize bodies that come from
9416         expression functions, so that the back-end can determine whether they
9417         can in fact be inlined.
9418         * sem_util.adb (Is_Expression_Function): predicate to determine whether
9419         a function body comes from an expression function.
9420
9421 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9422
9423         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9424         null exclusions to test Can_Never_Be_Null on the anonymous access types
9425         of the formals rather than testing the formals themselves. Exclude this
9426         check in cases where the Old_Formal is marked as a controlling formal,
9427         to avoid issuing spurious errors for bodies completing dispatching
9428         operations (due to the flag not getting set on controlling access
9429         formals in body specs).
9430         (Find_Corresponding_Spec): When checking full and subtype conformance of
9431         subprogram bodies in instances, pass Designated and E in that order, for
9432         consistency with the expected order of the formals (New_Id followed by
9433         Old_Id).
9434
9435 2011-08-02  Robert Dewar  <dewar@adacore.com>
9436
9437         * sem_ch8.adb: Minor reformatting.
9438
9439 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9440
9441         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9442         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9443         primitive operations of class-wide actuals.
9444
9445 2011-08-02  Javier Miranda  <miranda@adacore.com>
9446
9447         * exp_atag.ads, exp_atag.adb
9448         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9449         since its value is implicitly passed in argument Typ.
9450         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9451         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9452         Build_Common_Dispatching_Select_Statements.
9453
9454 2011-08-02  Robert Dewar  <dewar@adacore.com>
9455
9456         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9457         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9458         Minor reformatting.
9459
9460 2011-08-02  Robert Dewar  <dewar@adacore.com>
9461
9462         * sem_res.adb: Minor reformatting.
9463         * sem_prag.adb: Minor reformatting.
9464
9465 2011-08-02  Javier Miranda  <miranda@adacore.com>
9466
9467         * exp_atag.adb, exp_atags.ads
9468         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9469         by the tagged type Entity. Required to use this routine in the VM
9470         targets since we do not have available the Tag entity in the VM
9471         platforms.
9472         * exp_ch6.adb
9473         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9474         Ada.Tags has not been previously loaded.
9475         * exp_ch7.adb
9476         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9477         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9478         * sem_aux.adb
9479         (Enclosing_Dynamic_Scope): Add missing support to handle the full
9480         view of enclosing scopes. Required to handle enclosing scopes that
9481         are synchronized types whose full view is a task type.
9482         * exp_disp.adb
9483         (Build_VM_TSDs): Minor code improvement to avoid generating and
9484         analyzing lists with empty nodes.
9485         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9486         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9487         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9488         (Make_Disp_Timed_Select_Body): Add support for VM targets.
9489         (Make_Select_Specific_Data_Table): Add support for VM targets.
9490         (Make_VM_TSD): Generate code to initialize the SSD structure of
9491         the TSD.
9492
9493 2011-08-02  Yannick Moy  <moy@adacore.com>
9494
9495         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9496         cross-references section in ALI.
9497         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9498         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9499         Sub).
9500         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9501         subprogram or package entity of a node
9502         (Is_Local_Reference_Type): new function returns True for references
9503         selected in local cross-references.
9504         (Lt): function extracted from Lt in Output_References
9505         (Write_Entity_Name): function extracted from Output_References
9506         (Generate_Definition): generate reference with type 'D' for definition
9507         of objects (object declaration and parameter specification), with
9508         appropriate locations and units, for use in local cross-references.
9509         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9510         references of type 'I' for initialization in object definition.
9511         (Output_References): move part of function Lt and procedure
9512         Write_Entity_Name outside of the body. Ignore references of types 'D'
9513         and 'I' introduced for local cross-references.
9514         (Output_Local_References): new procedure to output the local
9515         cross-references sections.
9516         (Lref_Entity_Status): new array defining whether an entity is a local
9517         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9518         with 'I' type when initialization expression is present.
9519         * get_scos.adb, get_scos.ads: Correct comments and typos
9520
9521 2011-08-02  Javier Miranda  <miranda@adacore.com>
9522
9523         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9524         the JVM target.
9525         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9526         the JVM target.
9527         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9528         TSD support.
9529
9530 2011-08-02  Vincent Celier  <celier@adacore.com>
9531
9532         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9533         (No_Space_Img): New function
9534         (Find_Excluded_Sources): When reading from a file, record the file name
9535         and the line number for each excluded source.
9536         (Mark_Excluded_Sources): When reporting an error, if the excluded
9537         sources were read from a file, include file name and line number in
9538         the error message.
9539
9540 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9541
9542         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9543
9544 2011-08-02  Robert Dewar  <dewar@adacore.com>
9545
9546         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9547
9548 2011-08-02  Javier Miranda  <miranda@adacore.com>
9549
9550         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9551         generation of TSDs to the DOTNET compiler.
9552         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9553         generation of TSDs to the DOTNET compiler.
9554
9555 2011-08-02  Javier Miranda  <miranda@adacore.com>
9556
9557         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9558         record of all the tagged types declared inside library level package
9559         declarations, library level package bodies or library level subprograms.
9560         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9561         associated with a given tagged type.
9562         (Build_VM_TSDs): New subprogram.
9563         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9564         compilation units that are subprograms.
9565         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9566         compilation units that are package bodies.
9567         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9568         units that are a package declaration or a package instantiation.
9569         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9570         reorganization to improve the error generated by the frontend when the
9571         function Ada.Tags.Secondary_Tag is not available.
9572         * rtsfind.ads (RE_Register_TSD): New runtime entity.
9573         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9574
9575 2011-08-02  Javier Miranda  <miranda@adacore.com>
9576
9577         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9578
9579 2011-08-02  Robert Dewar  <dewar@adacore.com>
9580
9581         * s-imenne.ads: Minor reformatting.
9582
9583 2011-08-02  Robert Dewar  <dewar@adacore.com>
9584
9585         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9586         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9587         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9588
9589 2011-08-02  Robert Dewar  <dewar@adacore.com>
9590
9591         * einfo.ads (Materialize_Entity): Document this is only for renamings
9592         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9593         required debug information in the case where we transform the object
9594         declaration into a renaming declaration.
9595         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9596         object
9597         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9598         Materialize_Entity.
9599
9600 2011-08-02  Robert Dewar  <dewar@adacore.com>
9601
9602         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9603         Suppress_Init_Procs.
9604         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9605         Suppress_Initialization/Initialization_Suppressed.
9606         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9607         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9608         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9609         * sem_prag.adb: New processing for pragma Suppress_Initialization.
9610
9611 2011-08-02  Robert Dewar  <dewar@adacore.com>
9612
9613         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9614         Minor reformatting.
9615
9616 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9617
9618         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9619         only have inheritable classwide pre/postconditions.
9620
9621 2011-08-02  Javier Miranda  <miranda@adacore.com>
9622
9623         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9624         * rtsfind.ads (RE_Check_TSD): New runtime entity.
9625         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9626         checks if the external tag of a type is the same as the external tag
9627         of some other declaration.
9628
9629 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9630
9631         * s-taskin.ads: Minor reformatting.
9632
9633 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9634
9635         * g-comlin.adb (Display_Help): swap the order in which it prints the
9636         short help and the general usage.
9637
9638 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9639
9640         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9641         the aspect declarations and attach them to the generic copy for
9642         subsequent analysis.
9643         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9644         declarations of the generic tree to the new subprogram declarations.
9645         * sem_attr.adb (Check_Precondition_Postcondition): recognize
9646         conditions that apply to a subprogram instance.
9647
9648 2011-08-02  Robert Dewar  <dewar@adacore.com>
9649
9650         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9651
9652 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9653
9654         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9655         private type with a tagged full view is not derived in the immediate
9656         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9657
9658 2011-08-02  Robert Dewar  <dewar@adacore.com>
9659
9660         * exp_ch4.adb: Minor reformatting.
9661
9662 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9663
9664         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
9665         Ada2012 iterator, the loop will be rewritten during expansion into a
9666         while loop with a cursor and an element declaration. Do not analyze the
9667         body in this case, because if the container is for indefinite types the
9668         actual subtype of the elements will only be determined when the cursor
9669         declaration is analyzed.
9670
9671 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9672
9673         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9674         size/alignment related attributes in CodePeer_Mode.
9675
9676 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9677
9678         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9679         Prepend_Element, since this can result in the operation getting the
9680         wrong slot in the full type's dispatch table if the full type has
9681         inherited operations. The incomplete type's operation will get added
9682         to the proper position in the full type's primitives
9683         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9684         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9685         dispatching operations, since there are cases where nonprimitive
9686         subprograms can get added to the list of incomplete dependents (such
9687         as subprograms in nested packages).
9688         * sem_ch6.adb (Process_Formals): First, remove test for being in a
9689         private part when determining whether to add a primitive with a
9690         parameter of a tagged incomplete type to the Private_Dependents list.
9691         Such primitives can also occur in the visible part, and should not have
9692         been excluded from being private dependents.
9693         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9694         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9695         list of a Taft-amendment incomplete type is a primitive before issuing
9696         an error that the full type must appear in the same unit. There are
9697         cases where nonprimitives can be in the list (such as subprograms in
9698         nested packages).
9699         * sem_disp.adb (Derives_From): Use correct condition for checking that
9700         a formal's type is derived from the type of the corresponding formal in
9701         the parent subprogram (the condition was completely wrong). Add
9702         checking that was missing for controlling result types being derived
9703         from the result type of the parent operation.
9704
9705 2011-08-02  Yannick Moy  <moy@adacore.com>
9706
9707         * errout.adb (First_Node): minor renaming
9708         * restrict.adb (Check_Formal_Restriction): put restriction warning on
9709         first node.
9710
9711 2011-08-02  Yannick Moy  <moy@adacore.com>
9712
9713         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9714         before accessing operands.
9715         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9716         decide whether an initialization expression respects SPARK rules, as
9717         the plain node is the expanded one. This allows for more valid warnings
9718         to be issued.
9719         * gnat_rm.texi: Minor update.
9720
9721 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9722
9723         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9724         previous change.
9725
9726 2011-08-02  Robert Dewar  <dewar@adacore.com>
9727
9728         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9729
9730 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9731
9732         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9733         loop statements and the element renaming declaration with a block when
9734         the element type is controlled.
9735
9736 2011-08-02  Yannick Moy  <moy@adacore.com>
9737
9738         * sinfo.ads: Minor formatting.
9739
9740 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9741
9742         * sem_aggr.adb (Add_Association): if the association has a box and no
9743         expression, use the Sloc of the aggregate itself for the new
9744         association.
9745         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9746         the Original_Node.
9747
9748 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9749
9750         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9751         When a container is provided via a function call, generate a renaming
9752         of the function result. This avoids the creation of a transient scope
9753         and the premature finalization of the container.
9754         * exp_ch7.adb (Is_Container_Cursor): Removed.
9755         (Wrap_Transient_Declaration): Remove the supression of the finalization
9756         of the list controller when the declaration denotes a container cursor,
9757         it is not needed.
9758
9759 2011-08-02  Yannick Moy  <moy@adacore.com>
9760
9761         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9762         node is from source, instead of the original node being from source.
9763         * sem_aggr.adb
9764         (Resolve_Array_Aggregate): refine the check for a static expression, to
9765         recognize also static ranges
9766         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9767         Array_Type_Declaration): postpone the test for the type being a subtype
9768         mark after the type has been resolved, so that component-selection and
9769         expanded-name are discriminated.
9770         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9771         to distinguish the case of an iteration scheme, so that an error is
9772         issed on a non-static range in SPARK except in an iteration scheme.
9773         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9774         In_Iter_Schm = True.
9775         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9776         user-defined operators so that they are allowed in renaming
9777         * sem_ch8.adb
9778         (Find_Selected_Component): refine the check for prefixing of operators
9779         so that they are allowed in renaming. Move the checks for restrictions
9780         on selector name after analysis discriminated between
9781         component-selection and expanded-name.
9782         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9783         concatenation argument of string type if it is static.
9784         * sem_util.adb, sem_util.ads
9785         (Check_Later_Vs_Basic_Declarations): add a new function
9786         Is_Later_Declarative_Item to decice which declarations are allowed as
9787         later items, in the two different modes Ada 83 and SPARK. In the SPARK
9788         mode, add that renamings are considered as later items.
9789         (Enclosing_Package): new function to return the enclosing package
9790         (Enter_Name): correct the rule for homonyms in SPARK
9791         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9792         from source (result of expansion) to avoid issuing wrong warnings.
9793
9794 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9795
9796         * errout.adb: On anything but an expression First_Node returns its
9797         argument.
9798
9799 2011-08-02  Pascal Obry  <obry@adacore.com>
9800
9801         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9802
9803 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9804
9805         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9806         Set the associated loop as the related expression of internally
9807         generated cursors.
9808         * exp_ch7.adb (Is_Container_Cursor): New routine.
9809         (Wrap_Transient_Declaration): Supress the finalization of the list
9810         controller when the declaration denotes a container cursor.
9811
9812 2011-08-02  Yannick Moy  <moy@adacore.com>
9813
9814         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9815         command line now.
9816         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9817         expression is a simple expression. This check cannot be performed in
9818         the semantics, so just drop it.
9819         (P_Index_Or_Discriminant_Constraint): move check that the index or
9820         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9821         semantics. Other cases were previously checked in the semantics.
9822         * par-ch4.adb (P_Name): move checks that a selector name is not
9823         character literal or an operator symbol to Find_Selected_Component in
9824         the semantics
9825         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9826         declarations are not placed after later declarations in a separate
9827         procedure in Sem_Util (possibly not the best choice?), to be used both
9828         during parsing, for Ada 83 mode, and during semantic analysis, for
9829         SPARK mode.
9830         * par-endh.adb (Check_End): move check that end label is not missing
9831         to Process_End_Label in the semantics
9832         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9833         the special case for SPARK restriction
9834         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9835         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9836         parameter Force to issue the error message even on internal node (used
9837         for generated end label). Call Check_Restriction to check when an error
9838         must be issued. In SPARK mode, issue an error message even if the
9839         restriction is not set.
9840         (Check_Restriction): new procedure with an additional out parameter to
9841         inform the caller that a message has been issued
9842         * sem_aggr.adb: Minor modification of message
9843         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9844         instead of issuing an error message directly
9845         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9846         declarations are not placed after later declarations, by calling
9847         Check_Later_Vs_Basic_Declarations
9848         (Analyze_Subtype_Declaration): move here the check that an index or
9849         discriminant constraint must be a subtype mark. Change the check that
9850         a subtype of String must start at one so that it works on subtype marks.
9851         * sem_ch4.adb (Analyze_Call): move here the check that a named
9852         association cannot follow a positional one in a call
9853         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9854         instead of issuing an error message directly
9855         * sem_ch8.adb (Find_Selected_Component): move here the check that a
9856         selector name is not a character literal or an operator symbol. Move
9857         here the check that the prefix of an expanded name cannot be a
9858         subprogram or a loop statement.
9859         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9860         procedure called from parsing and semantics to check that basic
9861         declarations are not placed after later declarations
9862         (Process_End_Label): move here the check that end label is not missing
9863
9864 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9865
9866         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9867         representation clause in codepeer mode, since it confuses CodePeer and
9868         does not bring useful info.
9869
9870 2011-08-02  Ed Falis  <falis@adacore.com>
9871
9872         * init.c: initialize fp hw on MILS.
9873
9874 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9875
9876         * errout.adb (First_Node): for bodies, return the node itself (small
9877         optimization). For other nodes, do not check source_unit if the node
9878         comes from Standard.
9879
9880 2011-08-02  Robert Dewar  <dewar@adacore.com>
9881
9882         * exp_ch3.adb: Minor comment additions.
9883         * sem_ch13.adb: Minor reformatting.
9884
9885 2011-08-02  Pascal Obry  <obry@adacore.com>
9886
9887         * make.adb, makeutl.adb: Removes some superfluous directory separator.
9888
9889 2011-08-02  Robert Dewar  <dewar@adacore.com>
9890
9891         * sem_attr.adb: Minor reformatting.
9892
9893 2011-08-02  Robert Dewar  <dewar@adacore.com>
9894
9895         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9896         (Has_Default_Component_Value): Removed
9897         * einfo.ads Comment updates
9898         (Has_Default_Aspect): Replaces Has_Default_Value
9899         (Has_Default_Component_Value): Removed
9900         * exp_ch13.adb
9901         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9902         * exp_ch3.adb
9903         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9904         (Get_Simple_Init_Val): Handle Default_Value aspect
9905         (Needs_Simple_Initialization): Handle Default_Value aspect
9906         * exp_ch3.ads: Needs_Simple_Initialization
9907         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9908         * par-prag.adb (Pragma_Default[_Component]Value) Removed
9909         * sem_ch13.adb
9910         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9911         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9912         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9913
9914 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9915
9916         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9917         package containing iteration primitives.
9918         exp_ch5.adb (Expand_Iterator_Loop): ditto.
9919
9920 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9921
9922         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9923         "of", pre-analyze expression in case it is a function call with
9924         finalization actions that must be placed ahead of the loop.
9925         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9926         on an Ada2012 iterator, insert them ahead of the rewritten loop.
9927
9928 2011-08-02  Geert Bosch  <bosch@adacore.com>
9929
9930         * cstand.adb (Create_Float_Types): Only consider C's long double for
9931         Long_Long_Float, in addition to double.
9932
9933 2011-08-02  Robert Dewar  <dewar@adacore.com>
9934
9935         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9936         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9937         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9938         Minor reformatting.
9939
9940 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9941
9942         * sem_attr.adb: handle properly 'Result when it is a prefix of an
9943         indexed component.
9944
9945 2011-08-02  Javier Miranda  <miranda@adacore.com>
9946
9947         * einfo.ads, einfo.adb
9948         (Original_Access_Type): Move this attribute to Node26 since there was
9949         an undocumented use of Node21 in E_Access_Subprogram_Type entities
9950         which causes conflicts and breaks the generation of the .NET compiler.
9951         (Interface_Name): Add missing documentation on JGNAT only uses of
9952         this attribute.
9953
9954 2011-08-02  Geert Bosch  <bosch@adacore.com>
9955
9956         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9957         (Find_Back_End_Float_Type): Likewise
9958         (Create_Back_End_Float_Types): Likewise
9959         (Create_Float_Types): Likewise
9960         (Register_Float_Type): Likewise
9961         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9962         Nlist and split out type selection in new local Find_Base_Type function.
9963         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9964         Nlist
9965         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9966
9967 2011-08-02  Robert Dewar  <dewar@adacore.com>
9968
9969         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9970         alpha order).
9971         * opt.ads: Minor comment change.
9972         * sem_ch12.adb: Minor code reorganization.
9973
9974 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9975
9976         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9977         subtype's list of rep items to the list on the full subtype in the case
9978         where the lists are the same.
9979
9980 2011-08-02  Geert Bosch  <bosch@adacore.com>
9981
9982         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9983         using the one from System.Strings, which also deallocates all strings.
9984
9985 2011-08-02  Geert Bosch  <bosch@adacore.com>
9986
9987         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9988         function.
9989         * gcc-interface/Make-lang.in: Update dependencies.
9990
9991 2011-08-02  Olivier Hainque  <hainque@adacore.com>
9992
9993         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9994         end_locus.
9995
9996 2011-08-02  Javier Miranda  <miranda@adacore.com>
9997
9998         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9999         associated with anonymous access to subprograms.
10000
10001 2011-08-02  Geert Bosch  <bosch@adacore.com>
10002
10003         * opt.ads
10004         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10005         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10006         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10007         (Add_Symbol_Definition): Move to switch-c.adb
10008         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10009         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10010         (Add_Symbol_Definition): Move to switch-c.adb.
10011         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10012         * sem_warn.adb
10013         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10014         Move to warnsw.adb.
10015         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10016         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10017         Move to warnsw.adb.
10018         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10019         (Add_Symbol_Definition): Moved from Prepcomp.
10020         * switch-c.ads: Update copyright notice. Use String_List instead of
10021         Argument_List, removing dependency on System.OS_Lib.
10022
10023 2011-08-02  Yannick Moy  <moy@adacore.com>
10024
10025         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10026         mode on initialization expression which does not respect SPARK
10027         restrictions.
10028         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10029         if the tree referenced by its argument represents an initialization
10030         expression in SPARK, suitable for initializing an object in an object
10031         declaration.
10032
10033 2011-08-02  Javier Miranda  <miranda@adacore.com>
10034
10035         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10036         internally generated access to subprogram with its associated protected
10037         subprogram type.
10038         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10039
10040 2011-08-02  Geert Bosch  <bosch@adacore.com>
10041
10042         * cstand.adb (Register_Float_Type): Print information about type to
10043         register, if the Debug_Flag_Dot_B is set.
10044         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10045         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10046         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10047         with a requested precision of more than Max_Digits digits and no more
10048         than Max_Base_Digits digits, if a range specification is present and the
10049         Predefined_Float_Types list has a suitable type to derive from.
10050         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10051         case of type completion with pragma Import
10052         * sem_prag.adb
10053         (Process_Import_Predefined_Type): Processing to complete a type
10054         with pragma Import. Currently supports floating point types only.
10055         (Set_Convention_From_Pragma): Do nothing without underlying type.
10056         (Process_Convention): Guard against absence of underlying type,
10057         which may happen when importing incomplete types.
10058         (Process_Import_Or_Interface): Handle case of importing predefined
10059         types. Tweak error message.
10060
10061 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10062
10063         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10064         functions to previous change.  Reorganize code slightly.
10065
10066 2011-08-02  Geert Bosch  <bosch@adacore.com>
10067
10068         * back_end.ads (Register_Type_Proc): New call back procedure type for
10069         allowing the back end to provide information about available types.
10070         (Register_Back_End_Types): New procedure to register back end types.
10071         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10072         available types.
10073         * cstand.adb (Back_End_Float_Types): New list for floating point types
10074         supported by the back end.
10075         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10076         (Copy_Float_Type): New procedure to make new copies of predefined types.
10077         (Register_Float_Type): New call back procedure to populate the BEFT list
10078         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10079         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10080         (Create_Float_Types): New procedure to create entities for floating
10081         point types predefined in Standard, and put these and any remaining
10082         BEFTs on the Predefined_Float_Types list.
10083         * stand.ads (Predefined_Float_Types): New list for predefined floating
10084         point types that do not have declarations in package Standard.
10085
10086 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10087
10088         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
10089         entity node for the unit containing the parameter.
10090         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10091         (Add_Inlined_Subprogram): Likewise.
10092         * gcc-interface/Make-lang.in: Update dependencies.
10093
10094 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10095
10096         * s-stusta.adb (Print): Make sure Pos is always initialized to a
10097         suitable value.
10098
10099 2011-08-02  Geert Bosch  <bosch@adacore.com>
10100
10101         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10102
10103 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10104
10105         * sem_type.adb (Covers): Move trivial case to the top and reuse the
10106         computed value of Base_Type.
10107
10108 2011-08-02  Yannick Moy  <moy@adacore.com>
10109
10110         * restrict.adb (Check_Restriction): issue an error for any use of
10111         class-wide, even if the No_Dispatch restriction is not set.
10112         * sem_aggr.adb: Correct typos in comments and messages in formal mode
10113         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10114         when completing a private extension, the type named in the private part
10115         is not the same as that named in the visible part.
10116         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10117         of an inherited primitive operations of a tagged type or type extension
10118         that returns the tagged type.
10119         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10120         function which returns True for an implicit operation inherited by the
10121         derived type declaration for the argument type.
10122         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10123         order.
10124
10125 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10126
10127         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10128         Process_Bounds, to perform analysis with expansion of a range or an
10129         expression that is the iteration scheme for a loop.
10130         (Analyze_Iterator_Specification): If domain of iteration is given by a
10131         function call with a controlled result, as is the case if call returns
10132         a predefined container, ensure that finalization actions are properly
10133         generated.
10134         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10135
10136 2011-08-02  Javier Miranda  <miranda@adacore.com>
10137
10138         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10139         * gcc-interface/Make-lang.in: Update dependencies.
10140
10141 2011-08-02  Javier Miranda  <miranda@adacore.com>
10142
10143         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10144         determine if the analysis is performed using N or Original_Node (N).
10145         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10146         functionality of routine Is_Variable avoids code duplication.
10147         * checks.adb (Determine_Range): Handle temporaries generated by
10148         Remove_Side_Effects.
10149
10150 2011-08-02  Javier Miranda  <miranda@adacore.com>
10151
10152         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10153         expansion of the condition. Required since the previous analysis was
10154         done with expansion disabled (see Resolve_Quantified_Expression) and
10155         hence checks were not inserted and record comparisons have not been
10156         expanded.
10157
10158 2011-08-02  Ed Falis  <falis@adacore.com>
10159
10160         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10161         Update header.
10162
10163 2011-08-02  Bob Duff  <duff@adacore.com>
10164
10165         * opt.ads: Minor comment fix.
10166
10167 2011-08-02  Bob Duff  <duff@adacore.com>
10168
10169         * sem_ch12.adb (Analyze_Package_Instantiation,
10170         Analyze_Subprogram_Instantiation): Turn off style checking while
10171         analyzing an instance. Whatever style checks that apply to the generic
10172         unit should apply, so it makes no sense to apply them in an instance.
10173         This was causing trouble when compiling an instance of a runtime
10174         unit that violates the -gnatyO switch.
10175         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10176         one of the two case statements, causing spurious errors.
10177
10178 2011-08-02  Robert Dewar  <dewar@adacore.com>
10179
10180         * uname.adb: Minor reformatting.
10181         * gnatcmd.adb: Minor reformatting.
10182         * exp_attr.adb: Minor reformatting.
10183
10184 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10185
10186         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10187         No_Dispatching_Calls, do not look for the Assign primitive, because
10188         predefined primitives are not created in this case.
10189
10190 2011-08-02  Bob Duff  <duff@adacore.com>
10191
10192         * stylesw.ads: Minor comment fixes.
10193
10194 2011-08-02  Robert Dewar  <dewar@adacore.com>
10195
10196         * freeze.adb (Add_To_Result): New procedure.
10197
10198 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10199
10200         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10201         time, if the specific run-time routines for handling streams of strings
10202         are not available, use the default mechanism.
10203
10204 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10205
10206         * s-regpat.ads: Fix typo.
10207
10208 2011-08-02  Vincent Celier  <celier@adacore.com>
10209
10210         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10211         not null, call it to create the in memory config project file without
10212         parsing an existing default config project file.
10213
10214 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10215
10216         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10217
10218 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10219
10220         * sem_elim.adb: an abstract subprogram does not need an eliminate
10221         pragma for its descendant to be eliminable.
10222
10223 2011-08-02  Ed Falis  <falis@adacore.com>
10224
10225         * init.c: revert to handling before previous checkin for VxWorks
10226         * s-intman-vxworks.adb: delete unnecessary declarations related to
10227         using Ada interrupt facilities for handling signals.
10228         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10229         * s-intman-vxworks.ads: Import __gnat_install_handler as
10230         Initialize_Interrupts.
10231         * s-taprop-vxworks.adb: Delete Signal_Mask.
10232         (Abort_Handler): change construction of mask to unblock exception
10233         signals.
10234
10235 2011-08-02  Jerome Guitton  <guitton@adacore.com>
10236
10237         * a-except-2005.adb (Raise_From_Signal_Handler): Call
10238         Debug_Raise_Exception before propagation starts.
10239
10240 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10241
10242         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10243         to Restriction_Check_Required.
10244         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10245         * sem_res.adb (Resolve_Call): Likewise.
10246         * sem_attr.adb (Check_Stream_Attribute): Likewise.
10247
10248 2011-08-02  Bob Duff  <duff@adacore.com>
10249
10250         * stylesw.ads: Update comment.
10251         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10252         * errout.ads: Remove obsolete comment.
10253
10254 2011-08-02  Javier Miranda  <miranda@adacore.com>
10255
10256         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10257         (Set_Is_Safe_To_Reevaluate): new procedure.
10258         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10259         assignment is allowed on safe-to-reevaluate variables.
10260         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10261         temporary created to remove side effects in expressions that use
10262         the secondary stack as safe-to-reevaluate.
10263         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10264         variables that are not true constants.
10265
10266 2011-08-02  Robert Dewar  <dewar@adacore.com>
10267
10268         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10269         sem_res.adb, sem_ch6.adb: Minor reformatting.
10270
10271 2011-08-02  Jerome Guitton  <guitton@adacore.com>
10272
10273         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10274
10275 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10276
10277         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10278         not set Overridden_Operation if subprogram is an initialization
10279         procedure.
10280
10281 2011-08-02  Yannick Moy  <moy@adacore.com>
10282
10283         * par-ch6.adb: Correct obsolete name in comments
10284         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10285         which takes two message arguments (existing function takes one), with
10286         second message used for continuation.
10287         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10288         block statements that originate from a source block statement, not
10289         generated block statements
10290         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10291         symmetry with procedure case
10292         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10293         function to issue an error in formal mode if a package specification
10294         contains more than one tagged type or type extension.
10295         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10296         parameters matching formals of tagged types are objects (or ancestor
10297         type conversions of objects), not general expressions. Issue an error
10298         on view conversions that are not involving ancestor conversion of an
10299         extended type.
10300         (Resolve_Type_Conversion): in formal mode, issue an error on the
10301         operand of an ancestor type conversion which is not an object
10302         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10303         procedure so that it works also for actuals of function calls
10304         (Is_Actual_Tagged_Parameter): new function which determines if its
10305         argument is an actual parameter of a formal of tagged type in a
10306         subprogram call
10307         (Is_SPARK_Object_Reference): new function which determines if the tree
10308         referenced by its argument represents an object in SPARK
10309
10310 2011-08-02  Robert Dewar  <dewar@adacore.com>
10311
10312         * sem_ch3.adb: Minor reformatting
10313         Minor comment addition
10314         Minor error msg text change
10315
10316 2011-08-02  Javier Miranda  <miranda@adacore.com>
10317
10318         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10319         function. Used to be more precise when we generate a variable plus one
10320         assignment to remove side effects in the evaluation of the Bound
10321         expressions.
10322         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10323         of the bound expression to force its re-analysis and thus expand the
10324         associated transient scope (if required). Code cleanup replacing the
10325         previous code that declared the constant entity by an invocation to
10326         routine Force_Evaluation which centralizes this work in the frontend.
10327
10328 2011-08-02  Robert Dewar  <dewar@adacore.com>
10329
10330         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10331         (Base_Type): Now uses improved Is_Base_Type function
10332         * einfo.ads (Base_Type): Inline this function
10333
10334 2011-08-02  Robert Dewar  <dewar@adacore.com>
10335
10336         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10337         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10338
10339 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10340
10341         * gcc-interface/Make-lang.in: Update dependencies.
10342         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10343         targets.
10344
10345 2011-08-02  Yannick Moy  <moy@adacore.com>
10346
10347         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10348         non-simple expression used in delta constraint
10349         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10350         index constraint which is not a subtype mark
10351         * par.adb: With and use Restrict
10352         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10353         mode on component type which is not a subtype mark and default
10354         expression on component
10355         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10356         of string which does not have a lower index bound equal to 1
10357         (Array_Type_Declaration): issue an error in formal mode on index or
10358         component type which is not a subtype mark, and on aliased keyword on
10359         component
10360         (Derived_Type_Declaration): issue an error in formal mode on interface,
10361         limited or abstract type
10362         (Record_Type_Declaration): issue an error in formal mode on interface
10363         (Record_Type_Definition): issue an error in formal mode on tagged types
10364         and type extensions not declared in the specification of a library unit
10365         package; on null non-tagged record; on variant part
10366
10367 2011-08-02  Vincent Celier  <celier@adacore.com>
10368
10369         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10370         not declared for qualified library project when Library_Name is not
10371         declared, but Library_Dir is.
10372
10373 2011-08-02  Robert Dewar  <dewar@adacore.com>
10374
10375         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10376         pragmas (affects aspects [Component_]Default_Value
10377         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10378         component type for the resolution
10379
10380 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10381
10382         * einfo.adb (Base_Type): Tune implementation for speed.
10383
10384 2011-08-02  Robert Dewar  <dewar@adacore.com>
10385
10386         * freeze.adb: Minor reformatting.
10387
10388 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10389
10390         * scos.ads: Update comments.
10391
10392 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10393
10394         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10395         base type, because the parent may be a subtype of a private type whose
10396         convention is established in a private part.
10397
10398 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10399
10400         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10401         statement in a block when the expansion of the return expression has
10402         created a finalization chain.
10403         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10404         with the parent node.
10405         Add N_Extended_Return_Statement to handle the case where a transient
10406         object declaration appears in the Return_Object_Declarations list of
10407         an extended return statement.
10408
10409 2011-08-02  Matthew Gingell  <gingell@adacore.com>
10410
10411         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10412         unused parameter 'name'.
10413
10414 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10415
10416         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10417         inherited operation, check whether its alias, which is the source
10418         operastion that it renames, has been marked eliminated.
10419
10420 2011-08-02  Javier Miranda  <miranda@adacore.com>
10421
10422         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10423         in-mode parameter whose type is an access type since it can be used to
10424         modify its designated object. Enforce code that handles as safe an
10425         access type that is not access-to-constant but it is the result of a
10426         previous removal of side-effects.
10427         (Remove_Side_Effects): Minor code reorganization of cases which require
10428         no action. Done to incorporate documentation on new cases uncovered
10429         working in this ticket: no action needed if this routine was invoked
10430         too early and the nodes are not yet decorated.
10431         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10432         to routine Remove_Side_Effects by calls to Force_Evaluation since they
10433         were issued with actuals that are implicitly provided by
10434         Force_Evaluation.
10435
10436 2011-08-02  Robert Dewar  <dewar@adacore.com>
10437
10438         * sem_ch3.adb, sem_res.adb: Minor reformatting.
10439
10440 2011-08-02  Yannick Moy  <moy@adacore.com>
10441
10442         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10443         to issue an error in formal mode on attribute not supported in this mode
10444         (Analyze_Attribute): issue errors on standard attributes not supported
10445         in formal mode.
10446         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10447         comment, and issue error in formal mode on modulus which is not a power
10448         of 2.
10449         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10450         range.
10451         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10452         subtype mark.
10453         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10454         operator on modular type (except 'not').
10455
10456 2011-08-02  Robert Dewar  <dewar@adacore.com>
10457
10458         * gnat_rm.texi: Minor reformatting.
10459
10460 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10461
10462         * s-osinte-linux.ads: Minor comment update and reformatting.
10463         * i-cexten.ads: Make this unit pure, as for its parent.
10464         Will allow its usage in more contexts if needed.
10465
10466 2011-08-02  Robert Dewar  <dewar@adacore.com>
10467
10468         * s-utf_32.ads: Minor comment fix.
10469
10470 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10471
10472         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10473         operation of a tagged synchronized type, handle the case where the
10474         controlling argument is overloaded.
10475
10476 2011-08-02  Yannick Moy  <moy@adacore.com>
10477
10478         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10479         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10480         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10481         SPARK mode and formal verification mode on processing SPARK restriction
10482         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10483         requiring consistency checking.
10484
10485 2011-08-02  Robert Dewar  <dewar@adacore.com>
10486
10487         * sem_res.adb: Minor reformatting.
10488
10489 2011-08-02  Robert Dewar  <dewar@adacore.com>
10490
10491         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10492         a-cforse.ads: Remove unneeded with of Ada.Containers
10493         Remove commented out pragma Inline's
10494         Move specifications of new subprograms to the actual specs
10495
10496 2011-08-02  Yannick Moy  <moy@adacore.com>
10497
10498         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10499         a-cforse.ads: Update comments.
10500
10501 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10502
10503         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10504
10505 2011-08-02  Robert Dewar  <dewar@adacore.com>
10506
10507         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10508         a-cforse.ads, a-cofove.ads: Minor reformatting.
10509
10510 2011-08-02  Claire Dross  <dross@adacore.com>
10511
10512         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10513         a-cofove.ads: Add comments.
10514
10515 2011-08-02  Yannick Moy  <moy@adacore.com>
10516
10517         * gnat_rm.texi: Document formal containers.
10518
10519 2011-08-02  Emmanuel Briot  <briot@adacore.com>
10520
10521         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10522         are empty sections.
10523
10524 2011-08-02  Robert Dewar  <dewar@adacore.com>
10525
10526         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10527         reformatting.
10528
10529 2011-08-02  Robert Dewar  <dewar@adacore.com>
10530
10531         * aspects.adb: New aspects Default_Value and Default_Component_Value
10532         New format of Aspect_Names table checks for omitted entries
10533         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10534         handling of boolean aspects for derived types.
10535         New aspects Default_Value and Default_Component_Value
10536         New format of Aspect_Names table checks for omitted entries
10537         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10538         (Has_Default_Value): New flag
10539         (Has_Default_Component_Value): New flag
10540         (Has_Default_Value): New flag
10541         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10542         table.
10543         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10544         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10545         Default_Value and Default_Component_Value
10546         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10547         New aspects Default_Value and Default_Component_Value
10548         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10549         * sprint.adb: Print N_Aspect_Specification node when called from gdb
10550
10551 2011-08-02  Vincent Celier  <celier@adacore.com>
10552
10553         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10554         inherit library kind.
10555
10556 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10557
10558         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10559         Minor reformatting.
10560
10561 2011-08-02  Robert Dewar  <dewar@adacore.com>
10562
10563         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10564
10565 2011-08-02  Yannick Moy  <moy@adacore.com>
10566
10567         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10568
10569 2011-08-02  Robert Dewar  <dewar@adacore.com>
10570
10571         * impunit.adb: Add comment.
10572
10573 2011-08-02  Yannick Moy  <moy@adacore.com>
10574
10575         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10576         qualification of aggregates in formal mode
10577         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10578         another aggregate
10579         (Resolve_Aggregate): complete the test that an aggregate is adequately
10580         qualified in formal mode
10581
10582 2011-08-02  Pascal Obry  <obry@adacore.com>
10583
10584         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10585         * mlib-prj.adb: Supress warning when compiling binder generated file.
10586         (Build_Library): Supress all warnings when compiling the binder
10587         generated file.
10588
10589 2011-08-02  Yannick Moy  <moy@adacore.com>
10590
10591         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10592         from here...
10593         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10594         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10595         Add with/use clauses to make Check_Formal_Restriction visible
10596
10597 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10598
10599         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10600         in-parameters when type of the generic formal is private in the generic
10601         spec and non-private in the body.
10602
10603 2011-08-02  Claire Dross  <dross@adacore.com>
10604
10605         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10606         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10607         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10608         * impunit.adb, Makefile.rtl: Take new files into account.
10609
10610 2011-08-02  Robert Dewar  <dewar@adacore.com>
10611
10612         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10613         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10614
10615 2011-08-02  Yannick Moy  <moy@adacore.com>
10616
10617         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10618         formal mode
10619         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10620         matching static array bounds, taking into account the special case of
10621         string literals
10622         * sem_ch3.adb: Typo in comment.
10623
10624 2011-08-02  Yannick Moy  <moy@adacore.com>
10625
10626         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10627         which issues an error in formal mode if its argument node is originally
10628         from source
10629         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10630         has a discriminant specification so that it does not include the case
10631         of derived types
10632         (Derived_Type_Declaration): move here the test that a derived type has a
10633         discriminant specification
10634         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10635         first element of a component association before accessing its choices
10636         (presence of component association is not enough)
10637         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10638         declaration is a library item before accessing the next element in a
10639         list, as library items are not member of lists
10640         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10641         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10642         Check_Formal_Restriction whenever possible.
10643
10644 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10645
10646         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10647         reference when needed.
10648
10649 2011-08-02  Bob Duff  <duff@adacore.com>
10650
10651         * gnat_ugn.texi: Fix typo.
10652
10653 2011-08-02  Vincent Celier  <celier@adacore.com>
10654
10655         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10656         archive file name. Do not use the full path name of archives for Open
10657         VMS.
10658
10659 2011-08-02  Robert Dewar  <dewar@adacore.com>
10660
10661         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10662         Analyze_Aspect_Specifications
10663         * sem_ch13.adb
10664         (Analyze_Aspect_Specifications): New handling for boolean aspects
10665         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10666         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10667         sequence for Analyze_Aspect_Specifications
10668         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10669         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10670
10671 2011-08-02  Robert Dewar  <dewar@adacore.com>
10672
10673         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10674         aspects, since these no longer exist.
10675
10676 2011-08-02  Robert Dewar  <dewar@adacore.com>
10677
10678         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10679         semicolon, do not try to see if there are aspects following it.
10680         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10681         aspect spec.
10682
10683 2011-08-02  Robert Dewar  <dewar@adacore.com>
10684
10685         * sem_ch8.adb, aspects.ads: Minor reformatting.
10686
10687 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10688
10689         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10690         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10691         extracted from...
10692         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
10693
10694 2011-08-02  Yannick Moy  <moy@adacore.com>
10695
10696         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10697         mode on subprogram declaration outside of package specification, unless
10698         it is followed by a pragma Import
10699         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10700         Access_Type_Declaration): issue error in formal mode on access type
10701         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10702         incomplete type
10703         (Analyze_Object_Declaration): issue error in formal mode on object
10704         declaration which does not respect SPARK restrictions
10705         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10706         declaration which does not respect SPARK restrictions
10707         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10708         error in formal mode on digits or delta constraint
10709         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10710         decimal fixed point type
10711         (Derived_Type_Declaration): issue error in formal mode on derived type
10712         other than type extensions of tagged record types
10713         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10714         with check on access definition
10715         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10716         mode on protected definition.
10717         (Analyze_Task_Definition): issue error in formal mode on task definition
10718
10719 2011-08-02  Robert Dewar  <dewar@adacore.com>
10720
10721         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10722
10723 2011-08-02  Javier Miranda  <miranda@adacore.com>
10724
10725         * sem_ch6.adb (Can_Override_Operator): New function.
10726         (Verify_Overriding_Indicator): Add missing code to check overriding
10727         indicator in operators. Fixes regression.
10728         (Check_Overriding_Indicator): Minor reformating after replacing the
10729         code that evaluates if the subprogram can override an operator by
10730         invocations to the above new function.
10731         * einfo.adb
10732         (Write_Field26_Name): Add missing code to ensure that, following
10733         the documentation in einfo.ads, this field is not shown as attribute
10734         "Static_Initialization" on non-dispatching functions.
10735
10736 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10737
10738         * sem_res.adb (Resolve_Call): A call to
10739         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10740         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10741         i.e., when the second parameter is of type Time_Span.
10742
10743 2011-08-02  Vincent Celier  <celier@adacore.com>
10744
10745         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10746         with an archive instead of -L<library dir> -l<library name>.
10747
10748 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10749
10750         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10751         mark the base types In_Use in addition to making the operations
10752         use_visible.
10753
10754 2011-08-02  Ed Falis  <falis@adacore.com>
10755
10756         * init.c: add and setup __gnat_signal_mask for the exception signals
10757         * s-inmaop-vxworks.adb: new file.
10758         * s-intman-vxworks.adb: remove unnecessary initializations and
10759         simplify remaining
10760         * s-intman-vxworks.ads: remove unnecessary variable
10761         * s-taprop-vxworks.adb: simplify signal initialization
10762
10763 2011-08-02  Robert Dewar  <dewar@adacore.com>
10764
10765         * sem_ch8.adb: Minor code reorganization, comment updates.
10766
10767 2011-08-02  Robert Dewar  <dewar@adacore.com>
10768
10769         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10770         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10771         here from Sem_Res.
10772         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10773         (Matching_Static_Array_Bounds): Moved here from Sem_Res
10774
10775 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10776
10777         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10778         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10779         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10780         use_type_clauses, to handle more efficiently use_type and use_all_type
10781         constructs.
10782         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10783         Ada2012 Use_All_Type clause.
10784         (Use_Class_Wide_Operations): new procedure.
10785
10786 2011-08-02  Robert Dewar  <dewar@adacore.com>
10787
10788         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10789         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10790         expression to expression function.
10791
10792 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10793
10794         * sem_ch4.adb: transform simple Ada2012 membership into equality only
10795         if types are compatible.
10796
10797 2011-08-02  Yannick Moy  <moy@adacore.com>
10798
10799         * sem_res.adb (Matching_Static_Array_Bounds): new function which
10800         returns True if its argument array types have same dimension and same
10801         static bounds at each index.
10802         (Resolve_Actuals): issue an error in formal mode on actuals passed as
10803         OUT or IN OUT paramaters which are not view conversions in SPARK.
10804         (Resolve_Arithmetic_Op): issue an error in formal mode on
10805         multiplication or division with operands of fixed point types which are
10806         not qualified or explicitly converted.
10807         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10808         Boolean or array type (except String) operands.
10809         (Resolve_Equality_Op): issue an error in formal mode on equality
10810         operators for array types other than String with non-matching static
10811         bounds.
10812         (Resolve_Logical_Op): issue an error in formal mode on logical operators
10813         for array types with non-matching static bounds. Factorize the code in
10814         Matching_Static_Array_Bounds.
10815         (Resolve_Qualified_Expression): issue an error in formal mode on
10816         qualified expressions for array types with non-matching static bounds.
10817         (Resolve_Type_Conversion): issue an error in formal mode on type
10818         conversion for array types with non-matching static bounds
10819
10820 2011-08-02  Robert Dewar  <dewar@adacore.com>
10821
10822         * par-ch10.adb: Minor code reorganization (use Nkind_In).
10823
10824 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10825
10826         * par-ch9.adb: save location of entry for proper error message.
10827
10828 2011-08-02  Javier Miranda  <miranda@adacore.com>
10829
10830         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10831         (Use_Full_View) which permits this routine to climb through the
10832         ancestors using the full-view of private parents.
10833         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10834         Use_Full_View to true in calls to Is_Ancestor.
10835         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10836         true in call to Is_Ancestor.
10837         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10838         Use_Full_View to true in call to Is_Ancestor.
10839         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10840         call to Is_Ancestor.
10841         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10842         Use_Full_View to true in calls to Is_Ancestor.
10843         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10844         Make_Select_Specific_Data_Table, Register_Primitive,
10845         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10846         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10847         to true in call to Is_Ancestor.
10848         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10849         Use_Full_View to true in calls to Is_Ancestor.
10850         * exp_cg.adb
10851         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10852         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10853
10854 2011-08-02  Robert Dewar  <dewar@adacore.com>
10855
10856         * gnat_rm.texi: Minor reformatting.
10857         * sem_prag.adb: Minor reformatting.
10858
10859 2011-08-02  Tristan Gingold  <gingold@adacore.com>
10860
10861         * vms_data.ads: Add VMS qualifier for -gnateP.
10862
10863 2011-08-02  Robert Dewar  <dewar@adacore.com>
10864
10865         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10866         * par-ch7.adb (P_Package): Proper placement of aspects for package
10867         decl/instantiation.
10868         * par-endh.adb (Check_End): Ad Is_Sloc parameter
10869         (End_Statements): Add Is_Sloc parameterr
10870         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10871         (Check_End): Ad Is_Sloc parameter
10872         (End_Statements): Add Is_Sloc parameterr
10873
10874 2011-08-02  Vincent Celier  <celier@adacore.com>
10875
10876         * ug_words: Add VMS qualifier equivalent to -gnateP:
10877         /SYMBOL_PREPROCESSING.
10878
10879 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10880
10881         * gnat-style.texi: For hexadecimal numeric literals the typical
10882         grouping of digits is 4 to represent 2 bytes.
10883         A procedure spec which is split into several lines is indented two
10884         characters.
10885
10886 2011-08-02  Yannick Moy  <moy@adacore.com>
10887
10888         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10889         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10890         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10891         properly qualified
10892         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10893         choice in array aggregate
10894         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10895         mark as ancestor
10896         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10897         positional and named aggregate for record, or others in record
10898         aggregate, or multiple choice in record aggregate
10899         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10900         array operands to logical operations AND, OR and XOR do not have the
10901         same static lower and higher bounds
10902         * sem_ch5.adb, sinfo.ads: Correct typos in comments
10903
10904 2011-08-01  Robert Dewar  <dewar@adacore.com>
10905
10906         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10907         Replaces Last_Source_Node_In_Sequence.
10908         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10909         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10910         parens and blank in string (this was inconsistently implemented).
10911         * errout.ads
10912         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10913         blank in string (this was inconsistently implemented).
10914         * gnat1drv.adb
10915         (Set_Global_Switches): Set formal mode switches appropriately
10916         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10917         * par-prag.adb
10918         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10919         call Set_Error_Msg_Lang to set "spark" as language name.
10920         * par.adb: Remove unnecessary call to set formal language for errout
10921         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10922         appropriately and call Set_Error_Msg_Lang to set "spark" as language
10923         name.
10924         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10925         calls to it, moved after resolution so that types are known
10926         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10927         result of concatenation is not of type String
10928         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10929         concatenation is not properly restricted
10930         * gnat_rm.texi: Add doc on pragma Spark_95.
10931         * gcc-interface/Makefile.in: Remove obsolete target pairs for
10932         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10933         * gcc-interface/Make-lang.in: Update dependencies.
10934
10935 2011-08-01  Javier Miranda  <miranda@adacore.com>
10936
10937         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10938         condition that detects if the overridden operation must replace an
10939         existing entity.
10940
10941 2011-08-01  Javier Miranda  <miranda@adacore.com>
10942
10943         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10944         code declarations inserted by Insert_Actions in each alternative of the
10945         N_Case_Expression node.
10946
10947 2011-08-01  Robert Dewar  <dewar@adacore.com>
10948
10949         * sem_ch6.adb: Minor code reorganization.
10950         * sem_util.adb: Minor reformatting.
10951
10952 2011-08-01  Pascal Obry  <obry@adacore.com>
10953
10954         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10955         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10956
10957 2011-08-01  Yannick Moy  <moy@adacore.com>
10958
10959         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10960         literal or operator symbol which is prefixed
10961         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10962         mode on access attributes.
10963         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10964         that concatenation operands are properly restricted in formal mode
10965         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10966         Analyze_Concatenation_Operand. Issue an error in formal mode if the
10967         result of the concatenation has a type different from String.
10968         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10969         Analyze_Quantified_Expression, Analyze_Slice,
10970         Analyze_Null): issue an error in formal mode on unsupported constructs
10971         * sem_ch5.adb
10972         (Analyze_Block_Statement): only issue error on source block statement
10973         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10974         function which returns the last node in a list of nodes for which
10975         Comes_From_Source returns True, if any
10976         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10977         Last_Source_Node_In_Sequence
10978         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10979         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10980         mode on unsupported constructs
10981         * sem_ch9.adb Do not return after issuing error in formal mode, as the
10982         rest of the actions may be needed later on since the error is marked as
10983         not serious.
10984         * sinfo.ads: Typos in comments.
10985
10986 2011-08-01  Pascal Obry  <obry@adacore.com>
10987
10988         * projects.texi: Minor editing.
10989
10990 2011-08-01  Yannick Moy  <moy@adacore.com>
10991
10992         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10993         insertion character ~~
10994         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10995         (Set_Error_Msg_Lang): new procedure which fixes the language for use
10996         with insertion character ~~
10997         (Set_Msg_Text): treat insertion character ~~
10998         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10999         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11000         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11001         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11002         errors related to the formal language restriction not serious
11003         (insertion character |).
11004         * par.adb (Par): set formal language for error messages if needed
11005         * sem_ch6.adb (Check_Missing_Return): take into account possible
11006         generated statements at the end of the function
11007         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11008         enumeration value to define a new pragma SPARK_95
11009         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11010         SPARK_Version): new type and variables to store the SPARK version
11011         (none by default).
11012         (SPARK_Mode): return True when SPARK_Version is set
11013         * par-prag.adb: Correct indentation
11014         (Prag): take Pragma_SPARK_95 into account
11015         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11016         into account.
11017
11018 2011-08-01  Robert Dewar  <dewar@adacore.com>
11019
11020         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11021         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11022         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11023
11024 2011-08-01  Pascal Obry  <obry@adacore.com>
11025
11026         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11027         Target_Name to Get_Path call.
11028         (Parse_Single_Project): Likewise.
11029         (Post_Parse_Context_Clause): Likewise.
11030         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11031         Call Initialise_Project_Path with the proper Target_Name.
11032         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11033         search path.
11034         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11035         with the proper Target_Name.
11036         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11037         Part.Parse routine.
11038         (Parse_Project_And_Apply_Config): Likewise.
11039         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11040         This is fine as this part of the code is supporting only native
11041         compilation.
11042         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11043         is fine as this part of the code is supporting only native compilation.
11044
11045 2011-08-01  Yannick Moy  <moy@adacore.com>
11046
11047         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11048         of homonym, unless the homonym is one of the cases allowed in SPARK
11049         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11050         package declaration occurring after a body.
11051
11052 2011-08-01  Robert Dewar  <dewar@adacore.com>
11053
11054         * checks.adb, exp_ch4.adb: Minor reformatting.
11055
11056 2011-08-01  Javier Miranda  <miranda@adacore.com>
11057
11058         * einfo.ads (Access_Disp_Table): Fix documentation.
11059         (Dispatch_Table_Wrappers): Fix documentation.
11060
11061 2011-08-01  Pascal Obry  <obry@adacore.com>
11062
11063         * prj-env.adb, prj-env.ads: Minor reformatting.
11064
11065 2011-08-01  Yannick Moy  <moy@adacore.com>
11066
11067         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11068         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11069         procedures out of these packages.
11070         * errout.ads, errout.adb
11071         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11072         procedures in of this package
11073         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11074         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11075         on misplaced later vs initial declarations, like in Ada 83
11076         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11077         formal mode on attribute of private type whose full type declaration
11078         is not visible
11079         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11080         package declaration inside a package specification
11081         (Analyze_Full_Type_Declaration): issue error in formal mode on
11082         controlled type or discriminant type
11083         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11084         user-defined operator means that it should come from the source
11085         (New_Overloaded_Entity): issue error in formal mode on overloaded
11086         entity.
11087         * sem_ch6.ads, sem_ch13.ads: typos in comments.
11088
11089 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11090
11091         * atree.adb: Minor reformatting.
11092         * checks.adb: Minor reformatting.
11093
11094 2011-08-01  Vincent Celier  <celier@adacore.com>
11095
11096         * s-parame-vms-ia64.ads: Fix typo in comment
11097         Minor reformatting
11098         * s-parame-vms-restrict.ads: Removed, unused.
11099
11100 2011-08-01  Javier Miranda  <miranda@adacore.com>
11101
11102         * exp_ch3.adb
11103         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11104         * sem_ch3.adb
11105         (Constrain_Index): Remove side effects in the evaluation of the bounds.
11106         * sem_ch3.ads, sem_ch3.adb
11107         (Is_Constant_Bound): New extended version of the subprogram that was
11108         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11109         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11110         * sem_aux.ads (Constant_Value): Fix typo in comment.
11111         * checks.adb (Generate_Index_Checks): New implementation which, for
11112         array objects with constant bounds, generates the runtime check
11113         referencing the bounds of the array type. For other cases this routine
11114         provides its previous behavior obtaining such values from the array
11115         object.
11116         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11117         parent type.
11118         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11119         we cannot have semantic interpretations of the new node.
11120
11121 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11122
11123         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11124         expressions.
11125
11126 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11127
11128         * sem_ch8.adb: Minor code editing.
11129         * s-vxwext.adb: Remove trailing space.
11130         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11131         consistency with other files.
11132
11133 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11134
11135         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11136
11137 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11138
11139         * par-ch10.adb: reject parameterized expressions as compilation unit.
11140         * sem_ch4.adb: handle properly conditional expression with overloaded
11141         then_clause and no else_clause.
11142
11143 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11144
11145         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11146         like done by System.Aux_DEC.
11147         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11148
11149 2011-08-01  Yannick Moy  <moy@adacore.com>
11150
11151         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11152         missing label at end of declaration (subprogram or package)
11153         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11154         of positional and named parameter association
11155         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11156         Error_Msg_SP which adds a prefix to the error message giving the name
11157         of the formal language analyzed
11158         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11159         access result type in subprogram, unconstrained array as result type,.
11160         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11161         procedure
11162         * sem_ch8.adb: Code clean up.
11163
11164 2011-08-01  Javier Miranda  <miranda@adacore.com>
11165
11166         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11167         * einfo.ads (Access_Disp_Table): Fix documentation.
11168         (Dispatch_Table_Wrappers): Fix documentation.
11169         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11170         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11171         to enforce the documentation of this attribute.
11172         (Set_Is_Interface): Cleanup the assertion.
11173         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11174         the Underlying_Type entity before reading attribute Access_Disp_Table.
11175         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11176         Locate the Underlying_Type before reading attribute Access_Disp_Table.
11177         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11178         the Underlying_Type entity before reading attribute Access_Disp_Table.
11179         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11180         Locate the Underlying_Type entity before reading attribute
11181         Access_Disp_Table.
11182
11183 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11184
11185         * s-poosiz.ads: Additional overriding indicators.
11186
11187 2011-08-01  Yannick Moy  <moy@adacore.com>
11188
11189         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11190         formal mode.
11191         (Analyze_Iteration_Scheme): issue error in formal mode when loop
11192         parameter specification does not include a subtype mark.
11193         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11194         formal mode on abstract subprogram.
11195         (Analyze_Subprogram_Specification): issue error in formal mode on
11196         user-defined operator.
11197         (Process_Formals): issue error in formal mode on access parameter and
11198         default expression.
11199         * sem_ch9.adb (Analyze_Abort_Statement,
11200         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11201         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11202         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11203         Analyze_Requeue, Analyze_Selective_Accept,
11204         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11205         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11206         issue error in formal mode on user-defined raise statement.
11207
11208 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11209
11210         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11211         declaration being hidden when overriding an implicit inherited
11212         subprogram.
11213         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11214         (-gnats), do not complain about a source file that contains only a
11215         pragma No_Body.
11216
11217 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11218
11219         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11220         variable if already set.
11221
11222 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11223
11224         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11225         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11226         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11227         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11228         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11229         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11230         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11231         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11232         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11233         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11234         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11235         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11236         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11237         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11238         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11239         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11240         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11241         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11242         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11243         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11244         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11245         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11246         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11247         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11248         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11249         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11250         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11251         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11252         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11253         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11254         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11255         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11256         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11257         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11258         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11259         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11260         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11261         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11262         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11263         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11264         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11265         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11266         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11267         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11268         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11269         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11270         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11271         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11272         s-osinte-mingw.ads: Update to GPLv3 run-time license.
11273         Use GNAT instead of GNARL.
11274
11275 2011-08-01  Bob Duff  <duff@adacore.com>
11276
11277         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11278         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11279         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11280         reformatting.
11281
11282 2011-08-01  Yannick Moy  <moy@adacore.com>
11283
11284         * debug.adb (d.D) reverve flag for the SPARK mode
11285         (d.E) reverve flag for SPARK generation mode
11286         (d.F) reverve flag for Why generation mode
11287         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11288         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
11289         functions which return True when the corresponding modes are set
11290         (Formal_Language): return "spark" or "alfa" when in formal verification
11291         mode.
11292         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11293         Error_Msg to prefix the error message with a tag giving the formal
11294         language
11295         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11296         message with a tag giving the formal language
11297         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11298         block statement
11299         (Analyze_Case_Statement): issue error in formal mode on case statement
11300         with a single "others" case alternative
11301         (Analyze_Exit_Statement): issue errors in formal mode on exit
11302         statements which do not respect SPARK restrictions
11303         (Analyze_Goto_Statement): issue error in formal mode on goto statement
11304         (Check_Unreachable_Code): always issue an error (not a warning) in
11305         formal mode on unreachable code (concerns both code after an infinite
11306         loop and after an unconditional jump, both not allowed in SPARK)
11307         * sem_ch6.adb (Analyze_Return_Statement): add call to
11308         Set_Return_Present for a procedure containing a return statement
11309         (already done for functions in Analyze_Function_Return)
11310         (Analyze_Function_Return): issue error in formal mode on extended
11311         return or if return is not last statement in function
11312         (Check_Missing_Return): issue error in formal mode if function does
11313         not end with return or if procedure contains a return
11314         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11315         function to detect if there is an inner scope of its parameter S which
11316         is a loop.
11317
11318 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11319
11320         * sem_ch6.ads: Minor reformatting.
11321
11322 2011-08-01  Javier Miranda  <miranda@adacore.com>
11323
11324         * sem_util.adb (Abstract_Interface_List): Complete condition when
11325         processing private type declarations to avoid reading unavailable
11326         attribute.
11327         (Is_Synchronized_Tagged_Type): Complete condition when processing
11328         private extension declaration nodes to avoid reading unavailable
11329         attribute.
11330
11331 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11332
11333         * sem_ch3.adb: Minor reformatting.
11334
11335 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11336
11337         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11338         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11339         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11340         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11341         for VMS, instead parametrize the common implementation with
11342         System.Parameters declarations.
11343
11344 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
11345
11346         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11347
11348 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11349
11350         * seh_init.c: Fix SEH handler installation on win64.
11351
11352 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11353
11354         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11355         double analysis of an anonymous access to subprogram, because it can
11356         lead to improper sharing of profiles and a back-end crash.
11357
11358 2011-08-01  Robert Dewar  <dewar@adacore.com>
11359
11360         * make.adb, sem_ch4.adb: Minor reformatting.
11361         * gcc-interface/Make-lang.in: Update dependencies.
11362         * sem_util.adb, exp_ch5.adb: Minor reformatting.
11363
11364 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11365
11366         * gnat_rm.texi: Fix definition of Long_Integer.
11367
11368 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11369
11370         * exp_aggr.adb: check limit size of static aggregate unconditionally,
11371         to prevent storage exhaustion.
11372         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11373         finalized is a function body, insert the cleanup code before the final
11374         return statement, to prevent spurious warnings.
11375         * s-pooglo.ads: add overriding indicator.
11376
11377 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11378
11379         * sem_ch4.adb (Operator_Check): improve error message when both a
11380         with_clause and a use_clause are needed to make operator usage legal.
11381         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11382         determine whether a compilation unit is visible within an other,
11383         either through a with_clause in the current unit, or a with_clause in
11384         its library unit or one one of its parents.
11385
11386 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11387
11388         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11389         over an arbitrary expression of an array or container type.
11390         * lib-xref.adb: clarify comment.
11391
11392 2011-08-01  Bob Duff  <duff@adacore.com>
11393
11394         * einfo.ads: Minor reformatting.
11395         * debug.adb: Minor comment improvement.
11396
11397 2011-08-01  Javier Miranda  <miranda@adacore.com>
11398
11399         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11400         consider hidden subprograms as valid candidates.
11401
11402 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11403
11404         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11405
11406 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
11407
11408         * gnat_ugn.texi: Fix typo.
11409
11410 2011-08-01  Robert Dewar  <dewar@adacore.com>
11411
11412         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11413         lib-xref.adb: Minor reformatting
11414
11415 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
11416
11417         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11418         when to generate a call to Move_Final_List.
11419         (Has_Controlled_Parts): Remove this function.
11420
11421 2011-08-01  Geert Bosch  <bosch@adacore.com>
11422
11423         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11424         "," in choice list.
11425
11426 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11427
11428         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11429         explicit raise of a predefined exception as Comes_From_Source if the
11430         original N_Raise_Statement comes from source.
11431
11432 2011-08-01  Robert Dewar  <dewar@adacore.com>
11433
11434         * sinfo.ads: Add comment.
11435         * sem_ch6.adb: Minor reformatting.
11436
11437 2011-08-01  Robert Dewar  <dewar@adacore.com>
11438
11439         * freeze.adb (Freeze_Entity): Refine check for bad component size
11440         clause to avoid rejecting confirming clause when atomic/aliased present.
11441
11442 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11443
11444         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11445         better determine whether an entity reference is a write.
11446         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11447         subcomponent.
11448         * lib-xref.adb (Output_References): Do no suppress a read reference at
11449         the same location as an immediately preceeding modify-reference, to
11450         handle properly in-out actuals.
11451
11452 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11453
11454         * env.c (__gnat_setenv) [VMS]: Refine previous change.
11455
11456 2011-08-01  Quentin Ochem  <ochem@adacore.com>
11457
11458         * i-cstrin.adb (New_String): Changed implementation, now uses only the
11459         heap to compute the result.
11460
11461 2011-08-01  Robert Dewar  <dewar@adacore.com>
11462
11463         * atree.ads: Minor reformatting.
11464
11465 2011-08-01  Emmanuel Briot  <briot@adacore.com>
11466
11467         * g-expect.adb (Get_Command_Output): Fix memory leak.
11468
11469 2011-08-01  Geert Bosch  <bosch@adacore.com>
11470
11471         * cstand.adb (P_Float_Type): New procedure to print the definition of
11472         predefined fpt types.
11473         (P_Mixed_Name): New procedure to print a name using mixed case
11474         (Print_Standard): Use P_Float_Type for printing floating point types
11475         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11476         precision IEEE float.
11477
11478 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11479
11480         * sem_ch3.adb: Minor reformatting.
11481
11482 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11483
11484         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11485         the completion of a generic function, insert the new body rather than
11486         rewriting the original.
11487
11488 2011-08-01  Yannick Moy  <moy@adacore.com>
11489
11490         * sinfo.ads, errout.ads: Typos in comments.
11491
11492 2011-08-01  Robert Dewar  <dewar@adacore.com>
11493
11494         * par-endh.adb: Minor reformatting.
11495
11496 2011-08-01  Robert Dewar  <dewar@adacore.com>
11497
11498         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11499         (Pre_Post_Aspects): New subtype.
11500         * par-ch12.adb (P_Generic): New syntax for aspects in packages
11501         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11502         * par-ch7.adb (P_Package): Remove Decl parameter
11503         (P_Package): Handle new syntax for aspects (before IS)
11504         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11505         new aspect syntax
11506         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11507         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11508         (P_Package): Remove Decl parameter
11509         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11510         aspects
11511         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11512         specs
11513         * sem_util.ads, sem_util.adb (Static_Boolean): New function
11514         * sinfo.ads: Document new syntax for aspects in packages etc.
11515         * sprint.adb: Handle new syntax of aspects before IS in package
11516
11517 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11518
11519         * atree.ads: Minor reformatting.
11520         * sem_prag.adb: Minor reformatting.
11521
11522 2011-08-01  Robert Dewar  <dewar@adacore.com>
11523
11524         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11525         case expr alternative.
11526
11527 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11528
11529         * sem_ch12.adb: Fix typo.
11530
11531 2011-08-01  Geert Bosch  <bosch@adacore.com>
11532
11533         * sem_prag.adb (Check_No_Link_Name): New procedure.
11534         (Process_Import_Or_Interface): Use Check_No_Link_Name.
11535         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11536         instead of Standard_Long_Long_Float_Size global. Preparation for
11537         eventual removal of per type constants.
11538         * exp_util.ads (Get_Stream_Size): New function returning the stream
11539         size value of subtype E.
11540         * exp_util.adb (Get_Stream_Size): Implement new function.
11541         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11542         function.
11543         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11544         * einfo.adb:
11545         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11546
11547 2011-08-01  Geert Bosch  <bosch@adacore.com>
11548
11549         * cstand.adb: Fix comments.
11550         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11551         count of arguments.
11552
11553 2011-08-01  Robert Dewar  <dewar@adacore.com>
11554
11555         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11556
11557 2011-08-01  Geert Bosch  <bosch@adacore.com>
11558
11559         * atree.ads: Fix comment.
11560
11561 2011-08-01  Robert Dewar  <dewar@adacore.com>
11562
11563         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11564         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11565         * par.adb: Add with for Namet.Sp.
11566         * par-tchk.adb: Minor reformatting.
11567
11568 2011-08-01  Vincent Celier  <celier@adacore.com>
11569
11570         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11571         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11572         of the init procedure of a SAL.
11573         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11574         New procedure.
11575
11576 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11577
11578         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11579         reformatting.
11580
11581 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11582
11583         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11584
11585 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11586
11587         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11588         conformant with its spec (return True only for types that have
11589         an overriding Initialize primitive operation that prevents them from
11590         having preelaborable initialization).
11591         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11592         initialization for controlled types in Ada 2005 or later mode.
11593
11594 2011-08-01  Robert Dewar  <dewar@adacore.com>
11595
11596         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11597         Postcondition.
11598         (Same_Aspect): New function.
11599         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11600         Type_Invariant, Precondition, Postcondition.
11601         * snames.ads-tmpl: Add Name_Type_Invariant.
11602
11603 2011-08-01  Robert Dewar  <dewar@adacore.com>
11604
11605         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11606         here.
11607         (Freeze_All_Ent): Fix error in handling inherited aspects.
11608         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11609         already analyzed, but don't skip entire processing of a declaration,
11610         that's wrong in some cases of declarations being rewritten.
11611         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11612         Don't delay for integer, string literals
11613         Treat predicates in usual manner for delay, remove special case code,
11614         not needed.
11615         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11616         (Build_Predicate_Function): Update saved expression in aspect
11617         (Build_Invariant_Procedure): Update saved expression in aspect
11618         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11619         of replacement of discriminant references if the reference is simple.
11620
11621 2011-08-01  Robert Dewar  <dewar@adacore.com>
11622
11623         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11624         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11625         Static_Predicate and Dynamic_Predicate.
11626         (Build_Predicate_Function): Add processing for Static_Predicate
11627         and Dynamic_Predicate.
11628         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11629         (From_Static_Predicate): New flag
11630         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11631
11632 2011-08-01  Robert Dewar  <dewar@adacore.com>
11633
11634         * usage.adb: Documentation cleanup for Ada version modes in usage.
11635         * expander.adb: Minor reformatting.
11636
11637 2011-08-01  Robert Dewar  <dewar@adacore.com>
11638
11639         * atree.ads: Minor comment fix.
11640         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11641         a-witeio.ads, sem_prag.adb: Minor reformatting.
11642
11643 2011-08-01  Doug Rupp  <rupp@adacore.com>
11644
11645         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11646         pointers. Use descrip.h header file for convenience. Add some
11647         comments.
11648
11649 2011-08-01  Robert Dewar  <dewar@adacore.com>
11650
11651         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11652         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11653         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11654         New procedure.
11655         (Check_Aspect_At_End_Of_Declarations): New procedure
11656         (Analye_Aspect_Specification): Minor changes for above procedures
11657         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11658         specification node as well.
11659
11660 2011-08-01  Pascal Obry  <obry@adacore.com>
11661
11662         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11663         Windows files. Use GetFilesAttributes() in this case to check for file
11664         existence instead of returning with an error code.
11665
11666 2011-08-01  Vincent Celier  <celier@adacore.com>
11667
11668         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11669         High is above Source length.
11670
11671 2011-08-01  Robert Dewar  <dewar@adacore.com>
11672
11673         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11674
11675 2011-08-01  Robert Dewar  <dewar@adacore.com>
11676
11677         * aspects.ads (Boolean_Aspects): New subtype.
11678         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11679         for derived types in cases where the parent type and derived type have
11680         aspects.
11681         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11682         with aspects when parent type also has aspects.
11683         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11684         boolean expression at this point).
11685         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11686         accordance with final decision on the Ada 2012 feature.
11687         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11688
11689 2011-08-01  Matthew Heaney  <heaney@adacore.com>
11690
11691         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11692
11693 2011-08-01  Pascal Obry  <obry@adacore.com>
11694
11695         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11696         Fix Replace_Slice when High is above current string size.
11697         (Replace_Slice): Fix DL computation when High is above current
11698         string length.
11699
11700 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
11701
11702         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11703
11704 2011-08-01  Matthew Heaney  <heaney@adacore.com>
11705
11706         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11707         of node.
11708
11709 2011-08-01  Pascal Obry  <obry@adacore.com>
11710
11711         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11712         reformatting.
11713
11714 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11715
11716         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11717         access to protected subprograms in generic bodies.
11718         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11719         protected type, indicate that the convention of the subprogram is
11720         Convention_Protected, because it may be used in subsequent declarations
11721         within the protected declaration.
11722
11723 2011-08-01  Vincent Celier  <celier@adacore.com>
11724
11725         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11726         and "final" procedures when the name of the library is "ada", to avoid
11727         duplicate symbols "adainit" and "adafinal" in executables.
11728
11729 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11730
11731         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11732         quantified expression that appears within a postcondition and uses the
11733         Ada2012 'Result attribute.
11734
11735 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11736
11737         * init.c (__gnat_error_handler): Cast reason to int.
11738         (__gnat_install_handler): Explain sa_sigaction use.
11739
11740 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11741
11742         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11743         subprogram has copy-in copy-out parameters, try to promote the mode of
11744         the return type if it is passed in registers.
11745
11746 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11747
11748         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11749         left operand as addressable.
11750
11751 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11752
11753         * gcc-interface/gigi.h (build_function_stub): Remove.
11754         (build_return_expr): Likewise.
11755         (convert_vms_descriptor): Declare.
11756         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11757         (build_function_stub): Move to...
11758         * gcc-interface/utils2.c (build_return_expr): Move to...
11759         * gcc-interface/trans.c (build_function_stub): ...here.
11760         (build_return_expr): ...here.
11761         (Subprogram_Body_to_gnu): Add local variable for language_function.
11762         Disconnect the parameter attributes cache, if any, once done with it.
11763         Call end_subprog_body only after setting the end_locus.
11764         Build the stub associated with the function, if any, at the very end.
11765         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11766         variables and streamline control flow.
11767
11768 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
11769
11770         PR ada/49819
11771         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11772         g-trasym-dwarf.adb.
11773
11774 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11775
11776         PR bootstrap/49794
11777         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11778         Assign to act.sa_sigaction.
11779         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11780         current->return_address to char * before arithmetic.
11781
11782 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11783
11784         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11785         Correct argument types.
11786         Extract code from reason.
11787         (__gnat_install_handler): Assign to act.sa_sigaction.
11788
11789 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
11790
11791         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11792         (GNAT1_OBJS): ...here.
11793
11794 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
11795
11796         PR ada/48711
11797         * g-socthi-mingw.adb (Fill): Fix formatting.
11798
11799         * gcc-interface/gigi.h: Move around comment.
11800
11801 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
11802
11803         PR ada/46350
11804         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11805
11806 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
11807
11808         PR ada/48711
11809         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11810
11811 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
11812
11813         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11814         range comparison if Pmode is SImode.
11815
11816 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
11817             Eric Botcazou  <ebotcazou@adacore.com>
11818
11819         * adadecode.c: Wrap up in extern "C" block.
11820         * adadecode.h: Likewise.
11821         * adaint.c: Likewise.  Remove 'const' keyword.
11822         * adaint.h: Likewise.
11823         * argv.c: Likewise.
11824         * atree.h: Likewise.
11825         * cio.c: Likewise.
11826         * cstreams.c: Likewise.
11827         * env.c: Likewise.
11828         * exit.c: Likewise.
11829         * fe.h: Likewise.
11830         * final.c: Likewise.
11831         * init.c: Likewise.
11832         * initialize.c: Likewise.
11833         * link.c: Likewise.
11834         * namet.h: Likewise.
11835         * nlists.h: Likewise.
11836         * raise.c: Likewise.
11837         * raise.h: Likewise.
11838         * repinfo.h: Likewise.
11839         * seh_init.c: Likewise.
11840         * targext.c: Likewise.
11841         * tracebak.c: Likewise.
11842         * uintp.h: Likewise.
11843         * urealp.h: Likewise.
11844         * xeinfo.adb: Wrap up generated C code in extern "C" block.
11845         * xsinfo.adb: Likewise.
11846         * xsnamest.adb: Likewise.
11847         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11848         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11849         * gcc-interface/misc.c: Likewise.
11850         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11851         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
11852         ada/targext.o here...
11853         (GNAT_ADA_OBJS): ...and not here.
11854         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11855         (GNATBIND_OBJS): Reorder.
11856
11857 2011-07-07  Richard Henderson  <rth@redhat.com>
11858
11859         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11860         dwarf2out_frame_init.
11861
11862 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
11863
11864         * gcc-interface/misc.c (gnat_init): Tweak previous change.
11865
11866 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11867
11868         PR target/39150
11869         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11870
11871 2011-07-06  Richard Guenther  <rguenther@suse.de>
11872
11873         * gcc-interface/misc.c (gnat_init): Merge calls to
11874         build_common_tree_nodes and build_common_tree_nodes_2.
11875         Re-initialize boolean_false_node.
11876
11877 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
11878             Olivier Hainque  <hainque@adacore.com>
11879             Nicolas Setton  <setton@adacore.com>
11880
11881         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11882         the type according to the ARTIFICIAL_P parameter.
11883         (create_type_decl): Likewise.
11884         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11885
11886 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
11887
11888         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11889         (gnatbind): Likewise.
11890
11891 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11892
11893         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11894
11895 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11896
11897         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11898         local variable throughout.  Remove useless call to Base_Type.
11899         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11900         Take it also into account for the volatileness of the field.  Set the
11901         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
11902
11903 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11904
11905         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11906         on a dereference built for a by-ref object if it has an address clause.
11907
11908 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11909
11910         * einfo.ads (Address_Taken): Document use for the second argument of
11911         Asm_Input and Asm_Output attributes.
11912         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11913         argument is an entity name, then set Address_Taken on it.
11914         <Attribute_Asm_Output>: Likewise.
11915         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11916         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11917         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11918         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11919
11920 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
11921
11922         PR middle-end/46500
11923         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11924
11925 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
11926
11927         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11928         (ada/utils.o): Update dependencies.
11929         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11930         ../../../libcpp/libcpp.a.
11931         * gcc-interface/utils.c: Include common/common-target.h.
11932         (process_attributes): Use targetm_common.have_named_sections.
11933
11934 2011-06-07  Richard Guenther  <rguenther@suse.de>
11935
11936         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11937         set_sizetype.
11938
11939 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11940
11941         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11942         TREE_THIS_NOTRAP flag.
11943
11944 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11945
11946         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11947         Fix thinko.
11948
11949 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11950
11951         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11952         constants whose full view has discriminants specially.
11953
11954 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11955
11956         * gcc-interface/utils.c: Include diagnostic.h.
11957         (gnat_write_global_declarations): Output debug information for all
11958         global type declarations before finalizing the compilation unit.
11959         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11960
11961 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
11962
11963         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11964
11965 2011-05-25  Kai Tietz  <ktietz@redhat.com>
11966
11967         * adaint.c (__gnat_to_canonical_file_list_next): Use array
11968         initialization instead of const/none-const pointer assignment.
11969
11970 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
11971
11972         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11973         $(EXTRA_GNAT1_OBJS).
11974         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11975         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11976         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11977         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11978         libcommon-target.a instead of prefix.o.
11979
11980 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
11981
11982         PR ada/49097
11983         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11984
11985 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
11986
11987         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11988         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11989         instead of version.o.
11990
11991 2011-05-18  Kai Tietz <ktietz@redhat.com>
11992
11993         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11994         boolean_false_node instead of integer_zero_node.
11995         (convert_with_check): Likewise.
11996         * gcc-interface/decl.c (choices_to_gnu): Likewise.
11997
11998 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
11999
12000         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12001         type of the parameter is an unconstrained array, convert the actual to
12002         the type of the formal in the In Out and Out cases as well.
12003
12004 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
12005
12006         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12007         call build_function_type_array or build_varargs_function_type_array
12008         instead.
12009         (create_subprog_type): Don't call build_function_type; call
12010         build_function_type_vec instead.
12011
12012 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
12013
12014         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12015         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12016         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12017
12018 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
12019
12020         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12021
12022         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12023         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12024
12025 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12026
12027         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12028
12029 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12030
12031         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12032         instead of accessing TYPE_ARG_TYPES directly.
12033         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12034
12035 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12036
12037         PR ada/48844
12038         * gcc-interface/gigi.h (get_variant_part): Declare.
12039         * gcc-interface/decl.c (get_variant_part): Make global.
12040         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12041         types have the same constant size, are record types and T1 has a
12042         variant part while T2 doesn't.
12043
12044 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12045
12046         * gcc-interface/utils.c (begin_subprog_body): Do not call
12047         get_pending_sizes.
12048         (end_subprog_body): Likewise.
12049
12050 2011-05-04  Richard Guenther  <rguenther@suse.de>
12051
12052         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12053         int_const_binop.
12054         (pos_to_constructor): Likewise.
12055
12056 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
12057             Eric Botcazou  <ebotcazou@adacore.com>
12058
12059         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12060         of build_function_type.  Adjust calls to...
12061         (build_raise_check): ...this.  Do not take a void_tree parameter.
12062         Call build_function_type_list instead of build_function_type.
12063         Fix head comment and swap couple of conditional blocks.
12064
12065 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
12066
12067         * gnatvsn.ads (Library_Version): Bump to 4.7.
12068         (Current_Year): Bump to 2011.
12069
12070 2011-04-29  Michael Matz  <matz@suse.de>
12071
12072         * gcc-interface/misc.c (gnat_handle_option): Set
12073         warn_maybe_uninitialized.
12074
12075 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
12076
12077         * gnat_ugn.texi (Complexity Metrics Control): Update link to
12078         the Watson/McCabe paper.
12079
12080 2011-04-23  Jim Meyering  <meyering@redhat.com>
12081
12082         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12083
12084 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12085
12086         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12087         onto the new type.
12088
12089 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12090
12091         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12092         parameter.
12093         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
12094         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12095         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12096         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12097         <all>: Do not set flags on the reused DECL node coming from an alias.
12098         Set DECL_IGNORED_P on the DECL node built for subprograms if they
12099         don't need debug info here...
12100         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12101         (gigi): Adjust calls to create_subprog_decl.
12102         (build_raise_check): Likewise.
12103         (establish_gnat_vms_condition_handler): Likewise.
12104         (Compilation_Unit_to_gnu): Likewise.
12105         (gnat_to_gnu): Likewise.
12106
12107 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
12108
12109         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12110         (NO_REORDER_ADAFLAGS): New variable.
12111         (EXTRA_GNATTOOLS): Always define.
12112         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12113         Clean up and adjust list of files compiled with special options.
12114         * gcc-interface/Make-lang.in: Likewise.
12115         (ada/decl.o): Cosmetical change.
12116         (ada/misc.o): Remove dependency on $(PLUGIN_H).
12117
12118 2011-04-20  Jim Meyering  <meyering@redhat.com>
12119
12120         * initialize.c (__gnat_initialize): Remove useless if-before-free.
12121
12122 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12123
12124         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12125         $(CFLAGS) on the link line.
12126
12127 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12128
12129         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12130         padded type built for the return type if it is unconstrained.
12131
12132 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
12133
12134         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12135
12136 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
12137
12138         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12139         before calling TREE_CHAIN.
12140         * gcc-interface/misc.c (gnat_init_ts): New function.
12141         (LANG_HOOKS_INIT_TS): Define.
12142
12143 2011-04-12  Martin Jambor  <mjambor@suse.cz>
12144
12145         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12146         instead of cgraph_node.
12147
12148 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12149
12150         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12151         alignment on fields of the RETURN type built for the Copy-In Copy-Out
12152         mechanism.
12153
12154 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12155
12156         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12157         of aggregate types that contain a placeholder.
12158
12159 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
12160
12161         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12162         TYPE_ARG_TYPES.
12163         (handle_type_generic_attribute): Likewise.
12164
12165 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
12166
12167         PR ada/47163
12168         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12169
12170 2011-04-04  Kai Tietz  <ktietz@redhat.com>
12171
12172         PR ada/47163
12173         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12174         to flag value.
12175
12176 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12177
12178         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12179         type case, do not strip a padding type around the array type.
12180
12181 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12182
12183         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12184         types.
12185
12186 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12187
12188         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12189         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12190         code for -feliminate-unused-debug-types.
12191         (gnat_post_options): Likewise.
12192
12193 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12194
12195         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12196         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12197         distinct copy.
12198
12199 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12200
12201         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12202         DECL_ARTIFICIAL flag on enumeration types.
12203
12204 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12205
12206         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12207         fat pointer types artificial unconditionally.
12208         <E_Array_Subtype>: Attach the base array type as a parallel type if it
12209         isn't artificial.
12210
12211 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12212
12213         * gcc-interface/gigi.h (get_dummy_type): Declare.
12214         (build_dummy_unc_pointer_types): Likewise.
12215         (finish_fat_pointer_type): Likewise.
12216         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12217         fat pointer type has been built, complete it in place.
12218         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12219         and thin pointers.  Remove useless variable.
12220         (finish_fat_pointer_type): Make global and move to...
12221         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12222         (get_dummy_type): New function.
12223         (build_dummy_unc_pointer_types): Likewise.
12224         (gnat_pushdecl): Propage the name to the anonymous variants only.
12225         (update_pointer_to): Only adjust the pointer types in the unconstrained
12226         array case.
12227
12228 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12229
12230         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12231         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12232         if this is a Taft amendment type and the full declaration is available.
12233         * gcc-interface/trans.c (process_type): Likewise.
12234         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12235         (process_freeze_entity): Likewise.
12236         * gcc-interface/utils.c (dummy_global): New static variable.
12237         (gnat_write_global_declarations): If there are types declared as used
12238         at the global level, insert them in the global hash table.
12239
12240 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12241
12242         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12243         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12244         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12245         copy.
12246         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
12247         flag of the type accordingly.
12248         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12249
12250 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12251
12252         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12253         finalizing types when updating the pointers to the designated type.
12254         <all>: Finalize the deferred types even if we didn't defer processing
12255         of incomplete types in this invocation.
12256
12257 2011-04-01  Olivier Hainque  <hainque@adacore.com>
12258             Nicolas Setton  <setton@adacore.com>
12259             Eric Botcazou  <ebotcazou@adacore.com>
12260
12261         * gcc-interface/misc.c (gnat_descriptive_type): New function.
12262         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12263
12264 2011-03-28  Kai Tietz  <ktietz@redhat.com>
12265
12266         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12267         Windows targets.
12268         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12269         * system-mingw.ads (System): Change ZCX_By_Default default to True.
12270
12271         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12272
12273 2011-03-28  Tristan Gingold  <gingold@adacore.com>
12274
12275         PR ada/44431
12276         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12277         Use ada output of gnatbind.
12278         (ada/b_gnatb.adb): Ditto.
12279         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12280         (ada.mostlyclean, ada.stage1)
12281         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12282         (ada.stagefeedback): Adjust.
12283         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12284         Use ada output of gnatbind.
12285         (b_gnatm.adb): Ditto.
12286         (b_gnatl.o, b_gnatm.o): New rules.
12287
12288 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12289
12290         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12291         for the padded type built to support a specified size or alignment.
12292
12293 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12294
12295         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12296         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12297         unconditionally to the end of the unit when the designated type is
12298         limited_with'ed.
12299         <all>: Rename local variable.  Attempt to un-defer types only and do it
12300         for limited_with'ed types as well.
12301         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
12302         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12303         consistently and remove redundant call to finalize_from_with_types.
12304
12305 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12306
12307         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12308         subprograms without a previous spec declared in the same unit.
12309         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12310         subprograms at the end of the unit instead of at the beginning.
12311         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12312         isn't public for the special handling of non-inline functions nested
12313         inside inline external functions.
12314
12315 2011-03-25  Jeff Law  <law@redhat.com>
12316
12317         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12318
12319 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
12320
12321         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12322         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12323         to compute Set_Size_Depends_On_Discriminant.
12324         (Layout_Type): Call it on array types in back-end layout mode.
12325         * sem_util.adb (Requires_Transient_Scope): Return true for array
12326         types only if the size depends on the value of discriminants.
12327         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12328         type if the RHS is a call to a function that returns an unconstrained
12329         type with default discriminant.
12330
12331 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
12332
12333         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12334         non-conversion to the nominal result type at the end.
12335
12336 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12337
12338         * gcc-interface/trans.c (create_temporary): New function taken from...
12339         (create_init_temporary): ...here.  Call it.
12340         (call_to_gnu): Create the temporary for the return value early, if any.
12341         Create it for a function with copy-in/copy-out parameters if there is
12342         no target; in other cases of copy-in/copy-out, use another temporary.
12343         Push the new binding level lazily.  Add and rename local variables.
12344
12345 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12346
12347         * gcc-interface/decl.c (validate_size): Improve comments and tweak
12348         error message.
12349         (set_rm_size): Likewise.
12350
12351 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12352
12353         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12354         for the padded type built in order to support a specified alignment.
12355         Fix incorrect formatting.
12356
12357 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12358
12359         PR bootstrap/48216
12360         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12361
12362 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12363
12364         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12365         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12366         to the end of the list.  Adjust recursive call.  Rename local variable.
12367         If REORDER is true, reorder components of the record type.
12368         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12369         components_to_record and adjust the parameter list.
12370
12371 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12372
12373         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12374         disabled, use the variable for bounds of loop iteration scheme.
12375
12376 2011-03-21  Kai Tietz  <ktietz@redhat.com>
12377
12378         PR target/12171
12379         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12380
12381 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
12382
12383         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12384         out whether the expression is read-only.  Short-circuit placeholder
12385         case and rename a couple of local variables.
12386
12387 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
12388
12389         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12390         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12391         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12392         (convert): Deal with conversions from a smaller form type specially.
12393
12394 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
12395
12396         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12397         its argument, except for the special -I- switch.
12398
12399 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
12400
12401         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12402         "Ada Issues".
12403
12404 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
12405
12406         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12407
12408 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
12409
12410         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12411         GNAT_FORMAL.
12412         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12413         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
12414         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
12415         Do not generate the check directly, instead instantiate the template
12416         check present in the descriptor.
12417         (make_descriptor_field): Move around.
12418         (build_vms_descriptor32): Build a template check in the POINTER field.
12419         (build_vms_descriptor): Remove useless suffixes.
12420         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12421
12422 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
12423
12424         PR bootstrap/47467
12425         * targext.c: Include target files if IN_RTS is defined.
12426
12427 2011-01-26  Richard Guenther  <rguenther@suse.de>
12428
12429         PR bootstrap/47467
12430         * targext.c: Include config.h.
12431         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12432         dependency.
12433
12434 2011-01-04  Pascal Obry  <obry@adacore.com>
12435             Eric Botcazou  <ebotcazou@adacore.com>
12436
12437         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12438
12439 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12440
12441         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12442         end-of-case on the end label and its associated gotos, if any.
12443
12444 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12445
12446         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12447         expressions of the parameter cache within the statement group of
12448         the CICO mechanism.
12449
12450 2011-01-04  Olivier Hainque  <hainque@adacore.com>
12451             Eric Botcazou  <ebotcazou@adacore.com>
12452
12453         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12454         (set_end_locus_from_node): New function.
12455         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12456         make and the function end_locus.
12457         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12458         for the elaboration subprogram.
12459         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12460         set the end_locus of the expression as well.
12461
12462 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12463
12464         PR ada/47131
12465         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12466         variables that are referenced in exception handlers volatile.
12467
12468
12469 \f
12470 Copyright (C) 2011 Free Software Foundation, Inc.
12471
12472 Copying and distribution of this file, with or without modification,
12473 are permitted in any medium without royalty provided the copyright
12474 notice and this notice are preserved.