OSDN Git Service

Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-08-30  Robert Dewar  <dewar@adacore.com>
2
3         * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
4         Minor code reorg/reformatting.
5
6 2011-08-30  Yannick Moy  <moy@adacore.com>
7
8         * opt.adb, opt.ads (Full_Expander_Active): New function defines a
9         common shorthand for (Expander_Active and not ALFA_Mode) that can be
10         used for testing full expansion, that is active expansion not in the
11         reduced mode for Alfa
12         * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
13         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
14         of the verbose (Expander_Active and not ALFA_Mode)
15
16 2011-08-30  Tristan Gingold  <gingold@adacore.com>
17
18         * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
19         s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
20         s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
21         Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
22
23 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
24
25         * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
26         access conversions to check that the conversion is a rewritten node,
27         rather than just having Comes_From_Source set to False, which wasn't
28         sufficient.
29
30 2011-08-30  Robert Dewar  <dewar@adacore.com>
31
32         * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
33         g-socket.ads: Minor reformatting.
34
35 2011-08-30  Thomas Quinot  <quinot@adacore.com>
36
37         * sem_util.adb: Minor reformatting.
38
39 2011-08-30  Tristan Gingold  <gingold@adacore.com>
40
41         * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
42         to be compliant with the ABI.
43
44 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
45
46         * sem_ch12.adb (Check_Private_View): Exchange the private and full view
47         of a designated type when the related access type is an actual in an
48         instance. This ensures that the full view of designated type is
49         available when inside the body of the instance.
50
51 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
52
53         * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
54         in a position to be modified, a slice is treated like an indexed
55         component.
56
57 2011-08-30  Thomas Quinot  <quinot@adacore.com>
58
59         * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
60         field tv_sec in struct timeval.
61
62 2011-08-30  Yannick Moy  <moy@adacore.com>
63
64         * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
65         blocks of code doing full expansion, previously only guarded by
66         Expander_Active, by anding the test that ALFA_Mode is not set
67
68 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
69
70         * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
71         add the function to the list of private dependents, for subsequent
72         legality check on Taft amendment types.
73         * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
74         Private_Dependents, as for other incomplete types.
75         * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
76         Taft-amendment type is used as the return type of a function.
77
78 2011-08-30  Javier Miranda  <miranda@adacore.com>
79
80         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
81         which emits an error by a call to a new routine which report the error.
82         * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
83         entity does not cover an existing interface.
84         * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
85         code.
86         * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
87         protected procedures or entries whose mode is not conformant.
88         (Check_Synchronized_Overriding): Code cleanup: replace code which emits
89         an error by a call to a new routine which report the error.
90
91 2011-08-30  Robert Dewar  <dewar@adacore.com>
92
93         * gnat_rm.texi: Minor change.
94         * exp_attr_light.adb: Minor reformatting.
95
96 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
97
98         * sem_ch3.adb: Patch inheritance of aspects in
99         Complete_Private_Subtype, to avoid infinite loop.
100
101 2011-08-30  Javier Miranda  <miranda@adacore.com>
102
103         * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
104         been reported and a subprogram covering an interface primitive is not
105         found then skip generating the internal entity. Done to avoid crashing
106         the frontend.
107         (Check_Abstract_Overriding): Change text of error of wrong formal of
108         protected subprogram or entry. Done for consistency to emit exactly the
109         same error reported by Check_Synchronized_Overriding. In addition, the
110         error is restricted to protected types (bug found working on AI05-0090)
111
112 2011-08-30  Yannick Moy  <moy@adacore.com>
113
114         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
115         expansion in Alfa mode.
116         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
117         * exp_light.adb, exp_light.ads: New package defining light expansion.
118         * expander.adb (Expand): Call light expansion in Alfa mode
119         * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
120         constructs.
121         * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
122         constructs.
123         * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
124         * gnat1drv.adb (Adjust_Global_Switches): Comment
125
126 2011-08-30  Yannick Moy  <moy@adacore.com>
127
128         * lib-xref-alfa.adb: Minor refactoring.
129
130 2011-08-30  Yannick Moy  <moy@adacore.com>
131
132         * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
133         mode.
134         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
135         expansion in Alfa mode.
136         * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
137         mode.
138
139 2011-08-30  Robert Dewar  <dewar@adacore.com>
140
141         * debug_a.adb: Update comment.
142
143 2011-08-30  Robert Dewar  <dewar@adacore.com>
144
145         * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
146         sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
147         exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
148         sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
149
150 2011-08-30  Robert Dewar  <dewar@adacore.com>
151
152         * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
153         volatile.
154
155 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
156
157         * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
158         Build_Finalization_Master by supplying an insertion node and enclosing
159         scope. In its old version, the call did not generate a finalization
160         master.
161         (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
162         recognize anonymous access-to-controlled components. Rewrite the
163         machinery which creates finalization masters to service anonymous
164         access-to-controlled components of a record type. In its current state,
165         only one heterogeneous master is necessary to handle multiple anonymous
166         components.
167         (Freeze_Type): Comment reformatting.
168         * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
169         RE_Unit_Table.
170         * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
171         associates TSS primitive Finalize_Address with either the master itself
172         or with the internal hash table depending on the mode of operation of
173         the master.
174
175 2011-08-30  Javier Miranda  <miranda@adacore.com>
176
177         * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
178         interface type then do not generate code to compare this component.
179         Required since they have no components and their equality operator is
180         abstract.
181
182 2011-08-30  Steve Baird  <baird@adacore.com>
183
184         * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
185         of a saooaaat (i.e, a stand-alone object of an anonymous access type),
186         returns the (static) accessibility level of the object. Otherwise, the
187         same as Type_Access_Level.
188         (Dynamic_Accessibility_Level): New function; given an expression which
189         could occur as the rhs of an assignment to a saooaaat (i.e., an
190         expression of an access-to-object type), return the new value for the
191         saooaaat's associated Extra_Accessibility object.
192         (Effective_Extra_Accessibility): New function; same as
193         Einfo.Extra_Accessibility except that object renames are looked through.
194         * sem_util.adb 
195         (Deepest_Type_Access_Level): New function; see sem_util.ads description.
196         (Dynamic_Accessibility_Level): New function; see sem_util.ads
197         description.
198         (Effective_Extra_Accessibility): New function; see sem_util.ads
199         description.
200         * einfo.ads (Is_Local_Anonymous_Access): Update comments.
201         (Extra_Accessibility): Update comments.
202         (Init_Object_Size_Align): New procedure; same as Init_Size_Align
203         except RM_Size field (which is only for types) is unaffected.
204         * einfo.adb
205         (Extra_Accessibility): Expand domain to allow objects, not just formals.
206         (Set_Extra_Accessibility): Expand domain to allow objects, not just
207         formals.
208         (Init_Size): Add assertion that we are not trashing the
209         Extra_Accessibility attribute of an object.
210         (Init_Size_Align): Add assertion that we are not trashing the
211         Extra_Accessibility attribute of an object.
212         (Init_Object_Size_Align): New procedure; see einfo.ads description.
213         * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
214         differently for the type of a (non-library-level) saooaaat depending
215         whether Ada_Version < Ada_2012. This is the only point where Ada_Version
216         is queried in this set of changes - everything else (in particular,
217         setting of the Extra_Accessibility attribute in exp_ch3.adb) is
218         driven off of the setting of the Is_Local_Anonymous_Access attribute.
219         The special treatment of library-level saooaaats is an optimization,
220         not required for correctnesss. This is based on the observation that the
221         Ada2012 rules (static and dynamic) for saooaaats turn out to be
222         equivalent to the Ada2005 rules in the case of a library-level saooaaat.
223         * exp_ch3.adb
224         (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
225         false for the type of a saooaaat, declare and initialize its
226         accessibility level object and set the Extra_Accessibility attribute
227         of the saooaaat to refer to this object.
228         * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
229         * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
230         calls to Effective_Extra_Accessibility in order to support
231         renames of saooaaats.
232         (Expand_N_Type_Conversion): Add new local function,
233         Has_Extra_Accessibility, and call it when determining whether an
234         accessibility check is needed.
235         It returns True iff Present (Effective_Extra_Accessibility (Id)) would
236         evaluate to True (without raising an exception).
237         * exp_ch5.adb
238         (Expand_N_Assignment_Statement): When assigning to an Ada2012
239         saooaaat, update its associated Extra_Accessibility object (if
240         it has one). This includes an accessibility check.
241         * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
242         a saooaaat, update its Extra_Accessibility object too (if it
243         has one).
244         (Expand_Call): Replace a couple of calls to Type_Access_Level
245         with calls to Dynamic_Access_Level to handle cases where
246         passing a literal (any literal) is incorrect.
247         * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
248         checks associated with "Saooaat := Some_Object'Access;"; this must
249         be rejected if Some_Object is declared in a more nested scope
250         than Saooaat.
251         * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
252         assignment to a saooaaat even if Is_Local_Anonymous_Access
253         returns False for its type (indicating a 2012-style saooaaat).
254         * sem_ch8.adb
255         (Analyze_Object_Renaming): Replace a call to Init_Size_Align
256         (which is only appropriate for objects, not types) with a call
257         of Init_Object_Size_Align in order to avoid trashing the
258         Extra_Accessibility attribute of a rename (the two attributes
259         share storage).
260         * sem_res.adb
261         (Valid_Conversion) Replace six calls to Type_Access_Level with
262         calls to Deepest_Type_Access_Level. This is a bit tricky. For an
263         Ada2012 non-library-level saooaaat, the former returns library level
264         while the latter returns the (static) accessibility level of the
265         saooaaat. A type conversion to the anonymous type of a saooaaat
266         can only occur as part of an assignment to the saooaaat, so we
267         know that such a conversion must be in a lhs context, so Deepest
268         yields the result that we need. If such a conversion could occur,
269         say, as the operand of an equality operator, then this might not
270         be right. Also add a test so that static accessibilty checks are
271         performed for converting to a saooaaat's type even if
272         Is_Local_Anonymous_Access yields False for the type.
273
274 2011-08-30  Javier Miranda  <miranda@adacore.com>
275
276         * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
277         controls generation of a warning associated with late declaration of
278         dispatching functions. Required to avoid generating spurious
279         warnings.
280
281 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
282
283         * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
284         return object has an anonymous access type and the function's type is
285         a named access type.
286         * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
287         conversions on implicit conversions, since such conversions can occur
288         for anonymous access cases due to expansion. Issue error for attempt
289         to rename an anonymous expression as an object of a named access type.
290         * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
291         to indicate whether this function should report errors on invalid
292         conversions.
293         * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
294         the expression is of an anonymous access type and the expected type is
295         a named general access type, rewrite the expression as a type
296         conversion, unless this is an expression of a membership test.
297         (Valid_Conversion.Error_Msg_N): New procedure that conditions the
298         calling of Error_Msg_N on new formal Report_Errs.
299         (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
300         calling of Error_Msg_NE on new formal Report_Errs.
301         (Valid_Conversion): Move declaration of this function to the package
302         spec, to allow calls from membership test processing. For Ada 2012,
303         enforce legality restrictions on implicit conversions of anonymous
304         access values to general access types, disallowing such conversions in
305         cases where the expression has a dynamic accessibility level (access
306         parameters, stand-alone anonymous access objects, or a component of a
307         dereference of one of the first two cases).
308         * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
309         in the context of a named general access expected type.
310         * exp_ch4.adb Add with and use of Exp_Ch2.
311         (Expand_N_In): Add processing for membership tests applied to
312         expressions of an anonymous access type. First, Valid_Conversion is
313         called to check whether the test is statically False, and then the
314         conversion is expanded to test that the expression's accessibility
315         level is no deeper than that of the tested type. In the case of
316         anonymous access-to-tagged types, a tagged membership test is applied
317         as well.
318         (Tagged_Membership): Extend to handle access type cases, applying the
319         test to the designated types.
320         * exp_ch6.adb (Expand_Call): When creating an extra actual for an
321         accessibility level, and the actual is a 'Access applied to a current
322         instance, pass the accessibility level of the type of the current
323         instance rather than applying Object_Access_Level to the prefix. Add a
324         ??? comment, since this level isn't quite right either (will eventually
325         need to pass an implicit level parameter to init procs).
326
327 2011-08-30  Bob Duff  <duff@adacore.com>
328
329         * s-taskin.ads: Minor comment fix.
330
331 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
332
333         * sem_res.adb (Check_Parameterless_Call): If the node is a selected
334         component and the selector is a dispatching operation, check if it is
335         a prefixed call before rewriting as a parameterless function call.
336
337 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
338
339         * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
340         tsystem.h into $(RTSDIR) instead of rts.
341
342 2011-08-29  Robert Dewar  <dewar@adacore.com>
343
344         * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
345         reformatting.
346         * gcc-interface/Make-lang.in: Update dependencies.
347
348 2011-08-29  Yannick Moy  <moy@adacore.com>
349
350         * alfa.ads (Name_Of_Heap_Variable): New constant name.
351         * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
352         table to hold dereferences.
353         (Add_ALFA_Xrefs): Take into account dereferences as special
354         reads/writes to the variable "HEAP".
355         (Enclosing_Subprogram_Or_Package): Move subprogram here.
356         (Generate_Dereference): New procedure to store a read/write dereferencew
357         in the table Drefs.
358         * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
359         the special "HEAP" var.
360         * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
361         in ALFA mode.
362         * sem_util.adb (Note_Possible_Modification): Store write dereference
363         in ALFA mode.
364
365 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
366
367         * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
368         ensures that the level of the subpool access type is not deeper than
369         that of the pool object.
370         * sem_util.adb (Object_Access_Level): Expand to handle defining
371         identifiers.
372         * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
373         subpool handle name of a rewritten allocator.
374
375 2011-08-29  Robert Dewar  <dewar@adacore.com>
376
377         * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
378
379 2011-08-29  Thomas Quinot  <quinot@adacore.com>
380
381         * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
382         values, we generate multiple triples of parameters in the TypeCode.
383         Bump Choice_Index for each such triple so that a subsequent default
384         choice is associated with the correct index in the typecode.
385
386 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
387
388         * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
389         container.
390         (First, Last): Handle properly an iterator over a null container.
391
392 2011-08-29  Bob Duff  <duff@adacore.com>
393
394         * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
395         processing if we run across a node with no Scope. This can happen if
396         we're with-ing an library-level instance, and that instance got errors
397         that caused "instantiation abandoned".
398         * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
399         an exception instead of using Assert, so it won't go into an infinite
400         loop, even when assertions are turned off.
401
402 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
403
404         * a-coorse.adb: Proper handling of empty ordered sets.
405
406 2011-08-29  Johannes Kanig  <kanig@adacore.com>
407
408         * debug.adb: Add comments.
409
410 2011-08-29  Thomas Quinot  <quinot@adacore.com>
411
412         * a-except.adb, a-except-2005.adb: Minor comment rewording and
413         reformatting.
414
415 2011-08-29  Yannick Moy  <moy@adacore.com>
416
417         * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
418         declaration for Itypes in Alfa mode.
419
420 2011-08-29  Robert Dewar  <dewar@adacore.com>
421
422         * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
423         a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
424         a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
425         reformatting.
426
427 2011-08-29  Tristan Gingold  <gingold@adacore.com>
428
429         * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
430         package spec.
431         * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
432         * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
433         while raising PE.
434
435 2011-08-29  Robert Dewar  <dewar@adacore.com>
436
437         * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
438
439 2011-08-29  Javier Miranda  <miranda@adacore.com>
440
441         * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
442         renamings of formal subprograms when the actual for a formal type is
443         class-wide.
444
445 2011-08-29  Matthew Heaney  <heaney@adacore.com>
446
447         * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
448         to Target.
449
450 2011-08-29  Matthew Heaney  <heaney@adacore.com>
451
452         * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
453         components of record type.
454         * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
455         to Target.
456
457 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
458
459         * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
460         a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
461         container packages.
462
463 2011-08-29  Robert Dewar  <dewar@adacore.com>
464
465         * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
466         reformatting.
467
468 2011-08-29  Matthew Heaney  <heaney@adacore.com>
469
470         * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
471         components of record type.
472
473 2011-08-29  Bob Duff  <duff@adacore.com>
474
475         * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
476         by the termination handler.
477
478 2011-08-29  Yannick Moy  <moy@adacore.com>
479
480         * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
481         created in Alfa mode, instead of inserting artificial declarations of
482         non-Itypes in the tree.
483         * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
484         know if an Itype has a corresponding declaration, as defined in
485         itypes.ads.
486
487 2011-08-29  Yannick Moy  <moy@adacore.com>
488
489         * gnat1drv.adb: Minor rewrite.
490
491 2011-08-29  Bob Duff  <duff@adacore.com>
492
493         * s-tasuti.adb (Make_Passive): Work around race condition in
494         Make_Independent, which can cause Wait_Count to be zero. So instead of
495         asserting that Wait_Count > 0, and then decrementing it, decrement it
496         only if Wait_Count > 0.
497         * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
498         should be nonnegative, so declare them Natural instead of Integer.
499
500 2011-08-29  Robert Dewar  <dewar@adacore.com>
501
502         * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
503         sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
504         a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
505         a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
506         exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
507
508 2011-08-29  Tristan Gingold  <gingold@adacore.com>
509
510         * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
511
512 2011-08-29  Vadim Godunko  <godunko@adacore.com>
513
514         * s-parint.ads: Minor comment clarification.
515
516 2011-08-29  Vincent Celier  <celier@adacore.com>
517
518         * prj.adb (Initialize): Make sure that new reserved words after Ada 95
519         may be used as identifiers.
520
521 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
522
523         * a-coinho.ads: Minor reformating.
524
525 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
526
527         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
528         container of a derived type.
529
530 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
531
532         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
533         a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
534
535 2011-08-29  Pascal Obry  <obry@adacore.com>
536
537         * exp_disp.adb: Minor comment fix.
538         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
539         to avoid warnings when compiling with -Wall.
540         (Make_Disp_Conditional_Select_Body): Likewise.
541         (Make_Disp_Timed_Select_Body): Likewise.
542
543 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
544
545         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
546         an entity name, generate reference for it.
547
548 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
549
550         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
551         iterator form.
552         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
553         the class-wide type.
554         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
555
556 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
557
558         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
559         subtype for an object whose type is an unconstrained union.
560
561 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
562
563         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
564         is allowed in a component definition, by AI95-406.
565
566 2011-08-29  Matthew Heaney  <heaney@adacore.com>
567
568         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
569
570 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
571
572         * a-except-2005.adb: Alphabetize all routines.
573         (Triggered_By_Abort): New routine.
574         * a-except-2005.ads (Triggered_By_Abort): New routine.
575         * a-except.adb Alphabetize all routines.
576         (Triggered_By_Abort): New routine.
577         * a-except.ads (Triggered_By_Abort): New routine.
578         * exp_ch7.adb: Update all comments involving the detection of aborts in
579         finalization code.
580         (Build_Object_Declarations): Do not generate code to detect the
581         presence of an abort at the start of finalization code, use a runtime
582         routine istead.
583         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
584         RE_Unit_Table.
585         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
586         allocate a task on a subpool.
587         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
588         The flag disables all actions related to the maintenance of
589         Finalize_Address_Table when subpools are not in use.
590         (Allocate_Any_Controlled): Signal the machinery that subpools are in
591         use.
592         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
593         performs costly task locking when subpools are not in use.
594
595 2011-08-29  Yannick Moy  <moy@adacore.com>
596
597         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
598         types and dispatching calls in Alfa mode.
599         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
600         correspondance between body and spec scopes, to reuse utility functions
601         (Traverse_Declarations_Or_Statements): Protect access to body for stub
602         by testing the presence of the library unit for the body
603         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
604         mode the expansion of accept statements is skipped
605         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
606         the unique entity corresponding to the one returned by
607         Unique_Defining_Entity applied to the enclosing declaration of the
608         argument.
609
610 2011-08-29  Bob Duff  <duff@adacore.com>
611
612         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
613         gdb when x is not a node (it can be a node list, name_id, etc). pp is
614         an alias for pn. ppp is an alias for pt.
615
616 2011-08-29  Javier Miranda  <miranda@adacore.com>
617
618         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
619         aggregate to take a consistent decision on the need to convert into
620         assignments aggregates that initialize constant objects.
621
622 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
623
624         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
625         Build_Allocate_Deallocate_Proc in order to handle allocation of
626         non-controlled objects on subpools.
627         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
628         to be end-user visible.
629         * s-finmas.adb: Add with and use clause for System.HTable.
630         Add an instantiation of Simple_HTable which provides a mapping between
631         the address of a controlled object and the corresponding
632         Finalize_Address used to clean up the object. The table is used when a
633         master is operating in heterogeneous mode.
634         (Attach): Explain why the input node is not verified on being already
635         attached.
636         (Delete_Finalize_Address): New routine.
637         (Detach): Add pragma Assert which ensures that a node is already
638         attached.
639         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
640         since nodes are no longer removed on traversal. Explain why node
641         detachment is undesirable in this case.
642         (Get_Finalize_Address): New routine.
643         (Hash): New routine.
644         (Is_Empty_List): Removed.
645         (pm): Renamed to Print_Master. Add output for discriminant
646         Is_Homogeneous.
647         Comment reformatting.
648         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
649         * s-finmas.ads: Various comments additions / improvements.
650         Type Finalization_Master has a discriminant which determines the mode of
651         operation.
652         (Delete_Finalize_Address): New routine.
653         (Get_Finalize_Address): New routine.
654         (pm): Renamed to Print_Master.
655         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
656         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
657         use clause for System.IO.
658         (Allocate_Any_Controlled): Add machinery to set TSS primitive
659         Finalize_Address depending on the mode of allocation and the mode of
660         the master.
661         (Deallocate_Any_Controlled): Remove the relation pair object -
662         Finalize_Address regardless of the master mode. Add comment explaining
663         the reason.
664         (Detach): Ensure that fields Prev and Next are null after detachment.
665         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
666         scheme to check whether the list of subpools is empty. There is no
667         longer need to store the next subpool or advance the current pointer.
668         (Is_Empty_List): New routine.
669         (Print_Pool): New routine.
670         (Print_Subpool): New routine.
671         * s-stposu.ads: Various comments additions / improvements.
672         Field Master of type Root_Subpool is now a heterogeneous collection.
673         (Print_Pool): New routine.
674         (Print_Subpool): New routine.
675
676 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
677
678         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
679         forms, using aspects of container types.
680         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
681         Has_Implicit_Dereference flags, that may be set on the partial view.
682         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
683         container type with an indexing aspect.
684         (Analyze_Quantified_Expression): Analyze construct with expansion
685         disabled, because it will be rewritten as a loop during expansion.
686         (Try_Container_Indexing): The prefix itself may be a container type
687         with an indexing aspect, as with a vector of vectors.
688         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
689         the original doamin of iteration, for name capture.
690         (Analyze_Iterator_Specification): If the domain is an expression that
691         needs finalization, create a separate declaration for it.
692         For an iterator with "of" retrieve default iterator info from aspect of
693         container type. For "in" iterator, retrieve type of Iterate function.
694         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
695         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
696         analysis, to prevent spurious errors about late attributes.
697         * sprint.adb: Handle quantified expression with either loop or iterator
698         specification.
699         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
700         iterator.
701
702 2011-08-29  Vincent Celier  <celier@adacore.com>
703
704         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
705         Binder or Linker of the main project file.
706
707 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
708
709         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
710         unit.
711
712 2011-08-29  Yannick Moy  <moy@adacore.com>
713
714         * exp_ch9.adb: Partial revert of previous change for Alfa mode
715
716 2011-08-29  Yannick Moy  <moy@adacore.com>
717
718         * exp_ch11.adb: Minor expansion of comment.
719
720 2011-08-29  Yannick Moy  <moy@adacore.com>
721
722         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
723
724 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
725
726         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
727         interpretation, set the type before resolving the operands, because
728         legality checks on an exponention operand need to know the type of the
729         context.
730
731 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
732
733         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
734         cleanups on a master if the instance is within a generic unit.
735         Complement to the corresponding fix to inline.adb for K520-030.
736
737 2011-08-29  Tristan Gingold  <gingold@adacore.com>
738
739         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
740         occurrence.
741         * exp_intr.adb: Minor comment fix.
742
743 2011-08-29  Bob Duff  <duff@adacore.com>
744
745         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
746         Delay_Required was used as an uninitialized variable.
747
748 2011-08-29  Robert Dewar  <dewar@adacore.com>
749
750         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
751         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
752         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
753
754 2011-08-29  Thomas Quinot  <quinot@adacore.com>
755
756         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
757         Remove unused variables.
758
759 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
760
761         * sem_res.adb: Remove Build_Explicit_Dereference.
762         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
763         from sem_res.adb, used in analysis of additional constructs.
764         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
765         expansion of iterators.
766         (Is_Object_Reference): Recognize variables rewritten as explicit
767         dereferences in Ada2012.
768         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
769         Reversible_Iterator names, for expansion of Ada2012 iterators.
770         * aspects.ads, aspects.adb (Find_Aspect): Utility.
771         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
772         linked list container.
773         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
774         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
775
776 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
777
778         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
779         containers.
780
781 2011-08-29  Vincent Celier  <celier@adacore.com>
782
783         * make.adb (Gnatmake): Get the maximum number of simultaneous
784         compilation processes after the Builder switches has been scanned, as
785         there may include -jnn.
786
787 2011-08-29  Matthew Heaney  <heaney@adacore.com>
788
789         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
790
791 2011-08-29  Tristan Gingold  <gingold@adacore.com>
792
793         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
794         GNAT_DRIVER_COMMAND_LINE to 255.
795
796 2011-08-29  Pascal Obry  <obry@adacore.com>
797
798         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
799         reformatting and style fix (class attribute casing).
800
801 2011-08-29  Yannick Moy  <moy@adacore.com>
802
803         * exp_ch11.adb: Yet another case where expansion should be common
804         between CodePeer and Alfa.
805
806 2011-08-29  Yannick Moy  <moy@adacore.com>
807
808         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
809
810 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
811
812         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
813         incomplete type and its completion match.
814
815 2011-08-29  Yannick Moy  <moy@adacore.com>
816
817         * exp_ch13.adb: Adjust previous change.
818
819 2011-08-29  Robert Dewar  <dewar@adacore.com>
820
821         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
822         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
823         Minor reformatting.
824
825 2011-08-29  Emmanuel Briot  <briot@adacore.com>
826
827         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
828         initialize aggregated projects.
829
830 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
831
832         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
833         depth of candidates to resolve a potentially spurious ambiguity between
834         two visible subprograms.
835
836 2011-08-29  Yannick Moy  <moy@adacore.com>
837
838         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
839         Requires/Ensures.
840         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
841         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
842         Requires/Ensures.
843
844 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
845
846         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
847         Add comment.
848
849 2011-08-29  Thomas Quinot  <quinot@adacore.com>
850
851         * sem_res.adb: Minor reformatting.
852
853 2011-08-29  Johannes Kanig  <kanig@adacore.com>
854
855         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
856         mode.
857         * gnat1drv.adb (Adjust_Global_Switches): Set
858         Use_Expressions_With_Actions to False in ALFA mode.
859         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
860         ALFA mode.
861
862 2011-08-29  Yannick Moy  <moy@adacore.com>
863
864         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
865         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
866         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
867         tagged types and dispatching calls in Alfa mode.
868
869 2011-08-29  Javier Miranda  <miranda@adacore.com>
870
871         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
872         we do not report an error on an Empty node.
873
874 2011-08-29  Geert Bosch  <bosch@adacore.com>
875
876         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
877         a-nlrear.o and a-nurear.o.
878
879 2011-08-29  Robert Dewar  <dewar@adacore.com>
880
881         * freeze.adb: Minor code reorganization.
882         Minor reformatting.
883         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
884         sem_ch6.adb: Minor reformatting
885
886 2011-08-29  Tristan Gingold  <gingold@adacore.com>
887
888         * s-except.ads, s-except.adb: Provide dummy body.
889
890 2011-08-29  Yannick Moy  <moy@adacore.com>
891
892         * sem_warn.adb (Within_Postcondition): Take into account the case of
893         an Ensures component in a Test_Case.
894
895 2011-08-29  Tristan Gingold  <gingold@adacore.com>
896
897         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
898         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
899         System_Exceptions_Debug
900         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
901         * a-except.adb: With and use System.Exceptions_Debug instead of
902         System.Exceptions.
903         * a-except-2005.adb: Likewise.
904         * s-assert.adb: Likewise.
905         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
906         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
907         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
908         s-excdeb. Update dependencies.
909         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
910         as these no longer need external libraries.
911
912 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
913
914         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
915         exponentiation operator on universal values in a context that requires
916         a fixed-point type.
917
918 2011-08-29  Tristan Gingold  <gingold@adacore.com>
919
920         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
921         before calling notify_handled_exception.
922         * a-exextr.adb: Fix comment.
923
924 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
925
926         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
927         Finalize_Address of the access type's finalization master.
928         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
929         access type's finalization master. Add a guard to prevent
930         Associated_Storage_Pool from being set on .NET/JVM.
931         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
932         attribute Finalize_Address of the access type's finalization master.
933         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
934         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
935         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
936         RE_Unit_Table.
937         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
938         use clause for System.IO
939         (Detach): Relax the assertion, to be reinstated later.
940         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
941         Relax the assertion on Finalize_Address, to be reinstated later.
942         (Is_Empty_List): New routine.
943         (pm): New debug routine.
944         (Set_Finalize_Address): New routine.
945         * s-finmas.ads (pm): New debug routine.
946         (Set_Finalize_Address): New routine.
947         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
948
949 2011-08-29  Tristan Gingold  <gingold@adacore.com>
950
951         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
952         Remove convention C.
953
954 2011-08-29  Tristan Gingold  <gingold@adacore.com>
955
956         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
957         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
958         (Finalize_TCB): Remove its finalization.
959         (Initialize): Remove assignment of GET_Exc_Stack_Addr
960         * s-soflin.adb (NT_Exc_Stack): Remove
961         (Get_Exc_Stack_Addr_NT): Likewise.
962         (Get_Exc_Stack_Addr_Soft): Likewise.
963         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
964         (Get_Exc_Stack_Addr): Likewise.
965         (Get_Exc_Stack_Addr_Soft): Likewise
966         * s-taspri-vms.ads (Exc_Stack_T): Remove.
967         (Exc_Stack_Ptr_T): Likewise.
968         (Private_Data): Remove Exc_Stack_Ptr component.
969
970 2011-08-29  Tristan Gingold  <gingold@adacore.com>
971
972         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
973
974 2011-08-29  Tristan Gingold  <gingold@adacore.com>
975
976         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
977
978 2011-08-29  Geert Bosch  <bosch@adacore.com>
979
980         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
981         L2_Norm, Swap_Column): New generic subprograms
982         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
983         L2_Norm, Swap_Column): Implement new subprograms in order to
984         eliminate dependency on BLAS and LAPACK libraries in
985         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
986         version. Forward_Eliminate/Back_Substitute can be used to put a
987         matrix in row echelon or reduced row echelon form using partial
988         pivoting.
989         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
990         Swap_Column): Instantiate from System.Generic_Array_Operations.
991         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
992         (Sqrt): Local function for simple computation of square root without
993         adding dependencies on Generic_Elementary_Functions.
994         (Swap): New subprogram to exchange floating point numbers.
995         (Inverse): Reimplement using Jordan-Gauss elimination.
996         (Jacobi): New procedure implementing Jacobi's method for computation
997         of eigensystems, based on Rutishauser's implementation.
998         (L2_Norm): Implement directly using the inner product.
999         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
1000         decreasing eigenvalue as required by the Ada RM.
1001         (Swap_Column): New helper procedure for Sort_Eigensystem.
1002         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
1003         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
1004         Sort_Eigensystems.
1005
1006 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1007
1008         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
1009         statements line.
1010
1011 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1012
1013         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
1014         than the current node.
1015         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
1016         Finalization_Master. The list headers have two fields instead of three.
1017         This should fix alignment issue but subpool allocations are now
1018         unusable. Alphabetize subprograms.
1019         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
1020         the size of the header when converting the beginning of the object to
1021         a FM_Node. Set the master's Finalize_Address attribute if not already
1022         set.
1023         (Deallocate_Any_Controlled): Use the offset rather than the size of the
1024         header when converting the beginning of the object to a FM_Node.
1025
1026 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
1027
1028         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
1029         reraise when compiling for CodePeer.
1030
1031 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1032
1033         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
1034         now needed by a-convec.adb. Fix warning.
1035
1036 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1037
1038         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
1039         processing of TSS routine Finalize_Address when compiling in
1040         CodePeer_Mode.
1041
1042 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1043
1044         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
1045         sem_warn.adb: Minor reformatting.
1046
1047 2011-08-29  Emmanuel Briot  <briot@adacore.com>
1048
1049         * prj-conf.adb (Get_Config_Switches): Also collect the list of
1050         languages from aggregated projects.
1051
1052 2011-08-29  Yannick Moy  <moy@adacore.com>
1053
1054         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
1055         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
1056         Traverse_Package_Declaration, Traverse_Subprogram_Body,
1057         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
1058         for stubs are traversed too when parameter is set
1059         (Traverse_All_Compilation_Units): Traverse without going inside stubs
1060         (Traverse_Declarations_Or_Statements): Do the special traversing for
1061         stubs when required.
1062         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
1063         return subprogram or package body from stub.
1064         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
1065         stubs without prior subprogram decl.
1066
1067 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
1068
1069         * gnat_ugn.texi: Fix typo.
1070
1071 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1072
1073         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
1074         which accounts for size vs alignment issues and calculates the size of
1075         the list header.
1076         (Deallocate_Any_Controlled): Ditto.
1077         (Nearest_Multiple_Rounded_Up): New routine.
1078
1079 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1080
1081         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
1082         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
1083         (Set_Exception_Msg): Ditto.
1084         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
1085         Private_Data.
1086         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
1087         Use Save_Occurrence instead of Save_Occurrence_No_Private.
1088         (Raise_With_Msg): Remove Cleanup_Flag.
1089         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
1090         Clean_Flag and Private_Data components.
1091
1092 2011-08-29  Yannick Moy  <moy@adacore.com>
1093
1094         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
1095         in CodePeer mode.
1096         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
1097         of an explicitly declared type, so that the base types of the original
1098         type and this generated type are the same, and a "type" (not a subtype
1099         like previously).
1100         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
1101         small" in Alfa mode, like in CodePeer mode.
1102         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
1103         clauses in Alfa mode.
1104
1105 2011-08-29  Javier Miranda  <miranda@adacore.com>
1106
1107         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
1108         function to the package spec.
1109         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
1110         internally generated bodies of null procedures locate the internally
1111         generated spec enforcing mode conformance.
1112         (Is_Interface_Conformant): Ensure that the controlling formal of the
1113         primitives match.
1114
1115 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1116
1117         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
1118         reject the pragma if it appears to apply to a formal subprogram.
1119
1120 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1121
1122         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
1123         inner expression, to prevent double evaluation.
1124
1125 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1126
1127         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
1128         they were unused.
1129         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
1130         * a-except-2005.adb (Propagate_Exception): Adjust spec.
1131         (Raise_Current_Excep): Adjust call.
1132         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
1133
1134 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1135
1136         * exp_disp.adb: Minor reformatting.
1137
1138 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1139
1140         * a-exexpr.adb (Setup_Exception): Removed.
1141         * a-exexpr-gcc.adb (Setup_Exception): Removed.
1142         * a-except.adb (Exception_Propagation): Removed.
1143         * a-except-2005.adb (Setup_Exception): Removed.
1144         (Reraise): Remove call to Setup_Exception.
1145         (Reraise_Occurrence): Ditto.
1146         (Reraise_Occurrence_Always): Ditto.
1147         (Reraise_Occurrence_No_Defer): Ditto.
1148         (Transfer_Occurrence): Ditto.
1149         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
1150         (Set_Exception_Msg): Ditto.
1151
1152 2011-08-29  Robert Dewar  <dewar@adacore.com>
1153
1154         * a-convec.adb, exp_disp.adb: Minor reformatting.
1155
1156 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1157
1158         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
1159
1160 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
1161
1162         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
1163         Exception_Handlers to No_List instead of Empty_List in the case where
1164         there are no handlers.
1165
1166 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1167
1168         * gcc-interface/gigi.h (enum standard_datatypes): Add
1169         ADT_reraise_zcx_decl
1170         (reraise_zcx_decl): New macro.
1171         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
1172         (gigi): Set reraise_zcx_decl.
1173         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
1174         (gnat_to_gnu): Handle N_Raise_Statement.
1175
1176 2011-08-29  Robert Dewar  <dewar@adacore.com>
1177
1178         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
1179         a-undesu.adb: Minor reformatting.
1180
1181 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1182
1183         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
1184         table, accept an unfrozen untagged component if it is an actual for a
1185         formal incomplete type.
1186         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
1187         provide new iterator forms over vectors.
1188         Introduce type Iterator in package body to implement operations of
1189         Reversible_Iterator interface.
1190         * a-iteint.ads: Make package pure so it is usable with new container
1191         packages, that are categorized Remote_Types.
1192
1193 2011-08-29  Robert Dewar  <dewar@adacore.com>
1194
1195         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
1196
1197 2011-08-29  Bob Duff  <duff@adacore.com>
1198
1199         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
1200         of <>, because this is the routine that checks for dimensionality
1201         errors (for example, for a two-dimensional array, (others => <>) should
1202         be (others => (others => <>)).
1203
1204 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1205
1206         * impunit.adb: Add new run-time units.
1207         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
1208         s-stposu.ads, s-stposu.adb: Code clean up.
1209         Handle protected class-wide or task class-wide types
1210         Handle C/C++/CIL/Java types.
1211         * s-spsufi.adb, s-spsufi.ads: New files.
1212
1213 2011-08-29  Yannick Moy  <moy@adacore.com>
1214
1215         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
1216         library-level subprogram.
1217         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
1218         placement.
1219         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
1220         component.
1221         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
1222         component.
1223         * gnat_rm.texi: Update doc for Test_Case pragma.
1224
1225 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1226
1227         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
1228         convention C.
1229         (GCC_Exception_Access): New type.
1230         (Unwind_DeleteException): New imported procedure
1231         (Foreign_Exception): Import it.
1232         (GNAT_GCC_Exception): Simply have the occurrence inside.
1233         (To_GCC_Exception): New function.
1234         (To_GNAT_GCC_Exception): New function.
1235         (GNAT_GCC_Exception_Cleanup): New procedure..
1236         (Propagate_GCC_Exception): New procedure.
1237         (Reraise_GCC_Exception): New procedure.
1238         (Setup_Current_Excep): New procedure.
1239         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
1240         (Unwind_RaiseException): Ditto.
1241         (Unwind_ForcedUnwind): Ditto.
1242         (Remove): Removed.
1243         (Begin_Handler): Change type of parameter.
1244         (End_Handler): Ditto. Now delete the exception if still present.
1245         (Setup_Key): Removed.
1246         (Is_Setup_And_Not_Propagated): Removed.
1247         (Set_Setup_And_Not_Propagated): Ditto.
1248         (Clear_Setup_And_Not_Propagated): Ditto.
1249         (Save_Occurrence_And_Private): Ditto.
1250         (EID_For): Add 'not null' constraint on parameter.
1251         (Setup_Exception): Does nothing.
1252         (Propagate_Exception): Simplified.
1253         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
1254         re-raise is not expanded anymore.
1255         * s-except.ads (Foreign_Exception): New exception - placeholder for
1256         non Ada exceptions.
1257         * raise-gcc.c (__gnat_setup_current_excep): Declare
1258         (CXX_EXCEPTION_CLASS): Define (not yet used)
1259         (GNAT_EXCEPTION_CLASS): Define.
1260         (is_handled_by): Handle foreign exceptions.
1261         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
1262
1263 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1264
1265         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
1266
1267 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1268
1269         * a-synbar-posix.adb: Minor reformatting.
1270
1271 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1272
1273         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
1274         a-exetim-default.ads (Interrupt_Clocks_Supported,
1275         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
1276         definitions to be compliant with AI-0171. The target systems do not
1277         support separate account for the execution time of interrupt handlers.
1278
1279 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1280
1281         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
1282         in the barrier to put first the easiest to evaluate (and the one which
1283         will be True more often). More efficient.
1284
1285 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
1286
1287         * s-atocou-x86.adb: Fix constraint in machine code insertion.
1288
1289 2011-08-29  Bob Duff  <duff@adacore.com>
1290
1291         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
1292         attributes that are now aspects, as specified by AI05-0229-1.
1293         * sem_ch13.adb (Analyze_Aspect_Specifications,
1294         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
1295         pragmas or attribute references, as appropriate.
1296
1297 2011-08-29  Robert Dewar  <dewar@adacore.com>
1298
1299         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
1300         a-synbar-posix.ads: Minor reformatting.
1301
1302 2011-08-29  Yannick Moy  <moy@adacore.com>
1303
1304         * snames.ads-tmpl: Add name Force.
1305
1306 2011-08-29  Pascal Obry  <obry@adacore.com>
1307
1308         * prj-nmsc.adb: Minor reformatting.
1309
1310 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1311
1312         * a-exetim.ads (Interrupt_Clocks_Supported,
1313         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
1314         definitions to be compliant with AI-0171.
1315
1316 2011-08-29  Robert Dewar  <dewar@adacore.com>
1317
1318         * a-ngelfu.adb: Add comments.
1319
1320 2011-08-29  Geert Bosch  <bosch@adacore.com>
1321
1322         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
1323         the closest machine number to Pi / 2.0.
1324
1325 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1326
1327         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
1328         package Ada.Synchronous_Barriers.
1329         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
1330         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
1331         default implementation using protected objects and another one
1332         a-synbar-posix using POSIX barriers as the underlying support.
1333         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
1334         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
1335         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
1336         Clean up dependencies.
1337         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
1338
1339 2011-08-29  Robert Dewar  <dewar@adacore.com>
1340
1341         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
1342         exp_dist.adb: Minor code reorganization.
1343         Minor reformatting.
1344
1345 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1346
1347         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
1348         primitive operation must support external streaming if it is not a
1349         controlling access result.
1350
1351 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1352
1353         * sinfo.ads, sem_ch7.adb: Minor reformatting.
1354
1355 2011-08-29  Bob Duff  <duff@adacore.com>
1356
1357         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
1358         restriction on allocators, as required by AI05-0013-1.
1359         * restrict.ads: Minor comment fix.
1360
1361 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1362
1363         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
1364         (To_Jmpbuf_Address): Ditto
1365         (builtin_longjmp): Ditto
1366
1367 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1368
1369         * sem_res.adb: Minor reformatting.
1370
1371 2011-08-29  Vincent Celier  <celier@adacore.com>
1372
1373         * make.adb (Gnatmake): Move special processing for VM targets after the
1374         call to Get_Target_Parameters.
1375
1376 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1377
1378         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
1379
1380 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1381
1382         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
1383         where an anonymous access discriminant of a limited designated type
1384         appears in a non-immutably limited discriminated type and issue an
1385         error message. Add local variable Desig_T and replace all occurrences
1386         of Designated_Type.
1387
1388 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1389
1390         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
1391         implementation is compliant to RM D.15(15/2) after the modification
1392         imposed by AI05-0094-1 (binding interpretation).
1393
1394 2011-08-29  Robert Dewar  <dewar@adacore.com>
1395
1396         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
1397         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
1398
1399 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1400
1401         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
1402         the scope name, do not report a missing label as a style violation (it
1403         will be diagnosed as an illegality).
1404         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
1405         variant records: Get_Enum_Lit_From_Pos already returns a usage
1406         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
1407         on Expr in Integer_Literal case so that it can be used by
1408         Build_To_Any_Call.
1409
1410 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1411
1412         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
1413         Adjust comment.
1414         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
1415         (Build_Abort_Block_Handler): New function to build an Abort_Signal
1416         exception handler.
1417         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
1418         Build_Abort_Block_Handler to build the exception handler. Do not
1419         undefer aborts for the Abort_Signal exception handler if back-end
1420         exception mechanism.
1421         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
1422         back_end exceptions for all others and abort_signal.
1423         * s-except.ads (ZCX_By_Default): New constant.
1424         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
1425         (Raise_Exception_Always): Ditto.
1426         (Raise_From_Signal_Handler): Ditto.
1427         (Raise_With_Location_And_Msg): Ditto.
1428         (Raise_With_Msg): Ditto.
1429         (Reraise): Ditto.
1430         (Reraise_Occurence): Ditto.
1431         (Reraise_Occurrence_Always): Ditto.
1432         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
1433         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
1434
1435 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1436
1437         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
1438
1439 2011-08-29  Robert Dewar  <dewar@adacore.com>
1440
1441         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
1442         Minor code reorganization.
1443
1444 2011-08-29  Bob Duff  <duff@adacore.com>
1445
1446         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
1447         2012, not just Ada 2005.
1448
1449 2011-08-29  Vincent Celier  <celier@adacore.com>
1450
1451         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
1452         with a project file or with gprbuid, if -gnatep= is specified, the
1453         builder may need to be invoked with -x.
1454
1455 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1456
1457         * a-exexpr-gcc.adb: Minor comment fix.
1458
1459 2011-08-29  Robert Dewar  <dewar@adacore.com>
1460
1461         * sem_ch8.adb: Minor reformatting.
1462
1463 2011-08-29  Bob Duff  <duff@adacore.com>
1464
1465         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
1466         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
1467         treating "some" as unreserved in earlier Ada versions. This is now
1468         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
1469         rather than Name_Some, since Tok_Some is now recognized as reserved.
1470         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
1471         reserved word.
1472         * scans.ads: Minor comment fixes.
1473         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
1474         for other language versions.
1475         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
1476         treating "some" as unreserved in earlier Ada versions. This is now
1477         handled in Snames.Is_Keyword_Name.
1478         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
1479         Ada 2012.
1480         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
1481         unreserved in earlier Ada versions. This is now handled in
1482         Snames.Is_Keyword_Name.
1483         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
1484         words as for other language versions.
1485         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
1486         Ada 2012, not just Ada 2005.
1487
1488 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1489
1490         * sem_ch13.adb: Additional semantic checks for aspects involved in
1491         iterators.
1492
1493 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1494
1495         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
1496         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
1497         Container parameter.
1498         (Ancestor_Find): ditto.
1499
1500 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1501
1502         * par-endh.adb: Minor reformatting.
1503
1504 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1505
1506         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
1507         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
1508         (Adjust_N_CLeanups_For): Remove.
1509         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
1510         stack is reached.
1511         (Propgate_Exception): Adjust.
1512         * raise-gcc.c: Add a few static/const.
1513         (Adjust_N_Cleanups_For): Remove declaration.
1514         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
1515
1516 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1517
1518         * sem_ch8.adb: Use type of function return when rewriting as object
1519         declaration.
1520
1521 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
1522
1523         * sem_type.adb: Minor reformatting.
1524
1525 2011-08-29  Robert Dewar  <dewar@adacore.com>
1526
1527         * makeutl.adb: Minor reformatting.
1528
1529 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1530
1531         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
1532         function call of a limited type, the expansion of the renaming is
1533         complicated by the presence of various temporaries and subtypes that
1534         capture constraints of the renamed object.
1535         Rewrite node as an object declaration, whose expansion is simpler.
1536         Given that the object is limited there is no copy involved and no
1537         performance hit.
1538
1539 2011-08-29  Robert Dewar  <dewar@adacore.com>
1540
1541         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
1542         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
1543
1544 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1545
1546         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
1547         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
1548         system-linux-hppa.ads, system-linux-s390.ads,
1549         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
1550         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
1551         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
1552         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
1553         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
1554         system-solaris-sparc.ads, system-lynxos-x86.ads,
1555         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
1556         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
1557         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
1558         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
1559         system-vxworks-x86.ads: Remove GCC_ZCX_Support
1560         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
1561         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
1562         * opt.ads: Adjust comment.
1563         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
1564         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
1565         * system.ads: Move GCC_ZCX_Support to obsolete entries.
1566
1567 2011-08-29  Emmanuel Briot  <briot@adacore.com>
1568
1569         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
1570         file name is specified on the gnatmake or gprbuild command line, and
1571         before we search for that file in the project.
1572
1573 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1574
1575         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
1576         used to determine whether a possible interpretation for an overloadable
1577         entity is declared within the current instantiation and should be
1578         included in the candidate set.
1579
1580 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
1581
1582         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
1583
1584 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1585
1586         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
1587         access subtype is access_to_subprogram, when applying checks for
1588         RM 3.10.2 (27).
1589
1590 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1591
1592         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
1593         for sibling when common parent.
1594
1595 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1596
1597         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
1598         "pragma_".
1599
1600 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1601
1602         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
1603         for the return type when in ASIS mode.
1604
1605 2011-08-29  Vincent Celier  <celier@adacore.com>
1606
1607         * make.adb (Gnatmake): Get the default search dirs, then the target
1608         parameters after getting the Builder switches, as the Builder switches
1609         may include --RTS= and that could change the default search dirs.
1610
1611 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1612
1613         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
1614         Make_Final_Call. Move the processing for class-wide types before the
1615         processing for derivations from [Limited_]Controlled.
1616         (Make_Final_Call): Move the processing for class-wide types before the
1617         processing for derivations from [Limited_]Controlled.
1618         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
1619         Add code to account for alignments larger than the list header. Add a
1620         comment illustrating the structure of the allocated object + padding +
1621         header.
1622         (Deallocate_Any_Controlled): Add code to account for alignments larger
1623         than the list header.
1624
1625 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1626
1627         * sinfo.ads, sinfo.adb: New node kind
1628         N_Formal_Incomplete_Type_Definition, related flags.
1629         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
1630         Parse formal incomplete types.
1631         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
1632         sem_ch12.
1633         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
1634         Formal incomplete types do not need completion.
1635         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
1636         Validate_Incomplete_Type_Instance): New procedures to handle formal
1637         incomplete types.
1638         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
1639         that corresponds to a formal incomplete type.
1640         * sprint.adb: Handle formal incomplete type declarations.
1641         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
1642         an insertion point.
1643
1644 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1645
1646         * a-fihema.ads, a-fihema.adb: Unit removed.
1647         * a-undesu.ads, a-undesu.adb: New unit implementing
1648         Ada.Unchecked_Deallocate_Subpool.
1649         * einfo.adb: Remove Associated_Collection from the node usage.
1650         Add Finalization_Master to the node usage.
1651         (Associated_Collection): Removed.
1652         (Finalization_Master): New routine.
1653         (Set_Associated_Collection): Removed.
1654         (Set_Finalization_Master): New routine.
1655         (Write_Field23_Name): Remove Associated_Collection from the output. Add
1656         Finalization_Master to the output.
1657         * einfo.ads: Remove attribute Associated_Collection and its uses in
1658         entities.
1659         Add new attribute Finalization_Master along with its uses in entitites.
1660         (Associated_Collection): Removed along with its pragma import.
1661         (Finalization_Master): New routine along with a pragma import.
1662         (Set_Associated_Collection): Removed along with its pragma import.
1663         (Set_Finalization_Master): New routine along with a pragma import.
1664         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
1665         Build_Finalization_Collection with Build_Finalization_Master.
1666         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
1667         before the bodies of the predefined routines. Add comment explaining
1668         this. Replace call to Build_Finalization_Collection with
1669         Build_Finalization_Master.
1670         (Freeze_Type): Replace call to Build_Finalization_Collection with
1671         Build_Finalization_Master.
1672         (Make_Finalize_Address_Body): Comment reformatting.
1673         (Make_Predefined_Primitive_Specs): Code reformatting.
1674         (Stream_Operation_OK): Update comment mentioning finalization
1675         collections. Replace RE_Finalization_Collection with
1676         RE_Finalization_Master.
1677         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
1678         Associated_Collection with Finalization_Master. Replace call to
1679         Build_Finalization_Collection with Build_Finalization_Master.
1680         (Expand_Allocator_Expression): Replace call to Associated_Collection
1681         with Finalization_Master. Replace call to Set_Associated_Collection with
1682         Set_Finalization_Master. Remove the generation of
1683         Set_Finalize_Address_Ptr.
1684         (Expand_N_Allocator): Replace call to Associated_Collection with
1685         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
1686         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
1687         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
1688         comment on usage. Replace call to Needs_BIP_Collection with
1689         Needs_BIP_Finalization_Master Remplace BIP_Collection with
1690         BIP_Finalization_Master. Update all comments which mention finalization
1691         collections. Replace Associated_Collection with
1692         Finalization_Master. Replace Build_Finalization_Collection with
1693         Build_Finalization_Master.
1694         (BIP_Formal_Suffix): Update BIP_Collection's case.
1695         (Build_Heap_Allocator): Update the related comment. Rename local
1696         variable Collect to Fin_Mas_Id and update its occurrences. Update
1697         comments which mention finalization collections. Replace
1698         Set_Associated_Collection with Set_Finalization_Master.
1699         (Expand_Call): Update the code which detects a special piece of library
1700         code for .NET/JVM.
1701         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
1702         Add_Collection_Actual_To_Build_In_Place_Call with
1703         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
1704         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
1705         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
1706         Add_Collection_Actual_To_Build_In_Place_Call with
1707         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1708         (Make_Build_In_Place_Call_In_Assignment): Replace call to
1709         Add_Collection_Actual_To_Build_In_Place_Call with
1710         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1711         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1712         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
1713         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1714         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
1715         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
1716         Replace call to Set_Associated_Collection with Set_Finalization_Master.
1717         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
1718         Replace the call to Associated_Collection with Finalization_Master.
1719         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
1720         Update the way finalization master names are generated. Update the
1721         retrieval of the correct access type which will carry the pool and
1722         master attributes.
1723         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
1724         (Make_Finalize_Address_Body): Abstract types do not need
1725         Finalize_Address. Code reformatting.
1726         (Make_Finalize_Address_Stmts): Update comment on usage.
1727         (Make_Set_Finalize_Address_Ptr_Call): Removed.
1728         (Process_Declarations): Update comments.
1729         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
1730         Build_Finalization_Master. Update associated comment.
1731         (Make_Set_Finalize_Address_Ptr_Call): Removed.
1732         * exp_ch13.adb: Update comments which mention finalization collections.
1733         (Expand_N_Free_Statement): Replace the call to Associated_Collection
1734         with Finalization_Master.
1735         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
1736         create calls to routines Allocate_Any_Controlled and
1737         Deallocate_Any_Controlled.
1738         (Find_Finalize_Address): New routine.
1739         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
1740         comparison.
1741         (Requires_Cleanup_Actions): Update the comment on freeze node
1742         inspection.
1743         * exp_util.ads: Remove comment on generated code for
1744         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
1745         is better to simply look in the body.
1746         * freeze.adb (Freeze_All): Update the comment of finalization
1747         collections. Replace the call to Associated_Collection with
1748         Finalization_Master. Replace the call to Build_Finalization_Collection
1749         with Build_Finalization_Master.
1750         * impunit.adb: Add a-undesu and s-stposu to the list of units.
1751         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
1752         a-fihema.
1753         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
1754         Ada.Finalization. Add processing for children of System.Storage_Pools.
1755         * rtsfind.ads: Remove the naming of second level children of
1756         Ada.Finalization.
1757         Remove Ada_Finalization_Heap_Management from the list of units.
1758         Remove subtype Ada_Finalization_Child.
1759         Remove the following subprogram entities:
1760         
1761            RE_Allocate
1762            RE_Deallocate
1763            RE_Finalization_Collection
1764            RE_Finalization_Collection_Ptr
1765            RE_Set_Finalize_Address_Ptr
1766         
1767         Add the naming of second level children of System.Storage_Pools.
1768         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
1769         the list of units.
1770         Add subtype System_Storage_Pools_Child.
1771         Add the following subprogram entities to System.Finalization_Masters:
1772         
1773            RE_Finalization_Master
1774            RE_Finalization_Master_Ptr
1775         
1776         Add the following subprogram entities to System.Storage_Pools.Subpools:
1777         
1778            RE_Allocate_Any_Controlled
1779            RE_Deallocate_Any_Controlled
1780            RE_Root_Storage_Pool_With_Subpools
1781            RE_Root_Subpool
1782            RE_Subpool_Handle
1783         
1784         Move the following subprogram entities from
1785         Ada.Finalization.Heap_Management to System.Finalization_Masters:
1786         
1787            RE_Add_Offset_To_Address
1788            RE_Attach
1789            RE_Base_Pool
1790            RE_Detach
1791         
1792         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
1793         Set_Associated_Collection with Set_Finalization_Master.
1794         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
1795         BIP_Finalization_Master is created.
1796         * s-finmas.adb: New unit System.Finalization_Masters.
1797         * s-finmas.ads: New unit System.Finalization_Masters.
1798         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
1799         * s-stposu.ads, s-stposu.adb: New unit implementing
1800         System.Storage_Pools.Subpools.
1801
1802 2011-08-29  Bob Duff  <duff@adacore.com>
1803
1804         * tbuild.adb: Add assertion.
1805
1806 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1807
1808         * s-pooglo.adb: Minor reformatting.
1809
1810 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1811
1812         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
1813         an indexed component of a packed array whose element type is a record
1814         with a representation clause different from that of the right-hand
1815         side, generate a temporary to minimuze the number of bit-field
1816         operations generated.
1817
1818 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1819
1820         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
1821         declarations, and thus are likely insertion points for actions.
1822
1823 2011-08-29  Bob Duff  <duff@adacore.com>
1824
1825         * einfo.ads: Minor comment fix.
1826
1827 2011-08-29  Robert Dewar  <dewar@adacore.com>
1828
1829         * frontend.adb, gnat1drv.adb: Minor reformatting.
1830
1831 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1832
1833         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
1834         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
1835         space in front of the header.
1836
1837 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1838
1839         * frontend.adb (Frontend): Exit after creating Standard package when
1840         -gnatd.H is present.
1841         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
1842         present.
1843
1844 2011-08-29  Robert Dewar  <dewar@adacore.com>
1845
1846         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
1847         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
1848         snames.ads-tmpl: Minor reformatting.
1849
1850 2011-08-29  Philippe Gil  <gil@adacore.com>
1851
1852         * prj.adb (Reset_Units_In_Table): New procedure.
1853         Reset units to avoid access to freed memory.
1854
1855 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1856
1857         * get_scos.adb: When reading a P statement SCO without a pragma name
1858         (from an older ALI file), ensure that the Pragma_Name component is set
1859         to Unknown_Pragma (not left uninitialized).
1860
1861 2011-08-29  Vincent Celier  <celier@adacore.com>
1862
1863         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
1864         modified to compute correctly the object path of a SAL project that is
1865         extending another library project.
1866         (Write_Path_File): New procedure.
1867         * makeutl.ads (Directories): New table moved from Buildgpr
1868         (Get_Directories): New procedure moved from Buildgpr
1869         (Write_Path_File): New procedure
1870         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
1871         paths before binding SALs, instead of Set_Ada_Paths.
1872         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
1873         Prj.
1874         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
1875         (Current_Source_Path_File_Of): New function
1876         (Set_Current_Object_Path_File_Of): New procedure
1877         (Current_Source_Object_File_Of): New function
1878         (Set_Current_Object_Path_File_Of): New procedure
1879         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
1880         (Current_Source_Path_File_Of): New function
1881         (Set_Current_Object_Path_File_Of): New procedure
1882         (Current_Source_Object_File_Of): New function
1883         (Set_Current_Object_Path_File_Of): New procedure
1884
1885 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1886
1887         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
1888         packed entity, use a bit-field assignment only if there is no change of
1889         representation.
1890
1891 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1892
1893         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
1894         Is_RTU instead of using Chars comparisons.
1895
1896 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1897
1898         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
1899         temporary object if the actual is constrained, and the discriminants
1900         read from the stream don't match.
1901
1902 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1903
1904         * sem_attr.adb, exp_attr.adb: Add handling of
1905         Attribute_System_Allocator_Alignment
1906         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
1907         Attribute_System_Allocator_Alignment.
1908         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
1909         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
1910         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
1911         get_target_system_allocator_alignment.
1912
1913 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1914
1915         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1916         dependencies.
1917
1918 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1919
1920         * exp_ch3.adb (In_Runtime): Fix typo.
1921
1922 2011-08-29  Bob Duff  <duff@adacore.com>
1923
1924         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
1925
1926 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1927
1928         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
1929         and a separate tag assignment is generated, ensure that the tag
1930         assignment is analyzed.
1931
1932 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1933
1934         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
1935         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
1936         of statement lists that may contain local declarations.
1937         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
1938         duplicate the triggering statements needed for the expansion of this
1939         construct, when the trigger is a dispatching call to a synchronized
1940         primitive.
1941
1942 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1943
1944         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
1945         * bindgen.adb: Add comments.
1946         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
1947         in CodePeer mode.
1948
1949 2011-08-29  Robert Dewar  <dewar@adacore.com>
1950
1951         * exp_attr.adb: Minor reformatting.
1952         Minor code reorganization and commenting.
1953         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
1954         reformatting.
1955
1956 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1957
1958         * get_scos.adb: Ignore chaining indicators not currently supported
1959         by Ada.
1960
1961 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1962
1963         * system.ads: Minor editing.
1964
1965 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1966
1967         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
1968         CodePeer mode.
1969         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
1970         Attribute_Elab_Subp_Body.
1971         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
1972         * sem_util.adb: Update comments.
1973
1974 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1975
1976         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
1977         pragma name for each SCO statement corresponding to a pragma.
1978
1979 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1980
1981         * opt.ads: Minor editing.
1982
1983 2011-08-29  Yannick Moy  <moy@adacore.com>
1984
1985         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
1986         that only made sense for CodePeer mode.
1987
1988 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1989
1990         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
1991         which is no longer used.
1992         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
1993         handling of the 64-bit division check.
1994         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
1995         division available.
1996         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
1997         longer used.
1998
1999 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2000
2001         * get_scos.adb: Minor reformatting.
2002
2003 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
2004
2005         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
2006         statement list is wrapped in a block, the block is explicitly analyzed
2007         in order to properly redecorate the entities and create a servicing
2008         finalizer.
2009
2010 2011-08-29  Tristan Gingold  <gingold@adacore.com>
2011
2012         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
2013         (Set_Zero_Cost_Handling): Remove.
2014
2015 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2016
2017         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
2018
2019 2011-08-29  Geert Bosch  <bosch@adacore.com>
2020
2021         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
2022         instruction, as the latter may produce -0.0, which is not a valid VAX
2023         F float number.
2024         (Neg_G): Likewise for VAX F float.
2025
2026 2011-08-29  Robert Dewar  <dewar@adacore.com>
2027
2028         * exp_util.adb: Minor reformatting.
2029
2030 2011-08-29  Yannick Moy  <moy@adacore.com>
2031
2032         * sem_ch3.adb: Minor comment update.
2033
2034 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2035
2036         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
2037         the operand type.
2038
2039 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2040
2041         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
2042         current statement sequence on a generic instantiation or a subprogram
2043         declaration.
2044
2045 2011-08-29  Robert Dewar  <dewar@adacore.com>
2046
2047         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
2048         Minor reformatting.
2049
2050 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
2051
2052         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2053         Correct the check which involves the freeze node of a controlled or
2054         access-to-controlled type.
2055
2056 2011-08-29  Geert Bosch  <bosch@adacore.com>
2057
2058         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
2059         statements.
2060         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
2061         Asm statements.
2062
2063 2011-08-29  Yannick Moy  <moy@adacore.com>
2064
2065         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
2066         for every index type and component type that is not a subtype_mark.
2067         (Process_Subtype): Set Etype of subtype.
2068
2069 2011-08-29  Robert Dewar  <dewar@adacore.com>
2070
2071         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
2072         reorganization.  Minor reformatting.
2073
2074 2011-08-29  Steve Baird  <baird@adacore.com>
2075
2076         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
2077         for CodePeer and ALFA modes.
2078
2079 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2080
2081         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
2082         that comes from an enclosing scope if it is not the renaming of an
2083         actual, to handle properly a spurious ambiguity in an instance.
2084
2085 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
2086
2087         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
2088         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
2089         use it instead of the Esize of the first parameter.
2090         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
2091         above change.
2092         <Size>: Likewise.  Call it for composite types on the RM size.
2093
2094 2011-08-29  Yannick Moy  <moy@adacore.com>
2095
2096         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
2097         * sem_util.adb (Unique_Name): Correct behaviour for names of
2098         compilation units.
2099
2100 2011-08-29  Yannick Moy  <moy@adacore.com>
2101
2102         * sem_prag.adb (Check_Precondition_Postcondition): In formal
2103         verification mode, analyze pragma expression for correctness, for
2104         pre/post on library-level subprogram, as it is not expanded later.
2105
2106 2011-08-29  Yannick Moy  <moy@adacore.com>
2107
2108         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
2109         in formal verification.
2110
2111 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2112
2113         * sem_util.adb: Minor reformatting.
2114         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
2115         there's no pragma.
2116         * par_sco.ads, par_sco.adb: Update comments.
2117
2118 2011-08-29  Yannick Moy  <moy@adacore.com>
2119
2120         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
2121         associated getter/setter.
2122         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
2123
2124 2011-08-29  Vincent Celier  <celier@adacore.com>
2125
2126         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
2127         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
2128         with declarations for Language_Kind and Dependency_Kind for Ada.
2129         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
2130         (Process_Compiler): Take into account the new attributes Dependency_Kind
2131         and Language_Kind.
2132         (Check_Configuration): Check if language kind is unit based, not if the
2133         language name is Ada.
2134         (Process_Exceptions_Unit_Based): Ditto
2135         (Add_Language): Remove default additions of language and dependency kind
2136         * prj.ads: Minor comment change
2137         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
2138
2139 2011-08-29  Johannes Kanig  <kanig@adacore.com>
2140
2141         * debug.adb: Update comments.
2142
2143 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
2144
2145         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
2146         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
2147         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
2148         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
2149         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
2150
2151 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2152
2153         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
2154         (GNATLIBCFLAGS_FOR_C): Replace
2155         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
2156         (gnatlib-shared-default, gnatlib-shared-dual-win32)
2157         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
2158         (gnatlib-sjlj, gnatlib-zcx): Likewise.
2159
2160 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
2161
2162         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
2163
2164         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
2165
2166         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
2167
2168 2011-08-05  Nicolas Roche  <roche@adacore.com>
2169
2170         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
2171         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
2172         canadian cross.
2173         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
2174
2175 2011-08-05  Matthew Heaney  <heaney@adacore.com>
2176
2177         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
2178         subprogram bodies declared out-of-order.
2179
2180 2011-08-05  Yannick Moy  <moy@adacore.com>
2181
2182         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
2183         entities directly in package Standard, otherwise skip the standard
2184         prefix.
2185
2186 2011-08-05  Robert Dewar  <dewar@adacore.com>
2187
2188         * a-cbmutr.adb: Minor reformatting
2189         (Allocate_Node): refactor node allocation algorithm
2190
2191 2011-08-05  Robert Dewar  <dewar@adacore.com>
2192
2193         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
2194         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
2195         mode.
2196         (Analyze_Pragma, case Check_Policy): Ditto.
2197         * sem_prag.ads (Check_Disabled): New function
2198         * snames.ads-tmpl: Add Name_Disable.
2199
2200 2011-08-05  Robert Dewar  <dewar@adacore.com>
2201
2202         * gnat_rm.texi: Document implementation-defined policy DISABLE for
2203         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
2204
2205 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2206
2207         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
2208         that appears in a generic formal part and applies to a formal
2209         subprogram.
2210
2211 2011-08-05  Robert Dewar  <dewar@adacore.com>
2212
2213         * a-cbmutr.ads: Minor reformatting.
2214
2215 2011-08-05  Matthew Heaney  <heaney@adacore.com>
2216
2217         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
2218         to check count, check sign of value instead.
2219         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
2220         (Copy_Subtree): allocate copy of source element
2221         (Equal_Subtree): compare elements, not access objects
2222
2223 2011-08-05  Vincent Celier  <celier@adacore.com>
2224
2225         * gnat_ugn.texi: Fix VMS alternative.
2226
2227 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2228
2229         * sem_ch11.adb: Add comment.
2230
2231 2011-08-05  Robert Dewar  <dewar@adacore.com>
2232
2233         * exp_util.adb: Minor comment fix.
2234
2235 2011-08-05  Robert Dewar  <dewar@adacore.com>
2236
2237         * scng.adb (Error_Unterminated_String): Improve flag position when
2238         comma present.
2239
2240 2011-08-05  Matthew Heaney  <heaney@adacore.com>
2241
2242         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
2243         tree containers).
2244         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
2245         multiway tree containers.
2246
2247 2011-08-05  Robert Dewar  <dewar@adacore.com>
2248
2249         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
2250         * stylesw.adb: Implement -gnatyC to control comment spacing
2251         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
2252         -gnatyc/C).
2253         * usage.adb: Add line for -gnatyC.
2254
2255 2011-08-05  Robert Dewar  <dewar@adacore.com>
2256
2257         * gnat_ugn.texi: Document -gnatyC.
2258         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
2259         synonym for COMMENTS2).
2260
2261 2011-08-05  Robert Dewar  <dewar@adacore.com>
2262
2263         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
2264         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
2265         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
2266         a-comutr.ads, lib-xref.adb: Minor reformatting.
2267
2268 2011-08-05  Robert Dewar  <dewar@adacore.com>
2269
2270         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
2271         warning if there is an exception handler present.
2272
2273 2011-08-05  Pascal Obry  <obry@adacore.com>
2274
2275         * a-iteint.ads: Fix copyright year.
2276
2277 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2278
2279         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
2280         statement SCO for a USE clause or a representation clause.
2281
2282 2011-08-05  Yannick Moy  <moy@adacore.com>
2283
2284         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
2285         between body and spec for stub.
2286         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
2287         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
2288         pragma precondition or postcondition, for which the enclosing
2289         subprogram or package in the AST is not the desired one, return empty.
2290
2291 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2292
2293         * g-expect.adb: Minor reformatting.
2294
2295 2011-08-05  Bob Duff  <duff@adacore.com>
2296
2297         * a-fihema.adb: Comment out OS_Lib.
2298
2299 2011-08-05  Matthew Heaney  <heaney@adacore.com>
2300
2301         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
2302         (unbounded multiway tree containers) and a-iteint.ads.
2303         * a-comutr.ads, a-comutr.adb:
2304         This is the new Ada 2012 unit for unbounded multiway tree containers
2305         * a-cimutr.ads, a-cimutr.adb
2306         This is the new Ada 2012 unit for indefinite multiway tree containers
2307         * a-iteint.ads: New file.
2308
2309 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2310
2311         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
2312
2313 2011-08-05  Bob Duff  <duff@adacore.com>
2314
2315         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
2316         subpools.
2317         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
2318
2319 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2320
2321         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
2322         general indexing aspects of Ada2012. Called when analyzing indexed
2323         components when other interpretations fail.
2324         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
2325         in an expression context where overloading is meaningful. This excludes
2326         the occurrence in an aspect specification (efficiency only).
2327         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
2328         related to iterators can be set by an attribute specification, but
2329         cannot be queried.
2330         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
2331         Constant_Indexing and Variable_Indexing.
2332         (Check_Indexing_Functions): New procedure to perform legality checks.
2333         Additional semantic checks at end of declarations.
2334
2335 2011-08-05  Sergey Rybin  <rybin@adacore.com>
2336
2337         * tree_io.ads: Update ASIS_Version_Number because of the change of the
2338         order of calling Tree_Write/Tree_Read routines made for aspects.
2339
2340 2011-08-05  Bob Duff  <duff@adacore.com>
2341
2342         * a-fihema.adb (Finalize): Fix race condition.
2343
2344 2011-08-05  Yannick Moy  <moy@adacore.com>
2345
2346         * sem_ch12.adb (Analyze_Package_Instantiation,
2347         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
2348         mode.
2349
2350 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2351
2352         * sem_type.adb (Specific_Type): in an instance, the type-specific
2353         operand of an equality check that involves null may have a private
2354         type. Use full view to determine legality of construct.
2355
2356 2011-08-05  Vincent Celier  <celier@adacore.com>
2357
2358         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2359         delete or close the file when the call to gnatmake was successful.
2360
2361 2011-08-05  Yannick Moy  <moy@adacore.com>
2362
2363         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
2364         Global_Discard_Names.
2365
2366 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2367
2368         * sinfo.ads: comments on use of entity field for aspect specifications.
2369
2370 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2371
2372         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
2373         node is not itself an entity but a selected component, it is a
2374         rewritten parameterless call to an en enclosing synchronized operation,
2375         and this expansion will be performed again in the instance, so there is
2376         no global information to preserve.
2377
2378 2011-08-05  Javier Miranda  <miranda@adacore.com>
2379
2380         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
2381         for renamings of predefined primitives.
2382         (In_Predef_Prims_DT): New subprogram.
2383
2384 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2385
2386         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
2387         possible interpretation of name is a reference type, add an
2388         interpretation that is the designated type of the reference
2389         discriminant of that type.
2390         * sem_res.adb (resolve): If the interpretation imposed by context is an
2391         implicit dereference, rewrite the node as the deference of the
2392         reference discriminant.
2393         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
2394         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
2395         parent type or base type.
2396         * sem_ch4.adb (Process_Indexed_Component,
2397         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
2398         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
2399         Check for implicit dereference.
2400         (List_Operand_Interps): Indicate when an implicit dereference is
2401         ambiguous.
2402         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
2403
2404 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2405
2406         * scos.ads: Update documentation of SCO table. Pragma statements can now
2407         be marked as disabled (using 'p' instead of 'P' as the statement kind).
2408         * par_sco.ads, par_sco.adb: Implement the above change.
2409         (Process_Decisions_Defer): Generate a P decision for the first parameter
2410         of a dyadic pragma Debug.
2411         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
2412         necessary.
2413         * put_scos.adb: Code simplification based on above change.
2414
2415 2011-08-05  Robert Dewar  <dewar@adacore.com>
2416
2417         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
2418         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
2419         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
2420         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
2421
2422 2011-08-05  Bob Duff  <duff@adacore.com>
2423
2424         * a-stunau.ads, g-spipat.adb: Update comments.
2425
2426 2011-08-05  Bob Duff  <duff@adacore.com>
2427
2428         * a-fihema.ads: Minor comment fix.
2429         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
2430         correct.
2431         (Attach, Detach): Remove some unnecessary code.
2432         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
2433
2434 2011-08-05  Bob Duff  <duff@adacore.com>
2435
2436         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
2437         allocation for Objects component. This simplifies the code somewhat. It
2438         is also a little more efficient in the not-so-unusual case where there
2439         are no controlled objects allocated.
2440         Make Finalization_Started flag atomic.
2441         (Finalize): Avoid unnecessary detachment of items from the list.
2442         (pcol): Minor cleanup.
2443
2444 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2445
2446         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
2447         package whose name is the same as that of the generic unit, or its
2448         ultimate prefix.
2449
2450 2011-08-05  Bob Duff  <duff@adacore.com>
2451
2452         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
2453         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
2454         Minor comment fixes.
2455
2456 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
2457
2458         * make.adb (Linking_Phase): No longer need to set source search path
2459         before calling gnatlink in CodePeer mode.
2460         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
2461         gcc in CodePeer mode, since the binder generated file no longer has a
2462         'with Main'.
2463         * switch.ads, switch.adb (Is_Language_Switch): Removed.
2464         * switch-c.adb: Update comment.
2465
2466 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2467
2468         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
2469
2470 2011-08-05  Nicolas Roche  <roche@adacore.com>
2471
2472         * gnat_ugn.texi: Fix minor syntax error issue.
2473
2474 2011-08-05  Vincent Celier  <celier@adacore.com>
2475
2476         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2477         delete or close the file when the call to gnatmake returns a non
2478         successful return code.
2479
2480 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2481
2482         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
2483         check, indicate that the copy of the original node does not come from
2484         source, to prevent an infinite recursion of the expansion.
2485
2486 2011-08-05  Johannes Kanig  <kanig@adacore.com>
2487
2488         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
2489         VC generation for subprogram bodies.
2490
2491 2011-08-05  Yannick Moy  <moy@adacore.com>
2492
2493         * einfo.ads: Typo.
2494         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
2495         the base type with the smallest allowed base type.
2496
2497 2011-08-05  Sergey Rybin  <rybin@adacore.com>
2498
2499         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
2500         aspects.
2501
2502 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2503
2504         * sem_ch12.ads: minor comment updates.
2505
2506 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2507
2508         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
2509         instantiation and a formal package the compiler generates a package
2510         renaming declaration so that the generic name within the declaration
2511         is interpreted as a renaming of the instance. At the end of a formal
2512         package declaration, this renaming must become invisible.
2513
2514 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2515
2516         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
2517         comparison and rely on concrete entities instead.
2518
2519 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2520
2521         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
2522         and discriminants, to indicate that the type has an access discriminant
2523         that supports implicit dereference.
2524         * snames.ads-tmpl: Add names of aspects and attributes related to
2525         Ada2012 iterators: constant_indexing, default_iterator,
2526         iterator_element, implicit_dereference, variable_indexing.
2527         * aspects.ads, aspects.adb: entries for iterator-related aspects.
2528         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
2529         iterator-related aspects.
2530         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
2531
2532 2011-08-05  Sergey Rybin  <rybin@adacore.com>
2533
2534         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
2535         metrics in gnatmetric to cover new kinds of coupling mentrics.
2536
2537 2011-08-05  Steve Baird  <baird@adacore.com>
2538
2539         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2540         of calling the user-defined main subprogram.
2541         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
2542         is set) Call_Main_Subprogram ahead of, as opposed to
2543         inside of, Main.
2544         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
2545         generation of a "with" of the user-defined main subprogram.
2546         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
2547         (which is now called from Gen_Main instead).
2548
2549 2011-08-05  Emmanuel Briot  <briot@adacore.com>
2550
2551         * projects.texi: Added reference to the Makefile package.
2552
2553 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2554
2555         * exp_ch7.adb: Minor comment rewording.
2556
2557 2011-08-05  Ed Falis  <falis@adacore.com>
2558
2559         * env.c: Fix comment.
2560
2561 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2562
2563         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
2564         character comparison and rely on concrete entities instead.
2565
2566 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2567
2568         * sem_ch3.adb: (Check_Private_Overriding): better error message,
2569         suggested by AI95-0068.
2570
2571 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2572
2573         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
2574         the two potential initialization calls. This accounts for any
2575         access-before-elaboration checks which may precede the initialization
2576         calls.
2577         (Next_Suitable_Statement): New routine. Returns the next real statement
2578         after the input node while skipping generated checks.
2579         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
2580         with comment on usage.
2581         Do not generate Elaborate_All when the trigger is a finalization call
2582         coming from a type init proc.
2583         (Check_Elab_Call): Propagate the initialization procedure context to
2584         subsequent calls to Check_A_Call.
2585         (Check_Internal_Call_Continue): Propagate the initialization procedure
2586         context to subsequent calls to Check_Elab_Call.
2587         (Is_Finalization_Procedure): New routine. Returns True if the input
2588         entity denotes a [Deep_]Finalize routine.
2589         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
2590         along with comment on usage.
2591
2592 2011-08-05  Vadim Godunko  <godunko@adacore.com>
2593
2594         * s-atocou.ads: Add list of supported platforms.
2595
2596 2011-08-05  Yannick Moy  <moy@adacore.com>
2597
2598         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
2599
2600         * opt.ads (Disable_ALI_File): new Boolean flag
2601         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
2602
2603 2011-08-05  Ed Falis  <falis@adacore.com>
2604
2605         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
2606         environ is properly defined.
2607
2608 2011-08-05  Vincent Celier  <celier@adacore.com>
2609
2610         * make.adb (Compilation_Phase): Exit immediately when all objects have
2611         been found up to date, to avoid multiple exit messages.
2612         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
2613         same project for languages with no compiler.
2614         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
2615         -eI.
2616 2011-08-05  Robert Dewar  <dewar@adacore.com>
2617
2618         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
2619         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
2620         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
2621         s-atocou-builtin.adb: Minor reformatting.
2622
2623 2011-08-05  Yannick Moy  <moy@adacore.com>
2624
2625         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
2626         if the node to wrap is a pragma check, this node and enclosed
2627         expression are not expanded, so do not apply any transformations here.
2628         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
2629         introducing transient scopes.
2630
2631 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
2632
2633         * adaint.c (__gnat_set_writable, __gnat_set_readable,
2634         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
2635         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
2636         routine is available, so we use the default implementation of these
2637         functions.
2638         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
2639         support for copying attributes on VxWorks 6.
2640
2641 2011-08-05  Yannick Moy  <moy@adacore.com>
2642
2643         * debug.adb: Remove use of -gnatd.D.
2644         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
2645         * opt.ads: Simplify variables for ALFA mode, to keep one only
2646         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
2647         to ALFA mode.
2648
2649 2011-08-05  Vincent Celier  <celier@adacore.com>
2650
2651         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
2652         Builder'Default_Switches.
2653
2654 2011-08-05  Vincent Celier  <celier@adacore.com>
2655
2656         * makeusg.adb: Add lines for --create-map-file switches.
2657
2658 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2659
2660         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
2661         profile is incomplete and the full view is available, replace it with
2662         the full view.
2663         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
2664         incomplete, freezing the subprogram is delayed until the full view is
2665         frozen.
2666         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
2667         fixed-point multiplication operator and the predefined operator is
2668         resolved in favor of the user-defined one.
2669
2670 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2671
2672         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
2673         CONST_CAST.
2674
2675 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2676
2677         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
2678         whether a type lacks user-defined Read or Write operations, or has a
2679         component that lacks them.
2680         * sem_attr.adb (Check_Stream_Attribute): if restriction
2681         No_Default_Stream_Attributes is active, verify that all subcomponent
2682         types of the target have user-defined stream operations, and report
2683         error otherwise.
2684         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
2685         * exp_strm.adb: Build_Elementary_Input_Call,
2686         Build_Elementary_Write_Call): remove checks for restriction
2687         No_Default_Stream_Attributes, now checked in semantics.
2688
2689 2011-08-04  Vincent Celier  <celier@adacore.com>
2690
2691         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
2692         switches on the command line, look for all valid --RTS switches in the
2693         Builder switches and for each language use the first runtime name found
2694         to invoke gprconfig.
2695         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
2696         command line and there is no auto-configuration.
2697         (Runtime_Name_Set_For): New function.
2698
2699 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2700
2701         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
2702         elaborate initialization expression for variable Abort when processing
2703         a package body or a declaration.
2704         (Create_Finalizer): Propagate the package context when creating the
2705         exception-related variables.
2706         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
2707         For_Package along with usage comment.
2708
2709 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2710
2711         * gcc-interface/Makefile.in: Clean up targets.
2712         Enable new package for atomic counters and copy-on-write implementation
2713         of unbounded strings on x86 platforms.
2714         * gcc-interface/Make-lang.in: Update dependencies.
2715
2716 2011-08-04  Robert Dewar  <dewar@adacore.com>
2717
2718         * exp_ch7.adb: Minor reformatting.
2719
2720 2011-08-04  Robert Dewar  <dewar@adacore.com>
2721
2722         * exp_strm.adb: Minor reformatting.
2723
2724 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2725
2726         * s-atocou.adb: Replace by dummy version and use on targets where atomic
2727         operations are not supported.
2728         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
2729         * s-atocou-x86.adb: New file.
2730         * Makefile.rtl: Add s-atocou.o file
2731
2732 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2733
2734         * make.adb (Compile): Move setting of CodePeer_Mode to ...
2735         (Compilation_Phase): ... here.
2736         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
2737
2738 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2739
2740         * Make-generated.in: Fix minor typo in comment.
2741
2742 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2743
2744         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
2745         the project path.
2746
2747 2011-08-04  Robert Dewar  <dewar@adacore.com>
2748
2749         * a-coinho.adb: Minor reformatting.
2750
2751 2011-08-04  Robert Dewar  <dewar@adacore.com>
2752
2753         * a-coinho.ads: Minor reformatting.
2754
2755 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2756
2757         * s-atocou.ads, s-atocou.adb: New files.
2758         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
2759         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
2760         direct use of GCC's atomic builtins and replace them by use of new
2761         atomic counter package.
2762
2763 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2764
2765         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
2766
2767 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2768
2769         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
2770         with a call to Get_External_Tag.
2771         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
2772         subprogram usage. Remove the guard against package declarations and
2773         bodies since Build_Cleanup_Statements is no longer invoked in that
2774         context.
2775         (Build_Components): Initialize Tagged_Type_Stmts when the context
2776         contains at least one library-level tagged type.
2777         (Build_Finalizer): New local variables Has_Tagged_Types and
2778         Tagged_Type_Stmts along with associated comments on usage. Update the
2779         logic to include tagged type processing.
2780         (Create_Finalizer): Insert all library-level tagged type unregistration
2781         code before the jump block circuitry.
2782         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
2783         (Expand_N_Package_Declaration): Remove the call to
2784         Build_Cleanup_Statements.
2785         (Process_Tagged_Type_Declaration): New routine. Generate a call to
2786         unregister the external tag of a tagged type.
2787         (Processing_Actions): Reimplemented to handle tagged types.
2788         (Process_Declarations): Detect the declaration of a library-level
2789         tagged type and carry out the appropriate actions.
2790         (Unregister_Tagged_Types): Removed. The machinery has been directly
2791         merged with Build_Finalizer.
2792
2793 2011-08-04  Robert Dewar  <dewar@adacore.com>
2794
2795         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
2796         gnatls.adb, exp_ch3.adb: Minor reformatting.
2797
2798 2011-08-04  Marc Sango  <sango@adacore.com>
2799
2800         * sem_attr.adb (Analyze_Attribute): Replace the message
2801         "invisible attribute of}" of the spark restriction violation in
2802         attribute reference by the simple message "invisible attribute of type".
2803         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
2804         two insertion characters: '&' and '}'.
2805
2806 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2807
2808         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
2809         * a-coinho.ads, a-coinho.adb: New file.
2810         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
2811
2812 2011-08-04  Nicolas Roche  <roche@adacore.com>
2813
2814         * alfa_test.adb: Not all ali files are containing alfa information even
2815         if compiled with -gnatd.F. So suppress warning about missing ALFA
2816         information.
2817
2818 2011-08-04  Yannick Moy  <moy@adacore.com>
2819
2820         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
2821         scope.
2822         * put_alfa.adb: Check that scope name is not empty.
2823
2824 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2825
2826         * exp_ch3.adb (Stream_Operation_Ok): new predicate
2827         Needs_Elementary_Stream_Operation, to determine whether user-defined
2828         Read and Write attributes are available for the elementary components
2829         of the given type. If only the predefined attributes are available,
2830         then when restriction No_Default_Stream_Attributes is active the
2831         predefined stream attributes for the composite type cannot be created.
2832
2833 2011-08-04  Robert Dewar  <dewar@adacore.com>
2834
2835         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
2836         Put routines in alpha order
2837
2838 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
2839
2840         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
2841         * gcc-interface/Make-lang.in: Update dependencies.
2842
2843 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2844
2845         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
2846         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
2847         gnat1why).
2848
2849 2011-08-04  Robert Dewar  <dewar@adacore.com>
2850
2851         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
2852         lib-xref-alfa.adb: Minor reformatting.
2853
2854 2011-08-04  Marc Sango  <sango@adacore.com>
2855
2856         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
2857         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
2858         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
2859         mode.
2860
2861 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2862
2863         * bindgen.adb (Gen_Adainit_C): Remove.
2864         (Gen_Adafinal_C): Ditto.
2865         (Gen_Elab_Externals_C): Ditto.
2866         (Gen_Elab_Calls_C): Ditto.
2867         (Gen_Elab_Order_C): Ditto.
2868         (Gen_Elab_Defs_C): Ditto.
2869         (Gen_Finalize_Library_C): Ditto.
2870         (Gen_Finalize_Library_Defs_C): Ditto.
2871         (Gen_Main_C): Ditto.
2872         (Gen_Output_File_C): Ditto.
2873         (Gen_Restrictions_C): Ditto.
2874         (Gen_Versions_C): Ditto.
2875         (Write_Info_Ada_C): Ditto.
2876         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
2877         (Gen_Output_File): Do not force Ada_Bind_File anymore.
2878         Always call Gen_Output_File_Ada.
2879         * gnatlink.adb (Begin_Info): Now a constant.
2880         (End_Info): Ditto.
2881         (Ada_Bind_File): Remove
2882         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
2883         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
2884         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
2885         * opt.ads (Ada_Bind_File): Remove.
2886
2887 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2888
2889         * projects.texi: Document target-specific directory in default project
2890         path for gnatmake.
2891
2892 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2893
2894         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
2895         path in all cases .
2896
2897 2011-08-04  Yannick Moy  <moy@adacore.com>
2898
2899         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
2900         opt.ads, lib-xref.ads: Code clean up.
2901
2902 2011-08-04  Yannick Moy  <moy@adacore.com>
2903
2904         * gnat_rm.texi: Update description of Test_Case
2905         * gnat_ugn.texi: Typo.
2906
2907 2011-08-04  Ed Falis  <falis@adacore.com>
2908
2909         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
2910
2911 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2912
2913         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
2914         it is of type Root_Controlled. This action eliminates fields Prev and
2915         Next from type equality.
2916
2917 2011-08-04  Yannick Moy  <moy@adacore.com>
2918
2919         * lib-xref-alfa.adb: Correct typo.
2920
2921 2011-08-04  Matthew Heaney  <heaney@adacore.com>
2922
2923         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
2924         component.
2925
2926 2011-08-04  Yannick Moy  <moy@adacore.com>
2927
2928         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
2929         (Analyze_Pragma): allow static string expression for name of Test_Case,
2930         instead of simply string literals.
2931         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
2932         expressions.
2933
2934 2011-08-04  Vincent Celier  <celier@adacore.com>
2935
2936         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
2937         case suffixes to find truncated main sources.
2938
2939 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2940
2941         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
2942         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
2943         (Compute_Current_Task): Ditto.
2944
2945 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2946
2947         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
2948
2949 2011-08-04  Yannick Moy  <moy@adacore.com>
2950
2951         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
2952         library-level constant.
2953         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
2954         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
2955         used as selector of parameter association, in ALFA mode.
2956
2957 2011-08-04  Robert Dewar  <dewar@adacore.com>
2958
2959         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
2960         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
2961         reformatting.
2962
2963 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2964
2965         * make.adb (Linking_Phase): Set source search path before calling
2966         gnatlink in CodePeer mode.
2967
2968 2011-08-04  Javier Miranda  <miranda@adacore.com>
2969
2970         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
2971         Remove code which takes care of building TSDs.
2972         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
2973         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
2974         the accessibility check in VM targets.
2975         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
2976         (Building_Static_DT): Now returns false for VM targets.
2977         (Build_VM_TSDs): Removed.
2978         (Expand_Interface_Conversion): Generate missing runtime check for
2979         conversions to interface types whose target type is unknown at compile
2980         time.
2981         (Make_VM_TSD): Add missing code to disable the generation of calls to
2982         Check_TSD if the tagged type is not defined at library level, or not
2983         has a representation clause specifying its external tag, or -gnatdQ is
2984         active.
2985         * exp_disp.ads (Build_VM_TSDs): Removed.
2986         (Make_VM_TSDs): Spec relocated from exp_disp.adb
2987         * sem_disp.adb (Check_Dispatching_Operation): No code required to
2988         register primitives in the dispatch tables in VM targets.
2989         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
2990         initialization of class-wide interface objects in VM targets.
2991         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
2992         of Make_DT).
2993
2994 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2995
2996         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
2997         when dotnet-ld cannot be found.
2998
2999 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3000
3001         * bindgen.adb: Simplify significantly generation of binder body file in
3002         CodePeer mode.
3003         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
3004         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
3005         not expanded).
3006
3007 2011-08-04  Yannick Moy  <moy@adacore.com>
3008
3009         * sem_prag.adb, sem.ads: Code cleanup.
3010
3011 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3012
3013         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
3014         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
3015         results if possible.
3016         * s-stusta.adb (Print): Adjust after changes in s-stausa.
3017         * gnat_ugn.texi: Update dynamic stack usage section.
3018
3019 2011-08-04  Steve Baird  <baird@adacore.com>
3020
3021         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
3022         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
3023         contains only a call to the user-defined main subprogram.
3024         (Gen_Main_Ada) - If CodePeer_Mode is set, then
3025         call the "wrapper" subprogram instead of directly
3026         calling the user-defined main subprogram.
3027
3028 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3029
3030         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
3031         alternatives of a case statement for controlled objects. Rename local
3032         variable A to Dead_Alt.
3033         (Expand_N_If_Statement): Check the then and else statements of an if
3034         statement for controlled objects. Check the then statements of all
3035         elsif parts of an if statement for controlled objects.
3036         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
3037         objects.
3038         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
3039         detects a loop associated with the expansion of an array object.
3040         Augment the processing of the loop statements to account for a possible
3041         wrap done by Process_Statements_For_Controlled_Objects.
3042         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
3043         statements and abortable part of an asynchronous select for controlled
3044         objects.
3045         (Expand_N_Conditional_Entry_Call): Check the else statements of a
3046         conditional entry call for controlled objects.
3047         (Expand_N_Selective_Accept): Check the alternatives of a selective
3048         accept for controlled objects.
3049         (Expand_N_Timed_Entry_Call): Check the entry call and delay
3050         alternatives of a timed entry call for controlled objects.
3051         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
3052         exception handler for controlled objects.
3053         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3054         Add formal parameter Nested_Constructs along with its associated
3055         comment.
3056         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
3057         Requires_Cleanup_Actions.
3058         (Process_Statements_For_Controlled_Objects): New routine.
3059         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
3060         routine. Inspect a node which contains a non-handled sequence of
3061         statements for controlled objects. If such an object is found, the
3062         statements are wrapped in a block.
3063
3064 2011-08-04  Bob Duff  <duff@adacore.com>
3065
3066         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
3067         need to compare with Class_Wide_Type (T2), in order to get at the
3068         original class-wide type node.
3069         * sem_type.ads (Covers): Improve the comment.
3070         * einfo.ads (Class_Wide_Type): Improve the comment.
3071         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
3072         the type of the Deref.
3073
3074 2011-08-04  Yannick Moy  <moy@adacore.com>
3075
3076         * gnat_rm.texi: Document that Test_Case pragma can only appear on
3077         separate declarations.
3078         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
3079         check identifier of pragma argument.
3080         (Chain_TC): check that no other test case associated to the same entity
3081         share the same name.
3082         (Check_Test_Case): disallow test case inside subprogram body
3083         (Analyze_Pragma): correct call to check identifier and not argument
3084         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
3085         function gets name from test case pragma.
3086
3087 2011-08-04  Yannick Moy  <moy@adacore.com>
3088
3089         * gnat_rm.texi: Document new pragma and aspect.
3090         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
3091         (No_Duplicates_Allowed): new constant array defining whether duplicates
3092         aspects of each kind can appear on the same declaration.
3093         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
3094         field, which points to a node holding the previous Spec_PPC_List.
3095         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
3096         through the indirection with Contract.
3097         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
3098         * par-prag.adb (Prag): do nothing on Test_Case pragma
3099         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
3100         be called directly.
3101         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
3102         component Ensures of Test_Case.
3103         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
3104         (Analyze_Generic_Subprogram_Declaration,
3105         Analyze_Subprogram_Instantiation,
3106         Analyze_Abstract_Subprogram_Declaration,
3107         Analyze_Subprogram_Body_Helper,
3108         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
3109         insert contract in subprogram node at point of definition
3110         * sem_ch13.adb
3111         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
3112         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
3113         corresponding pragma
3114         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
3115         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
3116         similar to the analysis of pre/post
3117         (Derive_Subprogram): insert contract in subprogram node at point of
3118         derivation.
3119         * sem_prag.adb, sem_prag.ads
3120         (Check_Arg_Is_String_Literal, Check_Identifier):
3121         new checking procedures to be called in treatment of pragmas
3122         (Check_Test_Case): new procedure to check that a Test_Case aspect or
3123         pragma is well-formed. This does not check currently that 'Result is
3124         used only in the Ensures component of a Test_Case.
3125         (Analyze_Pragma): add case for Test_Case
3126         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
3127         components of a Test_Case.
3128         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
3129         expressions in the 3rd (and 4th if present) arguments of a Test_Case
3130         pragma, treated as spec expressions.
3131         (Sig_Flags): add value -1 for Test_Case.
3132         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
3133         Get_Requires_From_Test_Case_Pragma): getters for both expression
3134         components of a Test_Case.
3135         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
3136         indirection between an entry or [generic] subprogram entity and its
3137         pre/post + test-cases.
3138         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
3139         get/set for fields of an N_Contract node.
3140         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
3141         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
3142         names and pragma for Test_Case.
3143         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
3144
3145 2011-08-04  Vincent Celier  <celier@adacore.com>
3146
3147         * gnat_ugn.texi: Improve documentation of gnatmake switch
3148         --source-info-file=.
3149
3150 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3151
3152         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
3153         type). Initialize Atyp to the appropriate type which is later checked
3154         for completion. Rewrite the assertion associated with private type
3155         completion.
3156
3157 2011-08-04  Ed Falis  <falis@adacore.com>
3158
3159         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
3160         initialize the number of CPUs.
3161
3162 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3163
3164         * sem_type.adb (Disambiguate): New subsidiary routine
3165         In_Same_Declaration_List, to implement AI05-0020: a user-defined
3166         equality on an anonymous access type whose designated type is private
3167         does not lead to an ambiguity with the universal access equality
3168         operator in the body or child units of the defining package. The same
3169         is true for a multiplication operator on a private type completed with
3170         a fixed-point-type.
3171
3172 2011-08-04  Javier Miranda  <miranda@adacore.com>
3173
3174         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
3175         (Normalize_Scalars_Config): Removed.
3176         * opt.adb
3177         (Register_Opt_Config_Switches): Remove registering config values of
3178         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
3179         (Restore_Opt_Config_Switches): Remove code which restores the values of
3180         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3181         Init_Or_Norm_Scalars.
3182         (Save_Opt_Config_Switches): Remove code which saves values of
3183         Init_Or_Norm_Scalars and Normalize_Scalars.
3184         (Set_Opt_Config_Switches): Remove code which restores config values of
3185         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3186         Init_Or_Norm_Scalars.
3187
3188 2011-08-04  Yannick Moy  <moy@adacore.com>
3189
3190         * frontend.adb (Frontend): remove previous patch to avoid full
3191         qualification in ALFA mode.
3192         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
3193         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
3194         unique name for an entity, which could be used to identify the entity
3195         across compilation units.
3196
3197 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3198
3199         * prj-env.adb
3200         (Initialize_Default_Project_Path): Add target specific directory
3201         ($prefix/$target/lib/gnat) in front of project path in all cases
3202         (making gnatmake's behaviour consistent with gprbuild).
3203         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
3204         Pass target name from Sdefault to project subsystem.
3205         * gnatls.adb: Show new target specific default project directory.
3206
3207 2011-08-04  Johannes Kanig  <kanig@adacore.com>
3208
3209         * cstand.adb: Add Information to Identifier in Standard
3210         (Identifer_For): Set Entity to the corresponding entity
3211
3212 2011-08-04  Sergey Rybin  <rybin@adacore.com>
3213
3214         * gnat_ugn.texi: Update doc on gnatcheck.
3215
3216 2011-08-04  Yannick Moy  <moy@adacore.com>
3217
3218         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
3219         xrefs in a scope.
3220
3221 2011-08-04  Yannick Moy  <moy@adacore.com>
3222
3223         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
3224         performing expansion.
3225         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
3226         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
3227         it is not called in ALFA mode.
3228
3229 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3230
3231         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
3232         after all, so removed.
3233
3234 2011-08-04  Sergey Rybin  <rybin@adacore.com>
3235
3236         * vms_data.ads: Add missing VMS qualifiers.
3237
3238 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3239
3240         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
3241         the list of files on the command line after processing it through
3242         Complete_Mains.
3243
3244 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3245
3246         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
3247         processing for .NET/JVM. These targets can now benefit from
3248         Raise_From_Controlled_Operation and they share the same processing with
3249         standard targets.
3250         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
3251         These targets need transient scopes in order to properly finalize short
3252         lived controlled objects.
3253         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
3254          NET/JVM. These targets can now benefit from
3255         Raise_From_Controlled_Operation and they share the same processing with
3256         standard targets.
3257
3258 2011-08-04  Geert Bosch  <bosch@adacore.com>
3259
3260         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
3261
3262 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3263
3264         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
3265         Expand_Record_Aggregate, to determine whether aggregate must be
3266         expanded into assignments. This is the case if the ancestor part is
3267         private, regarless of the setting of the flag Has_Private_Ancestor.
3268
3269 2011-08-04  Ed Falis  <falis@adacore.com>
3270
3271         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
3272
3273 2011-08-04  Bob Duff  <duff@adacore.com>
3274
3275         * sinfo.ads: Fix comment.
3276
3277 2011-08-04  Steve Baird  <baird@adacore.com>
3278
3279         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
3280         choose a package name in much the same way as is
3281         done for JGNAT when VM_Target /= No_VM, except that
3282         a slightly more distinctive prefix string is used.
3283
3284 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3285
3286         * makeutl.adb (Complete_Mains): no longer accept unit names on the
3287         gnatmake command line.
3288         This behavior was never documented (and was supported only because of
3289         an early bug in the code). This case might lead to ambiguous cases
3290         (between unit names and truncated base names without suffixes).
3291
3292 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3293
3294         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
3295         Remove the external tag of a tagged type from the internal hash table.
3296         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
3297         expanded usage of the routine. Strenghten the check for Is_Master. Add
3298         processing for tagged types.
3299         (Build_Finalizer): Create all the necessary lists used in finalizer
3300         creation when the processed context is a package that may contain
3301         tagged types.
3302         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
3303         Requires_Cleanup_Actions.
3304         (Expand_N_Package_Body): Package bodies may need clean up code
3305         depending on whether they contain tagged types.
3306         (Expand_N_Package_Declaration): Package declarations may need clean up
3307         code depending on whether they contain tagged types.
3308         (Unregister_Tagged_Types): New routine. Search through a list of
3309         declarations or statements, looking for non-abstract Ada tagged types.
3310         For each such type, generate code to unregister the external tag.
3311         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
3312         Requires_Cleanup_Actions.
3313         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
3314         through a list of declarations or statements looking for non-abstract
3315         Ada tagged types or controlled objects.
3316         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
3317         Requires_Cleanup_Actions.
3318         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
3319         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
3320         RE_Unit_Table.
3321
3322 2011-08-04  Vincent Celier  <celier@adacore.com>
3323
3324         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
3325         has Ada sources, not project Project, because if the root project
3326         Project has no sources of its own, all projects will be deemed without
3327         sources.
3328
3329 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3330
3331         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
3332         of the No_Param_Proc acc-to-subp type used for initialization of
3333         __gnat_finalize_library_objects so that it's declared at library level
3334         rather than nested inside of the adainit routine.
3335
3336 2011-08-04  Javier Miranda  <miranda@adacore.com>
3337
3338         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
3339         if the tagged type has a representation clause which specifies its
3340         external tag.
3341
3342 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3343
3344         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
3345         Remove previous procedure with that name.
3346         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
3347         when appropriate.
3348         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
3349         subtype mark, the ancestor cannot have unknown discriminants.
3350         (Resolve_Record_Aggregate): if the type has invisible components
3351         because of a private ancestor, the aggregate is illegal.
3352
3353 2011-08-04  Vincent Celier  <celier@adacore.com>
3354
3355         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
3356         account switches -gnat2005, -gnat12 and -gnat2012.
3357
3358 2011-08-04  Bob Duff  <duff@adacore.com>
3359
3360         * s-tasdeb.ads: Minor comment fix.
3361
3362 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3363
3364         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
3365         CodePeer mode.
3366         * switch.ads, switch.adb (Is_Language_Switch): New function.
3367
3368 2011-08-04  Vincent Celier  <celier@adacore.com>
3369
3370         * switch-c.adb: Minor comment addition.
3371
3372 2011-08-04  Vincent Celier  <celier@adacore.com>
3373
3374         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
3375         ending with '=' is followed by a space (missing file name).
3376
3377 2011-08-04  Pascal Obry  <obry@adacore.com>
3378
3379         * g-regist.ads: Fix size of HKEY on x86_64-windows.
3380
3381 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3382
3383         * sem_ch12.adb (Analyze_Associations): New routine
3384         Check_Overloaded_Formal_Subprogram to reject a formal package when
3385         there is a named association or a box initialisation for an overloaded
3386         formal subprogram of the corresponding generic.
3387
3388 2011-08-04  Yannick Moy  <moy@adacore.com>
3389
3390         * alfa.ads (ALFA_Xref_Record): add component for type of entity
3391         * get_alfa.adb, put_alfa.adb: Read and write new component of
3392         cross-reference.
3393         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
3394
3395 2011-08-04  Pascal Obry  <obry@adacore.com>
3396
3397         * urealp.adb: Minor reformatting.
3398
3399 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3400
3401         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
3402         Handle the case when Cleanup_Protected_Object returns Empty.
3403
3404 2011-08-04  Yannick Moy  <moy@adacore.com>
3405
3406         * frontend.adb (Frontend): only qualify names in non-ALFA mode
3407
3408 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3409
3410         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
3411         call, ignore functions.
3412
3413 2011-08-04  Geert Bosch  <bosch@adacore.com>
3414
3415         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
3416         point.
3417
3418 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3419
3420         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
3421         as an index for Builder'Switches. This conforms to the documentation.
3422         * make.adb (Insert_Project_Sources): avoid duplicate code
3423
3424 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3425
3426         * makeutl.adb (Complete_Mains): if the user has passed a relative file
3427         name on the command line (for instance "../dummy"), never assume it can
3428         be a unit name.
3429
3430 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3431
3432         * bindgen.adb: Remove code the reference or create the
3433         Break_Start/__gnat_break_start procedure.
3434         * s-stalib.adb (Break_Start): Removed.
3435
3436 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3437
3438         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
3439         shared with gprbuild.
3440
3441 2011-08-04  Yannick Moy  <moy@adacore.com>
3442
3443         * par-ch4.adb (P_Primary): preferentially issue an error message about
3444         a missing parenthesis arount a conditional or case expression in Ada
3445         2012 mode, if we detect that the alignment is not correct for a
3446         statement.
3447
3448 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3449
3450         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
3451         tag-to-class-wide conversion as needing finalization actions.
3452         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
3453         a tag-to-class-wide conversion as needing finalization actions.
3454         (Is_Finalizable_Transient): The result of a tag-to-class-wide
3455         conversion does not need finalization actions.
3456         (Is_Tag_To_CW_Conversion): New routine.
3457         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
3458         whether an object is the result of a tag-to-class-wide conversion.
3459
3460 2011-08-04  Yannick Moy  <moy@adacore.com>
3461
3462         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
3463         the left-hand-side and right-hand-side of a conjunct are inserted when
3464         translating a pre- or postcondition
3465         * sem_ch6.adb: Correct typo in comment
3466
3467 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3468
3469         * gnat_rm.texi: Ravenscar does not prohibit dependence on
3470         Unchecked_Conversion and Unchecked_Deallocation.
3471
3472 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3473
3474         * make.adb: Minor reformatting.
3475
3476 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3477
3478         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
3479         sources in the project and its imported projects, but not in the whole
3480         tree.
3481
3482 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3483
3484         * make.adb: Remove debug trace.
3485
3486 2011-08-04  Vincent Celier  <celier@adacore.com>
3487
3488         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
3489         path in canonical form, to be able to compare path names on platforms
3490         such as Windows or Darwin.
3491
3492 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3493
3494         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
3495         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
3496         * scos.ads: Update documentation accordingly.
3497         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
3498         pragmas.
3499
3500 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3501
3502         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
3503         attribute only if prefix type is scalar.
3504
3505 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3506
3507         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
3508         in gnatmake for specifying mains on the command line that do not belong
3509         to the main project. These mains must currently all belong to the same
3510         project, though.
3511         (Ultimate_Extension_Of): removed, since duplicated
3512         Ultimate_Extending_Project.
3513
3514 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3515
3516         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
3517         instead.
3518         (CodePeer_Mode_String): New.
3519         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
3520         CodePeer mode.
3521         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
3522         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
3523         mode, since no useful elaboration subprogram is needed by CodePeer.
3524         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
3525         In this mode, compile binder file with -gnatC and do stop after this
3526         step.
3527
3528 2011-08-04  Vincent Celier  <celier@adacore.com>
3529
3530         * exp_ch7.adb: Minor comment fix.
3531
3532 2011-08-04  Robert Dewar  <dewar@adacore.com>
3533
3534         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
3535         exp_ch4.adb, makeutl.adb: Minor reformatting.
3536
3537 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3538
3539         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
3540         Create several new subprograms to move code out of Make. This makes the
3541         code more readable, removes code duplication, and is a preparation work
3542         for adding support for aggregate projects.
3543
3544 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3545
3546         * s-po32gl.ads, s-po32gl.adb: New files.
3547         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
3548         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
3549         (Build_Finalization_Collection): Use it.
3550         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
3551         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
3552         literals.
3553         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
3554         * gcc-interface/Make-lang.in: Update dependencies.
3555
3556 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3557
3558         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
3559         the command line.
3560
3561 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3562
3563         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
3564         command line is not a file name, also check whether it could be a unit
3565         name.
3566
3567 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3568
3569         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
3570         the header of the finalization routine.
3571         If the unit has no finalizer but is a body whose spec has one, then
3572         generate the decrement of the elaboration entity only.
3573         If the unit has a finalizer and is a spec, then do not generate the
3574         decrement of the elaboration entity.
3575         (Gen_Finalize_Library_C): Likewise.
3576
3577 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3578
3579         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
3580         (Bounds_Size_Expression): Removed.
3581         (Double_Alignment_Of): New subsidiary routine.
3582         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
3583         for a hole in the dope vector of unconstrained arrays due to different
3584         index and element alignments.
3585
3586 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3587
3588         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
3589         raise program_error because body has not been seen yet.
3590
3591 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3592
3593         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
3594         an unresolved name.
3595
3596 2011-08-04  Vincent Celier  <celier@adacore.com>
3597
3598         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
3599
3600 2011-08-04  Yannick Moy  <moy@adacore.com>
3601
3602         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
3603         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
3604
3605 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3606
3607         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
3608         instantiation in RCI.
3609
3610 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3611
3612         * make.adb: Share more code with gprbuild
3613
3614 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3615
3616         * projects.texi: Added documentation for the IDE'Gnat project file
3617         attribute.
3618
3619 2011-08-04  Nicolas Roche  <roche@adacore.com>
3620
3621         * gnat_rm.texi: Minor editing.
3622
3623 2011-08-04  Javier Miranda  <miranda@adacore.com>
3624
3625         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
3626         and the library case for VM targets.
3627         (Gen_Adainit_Ada): Likewise.
3628
3629 2011-08-04  Robert Dewar  <dewar@adacore.com>
3630
3631         * g-altive.ads: Minor comment updates.
3632         * prj-nmsc.adb: Minor reformatting.
3633
3634 2011-08-04  Javier Miranda  <miranda@adacore.com>
3635
3636         * opt.ads
3637         (Normalize_Scalars_Config): Value of the configuration switch set by
3638         pragma Normalize_Scalars when it appears in the gnat.adc file.
3639         (Normalize_Scalars): New field for record Config_Switches_Type. Used
3640         to save and restore settings of this pragma.
3641         * opt.adb
3642         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
3643         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
3644
3645 2011-08-04  Vincent Celier  <celier@adacore.com>
3646
3647         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
3648
3649 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3650
3651         * makeutl.adb: Minor reformatting.
3652
3653 2011-08-04  Olivier Hainque  <hainque@adacore.com>
3654
3655         * g-altive.ads: Update comments to reflect that only the soft
3656         binding is available today.
3657
3658 2011-08-04  Robert Dewar  <dewar@adacore.com>
3659
3660         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
3661         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
3662         * gcc-interface/Make-lang.in: Update dependencies.
3663
3664 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3665
3666         * prj-env.adb: Remove local debug traces.
3667
3668 2011-08-04  Yannick Moy  <moy@adacore.com>
3669
3670         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
3671         was used instead of Hi_OK, which could cause a read of an uninitialized
3672         value later on. Detected while working on the new warning.
3673         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
3674         to local variable.
3675         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
3676         in more cases, in order to detect more unreferenced values.
3677         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
3678         object for expression, if any.
3679
3680 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3681
3682         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
3683         the operand types instead of the Esize.
3684
3685 2011-08-04  Steve Baird  <baird@adacore.com>
3686
3687         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
3688         enable CodePeer_Mode.
3689         * bindusg.adb (Display): Add help message describing -P binder switch.
3690         * gnat_ugn.texi: Document -P binder switch.
3691         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
3692         user-defined main program directly.
3693         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
3694         user-defined main program in the context clause of the package body.
3695
3696 2011-08-04  Yannick Moy  <moy@adacore.com>
3697
3698         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
3699         duplicate of Defining_Entity
3700         (Get_Unique_Entity_For_Decl): rename function into
3701         Unique_Defining_Entity
3702         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
3703         (Formal_Proof_On): remove synthesized flag
3704         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3705         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
3706         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
3707         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
3708         Annotate (Formal_Proof)
3709
3710 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3711
3712         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
3713         source files with non-standard naming schemes, in imported projects
3714
3715 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3716
3717         * makeutl.adb (Complete_Mains): when a multi-unit source file is
3718         specified on the gprbuild command line, we need to compile all units
3719         within that file, not just the first one we find
3720         Fix error message for mains that are not found.
3721
3722 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3723
3724         * sem_ch6.adb: Update comment.
3725         * sem_ch12.adb: Minor reformatting.
3726
3727 2011-08-04  Bob Duff  <duff@adacore.com>
3728
3729         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
3730         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
3731         race condition whose symptom is to fail to lock Parent. That, in turn,
3732         causes Parent.Awake_Count to be accessed without locking Parent, which
3733         causes another race condition whose symptom is that Parent.Awake_Count
3734         can be off by 1 (either too high or too low). The solution is to lock
3735         Parent unconditionally, and then lock Acceptor, before reading
3736         Acceptor.Terminate_Alternative.
3737
3738 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3739
3740         * debug.adb: Update comment.
3741
3742 2011-08-04  Robert Dewar  <dewar@adacore.com>
3743
3744         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
3745         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
3746         exp_ch6.adb: Minor reformatting.
3747
3748 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3749
3750         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
3751         checks for -gnateE.
3752
3753 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3754
3755         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
3756
3757 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3758
3759         * sinfo.ads: Minor reformatting.
3760
3761 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3762
3763         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
3764         even if there is no location.
3765
3766 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3767
3768         * sem_res.adb, sem_ch4.adb: move check for restriction
3769         No_Task_Hierarchy to resolve_allocator.
3770
3771 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3772
3773         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
3774         This flag of N_Pragma nodes is not used, remove it as well as all of
3775         the associated circuitry.
3776
3777 2011-08-04  Javier Miranda  <miranda@adacore.com>
3778
3779         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
3780         runtime check on duplicated externa tags
3781         * debug.adb Document switch -gnatdQ.
3782
3783 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3784
3785         * a-fihema.ads: Minor typo fix.
3786
3787 2011-08-04  Yannick Moy  <moy@adacore.com>
3788
3789         * sem_ch10.adb: Minor comment update.
3790
3791 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3792
3793         * einfo.adb: Update the node field usage to reflect the renaming of
3794         Return_Flag to Return_ Flag_Or_Transient_Decl.
3795         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
3796         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
3797         (Write_Field15_Name): Change Return_Flag to
3798         Return_Flag_Or_Transient_Decl.
3799         * einfo.ads: Rename node field Return_Flag to
3800         Return_Flag_Or_Transient_Decl. Update the associated comment and all
3801         occurrences in entities.
3802         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
3803         associated Inline pragma.
3804         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
3805         associated Inline pragma.
3806         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
3807         routine.
3808         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
3809         Return_Flag and Set_Return_Flag.
3810         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
3811         objects generated for controlled transients declared inside an
3812         Exception_With_Actions. Update the calls to Return_Flag.
3813         (Process_Object_Declaration): Add code to add a null guard for hook
3814         objects generated for controlled transients declared inside an
3815         Exception_With_Actions. Update related comment.
3816         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
3817         objects generated for controlled transients declared inside an
3818         Exception_With_Actions. Update the calls to Return_Flag.
3819         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
3820
3821 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3822
3823         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
3824         positional aggregate.
3825
3826 2011-08-04  Vincent Celier  <celier@adacore.com>
3827
3828         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
3829         SLOC only for pragmas.
3830
3831 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3832
3833         * projects.texi: Minor typo fix.
3834
3835 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3836
3837         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
3838         on case-sensitive file systems.
3839
3840 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3841
3842         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
3843         nested in a disabled pragma.
3844         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
3845         enclosing pragma, if any, for X decisions.
3846
3847 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3848
3849         * sem_prag.adb: Minor reformatting.
3850
3851 2011-08-04  Vincent Celier  <celier@adacore.com>
3852
3853         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
3854         allowed in no run time mode.
3855
3856 2011-08-04  Vincent Celier  <celier@adacore.com>
3857
3858         * make.adb (Check): When -gnatc is used, check for the source file
3859         inside the ALI file with a canonical case file name.
3860
3861 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3862
3863         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
3864         overriding the separator.
3865
3866 2011-08-04  Robert Dewar  <dewar@adacore.com>
3867
3868         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
3869         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
3870
3871 2011-08-04  Robert Dewar  <dewar@adacore.com>
3872
3873         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
3874
3875 2011-08-04  Yannick Moy  <moy@adacore.com>
3876
3877         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
3878         'Result only appears in postcondition of function.
3879
3880 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3881
3882         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
3883         external tag, include the value of the external tag in the exception
3884         message.
3885
3886 2011-08-04  Yannick Moy  <moy@adacore.com>
3887
3888         * sem_attr.adb (Result): modify error message for misplaced 'Result
3889
3890 2011-08-04  Sergey Rybin  <rybin@adacore.com>
3891
3892         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
3893         clear that the second argument must be an identifier.
3894
3895 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3896
3897         * exp_ch9.adb (Build_Barrier_Function): When compiling with
3898         -fpreserve-control-flow, insert an IF statement on the barrier
3899         condition to ensure that a conditional branch instruction is generated.
3900
3901 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3902
3903         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
3904         (Processing_Flags.Ignore_Missing_With): new flag.
3905
3906 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3907
3908         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
3909         Source_List_File on case-insensitive systems where the file is actually
3910         on a case-sensitive file system (NFS,...).
3911
3912 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3913
3914         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
3915         function return contains a controlled [extension] aggregate and the
3916         return statement is not part of a handled sequence of statements, wrap
3917         the return in a block. This ensures that all controlled temporaries
3918         generated during aggregate resolution will be picked up by the
3919         finalization machinery.
3920
3921 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3922
3923         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
3924         components, freeze type before resolution, to ensure that default
3925         initializations are present for all components.
3926         * sem_res.adb (Resolve_Actuals): the designated object of an
3927         accces-to-constant type is a legal actual in a call to an
3928         initialization procedure.
3929
3930 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3931
3932         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
3933         N_Unchecked_Type_Conversion to the possible containers of a renamed
3934         transient variable.
3935
3936 2011-08-04  Yannick Moy  <moy@adacore.com>
3937
3938         * par-ch13.adb (Aspect_Specifications_Present): recognize
3939         "with Identifier'Class =>" as an aspect, so that a meaningful warning
3940         is issued in Strict mode.
3941         * par.adb: Fix typos in comments.
3942
3943 2011-08-04  Yannick Moy  <moy@adacore.com>
3944
3945         * sem_attr.adb (Result): modify error message to take into account Post
3946         aspect when compiling Ada 2012 (or newer) code.
3947
3948 2011-08-04  Nicolas Roche  <roche@adacore.com>
3949
3950         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
3951         remove need for GCC exceptions.
3952
3953 2011-08-04  Vincent Celier  <celier@adacore.com>
3954
3955         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
3956         project, not the source file name.
3957         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
3958         excluded, continue looking. This excluded source will only be returned
3959         if there is no other source with the same base name that is not locally
3960         removed.
3961
3962 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3963
3964         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
3965         private and one of the operands is a real literal, use a qualified
3966         expression rather than a conversion which is not meaningful to the
3967         back-end.
3968
3969 2011-08-04  Yannick Moy  <moy@adacore.com>
3970
3971         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
3972         corresponding aspect X'Class are allowed, proceed with analysis of the
3973         aspect instead of skipping it.
3974
3975 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3976
3977         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
3978         This will allow to have an Ada implementation for the subprogram.
3979
3980 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3981
3982         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
3983         completion and aspects are present, apply them to the entity for the
3984         type which is currently the partial view, but which is the one that
3985         will be frozen.
3986         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
3987         applies to a partial view, indicate that the full view has predicates
3988         and delayed aspects.
3989         (Replace_Type_Reference): Handle properly predicates that apply to the
3990         full view of a private completion.
3991
3992 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3993
3994         * layout.adb (Layout_Type): For composite types, do not set Esize.
3995         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
3996         set Esize.
3997         (Size_Known): Look at the RM size of components instead of the Esize.
3998         (Freeze_Record_Type): Look at the RM size instead of the Esize to
3999         issue warning and activate Implicit_Packing.
4000         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
4001         if the Esize is not known.
4002         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
4003         for elementary types only.
4004         (Analyze_Record_Representation_Clause): Look at the RM size instead
4005         of the Esize to issue errors.
4006         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
4007         is not known.
4008         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
4009         obsolete block.
4010         Look at the RM size instead of the Esize for types if the latter is
4011         not known.
4012         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
4013
4014 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4015
4016         * sem_type.adb: proper handling of equality not involving anonymous
4017         access types.
4018
4019 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4020
4021         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
4022         Vis_Decls. When creating a library-level finalizer for a package spec,
4023         both the declaration and body of the finalizer are inserted either in
4024         the visible or private declarations of the package spec.
4025
4026 2011-08-04  Javier Miranda  <miranda@adacore.com>
4027
4028         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
4029         use of the full-view of a type when invoking Is_Ancestor.
4030         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
4031         the full-view of private parents is requested, then use also the
4032         full-view of the parent of the first derivation.
4033
4034 2011-08-04  Tristan Gingold  <gingold@adacore.com>
4035
4036         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
4037         instead of the locally imported procedure.
4038         * s-taprop-mingw.adb (Enter_Task): Ditto.
4039         * s-valrea.adb (Scan_Real): Ditto.
4040         * s-imgrea.adb (Set_Image_Real): Ditto.
4041         * s-flocon.ads: Make the package pure.
4042
4043 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4044
4045         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
4046         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
4047         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
4048         New subprogram, moved here from...
4049         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
4050         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
4051         rewriting of the last argument into a procedure call statement here...
4052         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
4053         instead.
4054
4055 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4056
4057         * par_sco.adb: Minor reformatting.
4058
4059 2011-08-04  Robert Dewar  <dewar@adacore.com>
4060
4061         * erroutc.adb: Minor reformatting.
4062
4063 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4064
4065         * par_sco.adb: Comment update.
4066
4067 2011-08-04  Tristan Gingold  <gingold@adacore.com>
4068
4069         * s-flocon.ads: New file.
4070         * g-flocon.ads: Now a renaming of s-flocon.
4071         * Makefile.rtl: Add s-flocon.o
4072
4073 2011-08-04  Javier Miranda  <miranda@adacore.com>
4074
4075         * exp_strm.adb (Build_Array_Input_Function): if the array type is
4076         constrained, do not attempt to build a subtype of it.
4077
4078 2011-08-04  Yannick Moy  <moy@adacore.com>
4079
4080         * errout.ads Change comments: remove 'R'M as an example where quotes
4081         are needed; add ALFA as another case where quotes are not needed
4082         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
4083         case where quotes are not needed.
4084         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4085         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
4086         Remove all occurrences of 'A'L'F'A
4087
4088 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4089
4090         * sem_ch13.adb: check legality of invariant pragma.
4091
4092 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4093
4094         * bindgen.adb: Add comments.
4095
4096 2011-08-04  Yannick Moy  <moy@adacore.com>
4097
4098         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
4099         synthesized flag.
4100         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
4101         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
4102
4103 2011-08-04  Robert Dewar  <dewar@adacore.com>
4104
4105         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
4106         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
4107         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
4108
4109 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4110
4111         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
4112
4113 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4114
4115         PR ada/47880
4116         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
4117         allocated object.
4118
4119 2011-08-04  Robert Dewar  <dewar@adacore.com>
4120
4121         * einfo.ads, exp_ch4.adb: Minor reformatting.
4122
4123 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
4124
4125         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
4126
4127 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4128
4129         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
4130         type in all cases to compute list of primitive operations, because full
4131         view may be an itype that is not attached to the list of declarations.
4132
4133 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4134
4135         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
4136         library has already been finalized.
4137         (Gen_Adafinal_C): Likewise.
4138         (Gen_Adainit_Ada): Generate an early return if the library has
4139         already been elaborated.
4140         (Gen_Adainit_C): Likewise.
4141         (Gen_Output_File_Ada): Generate an elaboration flag.
4142         (Gen_Output_File_C): Likewise.
4143
4144 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4145
4146         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
4147         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
4148         built in the first place.
4149         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
4150         for CodePeer because Finalize_Address was not built to begin with.
4151         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
4152
4153 2011-08-04  Pascal Obry  <obry@adacore.com>
4154
4155         * adaint.c (__gnat_tmp_name): Use current process id to create temp
4156         filenames, this ensures unicity of filenames across processes.
4157
4158 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4159
4160         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
4161         Raise_Controlled to Raise_From_Controlled_Operation. Update the
4162         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
4163         Add False as the actual to From_Abort in the generated call to
4164         Raise_From_Controlled_Operation.
4165
4166 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
4167
4168         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
4169         so that the ali file name can be retrieved from outside of this package.
4170         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
4171         doing nothing in the general case, but used to update the object file
4172         timestamp if directly generated by the backend.
4173         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
4174         to a later time than the ali file one.
4175
4176 2011-08-04  Yannick Moy  <moy@adacore.com>
4177
4178         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
4179         entities whose body contains an Annotate pragma which forces formal
4180         proof on this body.
4181         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4182         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
4183         Mark_Non_ALFA_Subprogram to pass in a message and node.
4184         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
4185         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
4186         surrounding subprogram.
4187         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
4188         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
4189         as not in ALFA is annotated with Formal_Proof being On, then an error
4190         is issued based on the additional parameters for message and node.
4191         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
4192         * gcc-interface/Make-lang.in: Update dependencies.
4193
4194 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4195
4196         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
4197         Finalize_Address when CodePeer is enabled.
4198
4199 2011-08-04  Pascal Obry  <obry@adacore.com>
4200
4201         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
4202         the latter returns a pointer to a static buffer which is deallocated
4203         at the end of the routine.
4204
4205 2011-08-04  Yannick Moy  <moy@adacore.com>
4206
4207         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
4208         after index creation; mark unconstrained base array type generated as
4209         being in/not in ALFA as well
4210         (Make_Index): mark subtype created as in/not in ALFA
4211         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
4212         over a loop as in/not in ALFA, depending on its type and form of loop
4213         iteration.
4214
4215 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4216
4217         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
4218         directly to False on .NET and JVM.
4219
4220 2011-08-04  Yannick Moy  <moy@adacore.com>
4221
4222         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
4223         constraint that subtype must come from source code to be in ALFA, so
4224         that anonymous subtypes can be in ALFA too.
4225
4226 2011-08-04  Yannick Moy  <moy@adacore.com>
4227
4228         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
4229         reference for ALFA mode.
4230         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
4231         procedure public so as to use it from formal verification back-end.
4232
4233 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
4234
4235         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
4236         invalid checks of the Parameter, making Remove_Switch not working
4237         correctly.
4238
4239 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
4240
4241         * targparm.ads: Update header: no run-time exception is needed on this
4242         file.
4243
4244 2011-08-04  Vincent Celier  <celier@adacore.com>
4245
4246         * a-fihema.adb: Use System.IO instead of GNAT.IO
4247
4248 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4249
4250         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
4251         are forbidden in Compiler_Unit mode.
4252
4253 2011-08-04  Robert Dewar  <dewar@adacore.com>
4254
4255         * sem_util.adb: Minor reformatting.
4256
4257 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4258
4259         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
4260         library-level finalizers.
4261         (Gen_Finalize_Library_C): Update the import string for library-level
4262         finalizers.
4263         (Gen_Finalize_Library_Defs_C): Update the definition name of a
4264         library-level finalizer.
4265         * exp_ch7.adb: Remove with and use clauses for Stringt.
4266         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
4267         Spec_Decl. Add local variable Body_Id. The names of library-level
4268         finalizers are now manually fully qualified and are no longer external.
4269         A single name is now capable of servicing .NET, JVM and non-VM targets.
4270         Pragma Export is no longer required to provide visibility for the name.
4271         (Create_Finalizer_String): Removed.
4272         (New_Finalizer_Name): New routine which mimics New_..._Name.
4273
4274 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4275
4276         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
4277         elaboration counter to Standard_Short_Integer.
4278         * sem_util.adb (Build_Elaboration_Entity): Likewise.
4279         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
4280         (Gen_Elab_Externals_C): Likewise.
4281
4282 2011-08-04  Ed Falis  <falis@adacore.com>
4283
4284         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
4285         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
4286         system-vxworks-mips.ads, system-vxworks-x86.ads
4287         (Always_Compatible_Rep): set to False for all VxWorks targets.
4288
4289 2011-08-04  Robert Dewar  <dewar@adacore.com>
4290
4291         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
4292         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
4293         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
4294         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
4295         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
4296         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
4297         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
4298         Minor reformatting and code reorganization.
4299
4300 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4301
4302         * projects.texi: Added doc for aggregate projects.
4303
4304 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4305
4306         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
4307         Add support for overriding the Project_Path in aggregate projects.
4308
4309 2011-08-04  Robert Dewar  <dewar@adacore.com>
4310
4311         * a-cofove.ads: Minor reformatting.
4312
4313 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4314
4315         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
4316         on the generated code.
4317         (Build_Finalize_Statements): Update the comment on the generated code.
4318         (Build_Initialize_Statements): Update the comment on the generated code.
4319         (Build_Object_Declarations): Add local variable Result. The object
4320         declarations are now built in sequence.
4321         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
4322         RE_Unit_Table.
4323
4324 2011-08-04  Robert Dewar  <dewar@adacore.com>
4325
4326         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
4327
4328 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4329
4330         * einfo.ads (Elaboration_Entity): Document new definition and use.
4331         (Elaboration_Entity_Required): Adjust to above change.
4332         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
4333         * exp_ch12.adb: And with and use for Snames.
4334         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
4335         * exp_util.adb (Set_Elaboration_Flag): Likewise.
4336         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
4337         <Check_Unit_Name>: Deal with N_Expanded_Name.
4338         <Attribute_Elaborated>: Extend to all unit names.
4339         * sem_elab.adb: And with and use for Uintp.
4340         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
4341         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
4342         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
4343         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
4344         from Gen_Adainit_Ada.
4345         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
4346         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
4347         case, do not call System.Standard_Library.Adafinal; instead call
4348         finalize_library if needed.
4349         (Gen_Adafinal_C): Likewise.
4350         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
4351         non-main program case.
4352         (Gen_Adainit_C): Generate a couple of external declarations here.
4353         In the main program case, set SSL.Finalize_Library_Objects.
4354         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
4355         (Gen_Elab_Calls_C): Likewise.
4356         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
4357         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
4358         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
4359         objects here.
4360         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
4361         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
4362         Gen_Adafinal_Ada.
4363         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
4364         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
4365         of external declarations.  Call Gen_Finalize_Library_C.
4366
4367 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4368
4369         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
4370         Compute_Compilation_Phases): new subprogram.
4371         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
4372         The number of mains as well as the various compilation phases that
4373         need to be run are now project tree specific, since various
4374         aggregated trees might have different requirements. In particular,
4375         they do not all require bind or link phases.
4376
4377 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4378
4379         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
4380         (Project_Tree_Appdata): New type.
4381         It is now possible to associate application-specific data to a project
4382         tree. In particular, this is used in the gprbuild builder to avoid a
4383         number of global tables and htables, especially now that there can be
4384         several project trees loaded at once because of aggregate projects.
4385         (Debug_Name): new procedure.
4386         * projects.texi: Clarify syntax of "**" for Source_Dirs
4387
4388 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4389
4390         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
4391         the "roots" for a main.
4392         (Fill_From_Project): add support for aggregate projects. Main units
4393         in aggregated projects are now automatically added in the list of
4394         files to build (although this fails later on in gprbuild, because
4395         these files are not using the root proejct tree, so this needs
4396         further cleanup)
4397         * gcc-interface/Make-lang.in: Update dependencies.
4398
4399 2011-08-03  Yannick Moy  <moy@adacore.com>
4400
4401         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
4402         conditional expression in ALFA.
4403         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
4404         expressions as not in ALFA.
4405
4406 2011-08-03  Robert Dewar  <dewar@adacore.com>
4407
4408         * a-cofove.adb: Minor reformatting.
4409
4410 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4411
4412         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
4413         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
4414         gprbuild sources.
4415         These packages are more logically placed in the Queue package, since
4416         they manipulate the queue. It is also likely that they can be adapted
4417         for gnatmake, thus sharing more code.
4418         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
4419         that we could move the above.
4420
4421 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4422
4423         * errutil.adb (Finalize): clean up the list of error messages on exit.
4424         Calling this subprogram multiple times will no longer show duplicate
4425         error messages on stderr.
4426
4427 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4428
4429         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
4430         Getopt_Switches when we have already define a command line
4431         configuration.
4432
4433 2011-08-03  Yannick Moy  <moy@adacore.com>
4434
4435         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
4436         in ALFA. Instead, they are considered as assertions to prove.
4437         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
4438         nodes as not in ALFA. Instead, include conditional expressions in ALFA
4439         if they have no ELSE part, or if they occur in pre- and postconditions,
4440         where the Condition cannot have side-effects in ALFA
4441         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
4442         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
4443         Instead, include type conversion between scalar types in ALFA.
4444         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
4445         if-and-only-if its type is in ALFA.
4446
4447 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4448
4449         * scos.adb, get_scos.adb, put_scos.adb
4450         New code letter for decisions: G (entry guard)
4451         * par_sco.adb
4452         (Traverse_Subprogram_Body): Rename to...
4453         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
4454         (Traverse_Protected_Body): New subprogram
4455         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
4456         protected bodies and entry bodies.
4457
4458 2011-08-03  Yannick Moy  <moy@adacore.com>
4459
4460         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
4461         entities with get/set subprograms, which is set on procedure entities
4462         generated by the compiler for a postcondition.
4463         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
4464         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
4465         entity for a declaration
4466         (Get_Unique_Entity_For_Decl): new function returning an entity which
4467         represents a declaration, so that matching spec and body have the same
4468         entity.
4469
4470 2011-08-03  Robert Dewar  <dewar@adacore.com>
4471
4472         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
4473         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
4474
4475 2011-08-03  Yannick Moy  <moy@adacore.com>
4476
4477         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
4478         library-level because retriction No_Implicit_Dynamic_Code in the
4479         front-end prevents its definition as a local subprogram
4480         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
4481         for reuse in other contexts
4482         (Traverse_Declarations_Or_Statements,
4483         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4484         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
4485         procedures take a callback parameter to be called on all declarations
4486         * lib-xref.ads
4487         (Traverse_All_Compilation_Units): new generic function to traverse a
4488         compilation unit and call a callback parameter on all declarations
4489
4490 2011-08-03  Javier Miranda  <miranda@adacore.com>
4491
4492         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
4493         in Java since they are always enclosed in a namespace that
4494         differentiates them, and overloaded entities are supported by the VM.
4495
4496 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4497
4498         * checks.adb (Determine_Range): If a computed bound of an operation is
4499         outside the range of the base type of the expression, and overflow
4500         checks are enabled, the result is unknown and cannot be used for any
4501         subsequent constant folding.
4502         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
4503         unknown, so is the result of the comparison.
4504
4505 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4506
4507         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
4508         From_Abort. When finalization was triggered by an abort, propagate
4509         Standard'Abort_Signal rather than Program_Error.
4510         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
4511         From_Abort.
4512         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
4513         From_Abort. When finalization was triggered by an abort, propagate
4514         Standard'Abort_Signal rather than Program_Error.
4515         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
4516         From_Abort.
4517         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
4518         Abort_Id. Update the calls to Build_Object_Declarations and
4519         Build_Raise_Statement to include Abort_Id.
4520         (Build_Adjust_Statements): New local variable Abort_Id. Update the
4521         calls to Build_Object_Declarations and Build_Raise_Statement to include
4522         Abort_Id.
4523         (Build_Finalize_Statements): New local variable Abort_Id. Update the
4524         calls to Build_Object_Declarations and Build_Raise_Statement to include
4525         Abort_Id.
4526         (Build_Components): Create an entity for Abort_Id when exceptions are
4527         allowed on the target.
4528         (Build_Finalizer): New local variable Abort_Id.
4529         (Build_Initialize_Statements): New local variable Abort_Id. Update the
4530         calls to Build_Object_Declarations and Build_Raise_Statement to include
4531         Abort_Id.
4532         (Build_Object_Declarations): Add new formal Abort_Id. Create the
4533         declaration of flag Abort_Id to preserve the original abort status
4534         before finalization code is executed.
4535         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
4536         runtime routine Raise_From_Controlled_Operation.
4537         (Create_Finalizer): Update the call to Build_Raise_Statement to include
4538         Abort_Id. Update the call to Build_Object_Declarations to include
4539         Abort_Id. Update the layout of the finalizer body.
4540         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
4541         (Process_Transient_Objects): New local variable Abort_Id. Remove the
4542         clunky code to create all flags and objects related to
4543         exception propagation and replace it with a call to
4544         Build_Object_Declarations. Update the call to Build_Raise_Statement to
4545         include Abort_Id.
4546         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
4547         Add new formal Abort_Id and associated comment on its use.
4548         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
4549         on its use.
4550         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
4551         Remove the clunky code to create all flags and objects related to
4552         exception propagation and replace it with a call to
4553         Build_Object_Declarations. Update the call to Build_Raise_Statement.
4554
4555 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4556
4557         * s-tassta.adb: Fix minor typos.
4558
4559 2011-08-03  Robert Dewar  <dewar@adacore.com>
4560
4561         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
4562         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
4563
4564 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4565
4566         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
4567         to packages. This ensures that the finalizer body will not end up
4568         inside the freeze node.
4569         (Process_Declarations): Add code to detect whether a freeze node has a
4570         nested finalization collection.
4571
4572 2011-08-03  Pascal Obry  <obry@adacore.com>
4573
4574         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
4575         (Current_Session): Return a not null access to Session_Type.
4576         (Default_Session): Likewise.
4577
4578 2011-08-03  Robert Dewar  <dewar@adacore.com>
4579
4580         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
4581         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
4582
4583 2011-08-03  Pascal Obry  <obry@adacore.com>
4584
4585         * g-awk.ads: Minor comment fix.
4586
4587 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4588
4589         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4590         the tree structure related to discriminant constraints.
4591         Original_Discriminant cannot be used any more for computing the
4592         defining name for the reference to a discriminant.
4593
4594 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4595
4596         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
4597         function is not visibly tagged, this is not a dispatching call and
4598         therfore is not Tag_Indeterminate, even if the function is marked as
4599         dispatching on result.
4600
4601 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4602
4603         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
4604         (Expand_N_Free_Statement): Add a guard to protect against run-times
4605         which do not support controlled types.
4606         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
4607         against run-times which do not support controlled types.
4608         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
4609         against run-times which do not support controlled types.
4610         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
4611         against run-times which do not support controlled types.
4612         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
4613         protect against run-times which do not support controlled types.
4614
4615 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4616
4617         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
4618         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
4619
4620 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4621
4622         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
4623         modified in the source, to prevent spurious warnings when compiling
4624         with -gnatg.
4625
4626 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4627
4628         * a-except-2005.adb: Minor reformatting.
4629
4630 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4631
4632         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
4633         is a renaming declaration in the private part of a package, do not emit
4634         a warning that the with_clause could be moved because the renaming may
4635         be used in the body or in a child unit.
4636
4637 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4638
4639         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4640         Propagate the Comes_From_Source attribute from the original return
4641         object to the renaming.
4642
4643 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4644
4645         * exp_ch7.adb (Build_Raise_Statement): Do not call
4646         Raise_From_Controlled_Operation when this routine is not present in
4647         the run-time library.
4648         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
4649         libraries (Ravenscar), tasks are non-terminating, and protected objects
4650         and tasks can only appear at library level, so we do not want
4651         finalization of protected objects nor tasks.
4652         * exp_intr.adb: Minor clarification in comment.
4653         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
4654         Gen_Output_File_C): Remove references to finalization of library-level
4655         objects when using restricted run-time libraries.
4656
4657 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4658
4659         * sem_ch3.adb (Build_Discriminant_Constraints): Set
4660         Original_Discriminant only if the parent type is a generic formal.
4661
4662 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4663
4664         * exp_ch13.adb: Add with and use clause for Targparm;
4665         (Expand_N_Free_Statement): Prevent the generation of a custom
4666         Deallocate on .NET/JVM targets since this requires pools and address
4667         arithmetic.
4668         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
4669         .NET/JVM targets, attach the newly allocated object to the access
4670         type's finalization collection. Do not generate a call to
4671         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
4672         exist in the runtime.
4673         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
4674         create a custom Allocate for object that do not require initialization.
4675         Attach a newly allocated object to the access type's finalization
4676         collection on .NET/JVM.
4677         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
4678         assignment of controlled types on .NET/JVM. The two hidden pointers
4679         Prev and Next and stored and later restored after the assignment takes
4680         place.
4681         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
4682         kludge for .NET/JVM to recognize a particular piece of code coming from
4683         Heap_Management and change the call to Finalize into Deep_Finalize.
4684         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
4685         finalization collections on .NET/JVM only for types derived from
4686         Controlled. Separate the association of storage pools with a collection
4687         and only allow it on non-.NET/JVM targets.
4688         (Make_Attach_Call): New routine.
4689         (Make_Detach_Call): New routine.
4690         (Process_Object_Declarations): Suppress the generation of
4691         build-in-place return object clean up code on .NET/JVM since it uses
4692         pools.
4693         * exp_ch7.ads (Make_Attach_Call): New routine.
4694         (Make_Detach_Call): New routine.
4695         * exp_intr.adb Add with and use clause for Targparm.
4696         (Expand_Unc_Deallocation): Detach a controlled object from a collection
4697         on .NET/JVM targets.
4698         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
4699         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
4700         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
4701         names used in finalization.
4702
4703 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4704
4705         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
4706         (Attach, Detach): Lock the current task when chaining an object onto a
4707         collection.
4708
4709 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4710
4711         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
4712         Rewritten to create the message strings when the exception is not
4713         raised by an abort during finalization.
4714         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
4715         Raise_From_Controlled_Operation and update its associated comment.
4716         * a-fihema.ads, a-fihema.adb: New GNAT unit.
4717         Ada.Finalization.Heap_Management provides key functionality
4718         associated with controlled objects on the heap, their creation,
4719         finalization and reclamation. Type Finalization_Collection is
4720         effectively a wrapper which sits ontop of a storage pool and performs
4721         all necessary bookkeeping for all the objects it contains. Each
4722         access-to-controlled or access-to-class-wide type receives a collection
4723         as part of its expansion. The compiler generates buffer code and
4724         invokes Allocate / Deallocate to create and destroy allocated
4725         controlled objects.
4726         * a-finali.adb ("="): Removed.
4727         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
4728         fields Prev and Next.
4729         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
4730         A library unit with at least one controlled object on the library level
4731         has a special finalizer which is invoked by the binder. To signal this,
4732         ali files carry field PF.
4733         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
4734         associated comment on field usage.
4735         * a-tags.adb (Get_RC_Offset): Removed.
4736         (Needs_Finalization): New routine.
4737         * a-tags.ads: Update the structure of the GNAT dispatch tables.
4738         Dispatch tables now carry field Needs_Finalization which provides
4739         runtime indication whether a type is controlled or has controlled
4740         components or both. Remove field RC_Offset.
4741         (Get_RC_Offset): Removed along with its associated pragma Export.
4742         Since tagged types with controlled components no longer carry hidden
4743         field _controller, the special mechanism to retrieve its location is no
4744         longer needed.
4745         (Needs_Finalization): New routine.
4746         * atree.ads, atree.adb (Elist24): New routine.
4747         (Set_Elist24): New routine.
4748         * atree.h: Add a define clause for Elist24.
4749         * bindgen.adb New library-level variable Lib_Final_Built.
4750         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
4751         presence of a VM target, the routine generates calls to the proper
4752         library finalization routine.
4753         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
4754         targets. Set the correct library finalization routine depending on
4755         whether the library has controlled objects or this is a VM compilation.
4756         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
4757         to library-level finalizers of compiled units in reverse order of
4758         elaboration. It also produces exception management code and reraises a
4759         potential exception after all units have been finalized.
4760         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
4761         library-level finalizers of compiled units in reverse order of
4762         elaboration.
4763         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
4764         definitions of all library-level finalizers available to the compilation
4765         (Gen_Main_Ada): Directly call Adafinal which now contails all target
4766         dependent code.
4767         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
4768         System.Standard_Library.Adafinal directly. If the library needs
4769         finalization actions, create the sequence of finalization calls.
4770         (Gen_Output_File_Ada): Alphabetize local variables and constants.
4771         Generate a with clause for System.Soft_Links when compiling for a VM.
4772         Remove the code which imports System.Standard_Library.Adafinal as
4773         Do_Finalize. Generate the library finalization routine.
4774         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
4775         If the library needs finalization actions, create all the definitions
4776         of library- level finalizers.
4777         (Has_Finalizer): New routine. Determines whether at least one compiled
4778         unit has a library-level finalizer.
4779         Add type Qualification_Mode.
4780         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
4781         * einfo.adb: New usage of field 15 as Return_Flag.
4782         Remove Finalization_Chain_Entity from the usages of field 19.
4783         Remove Associated_Final_Chain from the usages of field 23.
4784         New usage of field 23 as Associated_Collection.
4785         New usage of field 24 as Finalizer.
4786         New usage of flag 252 as Is_Processed_Transient.
4787         (Associated_Final_Chain): Removed.
4788         (Associated_Collection): New routine.
4789         (Finalization_Chain_Entity): Removed.
4790         (Finalizer): New routine.
4791         (Is_Finalizer): New routine.
4792         (Is_Processed_Transient): New routine.
4793         (Return_Flag): New routine.
4794         (Set_Associated_Final_Chain): Removed.
4795         (Set_Associated_Collection): New routine.
4796         (Set_Finalization_Chain_Entity): Removed.
4797         (Set_Finalizer): New routine.
4798         (Set_Is_Processed_Transient): New routine.
4799         (Set_Return_Flag): New routine.
4800         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
4801         displayed flags.
4802         (Write_Field8_Name): Alphabetize the output.
4803         (Write_Field11_Name): Alphabetize the output.
4804         (Write_Field12_Name): Alphabetize the output.
4805         (Write_Field13_Name): Alphabetize the output.
4806         (Write_Field14_Name): Alphabetize the output.
4807         (Write_Field15_Name): Alphabetize the output.
4808         (Write_Field16_Name): Alphabetize the output.
4809         (Write_Field17_Name): Alphabetize the output.
4810         (Write_Field18_Name): Alphabetize the output.
4811         (Write_Field19_Name): Alphabetize the output. Remove the output of
4812         Finalization_Chain_Entity.
4813         (Write_Field20_Name): Alphabetize the output.
4814         (Write_Field21_Name): Alphabetize the output.
4815         (Write_Field22_Name): Alphabetize the output.
4816         (Write_Field23_Name): Alphabetize the output. Remove the output of
4817         Associated_Final_Chain. Add output for Associated_Collection.
4818         (Write_Field24_Name): Alphabetize the output.
4819         (Write_Field25_Name): Add output for Finalizer.
4820         (Write_Field26_Name): Alphabetize the output.
4821         (Write_Field27_Name): Alphabetize the output.
4822         (Write_Field28_Name): Alphabetize the output.
4823         * einfo.ads: Add new field description for Associated_Collection and
4824         its uses in nodes.
4825         Remove Associated_Final_Chain and its uses in nodes.
4826         Remove Finalization_Chain_Entity and its uses in nodes.
4827         Add new field description for Finalizer and its uses in nodes.
4828         Add new synthesized attribute Is_Finalizer.
4829         Add new flag description for Is_Processed_Transient and its uses in
4830         nodes.
4831         Add new field description for Return_Flag and its uses in nodes.
4832         (Associated_Final_Chain): Removed along with its pragma Inline.
4833         (Associated_Collection): New routine and pragma Inline.
4834         (Finalization_Chain_Entity): Removed along with its pragma Inline.
4835         (Finalizer): New routine and pragma Inline.
4836         (Is_Finalizer): New routine and pragma Inline.
4837         (Is_Processed_Transient): New routine and pragma Inline.
4838         (Return_Flag): New routine and pragma Inline.
4839         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
4840         (Set_Associated_Collection): New routine and pragma Inline.
4841         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
4842         (Set_Finalizer): New routine and pragma Inline.
4843         (Set_Is_Processed_Transient): New routine and pragma Inline.
4844         (Set_Return_Flag): New routine and pragma Inline.
4845         * exp_aggr.adb: Alphabetize subprograms.
4846         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
4847         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
4848         associated comments. Remove local variables External_Final_List and
4849         Attach.
4850         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
4851         Ancestor. Remove the retrieval of finalization lists. Update the call to
4852         Make_Adjust_Call.
4853         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
4854         lists. Update the call to Late_Expansion.
4855         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
4856         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
4857         (Gen_Assign): Remove the retrieval of the finalization list used to
4858         build the assignment. Update the calls to Make_Init_Call and
4859         Make_Adjust_Call.
4860         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
4861         Remove the mechanism to determine attachment levels and finalization
4862         list retrieval. Remove the processing for coextensions.
4863         (Init_Controller): Removed. Controllers no longer exist.
4864         (Late_Expansion): Remove formals Flist and Obj along with their
4865         associated comments. Update the calls to Build_Record_Aggr_Code and
4866         Build_Array_Aggr_Code.
4867         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
4868         (Expand_N_Freeze_Entity): Add special processing for finalizers which
4869         appear in entry bodies, protected subprograms and task bodies.
4870         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
4871         * exp_ch3.adb (Add_Final_Chain): Removed.
4872         (Build_Array_Init_Proc): Alphabetize local variables.
4873         (Build_Assignment): Alphabetize local variables. Update the call to
4874         Maked_Adjust_Call.
4875         (Build_Class_Wide_Master): Rename local variables to better reflect
4876         their role.
4877         (Build_Discriminant_Assignments): Code reformatting.
4878         (Build_Init_Call_Thru): Code reformatting.
4879         (Build_Init_Procedure): Code reformatting. Generate a special version
4880         of Deep_Finalize which is capable of finalizing all initialized
4881         components and ignore the rest.
4882         (Build_Init_Statements): Rename local variables to better reflect their
4883         role.
4884         Reimplement the mechanism to include the creation and update of an index
4885         variable called a "counter". It is used as a bookmark for tracing
4886         initialized and non-initialized components.
4887         (Build_Initialization_Call): Remove local variable Controller_Typ.
4888         Alphabetize all local variables. Remove the initialization of the
4889         record controller and update the call to Make_Init_Call.
4890         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
4891         New local variable Counter.
4892         (Constrain_Array): Alphabetize.
4893         (Expand_Freeze_Array_Type): Create a collection instead of a
4894         finalization list.
4895         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
4896         Finalize_Address which is used in conjunction with allocated controlled
4897         objects.
4898         (Expand_N_Object_Declaration): Remove the creation of a finalization
4899         list for anonymous access types. Update the calls to Make_Init_Call and
4900         Make_Adjust_Call.
4901         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
4902         retrieval of finalization lists. Remove the expansion of the record
4903         controller. Create TSS primitive Finalize_Address used in conjunction
4904         with controlled objects on the heap. Create finalization collections
4905         for access-to-controlled record components.
4906         (Expand_Record_Controller): Removed.
4907         (Freeze_Type): Remove the freezing of record controllers. Freezing of
4908         class-wide types now requires additional processing. Create
4909         finalization collections for access-to-controlled types.
4910         (Increment_Counter): New routine.
4911         (Make_Counter): New routine.
4912         (Make_Eq_If): Remove the mention of Name_uController.
4913         (Make_Predefined_Primitive_Specs): There is no longer need to skip
4914         types coming from System.Finalization_Root.
4915         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
4916         (Predefined_Primitive_Bodies): There is no longer need to skip types
4917         coming from System.Finalization_Root.
4918         (Stream_Operation_OK): Do not generate stream routines for
4919         type Ada.Finalization.Heap_Management.Finalization_Collection.
4920         * exp_ch3.ads: Alphabetize subprograms.
4921         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
4922         Add with and use clause for Lib.
4923         (Complete_Coextension_Finalization): Removed.
4924         (Complete_Controlled_Allocation): New routine. Create a finalization
4925         collection for anonymous access-to-controlled types. Create a custom
4926         Allocate which interfaces with the back end and the machinery in
4927         Heap_Management.
4928         (Expand_Allocator_Expression): Add necessary calls to
4929         Complete_Controlled_Allocation. Remove the retrieval of finalization
4930         lists. Update the calls to Make_Adjust_Call. Generate a call to
4931         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4932         the associated collection.
4933         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
4934         Code clean up. Remove the retrieval of finalization lists and
4935         attachment levels.
4936         Update the call to Make_Init_Call. Generate a call to
4937         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4938         the associated collection.
4939         (Get_Allocator_Final_List): Removed. Finalization lists are not
4940         available.
4941         (Suitable_Element): Remove the mention of Name_uController.
4942         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
4943         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
4944         the left hand side, carry out the assignment and adjust the left hand
4945         side.
4946         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
4947         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
4948         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
4949         BIP_Collection and BIPcollection.
4950         (Build_Heap_Allocator): New routine used to allocate the return object
4951         of a build-in-place function onto a collection.
4952         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
4953         (Expand_Call): Do not replace direct calls to Deep routines with their
4954         aliases.
4955         (Expand_N_Extended_Return_Statement): Give all variables shorter names
4956         and update their occurrences. Add a special return flag to monitor the
4957         [ab]normal execution of the function. The flag is set right before the
4958         return statement.
4959         Rewrite the mechanism used to allocate a build-in-place return object
4960         on the heap or on a storage pool.
4961         (Is_Direct_Deep_Call): New routine.
4962         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
4963         build-in-place function call instead of a final list. Build a call to
4964         Set_Finalize_Address_Ptr to decorate the associated collection.
4965         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
4966         order to name the build-in-place function call's result for later
4967         finalization. Add a collection to a build-in-place function call
4968         instead of a final list.
4969         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
4970         build-in-place function call instead of a final list. Remove the code
4971         which moves one final list and transforms it into the actual in a
4972         nested build-in-place call.
4973         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
4974         build-in-place function call instead of a final list.
4975         (Move_Final_List): Removed.
4976         (Needs_BIP_Collection): New routine.
4977         (Needs_BIP_Final_List): Removed.
4978         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
4979         enumeration type BIP_Formal_Kind.
4980         Update the related comment.
4981         (Needs_BIP_Collection): New routine.
4982         (Needs_BIP_Final_List): Removed.
4983         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
4984         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
4985         majority of subprograms in this unit. Add Name_Finalize_Address to
4986         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
4987         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
4988         statements for an array type.
4989         (Build_Adjust_Statements): Create the adjust statements for a record
4990         type.
4991         (Build_Cleanup_Statements): New routine. A procedure which given any
4992         construct containing asynchronous calls, references to _master, or is a
4993         task body, a task allocation or a protected body produces the necessary
4994         runtime calls to clean up these constructs.
4995         (Build_Exception_Handler): New routine.
4996         (Build_Final_List): Removed.
4997         (Build_Finalization_Collection): New routine. A core procedure which
4998         creates a collection to service heap allocated controlled objects
4999         associated with an access-to-controlled type.
5000         (Build_Finalize_Statements): Create the finalization statements for a
5001         record types.
5002         (Build_Finalizer): New routine. A core procedure which given any
5003         construct with declarations and/or statements detects all objects which
5004         need any type of clean up (controlled objects, protected objects) and
5005         generates all necessary code to clean up the said objects in the proper
5006         order.
5007         (Build_Finalizer_Call): New routine.
5008         (Build_Initialize_Statements): Create the initialization statements for
5009         an array type. The generated routine contains code to finalize partially
5010         initialized arrays.
5011         (Build_Object_Declarations): New routine.
5012         (Build_Raise_Statement): New routine.
5013         (Clean_Simple_Protected_Objects): Removed.
5014         (Controller_Component): Removed.
5015         (Enclosing_Function): New routine.
5016         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
5017         either declarations or statements or both.
5018         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
5019         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
5020         package.
5021         (Find_Final_List): Removed.
5022         (Global_Flist_Ref): Removed.
5023         (In_Finalization_Root): Removed.
5024         (Insert_Actions_In_Scope_Around): Determine the range of the transient
5025         scope in terms of tree nodes. Process all transient variables within
5026         that range.
5027         (Make_Adjust_Call): Rewritten. There is no longer an attach call
5028         generated after the adjust.
5029         (Make_Attach_Call): Removed.
5030         (Make_Call): New routine.
5031         (Make_Clean): Removed.
5032         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
5033         build routines.
5034         (Make_Deep_Proc): Rewritten to generate the new profile signature used
5035         in Deep routines.
5036         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
5037         build routines.
5038         (Make_Final_Call): Modified to simply create a call to either
5039         Deep_Finalize or Finalize.
5040         (Make_Finalize_Address_Body): New routine.
5041         (Make_Finalize_Address_Stmts): New routine. A function which produces
5042         TSS primitive Finalize_Address used in conjunction with heap allocated
5043         controlled objects.
5044         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
5045         (Make_Init_Call): Rewritten. There is no longer an attach call
5046         generated after initialization.
5047         (Make_Local_Deep_Finalize): New routine.
5048         (Make_Set_Finalize_Address_Ptr_Call): New routine.
5049         (Make_Transient_Block): Remove the finalization list retrieval and
5050         manipulation.
5051         (Needs_Finalization): Moved to Exp_Util.
5052         (Parent_Field_Type): New routine.
5053         (Preprocess_Components): New routine.
5054         (Process_Transient_Objects): New routine.
5055         (Wrap_HSS_In_Block): New routine.
5056         (Wrap_Transient_Declaration): Remove finalization list management and
5057         controller insertion.
5058         (Wrap_Transient_Expression): Code reformatting.
5059         (Wrap_Transient_Statement): Code reformatting.
5060         * exp_ch7.ads (Build_Final_List): Removed.
5061         (Build_Finalization_Collection): New routine.
5062         (Build_Raise_Statement): New routine.
5063         (Controller_Component): Removed.
5064         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
5065         (Find_Final_List): Removed.
5066         (In_Finalization_Root): Removed.
5067         (Is_Simple_Protected_Type): Update related comment.
5068         (Make_Adjust_Call): New parameter profile and associated comments.
5069         (Make_Attach_Call): Removed.
5070         (Make_Final_Call): New parameter profile and associated comments.
5071         (Make_Finalize_Address_Body): New routine.
5072         (Make_Init_Call): New parameter profile and associated comments.
5073         (Make_Local_Deep_Finalize): New routine.
5074         (Make_Set_Finalize_Address_Ptr_Call): New routine.
5075         (Needs_Finalization): Moved to Exp_Util.
5076         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
5077         (Expand_N_Protected_Body): Remove the handling of finalization lists.
5078         (Find_Protection_Type): Moved to Exp_Util.
5079         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
5080         (Make_DT): Update sequence of dispatch table initialization. Remove the
5081         initialization of field RC_Offset. Add initialization of field Needs_
5082         Finalization.
5083         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
5084         Reimplement how an object is first finalized, then deallocated.
5085         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
5086         Code reformatting.
5087         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
5088         Register TSS_Finalize_Address with type TSS_Names.
5089         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
5090         procedure provides the interface between an allocation / deallocation
5091         and the support machinery in Ada.Finalization.Heap_Management.
5092         (Find_Init_Call): Code reformatting.
5093         (Find_Init_Call_In_List): Code reformatting.
5094         (Find_Protection_Type): Moved from Exp_Ch9.
5095         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
5096         (Has_Controlled_Coextensions): Removed.
5097         (Has_Controlled_Objects): New routine.
5098         (In_Library_Level_Package_Body): New routine.
5099         (Insert_Action_After): New routine.
5100         (Is_Finalizable_Transient): New routine. This predicate determines
5101         whether an object declaration is one of the many variants of controlled
5102         transients.
5103         (Is_Null_Access_BIP_Func_Call): New routine.
5104         (Is_Non_BIP_Func_Call): New routine.
5105         (Is_Related_To_Func_Return): New routine.
5106         (Needs_Finalization): Moved from Exp_Ch7.
5107         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
5108         (Find_Protection_Type): Moved from Exp_Ch9.
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.
5114         (Is_Null_Access_BIP_Func_Call): New routine.
5115         (Is_Non_BIP_Func_Call): New routine.
5116         (Is_Related_To_Func_Return): New routine.
5117         (Needs_Finalization): Moved from Exp_ch7.
5118         * expander.adb (Expand): Add a case for N_Free_Statement.
5119         * freeze.adb (Freeze_All): Replace the generation of a finalization
5120         list with a collection for access-to-controlled types.
5121         (Freeze_Entity): Code reformatting.
5122         (Freeze_Record_Type): Remove the freezing of a record controller
5123         component.
5124         (Freeze_Subprogram): Code reformatting.
5125         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
5126         finalization list.
5127         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
5128         has a library-level finalizer.
5129         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
5130         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
5131         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
5132         files. Add a-fihema to the list of object files.
5133         * par-ch4.adb:
5134         Alphabetize the associations in type Is_Parameterless_Attribute.
5135         * rtsfind.ads: Ada.Finalization_List.Controller and
5136         System.Finalization_Implementation are no longer a GNAT unit.
5137         Update the range of type Ada_Finalization_Child. Remove the following
5138         recoverable entities:
5139
5140            RE_Attach_To_Final_List
5141            RE_Deep_Tag_Attach
5142            RE_Finalize_List
5143            RE_Finalize_One
5144            RE_Finalizable_Ptr_Ptr
5145            RE_Global_Final_List
5146            RE_Limited_Record_Controller
5147            RE_List_Controller
5148            RE_Move_Final_List
5149            RE_Record_Controller
5150            RE_Simple_List_Controller
5151
5152         Add the following recoverable entities:
5153
5154            RE_Add_Offset_To_Address
5155            RE_Allocate
5156            RE_Base_Pool
5157            RE_Deallocate
5158            RE_Exception_Identity
5159            RE_Finalization_Collection
5160            RE_Finalization_Collection_Ptr
5161            RE_Needs_Finalization
5162            RE_Save_Library_Occurrence
5163            RE_Set_Finalize_Address_Ptr
5164            RE_Set_Storage_Pool_Ptr
5165            RE_Storage_Count
5166         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
5167         Name_uController.
5168         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
5169         (First_Stored_Discriminant): Remove the mention of Name_uController.
5170         * sem_aux.ads: Comment reformatting.
5171         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
5172         to redecorate an already existing class-wide type.
5173         (Decorate_Tagged_Type): New parameter profile and associated comment.
5174         Create a "shadow class-wide type" for a shadow entity.
5175         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
5176         of the final chain along with the associated comment.
5177         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
5178         Full_Desig and set it to the full view of the designated type.
5179         Initialize the finalization collection to empty.
5180         (Build_Derived_Record_Type): Alphabetize local variables. Code
5181         reformatting.
5182         (Collect_Fixed_Components): Remove the mention of Name_uController.
5183         (Create_Constrained_Components): Remove the mention of Name_uController.
5184         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
5185         class-wide type of a shadow entity.
5186         (Process_Full_View): Update the machinery which marks type
5187         Limited_Controlled's entity as limited.
5188         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
5189         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
5190         list, instead make a collection build-in-place formal.
5191         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
5192         a designated type in order to establish a match between the renaming
5193         and the renamed entity.
5194         (Find_Selected_Component): Add guard to prevent spurious exceptions
5195         from being raised on .NET/JVM.
5196         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
5197         to the list of primitive that need special processing. Update arrays
5198         C_Names and D_Names.
5199         (Replace_Types): Handle class-wide types.
5200         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
5201         different parameter profile, look at the first formal.
5202         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
5203         use clauses for Exp_Util.
5204         * sem_res.adb: Remove with and use clauses for Elists.
5205         (Propagate_Coextensions): Removed.
5206         (Resolve_Allocator): Do not propagate the list of coextensions from one
5207         allocator to another.
5208         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
5209         Deaccessed_T to Desig_Typ.
5210         (Enter_Name): Remove the mention of Name_uController.
5211         (Gather_Components): Remove the mention of Name_uController.
5212         (Incomplete_Or_Private_View): New routine.
5213         (Is_Coextension_Root): Removed.
5214         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
5215         * sem_util.ads (Incomplete_Or_Private_View): New routine.
5216         (Is_Coextension_Root): Removed.
5217         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
5218         Controlled types are now derived from a null tagged record. Remove
5219         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
5220         * sinfo.adb (Coextensions): Removed.
5221         (Set_Coextensions): Removed.
5222         * sinfo.ads: Remove Coextensions from the explanation of node fields
5223         and its uses in nodes.
5224         Update the field usage of N_Allocator.
5225         (Coextensions): Removed along with its pragma Inline.
5226         (Set_Coextensions): Removed along with its pragma Inline.
5227         * snames.ads-tmpl: Remove names
5228
5229           Name_uClean
5230           Name_uController
5231           Name_uFinal_List
5232           Name_uLocal_Final_List
5233           Name_Finalization_Root
5234           Name_Next
5235           Name_Prev
5236
5237         Add names
5238
5239           Name_uFinalizer
5240           Name_Finalize_Address
5241         * s-pooglo.adb (Allocate): Add overriding indicator.
5242         (Deallocate): Add overriding indicator.
5243         (Storage_Size): Add overriding indicator.
5244         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
5245         than Finalize_Global_List.
5246         (Null_Finalize_Global_List): Removed.
5247         (Save_Library_Occurrence): New routine.
5248         * s-soflin.ads: Remove variable Finalize_Global_List along with its
5249         initialization. Add variable Finalize_Library_Objects along with its
5250         pragma Export. Add variables Library_Exception and
5251         Library_Exception_Set along with their pragma Export.
5252         (Null_Finalize_Global_List): Removed.
5253         (Save_Library_Occurrence): New routine.
5254         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
5255         rather than Finalize_Global_List.
5256         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
5257         of the constructed node.
5258
5259 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5260
5261         * link.c: Include "auto-host.h" before system headers.
5262
5263 2011-08-03  Vincent Celier  <celier@adacore.com>
5264
5265         * make.adb (Gnatmake): Add to table Library_Projs only library projects
5266         that are not extended. Do not check if a library project that is
5267         extended should be regenerated. Do not add to table Library_Paths the
5268         libraries that are in extended projects. Link only with libraries that
5269         are in libray projects that are not extended.
5270         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
5271         for a library project that is extended.
5272
5273 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5274
5275         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
5276         conforming subprogram renamings that appear to be completions if they
5277         are not fully conformant.
5278         Such renamings are homographs but not completions.
5279         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
5280         names in a subprogram renaming that appears in an instance.
5281
5282 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5283
5284         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
5285         not immutably limited, build actual subtype from expression to provide
5286         proper bounds to caller.
5287
5288 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5289
5290         * sem_ch8.adb: Minor comment correction.
5291
5292 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5293
5294         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
5295         returning a limited array, use an extended return statement.
5296
5297 2011-08-03  Vincent Celier  <celier@adacore.com>
5298
5299         * make.adb (Initialize): If --subdirs= is used, but no project file is
5300         specified, attempt to create the specify subdir if it does not already
5301         exist and use it as the object directory as if -D had been specified.
5302
5303 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5304
5305         * s-tpopsp-vms.adb: New file.
5306         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
5307         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
5308
5309 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5310
5311         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
5312         package.
5313
5314 2011-08-03  Yannick Moy  <moy@adacore.com>
5315
5316         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
5317         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
5318         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
5319         detect that an array has static bounds.
5320
5321 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5322
5323         * exp_dist.adb: Minor reformatting.
5324
5325 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5326
5327         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
5328         (ATCB_Key): Removed, not always used.
5329
5330 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5331
5332         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
5333         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
5334         most remaining global variables.
5335
5336 2011-08-03  Robert Dewar  <dewar@adacore.com>
5337
5338         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
5339         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
5340         reformatting.
5341
5342 2011-08-03  Javier Miranda  <miranda@adacore.com>
5343
5344         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
5345         that must be passed by copy in VM targets.
5346
5347 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5348
5349         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
5350         duplicates a similar htable now in the project tree.
5351
5352 2011-08-03  Claire Dross  <dross@adacore.com>
5353
5354         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
5355         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
5356         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
5357         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
5358         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
5359         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
5360         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
5361         update.
5362
5363 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5364
5365         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
5366         (ATCB_Key): Removed, not always used.
5367         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
5368         s-taprop-posix.adb.
5369         * s-tpopsp-tls.adb: New file.
5370         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
5371         x86/x64/ia64/powerpc/sparc Linux.
5372
5373 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5374
5375         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
5376         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
5377
5378 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5379
5380         * rtsfind.ads, exp_dist.adb, exp_dist.ads
5381         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
5382         Fix type selection for mapping integer types to PolyORB types.
5383
5384 2011-08-03  Bob Duff  <duff@adacore.com>
5385
5386         * sem_ch7.adb: Minor comment clarification.
5387
5388 2011-08-03  Bob Duff  <duff@adacore.com>
5389
5390         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
5391         an error analyzing a choice, skip further processing. Further
5392         processing could cause a crash or cascade errors.
5393
5394 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5395
5396         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
5397         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
5398         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
5399         prj-env.ads (Shared_Project_Tree_Data): new type
5400         An aggregate project and its aggregated trees need to share the common
5401         data structures used for lists of strings, packages,... This makes the
5402         code simpler since otherwise we have to pass the root tree (also used
5403         for the configuration file data) in addition to the current project
5404         tree. This also avoids ambiguities as to which tree should be used.
5405         And finally this saves a bit of memory.
5406         (For_Every_Project_Imported): new parameter Tree.
5407         Since aggregated projects are using a different tree, we need to let
5408         the caller know which tree to use to manipulate the returned project.
5409
5410 2011-08-03  Robert Dewar  <dewar@adacore.com>
5411
5412         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
5413         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
5414         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
5415         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
5416
5417 2011-08-03  Javier Miranda  <miranda@adacore.com>
5418
5419         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
5420         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
5421
5422 2011-08-03  Bob Duff  <duff@adacore.com>
5423
5424         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
5425         the Base_Type.
5426
5427 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
5428
5429         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
5430         g-sehash.ads: Fix typo. Update header.
5431
5432 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5433
5434         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
5435         expansion.
5436
5437 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5438
5439         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
5440         prefixes of private types along with records, since the selector may be
5441         a discriminant.
5442         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
5443         private types along with records, since the selector may be a
5444         discriminant.
5445
5446 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5447
5448         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
5449
5450 2011-08-03  Javier Miranda  <miranda@adacore.com>
5451
5452         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
5453         Tagged_Type_Expansion.
5454
5455 2011-08-03  Yannick Moy  <moy@adacore.com>
5456
5457         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
5458         violation when the argument of concatenation is the name of a
5459         constant.
5460
5461 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5462
5463         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
5464         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
5465         (Process_Declarative_Items): new parameter Child_Env.
5466
5467 2011-08-03  Yannick Moy  <moy@adacore.com>
5468
5469         * alfa.ads: Update format of ALFA section in ALI file in order to
5470         add a mapping from bodies to specs when both are present.
5471         (ALFA_Scope_Record): Add components for spec file/scope.
5472         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
5473         present.
5474         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
5475         collected, fill in the spec information when relevant.
5476         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
5477         present.
5478
5479 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5480
5481         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
5482         code unit to decide whether to add internally generated subprograms.
5483
5484 2011-08-03  Javier Miranda  <miranda@adacore.com>
5485
5486         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
5487         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
5488         be handled by copy in VM targets.
5489
5490 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5491
5492         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
5493         code with Makeutl.Get_Switches.
5494         * prj-tree.adb: Update comment.
5495
5496 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5497
5498         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
5499         subprogram with a limited formal that does not support external
5500         streaming.
5501
5502 2011-08-03  Yannick Moy  <moy@adacore.com>
5503
5504         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
5505         continuation line
5506         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
5507         not from current unit in two phases, because it is not possible to
5508         change the table while iterating over its content.
5509         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
5510
5511 2011-08-03  Sergey Rybin  <rybin@adacore.com>
5512
5513         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
5514         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
5515
5516 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5517
5518         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
5519         and the component type is composite, this is ambiguous for predefined
5520         concatenation, but if the node is not overloaded and the entity is a use
5521         -defined function its profile can be used to resolve that aggregate.
5522
5523 2011-08-03  Robert Dewar  <dewar@adacore.com>
5524
5525         * exp_ch4.adb: Minor code cleanup.
5526
5527 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5528
5529         * exp_dist.adb: Do not generate distribution stubs if serious errors
5530         have been diagnosed.
5531
5532 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5533
5534         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
5535         the first formal of a primitive operation, go to the base type to
5536         handle properly an access to a derived type with constrained
5537         discriminants.
5538         * sem_type.adb (Disambiguate): an immediately visible operator hides a
5539         user-defined function that is only use-visible.
5540
5541 2011-08-03  Robert Dewar  <dewar@adacore.com>
5542
5543         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
5544         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
5545         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
5546         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
5547         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
5548         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
5549         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
5550         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
5551
5552 2011-08-03  Robert Dewar  <dewar@adacore.com>
5553
5554         * repinfo.adb (List_Mechanism): Add handling of
5555         Convention_Ada_Pass_By_XXX.
5556         * sem_mech.adb (Set_Mechanism): Ditto.
5557         * sem_prag.adb (Process_Convention): Add entries for
5558         Convention_Ada_Pass_By_XXX.
5559         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
5560
5561 2011-08-03  Pascal Obry  <obry@adacore.com>
5562
5563         * makeutl.adb: Minor reformatting.
5564
5565 2011-08-03  Vincent Celier  <celier@adacore.com>
5566
5567         * fname-uf.adb
5568         (Get_File_Name) If the file cannot be found when there are no config
5569         pragmas file and May_Fail is True, return No_File instead of the file
5570         name, to be consistent.
5571
5572 2011-08-03  Pascal Obry  <obry@adacore.com>
5573
5574         * adaint.c (__gnat_is_executable_file_attr): Avoid access
5575         to null pointer.
5576
5577 2011-08-03  Javier Miranda  <miranda@adacore.com>
5578
5579         * sem_ch13.adb
5580         (Same_Representation): In VM targets the representation of arrays with
5581         aliased components differs from arrays with non-aliased components.
5582
5583 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5584
5585         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
5586         not systematically lower case attribute indexes that contain no "."
5587         Fix definition of several Naming attributes, which take
5588         a unit name as index and therefore should be case insensitive.
5589         Minor refactoring (reduce length of variable names).
5590
5591 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5592
5593         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
5594
5595 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5596
5597         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
5598         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
5599         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
5600         prj-tree.ads (Prj.Tree.Environment): new type.
5601
5602 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5603
5604         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
5605         prj-tree.adb, prj-tree.ads (Environment): new type.
5606
5607 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5608
5609         * prj-tree.ads: Remove unused variable.
5610
5611 2011-08-03  Yannick Moy  <moy@adacore.com>
5612
5613         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
5614         issuing messages related to SPARK restriction violation.
5615
5616 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5617
5618         * sem_ch6.adb: guard against error nodes in return statements.
5619
5620 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5621
5622         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
5623         a warning can only appear on a configuration file, so emit warning
5624         without further checks.
5625
5626 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5627
5628         * s-interr.ads: add overriding keyword.
5629
5630 2011-08-03  Geert Bosch  <bosch@adacore.com>
5631
5632         * exp_attr.adb: Fix minor typo.
5633
5634 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5635
5636         * par-ch4.adb: improve error recovery.
5637
5638 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5639
5640         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
5641         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
5642         to Errout_Handling.
5643
5644 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5645
5646         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
5647         "external" as an attribute name in aggregate projects.
5648
5649 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
5650
5651         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
5652         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
5653         from 0, so we need to adjust.
5654
5655 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5656
5657         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
5658         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
5659
5660 2011-08-03  Yannick Moy  <moy@adacore.com>
5661
5662         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
5663         restriction on overloaded entity if the entity is not an operator.
5664
5665 2011-08-03  Yannick Moy  <moy@adacore.com>
5666
5667         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
5668         restrict.ads: Rename remaining Check_Formal_Restriction* into
5669         Check_SPARK_Restriction*.
5670
5671 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5672
5673         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
5674         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
5675         qualifier.
5676         (Project_Empty): removed
5677         (Empty_Project): new parameter Qualifier
5678         This is used to have fields specific to aggregate projects, cleaner
5679         New field to store the list of aggregated projects.
5680         (Check_Aggregate_Project): removed
5681         (Process_Aggregated_Projects, Free): new subprograms.
5682
5683 2011-08-03  Olivier Hainque  <hainque@adacore.com>
5684
5685         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
5686
5687 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5688
5689         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
5690         explicit dereference of an unconstrained type, create a constrained
5691         subtype for it, as is done for function calls that return an
5692         unconstrained type.
5693
5694 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5695
5696         * g-pehage.adb (Finalize): Avoid possible double-free.
5697
5698 2011-08-03  Steve Baird  <baird@adacore.com>
5699
5700         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
5701         Elab_Spec/Body attrs in CodePeer_Mode.
5702
5703 2011-08-03  Javier Miranda  <miranda@adacore.com>
5704
5705         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
5706         low bound is not known at compile time but they have no others choice.
5707         Done because in this case the bounds can be obtained directly from the
5708         aggregate.
5709
5710 2011-08-03  Ed Falis  <falis@adacore.com>
5711
5712         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
5713         on VxWorks SMP. Remove unusable constant ANY_CPU.
5714
5715 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5716
5717         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
5718         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
5719         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
5720         Prj.Env.Initialize_Empty): new subprograms
5721         (Get_Env, Find_Project): remove parameter Target_Name.
5722
5723 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5724
5725         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
5726         as a condition for the delayed call to Derived_Subprograms done for the
5727         case of the rewriting of a derived type that constrains the
5728         discriminants of its parent type.
5729         Avoids redundant subprogram derivations for private subtype derivations.
5730
5731 2011-08-03  Javier Miranda  <miranda@adacore.com>
5732
5733         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
5734         Build_Record_Aggr_Code.
5735         (Build_Record_Aggr_Code): Add missing support to initialize hidden
5736         discriminants in extension aggregates.
5737
5738 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5739
5740         * prj-pp.adb (Print): also output project qualifiers, since in
5741         particular "aggregate" is mandatory in an aggregate project.
5742
5743 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5744
5745         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
5746         (Debug_Output): new function.
5747
5748 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5749
5750         * gnat_ugn.texi: Document -Wstack-usage.
5751         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
5752
5753 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5754
5755         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
5756         have keyword LIMITED.
5757
5758 2011-08-03  Yannick Moy  <moy@adacore.com>
5759
5760         * alfa.adb, alfa.ads, alfa_test.adb: New files.
5761         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
5762         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
5763         section (does not happen in compiler, only if code directly calls
5764         Scan_ALI).
5765         * get_alfa.adb, get_alfa.ads: New files.
5766         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
5767         needed.
5768         * lib-xref-alfa.adb: New file.
5769         * lib-xref.adb, lib-xref.ads
5770         (Xref_Entry): redefine information needed in cross-references for ALFA.
5771         Push ALFA treatments in separated local package.
5772         (Enclosing_Subpragram_Or_Package): treat specially subprogram
5773         identifiers. Return entity of package body instead of spec. Return
5774         Empty for a scope with no location.
5775         (Generate_Reference): adapt to new components for ALFA information.
5776         Remove the need for D references on definitions.
5777         (Is_Local_Reference): moved to ALFA local package
5778         (Output_References): extract subfunction as Extract_Source_Name
5779         (Output_Local_References): remove procedure, replaced by filtering of
5780         cross-references in package ALFA and printing in Put_ALFA.
5781         (Write_Entity_Name): remove procedure
5782         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
5783         print exact name of entity as it appears in source file
5784         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
5785         * put_alfa.adb, put_alfa.ads: New files.
5786         * xref_lib.adb (Search_Xref): protect read of cross-references against
5787         reading other sections of the ALI file, in gnatxref
5788         (Search): protect read of cross-references against reading other
5789         sections of the ALI file, in gnatfind.
5790         * gcc-interface/Make-lang.in: Update dependencies.
5791
5792 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5793
5794         * sem_ch3.adb: Minor reformatting.
5795
5796 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
5797
5798         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
5799         raising an exception.
5800
5801 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5802
5803         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
5804         type, always use 1 as the lower bound or string, even if lower bound of
5805         context is not static, to handle properly null strings in a non-static
5806         context.
5807
5808 2011-08-03  Bob Duff  <duff@adacore.com>
5809
5810         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
5811         always legal on the right-hand side of an assignment statement; there
5812         is always an applicable index constraint in this case. Therefore, the
5813         check for Pkind = N_Assignment_Statement is now unconditional -- it
5814         doesn't depend on whether Is_Constrained (Typ).
5815
5816 2011-08-03  Robert Dewar  <dewar@adacore.com>
5817
5818         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
5819
5820 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5821
5822         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
5823         for an itype created within a generic unit.
5824
5825 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5826
5827         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
5828         suppresses all inlining.
5829
5830 2011-08-03  Robert Dewar  <dewar@adacore.com>
5831
5832         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
5833         exp_aggr.adb: Minor reformatting.
5834
5835 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5836
5837         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
5838         tagged assignment when discriminant checks are suppressed. This is
5839         useless and extremely costly in terms of static stack usage.
5840
5841 2011-08-03  Bob Duff  <duff@adacore.com>
5842
5843         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
5844         of generics, because this leads to the wrong entity in the wrong scope,
5845         causing (e.g.) pragma Export_Procedure to get an error if the entity is
5846         an instance.
5847         (Process_Interface_Name): Follow Alias for instances of generics, to
5848         correct for the above change.
5849
5850 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5851
5852         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
5853         is an integer literal it is always safe to replace the reference. In
5854         addition, if the reference appears in the generated code for an object
5855         declaration it is necessary to copy because otherwise the reference
5856         might be to the uninitilized value of the discriminant of the object
5857         itself.
5858
5859 2011-08-03  Pascal Obry  <obry@adacore.com>
5860
5861         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
5862         ACL used, in this case we want to check for ending .exe, not .exe
5863         anywhere in the path.
5864
5865 2011-08-03  Sergey Rybin  <rybin@adacore.com>
5866
5867         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5868         the tree structure (semantic decoration of references to record
5869         discriminants).
5870
5871 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5872
5873         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
5874         choices of a named array aggregate, bail out when any choices are
5875         marked as Errors_Posted.
5876
5877 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5878
5879         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
5880         in which entity is frozen, to handle properly loop variables in
5881         iterators.
5882
5883 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5884
5885         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
5886         subtype is not static, compute the upper bound using attributes, to
5887         handle properly index types that are not integer types.
5888
5889 2011-08-03  Bob Duff  <duff@adacore.com>
5890
5891         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
5892         Update copyright notice.
5893
5894 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5895
5896         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
5897         Original_Discriminant if within an instance.
5898         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
5899
5900 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5901
5902         * einfo.ads: Minor reformatting.
5903
5904 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5905
5906         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
5907         composite type with an unfrozen subcomponent, in the profile of a
5908         primitive operation.
5909
5910 2011-08-03  Robert Dewar  <dewar@adacore.com>
5911
5912         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5913
5914 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5915
5916         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
5917         unconstrained type with discriminants is initialized with an aggregate,
5918         use the constrained subtype of the aggregate as the type of the object,
5919         because it is immutable, and this allows the back-end to generate no
5920         code for the object declaration.
5921
5922 2011-08-03  Robert Dewar  <dewar@adacore.com>
5923
5924         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
5925         comparison operand is variable, and turns out to be zero or negative.
5926
5927 2011-08-03  Javier Miranda  <miranda@adacore.com>
5928
5929         * exp_intr.adb
5930         (Expand_Dispatching_Constructor_Call): Disable expansion of
5931         code required for native targets. Done to avoid generating
5932         references to unavailable runtime entities in VM targets.
5933         * exp_ch3.adb
5934         (Expand_N_Object_Declaration): Add missing support to handle
5935         the explicit initialization of class-wide interface objects.
5936         Fix documentation.
5937
5938 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5939
5940         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
5941
5942 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5943
5944         * a-cbdlli.adb (Splice): move source items from first to last
5945
5946 2011-08-03  Yannick Moy  <moy@adacore.com>
5947
5948         * sem_util.ads: comment added.
5949
5950 2011-08-03  Javier Miranda  <miranda@adacore.com>
5951
5952         * exp_aggr.adb
5953         (Expand_Record_Aggregate): In VM targets disable the expansion into
5954         assignments of aggregates whose type is not known at compile time.
5955
5956 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5957
5958         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
5959         protected entries and task entries, to build the proper renaming
5960         declaration for entry formals, used in debugging.
5961         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
5962         parameters in the same way.
5963
5964 2011-08-02  Robert Dewar  <dewar@adacore.com>
5965
5966         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
5967         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
5968         code reorganization.
5969
5970 2011-08-02  Robert Dewar  <dewar@adacore.com>
5971
5972         * debug.adb: Debug flag d.P to suppress length comparison optimization
5973         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
5974         comparison of Length by comparing First/Last instead.
5975
5976 2011-08-02  Matthew Heaney  <heaney@adacore.com>
5977
5978         * a-cobove.ads: Code clean up.
5979
5980 2011-08-02  Vincent Celier  <celier@adacore.com>
5981
5982         * adaint.c (file_names_case_sensitive_cache): New static int.
5983         (__gnat_get_file_names_case_sensitive): Cache the return value in
5984         file_names_case_sensitive_cache at the first invocation, to avoid
5985         multiple calls to getenv.
5986
5987 2011-08-02  Bob Duff  <duff@adacore.com>
5988
5989         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
5990
5991 2011-08-02  Yannick Moy  <moy@adacore.com>
5992
5993         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
5994         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
5995         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
5996         indicate that we are in a precondition or postcondition. This is used in
5997         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
5998         decide whether to flag the spec or body of the current subprogram as
5999         not in ALFA.
6000
6001 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
6002
6003         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
6004         list.
6005         * a-extiin.ads: New file.
6006
6007 2011-08-02  Bob Duff  <duff@adacore.com>
6008
6009         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
6010         now raises Name_Error instead of Use_Error in certain cases. The other
6011         parts of this AI were already implemented properly.
6012
6013 2011-08-02  Vincent Celier  <celier@adacore.com>
6014
6015         * link.c: Only import "auto-host.h" when building the gnattools.
6016
6017 2011-08-02  Yannick Moy  <moy@adacore.com>
6018
6019         * sem_util.adb: Inter-unit inlining does not work for a subprogram
6020         which calls a local subprogram, so extract subprogram
6021         from Mark_Non_ALFA_Subprogram_Body.
6022
6023 2011-08-02  Javier Miranda  <miranda@adacore.com>
6024
6025         * exp_ch9.adb
6026         (Extract_Dispatching_Call): If the type of the dispatching object is an
6027         access type then return an explicit dereference in the Object out-mode
6028         parameter.
6029
6030 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6031
6032         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
6033         compatibility checks for all indexes of an array subtype, not just the
6034         first. Reset Has_Dynamic_Range_Check on the subtype before each
6035         potential check to ensure that Insert_Range_Checks will not elide any
6036         of the dynamic checks.
6037
6038 2011-08-02  Yannick Moy  <moy@adacore.com>
6039
6040         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
6041         SPARK restriction at parsing time.
6042         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
6043         directive only if the SPARK restriction is set for this unit.
6044
6045 2011-08-02  Yannick Moy  <moy@adacore.com>
6046
6047         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
6048         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
6049         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
6050         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
6051         Mark_Non_ALFA_Subprogram_Body.
6052         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
6053         inlined.
6054
6055 2011-08-02  Yannick Moy  <moy@adacore.com>
6056
6057         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
6058         might be costly.
6059
6060 2011-08-02  Robert Dewar  <dewar@adacore.com>
6061
6062         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
6063         exp_ch3.adb: Minor reformatting.
6064
6065 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6066
6067         * adaint.c (__gnat_locate_exec_on_path): only returns executable
6068         files, not any regular file.
6069         (__gnat_locate_file_with_predicate): new subprogram.
6070
6071 2011-08-02  Yannick Moy  <moy@adacore.com>
6072
6073         * sinfo.adb, sinfo.ads: Restrict the use of flags
6074         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
6075         nodes, plus N_Subtype_Declaration for the 2nd one.
6076
6077 2011-08-02  Sergey Rybin  <rybin@adacore.com>
6078
6079         * gnat_rm.texi: Ramification of pragma Eliminate documentation
6080          - fix bugs in the description of Source_Trace;
6081          - get rid of UNIT_NAME;
6082
6083 2011-08-02  Javier Miranda  <miranda@adacore.com>
6084
6085         * exp_ch9.adb
6086         (Build_Dispatching_Requeue): Adding support for VM targets
6087         since we cannot directly reference the Tag entity.
6088         * exp_sel.adb (Build_K): Adding support for VM targets.
6089         (Build_S_Assignment): Adding support for VM targets.
6090         * exp_disp.adb
6091         (Default_Prim_Op_Position): In VM targets do not restrict availability
6092         of predefined interface primitives to compiling in Ada 2005 mode.
6093         (Is_Predefined_Interface_Primitive): In VM targets this service is not
6094         restricted to compiling in Ada 2005 mode.
6095         (Make_VM_TSD): Generate code that declares and initializes the OSD
6096         record. Needed to support dispatching calls through synchronized
6097         interfaces.
6098         * exp_ch3.adb
6099         (Make_Predefined_Primitive_Specs): Enable generation of predefined
6100         primitives associated with synchronized interfaces.
6101         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6102         primitives associated with synchronized interfaces.
6103
6104 2011-08-02  Yannick Moy  <moy@adacore.com>
6105
6106         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6107         statements hidden in SPARK if preceded by the HIDE directive
6108         (Parse_Exception_Handlers): mark each exception handler in a sequence of
6109         exception handlers as hidden in SPARK if preceded by the HIDE directive
6110         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6111         if starting with the HIDE directive
6112         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6113         starting with the HIDE directive; mark the declarations in a private
6114         part as hidden in SPARK if the private part starts with the HIDE
6115         directive
6116         * restrict.adb, restrict.ads
6117         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6118         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6119         argument node belongs to a part which is hidden in SPARK
6120         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6121         parts in SPARK; protect the possibly costly call to
6122         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6123         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6124         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6125         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6126         Tok_SPARK_Hide.
6127         (Scan): recognize special comment starting with '#' and followed by
6128         SPARK keyword "hide" as a HIDE directive.
6129
6130 2011-08-02  Yannick Moy  <moy@adacore.com>
6131
6132         * types.ads, erroutc.ads: Minor reformatting.
6133
6134 2011-08-02  Vincent Celier  <celier@adacore.com>
6135
6136         * link.c: Add response file support for cross platforms.
6137
6138 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6139
6140         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
6141         in an association, set parent field of copy before partial analysis.
6142         * sem_res.adb (Resolve_Slice): create reference to itype only when
6143         expansion is enabled.
6144
6145 2011-08-02  Yannick Moy  <moy@adacore.com>
6146
6147         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
6148         for new flag denoting which subprogram bodies are in ALFA
6149         * restrict.adb, sem_ch7.adb: Update comment
6150         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6151         sem_ch9.adb, sem_res.adb: Add calls to
6152         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
6153         * sem_ch6.adb (Analyze_Function_Return): add calls to
6154         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
6155         middle of the body, and extended return.
6156         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
6157         False when missing return.
6158         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
6159         to True for subprograms whose spec is in ALFA. Remove later on the flag
6160         on the entity used for a subprogram body when there exists a separate
6161         declaration.
6162         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
6163         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
6164         False, otherwise do nothing.
6165
6166 2011-08-02  Robert Dewar  <dewar@adacore.com>
6167
6168         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6169
6170 2011-08-02  Yannick Moy  <moy@adacore.com>
6171
6172         * sem_ch4.ads: minor formatting.
6173
6174 2011-08-02  Yannick Moy  <moy@adacore.com>
6175
6176         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
6177         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
6178         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
6179         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
6180         opt.ads: cleanup of SPARK mode
6181
6182 2011-08-02  Yannick Moy  <moy@adacore.com>
6183
6184         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
6185         types.
6186         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
6187         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
6188         * sem_ch3.adb
6189         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
6190         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
6191         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
6192         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
6193         types.
6194         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
6195         non-static range.
6196         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
6197         functions whose return type is not in ALFA.
6198         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
6199         specifications.
6200         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
6201         parameter's type is not in ALFA.
6202         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
6203         types are in ALFA.
6204
6205 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6206
6207         * sem_ch6 (Analyze_Expression_Function): treat the function as
6208         Inline_Always, and introduce a subprogram declaration for it when it is
6209         not a completion.
6210         * inline.adb (Add_Inlined_Body): recognize bodies that come from
6211         expression functions, so that the back-end can determine whether they
6212         can in fact be inlined.
6213         * sem_util.adb (Is_Expression_Function): predicate to determine whether
6214         a function body comes from an expression function.
6215
6216 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6217
6218         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
6219         null exclusions to test Can_Never_Be_Null on the anonymous access types
6220         of the formals rather than testing the formals themselves. Exclude this
6221         check in cases where the Old_Formal is marked as a controlling formal,
6222         to avoid issuing spurious errors for bodies completing dispatching
6223         operations (due to the flag not getting set on controlling access
6224         formals in body specs).
6225         (Find_Corresponding_Spec): When checking full and subtype conformance of
6226         subprogram bodies in instances, pass Designated and E in that order, for
6227         consistency with the expected order of the formals (New_Id followed by
6228         Old_Id).
6229
6230 2011-08-02  Robert Dewar  <dewar@adacore.com>
6231
6232         * sem_ch8.adb: Minor reformatting.
6233
6234 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6235
6236         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
6237         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
6238         primitive operations of class-wide actuals.
6239
6240 2011-08-02  Javier Miranda  <miranda@adacore.com>
6241
6242         * exp_atag.ads, exp_atag.adb
6243         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
6244         since its value is implicitly passed in argument Typ.
6245         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
6246         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
6247         Build_Common_Dispatching_Select_Statements.
6248
6249 2011-08-02  Robert Dewar  <dewar@adacore.com>
6250
6251         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
6252         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
6253         Minor reformatting.
6254
6255 2011-08-02  Robert Dewar  <dewar@adacore.com>
6256
6257         * sem_res.adb: Minor reformatting.
6258         * sem_prag.adb: Minor reformatting.
6259
6260 2011-08-02  Javier Miranda  <miranda@adacore.com>
6261
6262         * exp_atag.adb, exp_atags.ads
6263         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
6264         by the tagged type Entity. Required to use this routine in the VM
6265         targets since we do not have available the Tag entity in the VM
6266         platforms.
6267         * exp_ch6.adb
6268         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
6269         Ada.Tags has not been previously loaded.
6270         * exp_ch7.adb
6271         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
6272         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
6273         * sem_aux.adb
6274         (Enclosing_Dynamic_Scope): Add missing support to handle the full
6275         view of enclosing scopes. Required to handle enclosing scopes that
6276         are synchronized types whose full view is a task type.
6277         * exp_disp.adb
6278         (Build_VM_TSDs): Minor code improvement to avoid generating and
6279         analyzing lists with empty nodes.
6280         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
6281         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
6282         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
6283         (Make_Disp_Timed_Select_Body): Add support for VM targets.
6284         (Make_Select_Specific_Data_Table): Add support for VM targets.
6285         (Make_VM_TSD): Generate code to initialize the SSD structure of
6286         the TSD.
6287
6288 2011-08-02  Yannick Moy  <moy@adacore.com>
6289
6290         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
6291         cross-references section in ALI.
6292         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
6293         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
6294         Sub).
6295         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
6296         subprogram or package entity of a node
6297         (Is_Local_Reference_Type): new function returns True for references
6298         selected in local cross-references.
6299         (Lt): function extracted from Lt in Output_References
6300         (Write_Entity_Name): function extracted from Output_References
6301         (Generate_Definition): generate reference with type 'D' for definition
6302         of objects (object declaration and parameter specification), with
6303         appropriate locations and units, for use in local cross-references.
6304         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
6305         references of type 'I' for initialization in object definition.
6306         (Output_References): move part of function Lt and procedure
6307         Write_Entity_Name outside of the body. Ignore references of types 'D'
6308         and 'I' introduced for local cross-references.
6309         (Output_Local_References): new procedure to output the local
6310         cross-references sections.
6311         (Lref_Entity_Status): new array defining whether an entity is a local
6312         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
6313         with 'I' type when initialization expression is present.
6314         * get_scos.adb, get_scos.ads: Correct comments and typos
6315
6316 2011-08-02  Javier Miranda  <miranda@adacore.com>
6317
6318         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
6319         the JVM target.
6320         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
6321         the JVM target.
6322         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
6323         TSD support.
6324
6325 2011-08-02  Vincent Celier  <celier@adacore.com>
6326
6327         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
6328         (No_Space_Img): New function
6329         (Find_Excluded_Sources): When reading from a file, record the file name
6330         and the line number for each excluded source.
6331         (Mark_Excluded_Sources): When reporting an error, if the excluded
6332         sources were read from a file, include file name and line number in
6333         the error message.
6334
6335 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6336
6337         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
6338
6339 2011-08-02  Robert Dewar  <dewar@adacore.com>
6340
6341         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
6342
6343 2011-08-02  Javier Miranda  <miranda@adacore.com>
6344
6345         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
6346         generation of TSDs to the DOTNET compiler.
6347         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
6348         generation of TSDs to the DOTNET compiler.
6349
6350 2011-08-02  Javier Miranda  <miranda@adacore.com>
6351
6352         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
6353         record of all the tagged types declared inside library level package
6354         declarations, library level package bodies or library level subprograms.
6355         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
6356         associated with a given tagged type.
6357         (Build_VM_TSDs): New subprogram.
6358         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
6359         compilation units that are subprograms.
6360         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
6361         compilation units that are package bodies.
6362         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
6363         units that are a package declaration or a package instantiation.
6364         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
6365         reorganization to improve the error generated by the frontend when the
6366         function Ada.Tags.Secondary_Tag is not available.
6367         * rtsfind.ads (RE_Register_TSD): New runtime entity.
6368         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
6369
6370 2011-08-02  Javier Miranda  <miranda@adacore.com>
6371
6372         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
6373
6374 2011-08-02  Robert Dewar  <dewar@adacore.com>
6375
6376         * s-imenne.ads: Minor reformatting.
6377
6378 2011-08-02  Robert Dewar  <dewar@adacore.com>
6379
6380         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
6381         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
6382         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
6383
6384 2011-08-02  Robert Dewar  <dewar@adacore.com>
6385
6386         * einfo.ads (Materialize_Entity): Document this is only for renamings
6387         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
6388         required debug information in the case where we transform the object
6389         declaration into a renaming declaration.
6390         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
6391         object
6392         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
6393         Materialize_Entity.
6394
6395 2011-08-02  Robert Dewar  <dewar@adacore.com>
6396
6397         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
6398         Suppress_Init_Procs.
6399         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
6400         Suppress_Initialization/Initialization_Suppressed.
6401         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
6402         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
6403         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
6404         * sem_prag.adb: New processing for pragma Suppress_Initialization.
6405
6406 2011-08-02  Robert Dewar  <dewar@adacore.com>
6407
6408         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
6409         Minor reformatting.
6410
6411 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6412
6413         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
6414         only have inheritable classwide pre/postconditions.
6415
6416 2011-08-02  Javier Miranda  <miranda@adacore.com>
6417
6418         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
6419         * rtsfind.ads (RE_Check_TSD): New runtime entity.
6420         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
6421         checks if the external tag of a type is the same as the external tag
6422         of some other declaration.
6423
6424 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6425
6426         * s-taskin.ads: Minor reformatting.
6427
6428 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6429
6430         * g-comlin.adb (Display_Help): swap the order in which it prints the
6431         short help and the general usage.
6432
6433 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6434
6435         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
6436         the aspect declarations and attach them to the generic copy for
6437         subsequent analysis.
6438         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
6439         declarations of the generic tree to the new subprogram declarations.
6440         * sem_attr.adb (Check_Precondition_Postcondition): recognize
6441         conditions that apply to a subprogram instance.
6442
6443 2011-08-02  Robert Dewar  <dewar@adacore.com>
6444
6445         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
6446
6447 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6448
6449         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
6450         private type with a tagged full view is not derived in the immediate
6451         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
6452
6453 2011-08-02  Robert Dewar  <dewar@adacore.com>
6454
6455         * exp_ch4.adb: Minor reformatting.
6456
6457 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6458
6459         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
6460         Ada2012 iterator, the loop will be rewritten during expansion into a
6461         while loop with a cursor and an element declaration. Do not analyze the
6462         body in this case, because if the container is for indefinite types the
6463         actual subtype of the elements will only be determined when the cursor
6464         declaration is analyzed.
6465
6466 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6467
6468         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
6469         size/alignment related attributes in CodePeer_Mode.
6470
6471 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6472
6473         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
6474         Prepend_Element, since this can result in the operation getting the
6475         wrong slot in the full type's dispatch table if the full type has
6476         inherited operations. The incomplete type's operation will get added
6477         to the proper position in the full type's primitives
6478         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
6479         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
6480         dispatching operations, since there are cases where nonprimitive
6481         subprograms can get added to the list of incomplete dependents (such
6482         as subprograms in nested packages).
6483         * sem_ch6.adb (Process_Formals): First, remove test for being in a
6484         private part when determining whether to add a primitive with a
6485         parameter of a tagged incomplete type to the Private_Dependents list.
6486         Such primitives can also occur in the visible part, and should not have
6487         been excluded from being private dependents.
6488         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
6489         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
6490         list of a Taft-amendment incomplete type is a primitive before issuing
6491         an error that the full type must appear in the same unit. There are
6492         cases where nonprimitives can be in the list (such as subprograms in
6493         nested packages).
6494         * sem_disp.adb (Derives_From): Use correct condition for checking that
6495         a formal's type is derived from the type of the corresponding formal in
6496         the parent subprogram (the condition was completely wrong). Add
6497         checking that was missing for controlling result types being derived
6498         from the result type of the parent operation.
6499
6500 2011-08-02  Yannick Moy  <moy@adacore.com>
6501
6502         * errout.adb (First_Node): minor renaming
6503         * restrict.adb (Check_Formal_Restriction): put restriction warning on
6504         first node.
6505
6506 2011-08-02  Yannick Moy  <moy@adacore.com>
6507
6508         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
6509         before accessing operands.
6510         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
6511         decide whether an initialization expression respects SPARK rules, as
6512         the plain node is the expanded one. This allows for more valid warnings
6513         to be issued.
6514         * gnat_rm.texi: Minor update.
6515
6516 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6517
6518         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
6519         previous change.
6520
6521 2011-08-02  Robert Dewar  <dewar@adacore.com>
6522
6523         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
6524
6525 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6526
6527         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
6528         loop statements and the element renaming declaration with a block when
6529         the element type is controlled.
6530
6531 2011-08-02  Yannick Moy  <moy@adacore.com>
6532
6533         * sinfo.ads: Minor formatting.
6534
6535 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6536
6537         * sem_aggr.adb (Add_Association): if the association has a box and no
6538         expression, use the Sloc of the aggregate itself for the new
6539         association.
6540         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
6541         the Original_Node.
6542
6543 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6544
6545         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
6546         When a container is provided via a function call, generate a renaming
6547         of the function result. This avoids the creation of a transient scope
6548         and the premature finalization of the container.
6549         * exp_ch7.adb (Is_Container_Cursor): Removed.
6550         (Wrap_Transient_Declaration): Remove the supression of the finalization
6551         of the list controller when the declaration denotes a container cursor,
6552         it is not needed.
6553
6554 2011-08-02  Yannick Moy  <moy@adacore.com>
6555
6556         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
6557         node is from source, instead of the original node being from source.
6558         * sem_aggr.adb
6559         (Resolve_Array_Aggregate): refine the check for a static expression, to
6560         recognize also static ranges
6561         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
6562         Array_Type_Declaration): postpone the test for the type being a subtype
6563         mark after the type has been resolved, so that component-selection and
6564         expanded-name are discriminated.
6565         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
6566         to distinguish the case of an iteration scheme, so that an error is
6567         issed on a non-static range in SPARK except in an iteration scheme.
6568         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
6569         In_Iter_Schm = True.
6570         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
6571         user-defined operators so that they are allowed in renaming
6572         * sem_ch8.adb
6573         (Find_Selected_Component): refine the check for prefixing of operators
6574         so that they are allowed in renaming. Move the checks for restrictions
6575         on selector name after analysis discriminated between
6576         component-selection and expanded-name.
6577         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
6578         concatenation argument of string type if it is static.
6579         * sem_util.adb, sem_util.ads
6580         (Check_Later_Vs_Basic_Declarations): add a new function
6581         Is_Later_Declarative_Item to decice which declarations are allowed as
6582         later items, in the two different modes Ada 83 and SPARK. In the SPARK
6583         mode, add that renamings are considered as later items.
6584         (Enclosing_Package): new function to return the enclosing package
6585         (Enter_Name): correct the rule for homonyms in SPARK
6586         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
6587         from source (result of expansion) to avoid issuing wrong warnings.
6588
6589 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6590
6591         * errout.adb: On anything but an expression First_Node returns its
6592         argument.
6593
6594 2011-08-02  Pascal Obry  <obry@adacore.com>
6595
6596         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6597
6598 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6599
6600         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6601         Set the associated loop as the related expression of internally
6602         generated cursors.
6603         * exp_ch7.adb (Is_Container_Cursor): New routine.
6604         (Wrap_Transient_Declaration): Supress the finalization of the list
6605         controller when the declaration denotes a container cursor.
6606
6607 2011-08-02  Yannick Moy  <moy@adacore.com>
6608
6609         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6610         command line now.
6611         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6612         expression is a simple expression. This check cannot be performed in
6613         the semantics, so just drop it.
6614         (P_Index_Or_Discriminant_Constraint): move check that the index or
6615         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6616         semantics. Other cases were previously checked in the semantics.
6617         * par-ch4.adb (P_Name): move checks that a selector name is not
6618         character literal or an operator symbol to Find_Selected_Component in
6619         the semantics
6620         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6621         declarations are not placed after later declarations in a separate
6622         procedure in Sem_Util (possibly not the best choice?), to be used both
6623         during parsing, for Ada 83 mode, and during semantic analysis, for
6624         SPARK mode.
6625         * par-endh.adb (Check_End): move check that end label is not missing
6626         to Process_End_Label in the semantics
6627         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6628         the special case for SPARK restriction
6629         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6630         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6631         parameter Force to issue the error message even on internal node (used
6632         for generated end label). Call Check_Restriction to check when an error
6633         must be issued. In SPARK mode, issue an error message even if the
6634         restriction is not set.
6635         (Check_Restriction): new procedure with an additional out parameter to
6636         inform the caller that a message has been issued
6637         * sem_aggr.adb: Minor modification of message
6638         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6639         instead of issuing an error message directly
6640         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6641         declarations are not placed after later declarations, by calling
6642         Check_Later_Vs_Basic_Declarations
6643         (Analyze_Subtype_Declaration): move here the check that an index or
6644         discriminant constraint must be a subtype mark. Change the check that
6645         a subtype of String must start at one so that it works on subtype marks.
6646         * sem_ch4.adb (Analyze_Call): move here the check that a named
6647         association cannot follow a positional one in a call
6648         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6649         instead of issuing an error message directly
6650         * sem_ch8.adb (Find_Selected_Component): move here the check that a
6651         selector name is not a character literal or an operator symbol. Move
6652         here the check that the prefix of an expanded name cannot be a
6653         subprogram or a loop statement.
6654         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6655         procedure called from parsing and semantics to check that basic
6656         declarations are not placed after later declarations
6657         (Process_End_Label): move here the check that end label is not missing
6658
6659 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6660
6661         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
6662         representation clause in codepeer mode, since it confuses CodePeer and
6663         does not bring useful info.
6664
6665 2011-08-02  Ed Falis  <falis@adacore.com>
6666
6667         * init.c: initialize fp hw on MILS.
6668
6669 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6670
6671         * errout.adb (First_Node): for bodies, return the node itself (small
6672         optimization). For other nodes, do not check source_unit if the node
6673         comes from Standard.
6674
6675 2011-08-02  Robert Dewar  <dewar@adacore.com>
6676
6677         * exp_ch3.adb: Minor comment additions.
6678         * sem_ch13.adb: Minor reformatting.
6679
6680 2011-08-02  Pascal Obry  <obry@adacore.com>
6681
6682         * make.adb, makeutl.adb: Removes some superfluous directory separator.
6683
6684 2011-08-02  Robert Dewar  <dewar@adacore.com>
6685
6686         * sem_attr.adb: Minor reformatting.
6687
6688 2011-08-02  Robert Dewar  <dewar@adacore.com>
6689
6690         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
6691         (Has_Default_Component_Value): Removed
6692         * einfo.ads Comment updates
6693         (Has_Default_Aspect): Replaces Has_Default_Value
6694         (Has_Default_Component_Value): Removed
6695         * exp_ch13.adb
6696         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
6697         * exp_ch3.adb
6698         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
6699         (Get_Simple_Init_Val): Handle Default_Value aspect
6700         (Needs_Simple_Initialization): Handle Default_Value aspect
6701         * exp_ch3.ads: Needs_Simple_Initialization
6702         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
6703         * par-prag.adb (Pragma_Default[_Component]Value) Removed
6704         * sem_ch13.adb
6705         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
6706         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
6707         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
6708
6709 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6710
6711         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
6712         package containing iteration primitives.
6713         exp_ch5.adb (Expand_Iterator_Loop): ditto.
6714
6715 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6716
6717         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
6718         "of", pre-analyze expression in case it is a function call with
6719         finalization actions that must be placed ahead of the loop.
6720         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
6721         on an Ada2012 iterator, insert them ahead of the rewritten loop.
6722
6723 2011-08-02  Geert Bosch  <bosch@adacore.com>
6724
6725         * cstand.adb (Create_Float_Types): Only consider C's long double for
6726         Long_Long_Float, in addition to double.
6727
6728 2011-08-02  Robert Dewar  <dewar@adacore.com>
6729
6730         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
6731         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
6732         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
6733         Minor reformatting.
6734
6735 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6736
6737         * sem_attr.adb: handle properly 'Result when it is a prefix of an
6738         indexed component.
6739
6740 2011-08-02  Javier Miranda  <miranda@adacore.com>
6741
6742         * einfo.ads, einfo.adb
6743         (Original_Access_Type): Move this attribute to Node26 since there was
6744         an undocumented use of Node21 in E_Access_Subprogram_Type entities
6745         which causes conflicts and breaks the generation of the .NET compiler.
6746         (Interface_Name): Add missing documentation on JGNAT only uses of
6747         this attribute.
6748
6749 2011-08-02  Geert Bosch  <bosch@adacore.com>
6750
6751         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
6752         (Find_Back_End_Float_Type): Likewise
6753         (Create_Back_End_Float_Types): Likewise
6754         (Create_Float_Types): Likewise
6755         (Register_Float_Type): Likewise
6756         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6757         Nlist and split out type selection in new local Find_Base_Type function.
6758         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6759         Nlist
6760         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6761
6762 2011-08-02  Robert Dewar  <dewar@adacore.com>
6763
6764         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6765         alpha order).
6766         * opt.ads: Minor comment change.
6767         * sem_ch12.adb: Minor code reorganization.
6768
6769 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6770
6771         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6772         subtype's list of rep items to the list on the full subtype in the case
6773         where the lists are the same.
6774
6775 2011-08-02  Geert Bosch  <bosch@adacore.com>
6776
6777         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6778         using the one from System.Strings, which also deallocates all strings.
6779
6780 2011-08-02  Geert Bosch  <bosch@adacore.com>
6781
6782         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6783         function.
6784         * gcc-interface/Make-lang.in: Update dependencies.
6785
6786 2011-08-02  Olivier Hainque  <hainque@adacore.com>
6787
6788         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6789         end_locus.
6790
6791 2011-08-02  Javier Miranda  <miranda@adacore.com>
6792
6793         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6794         associated with anonymous access to subprograms.
6795
6796 2011-08-02  Geert Bosch  <bosch@adacore.com>
6797
6798         * opt.ads
6799         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6800         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6801         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6802         (Add_Symbol_Definition): Move to switch-c.adb
6803         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6804         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6805         (Add_Symbol_Definition): Move to switch-c.adb.
6806         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6807         * sem_warn.adb
6808         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6809         Move to warnsw.adb.
6810         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6811         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6812         Move to warnsw.adb.
6813         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6814         (Add_Symbol_Definition): Moved from Prepcomp.
6815         * switch-c.ads: Update copyright notice. Use String_List instead of
6816         Argument_List, removing dependency on System.OS_Lib.
6817
6818 2011-08-02  Yannick Moy  <moy@adacore.com>
6819
6820         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6821         mode on initialization expression which does not respect SPARK
6822         restrictions.
6823         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6824         if the tree referenced by its argument represents an initialization
6825         expression in SPARK, suitable for initializing an object in an object
6826         declaration.
6827
6828 2011-08-02  Javier Miranda  <miranda@adacore.com>
6829
6830         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6831         internally generated access to subprogram with its associated protected
6832         subprogram type.
6833         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6834
6835 2011-08-02  Geert Bosch  <bosch@adacore.com>
6836
6837         * cstand.adb (Register_Float_Type): Print information about type to
6838         register, if the Debug_Flag_Dot_B is set.
6839         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6840         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6841         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6842         with a requested precision of more than Max_Digits digits and no more
6843         than Max_Base_Digits digits, if a range specification is present and the
6844         Predefined_Float_Types list has a suitable type to derive from.
6845         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6846         case of type completion with pragma Import
6847         * sem_prag.adb
6848         (Process_Import_Predefined_Type): Processing to complete a type
6849         with pragma Import. Currently supports floating point types only.
6850         (Set_Convention_From_Pragma): Do nothing without underlying type.
6851         (Process_Convention): Guard against absence of underlying type,
6852         which may happen when importing incomplete types.
6853         (Process_Import_Or_Interface): Handle case of importing predefined
6854         types. Tweak error message.
6855
6856 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6857
6858         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6859         functions to previous change.  Reorganize code slightly.
6860
6861 2011-08-02  Geert Bosch  <bosch@adacore.com>
6862
6863         * back_end.ads (Register_Type_Proc): New call back procedure type for
6864         allowing the back end to provide information about available types.
6865         (Register_Back_End_Types): New procedure to register back end types.
6866         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6867         available types.
6868         * cstand.adb (Back_End_Float_Types): New list for floating point types
6869         supported by the back end.
6870         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6871         (Copy_Float_Type): New procedure to make new copies of predefined types.
6872         (Register_Float_Type): New call back procedure to populate the BEFT list
6873         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6874         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6875         (Create_Float_Types): New procedure to create entities for floating
6876         point types predefined in Standard, and put these and any remaining
6877         BEFTs on the Predefined_Float_Types list.
6878         * stand.ads (Predefined_Float_Types): New list for predefined floating
6879         point types that do not have declarations in package Standard.
6880
6881 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6882
6883         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
6884         entity node for the unit containing the parameter.
6885         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6886         (Add_Inlined_Subprogram): Likewise.
6887         * gcc-interface/Make-lang.in: Update dependencies.
6888
6889 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6890
6891         * s-stusta.adb (Print): Make sure Pos is always initialized to a
6892         suitable value.
6893
6894 2011-08-02  Geert Bosch  <bosch@adacore.com>
6895
6896         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6897
6898 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6899
6900         * sem_type.adb (Covers): Move trivial case to the top and reuse the
6901         computed value of Base_Type.
6902
6903 2011-08-02  Yannick Moy  <moy@adacore.com>
6904
6905         * restrict.adb (Check_Restriction): issue an error for any use of
6906         class-wide, even if the No_Dispatch restriction is not set.
6907         * sem_aggr.adb: Correct typos in comments and messages in formal mode
6908         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6909         when completing a private extension, the type named in the private part
6910         is not the same as that named in the visible part.
6911         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6912         of an inherited primitive operations of a tagged type or type extension
6913         that returns the tagged type.
6914         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6915         function which returns True for an implicit operation inherited by the
6916         derived type declaration for the argument type.
6917         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6918         order.
6919
6920 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6921
6922         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6923         Process_Bounds, to perform analysis with expansion of a range or an
6924         expression that is the iteration scheme for a loop.
6925         (Analyze_Iterator_Specification): If domain of iteration is given by a
6926         function call with a controlled result, as is the case if call returns
6927         a predefined container, ensure that finalization actions are properly
6928         generated.
6929         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6930
6931 2011-08-02  Javier Miranda  <miranda@adacore.com>
6932
6933         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6934         * gcc-interface/Make-lang.in: Update dependencies.
6935
6936 2011-08-02  Javier Miranda  <miranda@adacore.com>
6937
6938         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6939         determine if the analysis is performed using N or Original_Node (N).
6940         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6941         functionality of routine Is_Variable avoids code duplication.
6942         * checks.adb (Determine_Range): Handle temporaries generated by
6943         Remove_Side_Effects.
6944
6945 2011-08-02  Javier Miranda  <miranda@adacore.com>
6946
6947         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6948         expansion of the condition. Required since the previous analysis was
6949         done with expansion disabled (see Resolve_Quantified_Expression) and
6950         hence checks were not inserted and record comparisons have not been
6951         expanded.
6952
6953 2011-08-02  Ed Falis  <falis@adacore.com>
6954
6955         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6956         Update header.
6957
6958 2011-08-02  Bob Duff  <duff@adacore.com>
6959
6960         * opt.ads: Minor comment fix.
6961
6962 2011-08-02  Bob Duff  <duff@adacore.com>
6963
6964         * sem_ch12.adb (Analyze_Package_Instantiation,
6965         Analyze_Subprogram_Instantiation): Turn off style checking while
6966         analyzing an instance. Whatever style checks that apply to the generic
6967         unit should apply, so it makes no sense to apply them in an instance.
6968         This was causing trouble when compiling an instance of a runtime
6969         unit that violates the -gnatyO switch.
6970         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6971         one of the two case statements, causing spurious errors.
6972
6973 2011-08-02  Robert Dewar  <dewar@adacore.com>
6974
6975         * uname.adb: Minor reformatting.
6976         * gnatcmd.adb: Minor reformatting.
6977         * exp_attr.adb: Minor reformatting.
6978
6979 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6980
6981         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6982         No_Dispatching_Calls, do not look for the Assign primitive, because
6983         predefined primitives are not created in this case.
6984
6985 2011-08-02  Bob Duff  <duff@adacore.com>
6986
6987         * stylesw.ads: Minor comment fixes.
6988
6989 2011-08-02  Robert Dewar  <dewar@adacore.com>
6990
6991         * freeze.adb (Add_To_Result): New procedure.
6992
6993 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6994
6995         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6996         time, if the specific run-time routines for handling streams of strings
6997         are not available, use the default mechanism.
6998
6999 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7000
7001         * s-regpat.ads: Fix typo.
7002
7003 2011-08-02  Vincent Celier  <celier@adacore.com>
7004
7005         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7006         not null, call it to create the in memory config project file without
7007         parsing an existing default config project file.
7008
7009 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7010
7011         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7012
7013 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7014
7015         * sem_elim.adb: an abstract subprogram does not need an eliminate
7016         pragma for its descendant to be eliminable.
7017
7018 2011-08-02  Ed Falis  <falis@adacore.com>
7019
7020         * init.c: revert to handling before previous checkin for VxWorks
7021         * s-intman-vxworks.adb: delete unnecessary declarations related to
7022         using Ada interrupt facilities for handling signals.
7023         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7024         * s-intman-vxworks.ads: Import __gnat_install_handler as
7025         Initialize_Interrupts.
7026         * s-taprop-vxworks.adb: Delete Signal_Mask.
7027         (Abort_Handler): change construction of mask to unblock exception
7028         signals.
7029
7030 2011-08-02  Jerome Guitton  <guitton@adacore.com>
7031
7032         * a-except-2005.adb (Raise_From_Signal_Handler): Call
7033         Debug_Raise_Exception before propagation starts.
7034
7035 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7036
7037         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7038         to Restriction_Check_Required.
7039         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7040         * sem_res.adb (Resolve_Call): Likewise.
7041         * sem_attr.adb (Check_Stream_Attribute): Likewise.
7042
7043 2011-08-02  Bob Duff  <duff@adacore.com>
7044
7045         * stylesw.ads: Update comment.
7046         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7047         * errout.ads: Remove obsolete comment.
7048
7049 2011-08-02  Javier Miranda  <miranda@adacore.com>
7050
7051         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7052         (Set_Is_Safe_To_Reevaluate): new procedure.
7053         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7054         assignment is allowed on safe-to-reevaluate variables.
7055         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7056         temporary created to remove side effects in expressions that use
7057         the secondary stack as safe-to-reevaluate.
7058         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7059         variables that are not true constants.
7060
7061 2011-08-02  Robert Dewar  <dewar@adacore.com>
7062
7063         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7064         sem_res.adb, sem_ch6.adb: Minor reformatting.
7065
7066 2011-08-02  Jerome Guitton  <guitton@adacore.com>
7067
7068         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7069
7070 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7071
7072         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7073         not set Overridden_Operation if subprogram is an initialization
7074         procedure.
7075
7076 2011-08-02  Yannick Moy  <moy@adacore.com>
7077
7078         * par-ch6.adb: Correct obsolete name in comments
7079         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7080         which takes two message arguments (existing function takes one), with
7081         second message used for continuation.
7082         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7083         block statements that originate from a source block statement, not
7084         generated block statements
7085         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7086         symmetry with procedure case
7087         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7088         function to issue an error in formal mode if a package specification
7089         contains more than one tagged type or type extension.
7090         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7091         parameters matching formals of tagged types are objects (or ancestor
7092         type conversions of objects), not general expressions. Issue an error
7093         on view conversions that are not involving ancestor conversion of an
7094         extended type.
7095         (Resolve_Type_Conversion): in formal mode, issue an error on the
7096         operand of an ancestor type conversion which is not an object
7097         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7098         procedure so that it works also for actuals of function calls
7099         (Is_Actual_Tagged_Parameter): new function which determines if its
7100         argument is an actual parameter of a formal of tagged type in a
7101         subprogram call
7102         (Is_SPARK_Object_Reference): new function which determines if the tree
7103         referenced by its argument represents an object in SPARK
7104
7105 2011-08-02  Robert Dewar  <dewar@adacore.com>
7106
7107         * sem_ch3.adb: Minor reformatting
7108         Minor comment addition
7109         Minor error msg text change
7110
7111 2011-08-02  Javier Miranda  <miranda@adacore.com>
7112
7113         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7114         function. Used to be more precise when we generate a variable plus one
7115         assignment to remove side effects in the evaluation of the Bound
7116         expressions.
7117         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7118         of the bound expression to force its re-analysis and thus expand the
7119         associated transient scope (if required). Code cleanup replacing the
7120         previous code that declared the constant entity by an invocation to
7121         routine Force_Evaluation which centralizes this work in the frontend.
7122
7123 2011-08-02  Robert Dewar  <dewar@adacore.com>
7124
7125         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7126         (Base_Type): Now uses improved Is_Base_Type function
7127         * einfo.ads (Base_Type): Inline this function
7128
7129 2011-08-02  Robert Dewar  <dewar@adacore.com>
7130
7131         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7132         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7133
7134 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7135
7136         * gcc-interface/Make-lang.in: Update dependencies.
7137         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7138         targets.
7139
7140 2011-08-02  Yannick Moy  <moy@adacore.com>
7141
7142         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
7143         non-simple expression used in delta constraint
7144         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
7145         index constraint which is not a subtype mark
7146         * par.adb: With and use Restrict
7147         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
7148         mode on component type which is not a subtype mark and default
7149         expression on component
7150         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
7151         of string which does not have a lower index bound equal to 1
7152         (Array_Type_Declaration): issue an error in formal mode on index or
7153         component type which is not a subtype mark, and on aliased keyword on
7154         component
7155         (Derived_Type_Declaration): issue an error in formal mode on interface,
7156         limited or abstract type
7157         (Record_Type_Declaration): issue an error in formal mode on interface
7158         (Record_Type_Definition): issue an error in formal mode on tagged types
7159         and type extensions not declared in the specification of a library unit
7160         package; on null non-tagged record; on variant part
7161
7162 2011-08-02  Vincent Celier  <celier@adacore.com>
7163
7164         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
7165         not declared for qualified library project when Library_Name is not
7166         declared, but Library_Dir is.
7167
7168 2011-08-02  Robert Dewar  <dewar@adacore.com>
7169
7170         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
7171         pragmas (affects aspects [Component_]Default_Value
7172         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
7173         component type for the resolution
7174
7175 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7176
7177         * einfo.adb (Base_Type): Tune implementation for speed.
7178
7179 2011-08-02  Robert Dewar  <dewar@adacore.com>
7180
7181         * freeze.adb: Minor reformatting.
7182
7183 2011-08-02  Thomas Quinot  <quinot@adacore.com>
7184
7185         * scos.ads: Update comments.
7186
7187 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7188
7189         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
7190         base type, because the parent may be a subtype of a private type whose
7191         convention is established in a private part.
7192
7193 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
7194
7195         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
7196         statement in a block when the expansion of the return expression has
7197         created a finalization chain.
7198         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
7199         with the parent node.
7200         Add N_Extended_Return_Statement to handle the case where a transient
7201         object declaration appears in the Return_Object_Declarations list of
7202         an extended return statement.
7203
7204 2011-08-02  Matthew Gingell  <gingell@adacore.com>
7205
7206         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
7207         unused parameter 'name'.
7208
7209 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7210
7211         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
7212         inherited operation, check whether its alias, which is the source
7213         operastion that it renames, has been marked eliminated.
7214
7215 2011-08-02  Javier Miranda  <miranda@adacore.com>
7216
7217         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
7218         in-mode parameter whose type is an access type since it can be used to
7219         modify its designated object. Enforce code that handles as safe an
7220         access type that is not access-to-constant but it is the result of a
7221         previous removal of side-effects.
7222         (Remove_Side_Effects): Minor code reorganization of cases which require
7223         no action. Done to incorporate documentation on new cases uncovered
7224         working in this ticket: no action needed if this routine was invoked
7225         too early and the nodes are not yet decorated.
7226         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
7227         to routine Remove_Side_Effects by calls to Force_Evaluation since they
7228         were issued with actuals that are implicitly provided by
7229         Force_Evaluation.
7230
7231 2011-08-02  Robert Dewar  <dewar@adacore.com>
7232
7233         * sem_ch3.adb, sem_res.adb: Minor reformatting.
7234
7235 2011-08-02  Yannick Moy  <moy@adacore.com>
7236
7237         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
7238         to issue an error in formal mode on attribute not supported in this mode
7239         (Analyze_Attribute): issue errors on standard attributes not supported
7240         in formal mode.
7241         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
7242         comment, and issue error in formal mode on modulus which is not a power
7243         of 2.
7244         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
7245         range.
7246         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
7247         subtype mark.
7248         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
7249         operator on modular type (except 'not').
7250
7251 2011-08-02  Robert Dewar  <dewar@adacore.com>
7252
7253         * gnat_rm.texi: Minor reformatting.
7254
7255 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7256
7257         * s-osinte-linux.ads: Minor comment update and reformatting.
7258         * i-cexten.ads: Make this unit pure, as for its parent.
7259         Will allow its usage in more contexts if needed.
7260
7261 2011-08-02  Robert Dewar  <dewar@adacore.com>
7262
7263         * s-utf_32.ads: Minor comment fix.
7264
7265 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7266
7267         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
7268         operation of a tagged synchronized type, handle the case where the
7269         controlling argument is overloaded.
7270
7271 2011-08-02  Yannick Moy  <moy@adacore.com>
7272
7273         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
7274         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
7275         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
7276         SPARK mode and formal verification mode on processing SPARK restriction
7277         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
7278         requiring consistency checking.
7279
7280 2011-08-02  Robert Dewar  <dewar@adacore.com>
7281
7282         * sem_res.adb: Minor reformatting.
7283
7284 2011-08-02  Robert Dewar  <dewar@adacore.com>
7285
7286         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7287         a-cforse.ads: Remove unneeded with of Ada.Containers
7288         Remove commented out pragma Inline's
7289         Move specifications of new subprograms to the actual specs
7290
7291 2011-08-02  Yannick Moy  <moy@adacore.com>
7292
7293         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7294         a-cforse.ads: Update comments.
7295
7296 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7297
7298         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
7299
7300 2011-08-02  Robert Dewar  <dewar@adacore.com>
7301
7302         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7303         a-cforse.ads, a-cofove.ads: Minor reformatting.
7304
7305 2011-08-02  Claire Dross  <dross@adacore.com>
7306
7307         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
7308         a-cofove.ads: Add comments.
7309
7310 2011-08-02  Yannick Moy  <moy@adacore.com>
7311
7312         * gnat_rm.texi: Document formal containers.
7313
7314 2011-08-02  Emmanuel Briot  <briot@adacore.com>
7315
7316         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
7317         are empty sections.
7318
7319 2011-08-02  Robert Dewar  <dewar@adacore.com>
7320
7321         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
7322         reformatting.
7323
7324 2011-08-02  Robert Dewar  <dewar@adacore.com>
7325
7326         * aspects.adb: New aspects Default_Value and Default_Component_Value
7327         New format of Aspect_Names table checks for omitted entries
7328         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
7329         handling of boolean aspects for derived types.
7330         New aspects Default_Value and Default_Component_Value
7331         New format of Aspect_Names table checks for omitted entries
7332         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
7333         (Has_Default_Value): New flag
7334         (Has_Default_Component_Value): New flag
7335         (Has_Default_Value): New flag
7336         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
7337         table.
7338         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
7339         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
7340         Default_Value and Default_Component_Value
7341         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
7342         New aspects Default_Value and Default_Component_Value
7343         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
7344         * sprint.adb: Print N_Aspect_Specification node when called from gdb
7345
7346 2011-08-02  Vincent Celier  <celier@adacore.com>
7347
7348         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
7349         inherit library kind.
7350
7351 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7352
7353         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
7354         Minor reformatting.
7355
7356 2011-08-02  Robert Dewar  <dewar@adacore.com>
7357
7358         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
7359
7360 2011-08-02  Yannick Moy  <moy@adacore.com>
7361
7362         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
7363
7364 2011-08-02  Robert Dewar  <dewar@adacore.com>
7365
7366         * impunit.adb: Add comment.
7367
7368 2011-08-02  Yannick Moy  <moy@adacore.com>
7369
7370         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
7371         qualification of aggregates in formal mode
7372         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
7373         another aggregate
7374         (Resolve_Aggregate): complete the test that an aggregate is adequately
7375         qualified in formal mode
7376
7377 2011-08-02  Pascal Obry  <obry@adacore.com>
7378
7379         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
7380         * mlib-prj.adb: Supress warning when compiling binder generated file.
7381         (Build_Library): Supress all warnings when compiling the binder
7382         generated file.
7383
7384 2011-08-02  Yannick Moy  <moy@adacore.com>
7385
7386         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
7387         from here...
7388         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
7389         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
7390         Add with/use clauses to make Check_Formal_Restriction visible
7391
7392 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7393
7394         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
7395         in-parameters when type of the generic formal is private in the generic
7396         spec and non-private in the body.
7397
7398 2011-08-02  Claire Dross  <dross@adacore.com>
7399
7400         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
7401         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
7402         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
7403         * impunit.adb, Makefile.rtl: Take new files into account.
7404
7405 2011-08-02  Robert Dewar  <dewar@adacore.com>
7406
7407         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
7408         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7409
7410 2011-08-02  Yannick Moy  <moy@adacore.com>
7411
7412         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
7413         formal mode
7414         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
7415         matching static array bounds, taking into account the special case of
7416         string literals
7417         * sem_ch3.adb: Typo in comment.
7418
7419 2011-08-02  Yannick Moy  <moy@adacore.com>
7420
7421         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
7422         which issues an error in formal mode if its argument node is originally
7423         from source
7424         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
7425         has a discriminant specification so that it does not include the case
7426         of derived types
7427         (Derived_Type_Declaration): move here the test that a derived type has a
7428         discriminant specification
7429         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
7430         first element of a component association before accessing its choices
7431         (presence of component association is not enough)
7432         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
7433         declaration is a library item before accessing the next element in a
7434         list, as library items are not member of lists
7435         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
7436         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
7437         Check_Formal_Restriction whenever possible.
7438
7439 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7440
7441         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
7442         reference when needed.
7443
7444 2011-08-02  Bob Duff  <duff@adacore.com>
7445
7446         * gnat_ugn.texi: Fix typo.
7447
7448 2011-08-02  Vincent Celier  <celier@adacore.com>
7449
7450         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
7451         archive file name. Do not use the full path name of archives for Open
7452         VMS.
7453
7454 2011-08-02  Robert Dewar  <dewar@adacore.com>
7455
7456         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
7457         Analyze_Aspect_Specifications
7458         * sem_ch13.adb
7459         (Analyze_Aspect_Specifications): New handling for boolean aspects
7460         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
7461         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
7462         sequence for Analyze_Aspect_Specifications
7463         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
7464         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
7465
7466 2011-08-02  Robert Dewar  <dewar@adacore.com>
7467
7468         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
7469         aspects, since these no longer exist.
7470
7471 2011-08-02  Robert Dewar  <dewar@adacore.com>
7472
7473         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
7474         semicolon, do not try to see if there are aspects following it.
7475         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
7476         aspect spec.
7477
7478 2011-08-02  Robert Dewar  <dewar@adacore.com>
7479
7480         * sem_ch8.adb, aspects.ads: Minor reformatting.
7481
7482 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7483
7484         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
7485         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
7486         extracted from...
7487         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
7488
7489 2011-08-02  Yannick Moy  <moy@adacore.com>
7490
7491         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
7492         mode on subprogram declaration outside of package specification, unless
7493         it is followed by a pragma Import
7494         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
7495         Access_Type_Declaration): issue error in formal mode on access type
7496         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
7497         incomplete type
7498         (Analyze_Object_Declaration): issue error in formal mode on object
7499         declaration which does not respect SPARK restrictions
7500         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
7501         declaration which does not respect SPARK restrictions
7502         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
7503         error in formal mode on digits or delta constraint
7504         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
7505         decimal fixed point type
7506         (Derived_Type_Declaration): issue error in formal mode on derived type
7507         other than type extensions of tagged record types
7508         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
7509         with check on access definition
7510         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
7511         mode on protected definition.
7512         (Analyze_Task_Definition): issue error in formal mode on task definition
7513
7514 2011-08-02  Robert Dewar  <dewar@adacore.com>
7515
7516         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
7517
7518 2011-08-02  Javier Miranda  <miranda@adacore.com>
7519
7520         * sem_ch6.adb (Can_Override_Operator): New function.
7521         (Verify_Overriding_Indicator): Add missing code to check overriding
7522         indicator in operators. Fixes regression.
7523         (Check_Overriding_Indicator): Minor reformating after replacing the
7524         code that evaluates if the subprogram can override an operator by
7525         invocations to the above new function.
7526         * einfo.adb
7527         (Write_Field26_Name): Add missing code to ensure that, following
7528         the documentation in einfo.ads, this field is not shown as attribute
7529         "Static_Initialization" on non-dispatching functions.
7530
7531 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
7532
7533         * sem_res.adb (Resolve_Call): A call to
7534         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
7535         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
7536         i.e., when the second parameter is of type Time_Span.
7537
7538 2011-08-02  Vincent Celier  <celier@adacore.com>
7539
7540         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
7541         with an archive instead of -L<library dir> -l<library name>.
7542
7543 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7544
7545         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
7546         mark the base types In_Use in addition to making the operations
7547         use_visible.
7548
7549 2011-08-02  Ed Falis  <falis@adacore.com>
7550
7551         * init.c: add and setup __gnat_signal_mask for the exception signals
7552         * s-inmaop-vxworks.adb: new file.
7553         * s-intman-vxworks.adb: remove unnecessary initializations and
7554         simplify remaining
7555         * s-intman-vxworks.ads: remove unnecessary variable
7556         * s-taprop-vxworks.adb: simplify signal initialization
7557
7558 2011-08-02  Robert Dewar  <dewar@adacore.com>
7559
7560         * sem_ch8.adb: Minor code reorganization, comment updates.
7561
7562 2011-08-02  Robert Dewar  <dewar@adacore.com>
7563
7564         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
7565         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
7566         here from Sem_Res.
7567         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
7568         (Matching_Static_Array_Bounds): Moved here from Sem_Res
7569
7570 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7571
7572         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
7573         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
7574         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
7575         use_type_clauses, to handle more efficiently use_type and use_all_type
7576         constructs.
7577         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
7578         Ada2012 Use_All_Type clause.
7579         (Use_Class_Wide_Operations): new procedure.
7580
7581 2011-08-02  Robert Dewar  <dewar@adacore.com>
7582
7583         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
7584         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
7585         expression to expression function.
7586
7587 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7588
7589         * sem_ch4.adb: transform simple Ada2012 membership into equality only
7590         if types are compatible.
7591
7592 2011-08-02  Yannick Moy  <moy@adacore.com>
7593
7594         * sem_res.adb (Matching_Static_Array_Bounds): new function which
7595         returns True if its argument array types have same dimension and same
7596         static bounds at each index.
7597         (Resolve_Actuals): issue an error in formal mode on actuals passed as
7598         OUT or IN OUT paramaters which are not view conversions in SPARK.
7599         (Resolve_Arithmetic_Op): issue an error in formal mode on
7600         multiplication or division with operands of fixed point types which are
7601         not qualified or explicitly converted.
7602         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7603         Boolean or array type (except String) operands.
7604         (Resolve_Equality_Op): issue an error in formal mode on equality
7605         operators for array types other than String with non-matching static
7606         bounds.
7607         (Resolve_Logical_Op): issue an error in formal mode on logical operators
7608         for array types with non-matching static bounds. Factorize the code in
7609         Matching_Static_Array_Bounds.
7610         (Resolve_Qualified_Expression): issue an error in formal mode on
7611         qualified expressions for array types with non-matching static bounds.
7612         (Resolve_Type_Conversion): issue an error in formal mode on type
7613         conversion for array types with non-matching static bounds
7614
7615 2011-08-02  Robert Dewar  <dewar@adacore.com>
7616
7617         * par-ch10.adb: Minor code reorganization (use Nkind_In).
7618
7619 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7620
7621         * par-ch9.adb: save location of entry for proper error message.
7622
7623 2011-08-02  Javier Miranda  <miranda@adacore.com>
7624
7625         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7626         (Use_Full_View) which permits this routine to climb through the
7627         ancestors using the full-view of private parents.
7628         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7629         Use_Full_View to true in calls to Is_Ancestor.
7630         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7631         true in call to Is_Ancestor.
7632         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7633         Use_Full_View to true in call to Is_Ancestor.
7634         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7635         call to Is_Ancestor.
7636         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7637         Use_Full_View to true in calls to Is_Ancestor.
7638         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7639         Make_Select_Specific_Data_Table, Register_Primitive,
7640         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7641         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7642         to true in call to Is_Ancestor.
7643         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7644         Use_Full_View to true in calls to Is_Ancestor.
7645         * exp_cg.adb
7646         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7647         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7648
7649 2011-08-02  Robert Dewar  <dewar@adacore.com>
7650
7651         * gnat_rm.texi: Minor reformatting.
7652         * sem_prag.adb: Minor reformatting.
7653
7654 2011-08-02  Tristan Gingold  <gingold@adacore.com>
7655
7656         * vms_data.ads: Add VMS qualifier for -gnateP.
7657
7658 2011-08-02  Robert Dewar  <dewar@adacore.com>
7659
7660         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7661         * par-ch7.adb (P_Package): Proper placement of aspects for package
7662         decl/instantiation.
7663         * par-endh.adb (Check_End): Ad Is_Sloc parameter
7664         (End_Statements): Add Is_Sloc parameterr
7665         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
7666         (Check_End): Ad Is_Sloc parameter
7667         (End_Statements): Add Is_Sloc parameterr
7668
7669 2011-08-02  Vincent Celier  <celier@adacore.com>
7670
7671         * ug_words: Add VMS qualifier equivalent to -gnateP:
7672         /SYMBOL_PREPROCESSING.
7673
7674 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
7675
7676         * gnat-style.texi: For hexadecimal numeric literals the typical
7677         grouping of digits is 4 to represent 2 bytes.
7678         A procedure spec which is split into several lines is indented two
7679         characters.
7680
7681 2011-08-02  Yannick Moy  <moy@adacore.com>
7682
7683         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
7684         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
7685         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
7686         properly qualified
7687         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
7688         choice in array aggregate
7689         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
7690         mark as ancestor
7691         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
7692         positional and named aggregate for record, or others in record
7693         aggregate, or multiple choice in record aggregate
7694         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
7695         array operands to logical operations AND, OR and XOR do not have the
7696         same static lower and higher bounds
7697         * sem_ch5.adb, sinfo.ads: Correct typos in comments
7698
7699 2011-08-01  Robert Dewar  <dewar@adacore.com>
7700
7701         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
7702         Replaces Last_Source_Node_In_Sequence.
7703         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
7704         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
7705         parens and blank in string (this was inconsistently implemented).
7706         * errout.ads
7707         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
7708         blank in string (this was inconsistently implemented).
7709         * gnat1drv.adb
7710         (Set_Global_Switches): Set formal mode switches appropriately
7711         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
7712         * par-prag.adb
7713         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
7714         call Set_Error_Msg_Lang to set "spark" as language name.
7715         * par.adb: Remove unnecessary call to set formal language for errout
7716         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
7717         appropriately and call Set_Error_Msg_Lang to set "spark" as language
7718         name.
7719         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
7720         calls to it, moved after resolution so that types are known
7721         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
7722         result of concatenation is not of type String
7723         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
7724         concatenation is not properly restricted
7725         * gnat_rm.texi: Add doc on pragma Spark_95.
7726         * gcc-interface/Makefile.in: Remove obsolete target pairs for
7727         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
7728         * gcc-interface/Make-lang.in: Update dependencies.
7729
7730 2011-08-01  Javier Miranda  <miranda@adacore.com>
7731
7732         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
7733         condition that detects if the overridden operation must replace an
7734         existing entity.
7735
7736 2011-08-01  Javier Miranda  <miranda@adacore.com>
7737
7738         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
7739         code declarations inserted by Insert_Actions in each alternative of the
7740         N_Case_Expression node.
7741
7742 2011-08-01  Robert Dewar  <dewar@adacore.com>
7743
7744         * sem_ch6.adb: Minor code reorganization.
7745         * sem_util.adb: Minor reformatting.
7746
7747 2011-08-01  Pascal Obry  <obry@adacore.com>
7748
7749         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
7750         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
7751
7752 2011-08-01  Yannick Moy  <moy@adacore.com>
7753
7754         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7755         literal or operator symbol which is prefixed
7756         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7757         mode on access attributes.
7758         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7759         that concatenation operands are properly restricted in formal mode
7760         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7761         Analyze_Concatenation_Operand. Issue an error in formal mode if the
7762         result of the concatenation has a type different from String.
7763         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7764         Analyze_Quantified_Expression, Analyze_Slice,
7765         Analyze_Null): issue an error in formal mode on unsupported constructs
7766         * sem_ch5.adb
7767         (Analyze_Block_Statement): only issue error on source block statement
7768         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7769         function which returns the last node in a list of nodes for which
7770         Comes_From_Source returns True, if any
7771         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7772         Last_Source_Node_In_Sequence
7773         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7774         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7775         mode on unsupported constructs
7776         * sem_ch9.adb Do not return after issuing error in formal mode, as the
7777         rest of the actions may be needed later on since the error is marked as
7778         not serious.
7779         * sinfo.ads: Typos in comments.
7780
7781 2011-08-01  Pascal Obry  <obry@adacore.com>
7782
7783         * projects.texi: Minor editing.
7784
7785 2011-08-01  Yannick Moy  <moy@adacore.com>
7786
7787         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7788         insertion character ~~
7789         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7790         (Set_Error_Msg_Lang): new procedure which fixes the language for use
7791         with insertion character ~~
7792         (Set_Msg_Text): treat insertion character ~~
7793         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7794         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7795         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7796         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7797         errors related to the formal language restriction not serious
7798         (insertion character |).
7799         * par.adb (Par): set formal language for error messages if needed
7800         * sem_ch6.adb (Check_Missing_Return): take into account possible
7801         generated statements at the end of the function
7802         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7803         enumeration value to define a new pragma SPARK_95
7804         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7805         SPARK_Version): new type and variables to store the SPARK version
7806         (none by default).
7807         (SPARK_Mode): return True when SPARK_Version is set
7808         * par-prag.adb: Correct indentation
7809         (Prag): take Pragma_SPARK_95 into account
7810         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7811         into account.
7812
7813 2011-08-01  Robert Dewar  <dewar@adacore.com>
7814
7815         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7816         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7817         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7818
7819 2011-08-01  Pascal Obry  <obry@adacore.com>
7820
7821         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7822         Target_Name to Get_Path call.
7823         (Parse_Single_Project): Likewise.
7824         (Post_Parse_Context_Clause): Likewise.
7825         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7826         Call Initialise_Project_Path with the proper Target_Name.
7827         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7828         search path.
7829         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7830         with the proper Target_Name.
7831         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7832         Part.Parse routine.
7833         (Parse_Project_And_Apply_Config): Likewise.
7834         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7835         This is fine as this part of the code is supporting only native
7836         compilation.
7837         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7838         is fine as this part of the code is supporting only native compilation.
7839
7840 2011-08-01  Yannick Moy  <moy@adacore.com>
7841
7842         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7843         of homonym, unless the homonym is one of the cases allowed in SPARK
7844         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7845         package declaration occurring after a body.
7846
7847 2011-08-01  Robert Dewar  <dewar@adacore.com>
7848
7849         * checks.adb, exp_ch4.adb: Minor reformatting.
7850
7851 2011-08-01  Javier Miranda  <miranda@adacore.com>
7852
7853         * einfo.ads (Access_Disp_Table): Fix documentation.
7854         (Dispatch_Table_Wrappers): Fix documentation.
7855
7856 2011-08-01  Pascal Obry  <obry@adacore.com>
7857
7858         * prj-env.adb, prj-env.ads: Minor reformatting.
7859
7860 2011-08-01  Yannick Moy  <moy@adacore.com>
7861
7862         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7863         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7864         procedures out of these packages.
7865         * errout.ads, errout.adb
7866         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7867         procedures in of this package
7868         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7869         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7870         on misplaced later vs initial declarations, like in Ada 83
7871         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7872         formal mode on attribute of private type whose full type declaration
7873         is not visible
7874         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7875         package declaration inside a package specification
7876         (Analyze_Full_Type_Declaration): issue error in formal mode on
7877         controlled type or discriminant type
7878         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7879         user-defined operator means that it should come from the source
7880         (New_Overloaded_Entity): issue error in formal mode on overloaded
7881         entity.
7882         * sem_ch6.ads, sem_ch13.ads: typos in comments.
7883
7884 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7885
7886         * atree.adb: Minor reformatting.
7887         * checks.adb: Minor reformatting.
7888
7889 2011-08-01  Vincent Celier  <celier@adacore.com>
7890
7891         * s-parame-vms-ia64.ads: Fix typo in comment
7892         Minor reformatting
7893         * s-parame-vms-restrict.ads: Removed, unused.
7894
7895 2011-08-01  Javier Miranda  <miranda@adacore.com>
7896
7897         * exp_ch3.adb
7898         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7899         * sem_ch3.adb
7900         (Constrain_Index): Remove side effects in the evaluation of the bounds.
7901         * sem_ch3.ads, sem_ch3.adb
7902         (Is_Constant_Bound): New extended version of the subprogram that was
7903         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7904         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7905         * sem_aux.ads (Constant_Value): Fix typo in comment.
7906         * checks.adb (Generate_Index_Checks): New implementation which, for
7907         array objects with constant bounds, generates the runtime check
7908         referencing the bounds of the array type. For other cases this routine
7909         provides its previous behavior obtaining such values from the array
7910         object.
7911         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7912         parent type.
7913         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7914         we cannot have semantic interpretations of the new node.
7915
7916 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7917
7918         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7919         expressions.
7920
7921 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7922
7923         * sem_ch8.adb: Minor code editing.
7924         * s-vxwext.adb: Remove trailing space.
7925         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7926         consistency with other files.
7927
7928 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7929
7930         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7931
7932 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7933
7934         * par-ch10.adb: reject parameterized expressions as compilation unit.
7935         * sem_ch4.adb: handle properly conditional expression with overloaded
7936         then_clause and no else_clause.
7937
7938 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7939
7940         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7941         like done by System.Aux_DEC.
7942         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7943
7944 2011-08-01  Yannick Moy  <moy@adacore.com>
7945
7946         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7947         missing label at end of declaration (subprogram or package)
7948         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7949         of positional and named parameter association
7950         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7951         Error_Msg_SP which adds a prefix to the error message giving the name
7952         of the formal language analyzed
7953         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7954         access result type in subprogram, unconstrained array as result type,.
7955         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7956         procedure
7957         * sem_ch8.adb: Code clean up.
7958
7959 2011-08-01  Javier Miranda  <miranda@adacore.com>
7960
7961         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7962         * einfo.ads (Access_Disp_Table): Fix documentation.
7963         (Dispatch_Table_Wrappers): Fix documentation.
7964         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7965         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7966         to enforce the documentation of this attribute.
7967         (Set_Is_Interface): Cleanup the assertion.
7968         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7969         the Underlying_Type entity before reading attribute Access_Disp_Table.
7970         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7971         Locate the Underlying_Type before reading attribute Access_Disp_Table.
7972         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7973         the Underlying_Type entity before reading attribute Access_Disp_Table.
7974         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7975         Locate the Underlying_Type entity before reading attribute
7976         Access_Disp_Table.
7977
7978 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7979
7980         * s-poosiz.ads: Additional overriding indicators.
7981
7982 2011-08-01  Yannick Moy  <moy@adacore.com>
7983
7984         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7985         formal mode.
7986         (Analyze_Iteration_Scheme): issue error in formal mode when loop
7987         parameter specification does not include a subtype mark.
7988         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7989         formal mode on abstract subprogram.
7990         (Analyze_Subprogram_Specification): issue error in formal mode on
7991         user-defined operator.
7992         (Process_Formals): issue error in formal mode on access parameter and
7993         default expression.
7994         * sem_ch9.adb (Analyze_Abort_Statement,
7995         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7996         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7997         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7998         Analyze_Requeue, Analyze_Selective_Accept,
7999         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8000         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8001         issue error in formal mode on user-defined raise statement.
8002
8003 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8004
8005         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8006         declaration being hidden when overriding an implicit inherited
8007         subprogram.
8008         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8009         (-gnats), do not complain about a source file that contains only a
8010         pragma No_Body.
8011
8012 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8013
8014         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8015         variable if already set.
8016
8017 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
8018
8019         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8020         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8021         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8022         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8023         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8024         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8025         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8026         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8027         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8028         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8029         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8030         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8031         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8032         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8033         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8034         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8035         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8036         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8037         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8038         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8039         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8040         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8041         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8042         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8043         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8044         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8045         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8046         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8047         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8048         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8049         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8050         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8051         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8052         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8053         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8054         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8055         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8056         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8057         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8058         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8059         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8060         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8061         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8062         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8063         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8064         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8065         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8066         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8067         s-osinte-mingw.ads: Update to GPLv3 run-time license.
8068         Use GNAT instead of GNARL.
8069
8070 2011-08-01  Bob Duff  <duff@adacore.com>
8071
8072         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8073         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8074         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8075         reformatting.
8076
8077 2011-08-01  Yannick Moy  <moy@adacore.com>
8078
8079         * debug.adb (d.D) reverve flag for the SPARK mode
8080         (d.E) reverve flag for SPARK generation mode
8081         (d.F) reverve flag for Why generation mode
8082         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8083         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
8084         functions which return True when the corresponding modes are set
8085         (Formal_Language): return "spark" or "alfa" when in formal verification
8086         mode.
8087         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8088         Error_Msg to prefix the error message with a tag giving the formal
8089         language
8090         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8091         message with a tag giving the formal language
8092         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8093         block statement
8094         (Analyze_Case_Statement): issue error in formal mode on case statement
8095         with a single "others" case alternative
8096         (Analyze_Exit_Statement): issue errors in formal mode on exit
8097         statements which do not respect SPARK restrictions
8098         (Analyze_Goto_Statement): issue error in formal mode on goto statement
8099         (Check_Unreachable_Code): always issue an error (not a warning) in
8100         formal mode on unreachable code (concerns both code after an infinite
8101         loop and after an unconditional jump, both not allowed in SPARK)
8102         * sem_ch6.adb (Analyze_Return_Statement): add call to
8103         Set_Return_Present for a procedure containing a return statement
8104         (already done for functions in Analyze_Function_Return)
8105         (Analyze_Function_Return): issue error in formal mode on extended
8106         return or if return is not last statement in function
8107         (Check_Missing_Return): issue error in formal mode if function does
8108         not end with return or if procedure contains a return
8109         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8110         function to detect if there is an inner scope of its parameter S which
8111         is a loop.
8112
8113 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8114
8115         * sem_ch6.ads: Minor reformatting.
8116
8117 2011-08-01  Javier Miranda  <miranda@adacore.com>
8118
8119         * sem_util.adb (Abstract_Interface_List): Complete condition when
8120         processing private type declarations to avoid reading unavailable
8121         attribute.
8122         (Is_Synchronized_Tagged_Type): Complete condition when processing
8123         private extension declaration nodes to avoid reading unavailable
8124         attribute.
8125
8126 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8127
8128         * sem_ch3.adb: Minor reformatting.
8129
8130 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8131
8132         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8133         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8134         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8135         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8136         for VMS, instead parametrize the common implementation with
8137         System.Parameters declarations.
8138
8139 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
8140
8141         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
8142
8143 2011-08-01  Tristan Gingold  <gingold@adacore.com>
8144
8145         * seh_init.c: Fix SEH handler installation on win64.
8146
8147 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8148
8149         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
8150         double analysis of an anonymous access to subprogram, because it can
8151         lead to improper sharing of profiles and a back-end crash.
8152
8153 2011-08-01  Robert Dewar  <dewar@adacore.com>
8154
8155         * make.adb, sem_ch4.adb: Minor reformatting.
8156         * gcc-interface/Make-lang.in: Update dependencies.
8157         * sem_util.adb, exp_ch5.adb: Minor reformatting.
8158
8159 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
8160
8161         * gnat_rm.texi: Fix definition of Long_Integer.
8162
8163 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8164
8165         * exp_aggr.adb: check limit size of static aggregate unconditionally,
8166         to prevent storage exhaustion.
8167         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
8168         finalized is a function body, insert the cleanup code before the final
8169         return statement, to prevent spurious warnings.
8170         * s-pooglo.ads: add overriding indicator.
8171
8172 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8173
8174         * sem_ch4.adb (Operator_Check): improve error message when both a
8175         with_clause and a use_clause are needed to make operator usage legal.
8176         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
8177         determine whether a compilation unit is visible within an other,
8178         either through a with_clause in the current unit, or a with_clause in
8179         its library unit or one one of its parents.
8180
8181 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8182
8183         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
8184         over an arbitrary expression of an array or container type.
8185         * lib-xref.adb: clarify comment.
8186
8187 2011-08-01  Bob Duff  <duff@adacore.com>
8188
8189         * einfo.ads: Minor reformatting.
8190         * debug.adb: Minor comment improvement.
8191
8192 2011-08-01  Javier Miranda  <miranda@adacore.com>
8193
8194         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
8195         consider hidden subprograms as valid candidates.
8196
8197 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
8198
8199         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
8200
8201 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
8202
8203         * gnat_ugn.texi: Fix typo.
8204
8205 2011-08-01  Robert Dewar  <dewar@adacore.com>
8206
8207         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
8208         lib-xref.adb: Minor reformatting
8209
8210 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
8211
8212         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
8213         when to generate a call to Move_Final_List.
8214         (Has_Controlled_Parts): Remove this function.
8215
8216 2011-08-01  Geert Bosch  <bosch@adacore.com>
8217
8218         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
8219         "," in choice list.
8220
8221 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8222
8223         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
8224         explicit raise of a predefined exception as Comes_From_Source if the
8225         original N_Raise_Statement comes from source.
8226
8227 2011-08-01  Robert Dewar  <dewar@adacore.com>
8228
8229         * sinfo.ads: Add comment.
8230         * sem_ch6.adb: Minor reformatting.
8231
8232 2011-08-01  Robert Dewar  <dewar@adacore.com>
8233
8234         * freeze.adb (Freeze_Entity): Refine check for bad component size
8235         clause to avoid rejecting confirming clause when atomic/aliased present.
8236
8237 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8238
8239         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
8240         better determine whether an entity reference is a write.
8241         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
8242         subcomponent.
8243         * lib-xref.adb (Output_References): Do no suppress a read reference at
8244         the same location as an immediately preceeding modify-reference, to
8245         handle properly in-out actuals.
8246
8247 2011-08-01  Tristan Gingold  <gingold@adacore.com>
8248
8249         * env.c (__gnat_setenv) [VMS]: Refine previous change.
8250
8251 2011-08-01  Quentin Ochem  <ochem@adacore.com>
8252
8253         * i-cstrin.adb (New_String): Changed implementation, now uses only the
8254         heap to compute the result.
8255
8256 2011-08-01  Robert Dewar  <dewar@adacore.com>
8257
8258         * atree.ads: Minor reformatting.
8259
8260 2011-08-01  Emmanuel Briot  <briot@adacore.com>
8261
8262         * g-expect.adb (Get_Command_Output): Fix memory leak.
8263
8264 2011-08-01  Geert Bosch  <bosch@adacore.com>
8265
8266         * cstand.adb (P_Float_Type): New procedure to print the definition of
8267         predefined fpt types.
8268         (P_Mixed_Name): New procedure to print a name using mixed case
8269         (Print_Standard): Use P_Float_Type for printing floating point types
8270         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
8271         precision IEEE float.
8272
8273 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8274
8275         * sem_ch3.adb: Minor reformatting.
8276
8277 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8278
8279         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
8280         the completion of a generic function, insert the new body rather than
8281         rewriting the original.
8282
8283 2011-08-01  Yannick Moy  <moy@adacore.com>
8284
8285         * sinfo.ads, errout.ads: Typos in comments.
8286
8287 2011-08-01  Robert Dewar  <dewar@adacore.com>
8288
8289         * par-endh.adb: Minor reformatting.
8290
8291 2011-08-01  Robert Dewar  <dewar@adacore.com>
8292
8293         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
8294         (Pre_Post_Aspects): New subtype.
8295         * par-ch12.adb (P_Generic): New syntax for aspects in packages
8296         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
8297         * par-ch7.adb (P_Package): Remove Decl parameter
8298         (P_Package): Handle new syntax for aspects (before IS)
8299         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
8300         new aspect syntax
8301         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
8302         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
8303         (P_Package): Remove Decl parameter
8304         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
8305         aspects
8306         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
8307         specs
8308         * sem_util.ads, sem_util.adb (Static_Boolean): New function
8309         * sinfo.ads: Document new syntax for aspects in packages etc.
8310         * sprint.adb: Handle new syntax of aspects before IS in package
8311
8312 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8313
8314         * atree.ads: Minor reformatting.
8315         * sem_prag.adb: Minor reformatting.
8316
8317 2011-08-01  Robert Dewar  <dewar@adacore.com>
8318
8319         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
8320         case expr alternative.
8321
8322 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8323
8324         * sem_ch12.adb: Fix typo.
8325
8326 2011-08-01  Geert Bosch  <bosch@adacore.com>
8327
8328         * sem_prag.adb (Check_No_Link_Name): New procedure.
8329         (Process_Import_Or_Interface): Use Check_No_Link_Name.
8330         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
8331         instead of Standard_Long_Long_Float_Size global. Preparation for
8332         eventual removal of per type constants.
8333         * exp_util.ads (Get_Stream_Size): New function returning the stream
8334         size value of subtype E.
8335         * exp_util.adb (Get_Stream_Size): Implement new function.
8336         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
8337         function.
8338         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
8339         * einfo.adb:
8340         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
8341
8342 2011-08-01  Geert Bosch  <bosch@adacore.com>
8343
8344         * cstand.adb: Fix comments.
8345         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
8346         count of arguments.
8347
8348 2011-08-01  Robert Dewar  <dewar@adacore.com>
8349
8350         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
8351
8352 2011-08-01  Geert Bosch  <bosch@adacore.com>
8353
8354         * atree.ads: Fix comment.
8355
8356 2011-08-01  Robert Dewar  <dewar@adacore.com>
8357
8358         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
8359         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
8360         * par.adb: Add with for Namet.Sp.
8361         * par-tchk.adb: Minor reformatting.
8362
8363 2011-08-01  Vincent Celier  <celier@adacore.com>
8364
8365         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
8366         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
8367         of the init procedure of a SAL.
8368         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
8369         New procedure.
8370
8371 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8372
8373         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
8374         reformatting.
8375
8376 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8377
8378         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
8379
8380 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8381
8382         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
8383         conformant with its spec (return True only for types that have
8384         an overriding Initialize primitive operation that prevents them from
8385         having preelaborable initialization).
8386         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
8387         initialization for controlled types in Ada 2005 or later mode.
8388
8389 2011-08-01  Robert Dewar  <dewar@adacore.com>
8390
8391         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
8392         Postcondition.
8393         (Same_Aspect): New function.
8394         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
8395         Type_Invariant, Precondition, Postcondition.
8396         * snames.ads-tmpl: Add Name_Type_Invariant.
8397
8398 2011-08-01  Robert Dewar  <dewar@adacore.com>
8399
8400         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
8401         here.
8402         (Freeze_All_Ent): Fix error in handling inherited aspects.
8403         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
8404         already analyzed, but don't skip entire processing of a declaration,
8405         that's wrong in some cases of declarations being rewritten.
8406         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
8407         Don't delay for integer, string literals
8408         Treat predicates in usual manner for delay, remove special case code,
8409         not needed.
8410         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
8411         (Build_Predicate_Function): Update saved expression in aspect
8412         (Build_Invariant_Procedure): Update saved expression in aspect
8413         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
8414         of replacement of discriminant references if the reference is simple.
8415
8416 2011-08-01  Robert Dewar  <dewar@adacore.com>
8417
8418         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
8419         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
8420         Static_Predicate and Dynamic_Predicate.
8421         (Build_Predicate_Function): Add processing for Static_Predicate
8422         and Dynamic_Predicate.
8423         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
8424         (From_Static_Predicate): New flag
8425         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
8426
8427 2011-08-01  Robert Dewar  <dewar@adacore.com>
8428
8429         * usage.adb: Documentation cleanup for Ada version modes in usage.
8430         * expander.adb: Minor reformatting.
8431
8432 2011-08-01  Robert Dewar  <dewar@adacore.com>
8433
8434         * atree.ads: Minor comment fix.
8435         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
8436         a-witeio.ads, sem_prag.adb: Minor reformatting.
8437
8438 2011-08-01  Doug Rupp  <rupp@adacore.com>
8439
8440         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
8441         pointers. Use descrip.h header file for convenience. Add some
8442         comments.
8443
8444 2011-08-01  Robert Dewar  <dewar@adacore.com>
8445
8446         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
8447         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
8448         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
8449         New procedure.
8450         (Check_Aspect_At_End_Of_Declarations): New procedure
8451         (Analye_Aspect_Specification): Minor changes for above procedures
8452         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
8453         specification node as well.
8454
8455 2011-08-01  Pascal Obry  <obry@adacore.com>
8456
8457         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
8458         Windows files. Use GetFilesAttributes() in this case to check for file
8459         existence instead of returning with an error code.
8460
8461 2011-08-01  Vincent Celier  <celier@adacore.com>
8462
8463         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
8464         High is above Source length.
8465
8466 2011-08-01  Robert Dewar  <dewar@adacore.com>
8467
8468         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
8469
8470 2011-08-01  Robert Dewar  <dewar@adacore.com>
8471
8472         * aspects.ads (Boolean_Aspects): New subtype.
8473         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
8474         for derived types in cases where the parent type and derived type have
8475         aspects.
8476         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
8477         with aspects when parent type also has aspects.
8478         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
8479         boolean expression at this point).
8480         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
8481         accordance with final decision on the Ada 2012 feature.
8482         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
8483
8484 2011-08-01  Matthew Heaney  <heaney@adacore.com>
8485
8486         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
8487
8488 2011-08-01  Pascal Obry  <obry@adacore.com>
8489
8490         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
8491         Fix Replace_Slice when High is above current string size.
8492         (Replace_Slice): Fix DL computation when High is above current
8493         string length.
8494
8495 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
8496
8497         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
8498
8499 2011-08-01  Matthew Heaney  <heaney@adacore.com>
8500
8501         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
8502         of node.
8503
8504 2011-08-01  Pascal Obry  <obry@adacore.com>
8505
8506         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
8507         reformatting.
8508
8509 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8510
8511         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
8512         access to protected subprograms in generic bodies.
8513         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
8514         protected type, indicate that the convention of the subprogram is
8515         Convention_Protected, because it may be used in subsequent declarations
8516         within the protected declaration.
8517
8518 2011-08-01  Vincent Celier  <celier@adacore.com>
8519
8520         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
8521         and "final" procedures when the name of the library is "ada", to avoid
8522         duplicate symbols "adainit" and "adafinal" in executables.
8523
8524 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8525
8526         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
8527         quantified expression that appears within a postcondition and uses the
8528         Ada2012 'Result attribute.
8529
8530 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8531
8532         * init.c (__gnat_error_handler): Cast reason to int.
8533         (__gnat_install_handler): Explain sa_sigaction use.
8534
8535 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8536
8537         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
8538         subprogram has copy-in copy-out parameters, try to promote the mode of
8539         the return type if it is passed in registers.
8540
8541 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8542
8543         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
8544         left operand as addressable.
8545
8546 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8547
8548         * gcc-interface/gigi.h (build_function_stub): Remove.
8549         (build_return_expr): Likewise.
8550         (convert_vms_descriptor): Declare.
8551         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
8552         (build_function_stub): Move to...
8553         * gcc-interface/utils2.c (build_return_expr): Move to...
8554         * gcc-interface/trans.c (build_function_stub): ...here.
8555         (build_return_expr): ...here.
8556         (Subprogram_Body_to_gnu): Add local variable for language_function.
8557         Disconnect the parameter attributes cache, if any, once done with it.
8558         Call end_subprog_body only after setting the end_locus.
8559         Build the stub associated with the function, if any, at the very end.
8560         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
8561         variables and streamline control flow.
8562
8563 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
8564
8565         PR ada/49819
8566         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
8567         g-trasym-dwarf.adb.
8568
8569 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8570
8571         PR bootstrap/49794
8572         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
8573         Assign to act.sa_sigaction.
8574         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
8575         current->return_address to char * before arithmetic.
8576
8577 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8578
8579         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
8580         Correct argument types.
8581         Extract code from reason.
8582         (__gnat_install_handler): Assign to act.sa_sigaction.
8583
8584 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
8585
8586         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
8587         (GNAT1_OBJS): ...here.
8588
8589 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
8590
8591         PR ada/48711
8592         * g-socthi-mingw.adb (Fill): Fix formatting.
8593
8594         * gcc-interface/gigi.h: Move around comment.
8595
8596 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
8597
8598         PR ada/46350
8599         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8600
8601 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
8602
8603         PR ada/48711
8604         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8605
8606 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
8607
8608         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8609         range comparison if Pmode is SImode.
8610
8611 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
8612             Eric Botcazou  <ebotcazou@adacore.com>
8613
8614         * adadecode.c: Wrap up in extern "C" block.
8615         * adadecode.h: Likewise.
8616         * adaint.c: Likewise.  Remove 'const' keyword.
8617         * adaint.h: Likewise.
8618         * argv.c: Likewise.
8619         * atree.h: Likewise.
8620         * cio.c: Likewise.
8621         * cstreams.c: Likewise.
8622         * env.c: Likewise.
8623         * exit.c: Likewise.
8624         * fe.h: Likewise.
8625         * final.c: Likewise.
8626         * init.c: Likewise.
8627         * initialize.c: Likewise.
8628         * link.c: Likewise.
8629         * namet.h: Likewise.
8630         * nlists.h: Likewise.
8631         * raise.c: Likewise.
8632         * raise.h: Likewise.
8633         * repinfo.h: Likewise.
8634         * seh_init.c: Likewise.
8635         * targext.c: Likewise.
8636         * tracebak.c: Likewise.
8637         * uintp.h: Likewise.
8638         * urealp.h: Likewise.
8639         * xeinfo.adb: Wrap up generated C code in extern "C" block.
8640         * xsinfo.adb: Likewise.
8641         * xsnamest.adb: Likewise.
8642         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8643         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8644         * gcc-interface/misc.c: Likewise.
8645         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8646         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
8647         ada/targext.o here...
8648         (GNAT_ADA_OBJS): ...and not here.
8649         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8650         (GNATBIND_OBJS): Reorder.
8651
8652 2011-07-07  Richard Henderson  <rth@redhat.com>
8653
8654         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8655         dwarf2out_frame_init.
8656
8657 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
8658
8659         * gcc-interface/misc.c (gnat_init): Tweak previous change.
8660
8661 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8662
8663         PR target/39150
8664         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
8665
8666 2011-07-06  Richard Guenther  <rguenther@suse.de>
8667
8668         * gcc-interface/misc.c (gnat_init): Merge calls to
8669         build_common_tree_nodes and build_common_tree_nodes_2.
8670         Re-initialize boolean_false_node.
8671
8672 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
8673             Olivier Hainque  <hainque@adacore.com>
8674             Nicolas Setton  <setton@adacore.com>
8675
8676         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
8677         the type according to the ARTIFICIAL_P parameter.
8678         (create_type_decl): Likewise.
8679         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
8680
8681 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
8682
8683         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
8684         (gnatbind): Likewise.
8685
8686 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8687
8688         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
8689
8690 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8691
8692         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
8693         local variable throughout.  Remove useless call to Base_Type.
8694         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
8695         Take it also into account for the volatileness of the field.  Set the
8696         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
8697
8698 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8699
8700         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
8701         on a dereference built for a by-ref object if it has an address clause.
8702
8703 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8704
8705         * einfo.ads (Address_Taken): Document use for the second argument of
8706         Asm_Input and Asm_Output attributes.
8707         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
8708         argument is an entity name, then set Address_Taken on it.
8709         <Attribute_Asm_Output>: Likewise.
8710         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
8711         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
8712         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
8713         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
8714
8715 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
8716
8717         PR middle-end/46500
8718         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
8719
8720 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
8721
8722         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
8723         (ada/utils.o): Update dependencies.
8724         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
8725         ../../../libcpp/libcpp.a.
8726         * gcc-interface/utils.c: Include common/common-target.h.
8727         (process_attributes): Use targetm_common.have_named_sections.
8728
8729 2011-06-07  Richard Guenther  <rguenther@suse.de>
8730
8731         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
8732         set_sizetype.
8733
8734 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8735
8736         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
8737         TREE_THIS_NOTRAP flag.
8738
8739 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8740
8741         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
8742         Fix thinko.
8743
8744 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8745
8746         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
8747         constants whose full view has discriminants specially.
8748
8749 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8750
8751         * gcc-interface/utils.c: Include diagnostic.h.
8752         (gnat_write_global_declarations): Output debug information for all
8753         global type declarations before finalizing the compilation unit.
8754         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8755
8756 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
8757
8758         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8759
8760 2011-05-25  Kai Tietz  <ktietz@redhat.com>
8761
8762         * adaint.c (__gnat_to_canonical_file_list_next): Use array
8763         initialization instead of const/none-const pointer assignment.
8764
8765 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
8766
8767         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8768         $(EXTRA_GNAT1_OBJS).
8769         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8770         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8771         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8772         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8773         libcommon-target.a instead of prefix.o.
8774
8775 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
8776
8777         PR ada/49097
8778         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8779
8780 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
8781
8782         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8783         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8784         instead of version.o.
8785
8786 2011-05-18  Kai Tietz <ktietz@redhat.com>
8787
8788         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8789         boolean_false_node instead of integer_zero_node.
8790         (convert_with_check): Likewise.
8791         * gcc-interface/decl.c (choices_to_gnu): Likewise.
8792
8793 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
8794
8795         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8796         type of the parameter is an unconstrained array, convert the actual to
8797         the type of the formal in the In Out and Out cases as well.
8798
8799 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
8800
8801         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8802         call build_function_type_array or build_varargs_function_type_array
8803         instead.
8804         (create_subprog_type): Don't call build_function_type; call
8805         build_function_type_vec instead.
8806
8807 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
8808
8809         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8810         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8811         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8812
8813 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
8814
8815         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8816
8817         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8818         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8819
8820 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
8821
8822         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8823
8824 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
8825
8826         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8827         instead of accessing TYPE_ARG_TYPES directly.
8828         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8829
8830 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8831
8832         PR ada/48844
8833         * gcc-interface/gigi.h (get_variant_part): Declare.
8834         * gcc-interface/decl.c (get_variant_part): Make global.
8835         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8836         types have the same constant size, are record types and T1 has a
8837         variant part while T2 doesn't.
8838
8839 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8840
8841         * gcc-interface/utils.c (begin_subprog_body): Do not call
8842         get_pending_sizes.
8843         (end_subprog_body): Likewise.
8844
8845 2011-05-04  Richard Guenther  <rguenther@suse.de>
8846
8847         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8848         int_const_binop.
8849         (pos_to_constructor): Likewise.
8850
8851 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
8852             Eric Botcazou  <ebotcazou@adacore.com>
8853
8854         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8855         of build_function_type.  Adjust calls to...
8856         (build_raise_check): ...this.  Do not take a void_tree parameter.
8857         Call build_function_type_list instead of build_function_type.
8858         Fix head comment and swap couple of conditional blocks.
8859
8860 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
8861
8862         * gnatvsn.ads (Library_Version): Bump to 4.7.
8863         (Current_Year): Bump to 2011.
8864
8865 2011-04-29  Michael Matz  <matz@suse.de>
8866
8867         * gcc-interface/misc.c (gnat_handle_option): Set
8868         warn_maybe_uninitialized.
8869
8870 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
8871
8872         * gnat_ugn.texi (Complexity Metrics Control): Update link to
8873         the Watson/McCabe paper.
8874
8875 2011-04-23  Jim Meyering  <meyering@redhat.com>
8876
8877         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8878
8879 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8880
8881         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8882         onto the new type.
8883
8884 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8885
8886         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8887         parameter.
8888         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
8889         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8890         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8891         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8892         <all>: Do not set flags on the reused DECL node coming from an alias.
8893         Set DECL_IGNORED_P on the DECL node built for subprograms if they
8894         don't need debug info here...
8895         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8896         (gigi): Adjust calls to create_subprog_decl.
8897         (build_raise_check): Likewise.
8898         (establish_gnat_vms_condition_handler): Likewise.
8899         (Compilation_Unit_to_gnu): Likewise.
8900         (gnat_to_gnu): Likewise.
8901
8902 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
8903
8904         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8905         (NO_REORDER_ADAFLAGS): New variable.
8906         (EXTRA_GNATTOOLS): Always define.
8907         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8908         Clean up and adjust list of files compiled with special options.
8909         * gcc-interface/Make-lang.in: Likewise.
8910         (ada/decl.o): Cosmetical change.
8911         (ada/misc.o): Remove dependency on $(PLUGIN_H).
8912
8913 2011-04-20  Jim Meyering  <meyering@redhat.com>
8914
8915         * initialize.c (__gnat_initialize): Remove useless if-before-free.
8916
8917 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8918
8919         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8920         $(CFLAGS) on the link line.
8921
8922 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8923
8924         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8925         padded type built for the return type if it is unconstrained.
8926
8927 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
8928
8929         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8930
8931 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
8932
8933         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8934         before calling TREE_CHAIN.
8935         * gcc-interface/misc.c (gnat_init_ts): New function.
8936         (LANG_HOOKS_INIT_TS): Define.
8937
8938 2011-04-12  Martin Jambor  <mjambor@suse.cz>
8939
8940         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8941         instead of cgraph_node.
8942
8943 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8944
8945         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8946         alignment on fields of the RETURN type built for the Copy-In Copy-Out
8947         mechanism.
8948
8949 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8950
8951         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8952         of aggregate types that contain a placeholder.
8953
8954 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
8955
8956         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8957         TYPE_ARG_TYPES.
8958         (handle_type_generic_attribute): Likewise.
8959
8960 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
8961
8962         PR ada/47163
8963         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8964
8965 2011-04-04  Kai Tietz  <ktietz@redhat.com>
8966
8967         PR ada/47163
8968         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8969         to flag value.
8970
8971 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8972
8973         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8974         type case, do not strip a padding type around the array type.
8975
8976 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8977
8978         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8979         types.
8980
8981 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8982
8983         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8984         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8985         code for -feliminate-unused-debug-types.
8986         (gnat_post_options): Likewise.
8987
8988 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8989
8990         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8991         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8992         distinct copy.
8993
8994 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8995
8996         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8997         DECL_ARTIFICIAL flag on enumeration types.
8998
8999 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9000
9001         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9002         fat pointer types artificial unconditionally.
9003         <E_Array_Subtype>: Attach the base array type as a parallel type if it
9004         isn't artificial.
9005
9006 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9007
9008         * gcc-interface/gigi.h (get_dummy_type): Declare.
9009         (build_dummy_unc_pointer_types): Likewise.
9010         (finish_fat_pointer_type): Likewise.
9011         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9012         fat pointer type has been built, complete it in place.
9013         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9014         and thin pointers.  Remove useless variable.
9015         (finish_fat_pointer_type): Make global and move to...
9016         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9017         (get_dummy_type): New function.
9018         (build_dummy_unc_pointer_types): Likewise.
9019         (gnat_pushdecl): Propage the name to the anonymous variants only.
9020         (update_pointer_to): Only adjust the pointer types in the unconstrained
9021         array case.
9022
9023 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9024
9025         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9026         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9027         if this is a Taft amendment type and the full declaration is available.
9028         * gcc-interface/trans.c (process_type): Likewise.
9029         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9030         (process_freeze_entity): Likewise.
9031         * gcc-interface/utils.c (dummy_global): New static variable.
9032         (gnat_write_global_declarations): If there are types declared as used
9033         at the global level, insert them in the global hash table.
9034
9035 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9036
9037         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9038         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9039         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9040         copy.
9041         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
9042         flag of the type accordingly.
9043         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9044
9045 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9046
9047         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9048         finalizing types when updating the pointers to the designated type.
9049         <all>: Finalize the deferred types even if we didn't defer processing
9050         of incomplete types in this invocation.
9051
9052 2011-04-01  Olivier Hainque  <hainque@adacore.com>
9053             Nicolas Setton  <setton@adacore.com>
9054             Eric Botcazou  <ebotcazou@adacore.com>
9055
9056         * gcc-interface/misc.c (gnat_descriptive_type): New function.
9057         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9058
9059 2011-03-28  Kai Tietz  <ktietz@redhat.com>
9060
9061         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9062         Windows targets.
9063         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9064         * system-mingw.ads (System): Change ZCX_By_Default default to True.
9065
9066         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9067
9068 2011-03-28  Tristan Gingold  <gingold@adacore.com>
9069
9070         PR ada/44431
9071         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9072         Use ada output of gnatbind.
9073         (ada/b_gnatb.adb): Ditto.
9074         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9075         (ada.mostlyclean, ada.stage1)
9076         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9077         (ada.stagefeedback): Adjust.
9078         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9079         Use ada output of gnatbind.
9080         (b_gnatm.adb): Ditto.
9081         (b_gnatl.o, b_gnatm.o): New rules.
9082
9083 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
9084
9085         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9086         for the padded type built to support a specified size or alignment.
9087
9088 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
9089
9090         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9091         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9092         unconditionally to the end of the unit when the designated type is
9093         limited_with'ed.
9094         <all>: Rename local variable.  Attempt to un-defer types only and do it
9095         for limited_with'ed types as well.
9096         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
9097         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9098         consistently and remove redundant call to finalize_from_with_types.
9099
9100 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
9101
9102         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9103         subprograms without a previous spec declared in the same unit.
9104         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9105         subprograms at the end of the unit instead of at the beginning.
9106         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9107         isn't public for the special handling of non-inline functions nested
9108         inside inline external functions.
9109
9110 2011-03-25  Jeff Law  <law@redhat.com>
9111
9112         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9113
9114 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
9115
9116         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9117         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9118         to compute Set_Size_Depends_On_Discriminant.
9119         (Layout_Type): Call it on array types in back-end layout mode.
9120         * sem_util.adb (Requires_Transient_Scope): Return true for array
9121         types only if the size depends on the value of discriminants.
9122         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9123         type if the RHS is a call to a function that returns an unconstrained
9124         type with default discriminant.
9125
9126 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
9127
9128         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9129         non-conversion to the nominal result type at the end.
9130
9131 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
9132
9133         * gcc-interface/trans.c (create_temporary): New function taken from...
9134         (create_init_temporary): ...here.  Call it.
9135         (call_to_gnu): Create the temporary for the return value early, if any.
9136         Create it for a function with copy-in/copy-out parameters if there is
9137         no target; in other cases of copy-in/copy-out, use another temporary.
9138         Push the new binding level lazily.  Add and rename local variables.
9139
9140 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
9141
9142         * gcc-interface/decl.c (validate_size): Improve comments and tweak
9143         error message.
9144         (set_rm_size): Likewise.
9145
9146 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
9147
9148         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9149         for the padded type built in order to support a specified alignment.
9150         Fix incorrect formatting.
9151
9152 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
9153
9154         PR bootstrap/48216
9155         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
9156
9157 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
9158
9159         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
9160         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
9161         to the end of the list.  Adjust recursive call.  Rename local variable.
9162         If REORDER is true, reorder components of the record type.
9163         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
9164         components_to_record and adjust the parameter list.
9165
9166 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
9167
9168         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
9169         disabled, use the variable for bounds of loop iteration scheme.
9170
9171 2011-03-21  Kai Tietz  <ktietz@redhat.com>
9172
9173         PR target/12171
9174         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
9175
9176 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
9177
9178         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
9179         out whether the expression is read-only.  Short-circuit placeholder
9180         case and rename a couple of local variables.
9181
9182 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
9183
9184         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
9185         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
9186         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
9187         (convert): Deal with conversions from a smaller form type specially.
9188
9189 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
9190
9191         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
9192         its argument, except for the special -I- switch.
9193
9194 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
9195
9196         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
9197         "Ada Issues".
9198
9199 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
9200
9201         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
9202
9203 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
9204
9205         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
9206         GNAT_FORMAL.
9207         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
9208         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
9209         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
9210         Do not generate the check directly, instead instantiate the template
9211         check present in the descriptor.
9212         (make_descriptor_field): Move around.
9213         (build_vms_descriptor32): Build a template check in the POINTER field.
9214         (build_vms_descriptor): Remove useless suffixes.
9215         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
9216
9217 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
9218
9219         PR bootstrap/47467
9220         * targext.c: Include target files if IN_RTS is defined.
9221
9222 2011-01-26  Richard Guenther  <rguenther@suse.de>
9223
9224         PR bootstrap/47467
9225         * targext.c: Include config.h.
9226         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
9227         dependency.
9228
9229 2011-01-04  Pascal Obry  <obry@adacore.com>
9230             Eric Botcazou  <ebotcazou@adacore.com>
9231
9232         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
9233
9234 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
9235
9236         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
9237         end-of-case on the end label and its associated gotos, if any.
9238
9239 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
9240
9241         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
9242         expressions of the parameter cache within the statement group of
9243         the CICO mechanism.
9244
9245 2011-01-04  Olivier Hainque  <hainque@adacore.com>
9246             Eric Botcazou  <ebotcazou@adacore.com>
9247
9248         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
9249         (set_end_locus_from_node): New function.
9250         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
9251         make and the function end_locus.
9252         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
9253         for the elaboration subprogram.
9254         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
9255         set the end_locus of the expression as well.
9256
9257 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
9258
9259         PR ada/47131
9260         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
9261         variables that are referenced in exception handlers volatile.
9262
9263
9264 \f
9265 Copyright (C) 2011 Free Software Foundation, Inc.
9266
9267 Copying and distribution of this file, with or without modification,
9268 are permitted in any medium without royalty provided the copyright
9269 notice and this notice are preserved.
9270
9271         * gnat_rm.texi: Ramification of pragma Eliminate documentation
9272          - fix bugs in the description of Source_Trace;
9273          - get rid of UNIT_NAME;
9274
9275 2011-08-02  Javier Miranda  <miranda@adacore.com>
9276
9277         * exp_ch9.adb
9278         (Build_Dispatching_Requeue): Adding support for VM targets
9279         since we cannot directly reference the Tag entity.
9280         * exp_sel.adb (Build_K): Adding support for VM targets.
9281         (Build_S_Assignment): Adding support for VM targets.
9282         * exp_disp.adb
9283         (Default_Prim_Op_Position): In VM targets do not restrict availability
9284         of predefined interface primitives to compiling in Ada 2005 mode.
9285         (Is_Predefined_Interface_Primitive): In VM targets this service is not
9286         restricted to compiling in Ada 2005 mode.
9287         (Make_VM_TSD): Generate code that declares and initializes the OSD
9288         record. Needed to support dispatching calls through synchronized
9289         interfaces.
9290         * exp_ch3.adb
9291         (Make_Predefined_Primitive_Specs): Enable generation of predefined
9292         primitives associated with synchronized interfaces.
9293         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9294         primitives associated with synchronized interfaces.
9295
9296 2011-08-02  Yannick Moy  <moy@adacore.com>
9297
9298         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9299         statements hidden in SPARK if preceded by the HIDE directive
9300         (Parse_Exception_Handlers): mark each exception handler in a sequence of
9301         exception handlers as hidden in SPARK if preceded by the HIDE directive
9302         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9303         if starting with the HIDE directive
9304         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9305         starting with the HIDE directive; mark the declarations in a private
9306         part as hidden in SPARK if the private part starts with the HIDE
9307         directive
9308         * restrict.adb, restrict.ads
9309         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9310         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9311         argument node belongs to a part which is hidden in SPARK
9312         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9313         parts in SPARK; protect the possibly costly call to
9314         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9315         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9316         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9317         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9318         Tok_SPARK_Hide.
9319         (Scan): recognize special comment starting with '#' and followed by
9320         SPARK keyword "hide" as a HIDE directive.
9321
9322 2011-08-02  Yannick Moy  <moy@adacore.com>
9323
9324         * types.ads, erroutc.ads: Minor reformatting.
9325
9326 2011-08-02  Vincent Celier  <celier@adacore.com>
9327
9328         * link.c: Add response file support for cross platforms.
9329
9330 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9331
9332         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9333         in an association, set parent field of copy before partial analysis.
9334         * sem_res.adb (Resolve_Slice): create reference to itype only when
9335         expansion is enabled.
9336
9337 2011-08-02  Yannick Moy  <moy@adacore.com>
9338
9339         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9340         for new flag denoting which subprogram bodies are in ALFA
9341         * restrict.adb, sem_ch7.adb: Update comment
9342         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9343         sem_ch9.adb, sem_res.adb: Add calls to
9344         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9345         * sem_ch6.adb (Analyze_Function_Return): add calls to
9346         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9347         middle of the body, and extended return.
9348         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9349         False when missing return.
9350         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9351         to True for subprograms whose spec is in ALFA. Remove later on the flag
9352         on the entity used for a subprogram body when there exists a separate
9353         declaration.
9354         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9355         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9356         False, otherwise do nothing.
9357
9358 2011-08-02  Robert Dewar  <dewar@adacore.com>
9359
9360         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9361
9362 2011-08-02  Yannick Moy  <moy@adacore.com>
9363
9364         * sem_ch4.ads: minor formatting.
9365
9366 2011-08-02  Yannick Moy  <moy@adacore.com>
9367
9368         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9369         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9370         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9371         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9372         opt.ads: cleanup of SPARK mode
9373
9374 2011-08-02  Yannick Moy  <moy@adacore.com>
9375
9376         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9377         types.
9378         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9379         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9380         * sem_ch3.adb
9381         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9382         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9383         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9384         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9385         types.
9386         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9387         non-static range.
9388         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9389         functions whose return type is not in ALFA.
9390         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9391         specifications.
9392         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9393         parameter's type is not in ALFA.
9394         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9395         types are in ALFA.
9396
9397 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9398
9399         * sem_ch6 (Analyze_Expression_Function): treat the function as
9400         Inline_Always, and introduce a subprogram declaration for it when it is
9401         not a completion.
9402         * inline.adb (Add_Inlined_Body): recognize bodies that come from
9403         expression functions, so that the back-end can determine whether they
9404         can in fact be inlined.
9405         * sem_util.adb (Is_Expression_Function): predicate to determine whether
9406         a function body comes from an expression function.
9407
9408 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9409
9410         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9411         null exclusions to test Can_Never_Be_Null on the anonymous access types
9412         of the formals rather than testing the formals themselves. Exclude this
9413         check in cases where the Old_Formal is marked as a controlling formal,
9414         to avoid issuing spurious errors for bodies completing dispatching
9415         operations (due to the flag not getting set on controlling access
9416         formals in body specs).
9417         (Find_Corresponding_Spec): When checking full and subtype conformance of
9418         subprogram bodies in instances, pass Designated and E in that order, for
9419         consistency with the expected order of the formals (New_Id followed by
9420         Old_Id).
9421
9422 2011-08-02  Robert Dewar  <dewar@adacore.com>
9423
9424         * sem_ch8.adb: Minor reformatting.
9425
9426 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9427
9428         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9429         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9430         primitive operations of class-wide actuals.
9431
9432 2011-08-02  Javier Miranda  <miranda@adacore.com>
9433
9434         * exp_atag.ads, exp_atag.adb
9435         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9436         since its value is implicitly passed in argument Typ.
9437         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9438         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9439         Build_Common_Dispatching_Select_Statements.
9440
9441 2011-08-02  Robert Dewar  <dewar@adacore.com>
9442
9443         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9444         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9445         Minor reformatting.
9446
9447 2011-08-02  Robert Dewar  <dewar@adacore.com>
9448
9449         * sem_res.adb: Minor reformatting.
9450         * sem_prag.adb: Minor reformatting.
9451
9452 2011-08-02  Javier Miranda  <miranda@adacore.com>
9453
9454         * exp_atag.adb, exp_atags.ads
9455         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9456         by the tagged type Entity. Required to use this routine in the VM
9457         targets since we do not have available the Tag entity in the VM
9458         platforms.
9459         * exp_ch6.adb
9460         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9461         Ada.Tags has not been previously loaded.
9462         * exp_ch7.adb
9463         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9464         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9465         * sem_aux.adb
9466         (Enclosing_Dynamic_Scope): Add missing support to handle the full
9467         view of enclosing scopes. Required to handle enclosing scopes that
9468         are synchronized types whose full view is a task type.
9469         * exp_disp.adb
9470         (Build_VM_TSDs): Minor code improvement to avoid generating and
9471         analyzing lists with empty nodes.
9472         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9473         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9474         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9475         (Make_Disp_Timed_Select_Body): Add support for VM targets.
9476         (Make_Select_Specific_Data_Table): Add support for VM targets.
9477         (Make_VM_TSD): Generate code to initialize the SSD structure of
9478         the TSD.
9479
9480 2011-08-02  Yannick Moy  <moy@adacore.com>
9481
9482         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9483         cross-references section in ALI.
9484         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9485         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9486         Sub).
9487         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9488         subprogram or package entity of a node
9489         (Is_Local_Reference_Type): new function returns True for references
9490         selected in local cross-references.
9491         (Lt): function extracted from Lt in Output_References
9492         (Write_Entity_Name): function extracted from Output_References
9493         (Generate_Definition): generate reference with type 'D' for definition
9494         of objects (object declaration and parameter specification), with
9495         appropriate locations and units, for use in local cross-references.
9496         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9497         references of type 'I' for initialization in object definition.
9498         (Output_References): move part of function Lt and procedure
9499         Write_Entity_Name outside of the body. Ignore references of types 'D'
9500         and 'I' introduced for local cross-references.
9501         (Output_Local_References): new procedure to output the local
9502         cross-references sections.
9503         (Lref_Entity_Status): new array defining whether an entity is a local
9504         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9505         with 'I' type when initialization expression is present.
9506         * get_scos.adb, get_scos.ads: Correct comments and typos
9507
9508 2011-08-02  Javier Miranda  <miranda@adacore.com>
9509
9510         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9511         the JVM target.
9512         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9513         the JVM target.
9514         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9515         TSD support.
9516
9517 2011-08-02  Vincent Celier  <celier@adacore.com>
9518
9519         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9520         (No_Space_Img): New function
9521         (Find_Excluded_Sources): When reading from a file, record the file name
9522         and the line number for each excluded source.
9523         (Mark_Excluded_Sources): When reporting an error, if the excluded
9524         sources were read from a file, include file name and line number in
9525         the error message.
9526
9527 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9528
9529         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9530
9531 2011-08-02  Robert Dewar  <dewar@adacore.com>
9532
9533         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9534
9535 2011-08-02  Javier Miranda  <miranda@adacore.com>
9536
9537         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9538         generation of TSDs to the DOTNET compiler.
9539         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9540         generation of TSDs to the DOTNET compiler.
9541
9542 2011-08-02  Javier Miranda  <miranda@adacore.com>
9543
9544         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9545         record of all the tagged types declared inside library level package
9546         declarations, library level package bodies or library level subprograms.
9547         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9548         associated with a given tagged type.
9549         (Build_VM_TSDs): New subprogram.
9550         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9551         compilation units that are subprograms.
9552         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9553         compilation units that are package bodies.
9554         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9555         units that are a package declaration or a package instantiation.
9556         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9557         reorganization to improve the error generated by the frontend when the
9558         function Ada.Tags.Secondary_Tag is not available.
9559         * rtsfind.ads (RE_Register_TSD): New runtime entity.
9560         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9561
9562 2011-08-02  Javier Miranda  <miranda@adacore.com>
9563
9564         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9565
9566 2011-08-02  Robert Dewar  <dewar@adacore.com>
9567
9568         * s-imenne.ads: Minor reformatting.
9569
9570 2011-08-02  Robert Dewar  <dewar@adacore.com>
9571
9572         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9573         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9574         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9575
9576 2011-08-02  Robert Dewar  <dewar@adacore.com>
9577
9578         * einfo.ads (Materialize_Entity): Document this is only for renamings
9579         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9580         required debug information in the case where we transform the object
9581         declaration into a renaming declaration.
9582         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9583         object
9584         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9585         Materialize_Entity.
9586
9587 2011-08-02  Robert Dewar  <dewar@adacore.com>
9588
9589         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9590         Suppress_Init_Procs.
9591         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9592         Suppress_Initialization/Initialization_Suppressed.
9593         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9594         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9595         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9596         * sem_prag.adb: New processing for pragma Suppress_Initialization.
9597
9598 2011-08-02  Robert Dewar  <dewar@adacore.com>
9599
9600         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9601         Minor reformatting.
9602
9603 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9604
9605         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9606         only have inheritable classwide pre/postconditions.
9607
9608 2011-08-02  Javier Miranda  <miranda@adacore.com>
9609
9610         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9611         * rtsfind.ads (RE_Check_TSD): New runtime entity.
9612         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9613         checks if the external tag of a type is the same as the external tag
9614         of some other declaration.
9615
9616 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9617
9618         * s-taskin.ads: Minor reformatting.
9619
9620 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9621
9622         * g-comlin.adb (Display_Help): swap the order in which it prints the
9623         short help and the general usage.
9624
9625 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9626
9627         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9628         the aspect declarations and attach them to the generic copy for
9629         subsequent analysis.
9630         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9631         declarations of the generic tree to the new subprogram declarations.
9632         * sem_attr.adb (Check_Precondition_Postcondition): recognize
9633         conditions that apply to a subprogram instance.
9634
9635 2011-08-02  Robert Dewar  <dewar@adacore.com>
9636
9637         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9638
9639 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9640
9641         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9642         private type with a tagged full view is not derived in the immediate
9643         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9644
9645 2011-08-02  Robert Dewar  <dewar@adacore.com>
9646
9647         * exp_ch4.adb: Minor reformatting.
9648
9649 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9650
9651         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
9652         Ada2012 iterator, the loop will be rewritten during expansion into a
9653         while loop with a cursor and an element declaration. Do not analyze the
9654         body in this case, because if the container is for indefinite types the
9655         actual subtype of the elements will only be determined when the cursor
9656         declaration is analyzed.
9657
9658 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9659
9660         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9661         size/alignment related attributes in CodePeer_Mode.
9662
9663 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9664
9665         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9666         Prepend_Element, since this can result in the operation getting the
9667         wrong slot in the full type's dispatch table if the full type has
9668         inherited operations. The incomplete type's operation will get added
9669         to the proper position in the full type's primitives
9670         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9671         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9672         dispatching operations, since there are cases where nonprimitive
9673         subprograms can get added to the list of incomplete dependents (such
9674         as subprograms in nested packages).
9675         * sem_ch6.adb (Process_Formals): First, remove test for being in a
9676         private part when determining whether to add a primitive with a
9677         parameter of a tagged incomplete type to the Private_Dependents list.
9678         Such primitives can also occur in the visible part, and should not have
9679         been excluded from being private dependents.
9680         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9681         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9682         list of a Taft-amendment incomplete type is a primitive before issuing
9683         an error that the full type must appear in the same unit. There are
9684         cases where nonprimitives can be in the list (such as subprograms in
9685         nested packages).
9686         * sem_disp.adb (Derives_From): Use correct condition for checking that
9687         a formal's type is derived from the type of the corresponding formal in
9688         the parent subprogram (the condition was completely wrong). Add
9689         checking that was missing for controlling result types being derived
9690         from the result type of the parent operation.
9691
9692 2011-08-02  Yannick Moy  <moy@adacore.com>
9693
9694         * errout.adb (First_Node): minor renaming
9695         * restrict.adb (Check_Formal_Restriction): put restriction warning on
9696         first node.
9697
9698 2011-08-02  Yannick Moy  <moy@adacore.com>
9699
9700         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9701         before accessing operands.
9702         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9703         decide whether an initialization expression respects SPARK rules, as
9704         the plain node is the expanded one. This allows for more valid warnings
9705         to be issued.
9706         * gnat_rm.texi: Minor update.
9707
9708 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9709
9710         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9711         previous change.
9712
9713 2011-08-02  Robert Dewar  <dewar@adacore.com>
9714
9715         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9716
9717 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9718
9719         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9720         loop statements and the element renaming declaration with a block when
9721         the element type is controlled.
9722
9723 2011-08-02  Yannick Moy  <moy@adacore.com>
9724
9725         * sinfo.ads: Minor formatting.
9726
9727 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9728
9729         * sem_aggr.adb (Add_Association): if the association has a box and no
9730         expression, use the Sloc of the aggregate itself for the new
9731         association.
9732         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9733         the Original_Node.
9734
9735 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9736
9737         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9738         When a container is provided via a function call, generate a renaming
9739         of the function result. This avoids the creation of a transient scope
9740         and the premature finalization of the container.
9741         * exp_ch7.adb (Is_Container_Cursor): Removed.
9742         (Wrap_Transient_Declaration): Remove the supression of the finalization
9743         of the list controller when the declaration denotes a container cursor,
9744         it is not needed.
9745
9746 2011-08-02  Yannick Moy  <moy@adacore.com>
9747
9748         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9749         node is from source, instead of the original node being from source.
9750         * sem_aggr.adb
9751         (Resolve_Array_Aggregate): refine the check for a static expression, to
9752         recognize also static ranges
9753         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9754         Array_Type_Declaration): postpone the test for the type being a subtype
9755         mark after the type has been resolved, so that component-selection and
9756         expanded-name are discriminated.
9757         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9758         to distinguish the case of an iteration scheme, so that an error is
9759         issed on a non-static range in SPARK except in an iteration scheme.
9760         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9761         In_Iter_Schm = True.
9762         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9763         user-defined operators so that they are allowed in renaming
9764         * sem_ch8.adb
9765         (Find_Selected_Component): refine the check for prefixing of operators
9766         so that they are allowed in renaming. Move the checks for restrictions
9767         on selector name after analysis discriminated between
9768         component-selection and expanded-name.
9769         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9770         concatenation argument of string type if it is static.
9771         * sem_util.adb, sem_util.ads
9772         (Check_Later_Vs_Basic_Declarations): add a new function
9773         Is_Later_Declarative_Item to decice which declarations are allowed as
9774         later items, in the two different modes Ada 83 and SPARK. In the SPARK
9775         mode, add that renamings are considered as later items.
9776         (Enclosing_Package): new function to return the enclosing package
9777         (Enter_Name): correct the rule for homonyms in SPARK
9778         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9779         from source (result of expansion) to avoid issuing wrong warnings.
9780
9781 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9782
9783         * errout.adb: On anything but an expression First_Node returns its
9784         argument.
9785
9786 2011-08-02  Pascal Obry  <obry@adacore.com>
9787
9788         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9789
9790 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9791
9792         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9793         Set the associated loop as the related expression of internally
9794         generated cursors.
9795         * exp_ch7.adb (Is_Container_Cursor): New routine.
9796         (Wrap_Transient_Declaration): Supress the finalization of the list
9797         controller when the declaration denotes a container cursor.
9798
9799 2011-08-02  Yannick Moy  <moy@adacore.com>
9800
9801         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9802         command line now.
9803         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9804         expression is a simple expression. This check cannot be performed in
9805         the semantics, so just drop it.
9806         (P_Index_Or_Discriminant_Constraint): move check that the index or
9807         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9808         semantics. Other cases were previously checked in the semantics.
9809         * par-ch4.adb (P_Name): move checks that a selector name is not
9810         character literal or an operator symbol to Find_Selected_Component in
9811         the semantics
9812         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9813         declarations are not placed after later declarations in a separate
9814         procedure in Sem_Util (possibly not the best choice?), to be used both
9815         during parsing, for Ada 83 mode, and during semantic analysis, for
9816         SPARK mode.
9817         * par-endh.adb (Check_End): move check that end label is not missing
9818         to Process_End_Label in the semantics
9819         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9820         the special case for SPARK restriction
9821         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9822         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9823         parameter Force to issue the error message even on internal node (used
9824         for generated end label). Call Check_Restriction to check when an error
9825         must be issued. In SPARK mode, issue an error message even if the
9826         restriction is not set.
9827         (Check_Restriction): new procedure with an additional out parameter to
9828         inform the caller that a message has been issued
9829         * sem_aggr.adb: Minor modification of message
9830         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9831         instead of issuing an error message directly
9832         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9833         declarations are not placed after later declarations, by calling
9834         Check_Later_Vs_Basic_Declarations
9835         (Analyze_Subtype_Declaration): move here the check that an index or
9836         discriminant constraint must be a subtype mark. Change the check that
9837         a subtype of String must start at one so that it works on subtype marks.
9838         * sem_ch4.adb (Analyze_Call): move here the check that a named
9839         association cannot follow a positional one in a call
9840         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9841         instead of issuing an error message directly
9842         * sem_ch8.adb (Find_Selected_Component): move here the check that a
9843         selector name is not a character literal or an operator symbol. Move
9844         here the check that the prefix of an expanded name cannot be a
9845         subprogram or a loop statement.
9846         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9847         procedure called from parsing and semantics to check that basic
9848         declarations are not placed after later declarations
9849         (Process_End_Label): move here the check that end label is not missing
9850
9851 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9852
9853         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9854         representation clause in codepeer mode, since it confuses CodePeer and
9855         does not bring useful info.
9856
9857 2011-08-02  Ed Falis  <falis@adacore.com>
9858
9859         * init.c: initialize fp hw on MILS.
9860
9861 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9862
9863         * errout.adb (First_Node): for bodies, return the node itself (small
9864         optimization). For other nodes, do not check source_unit if the node
9865         comes from Standard.
9866
9867 2011-08-02  Robert Dewar  <dewar@adacore.com>
9868
9869         * exp_ch3.adb: Minor comment additions.
9870         * sem_ch13.adb: Minor reformatting.
9871
9872 2011-08-02  Pascal Obry  <obry@adacore.com>
9873
9874         * make.adb, makeutl.adb: Removes some superfluous directory separator.
9875
9876 2011-08-02  Robert Dewar  <dewar@adacore.com>
9877
9878         * sem_attr.adb: Minor reformatting.
9879
9880 2011-08-02  Robert Dewar  <dewar@adacore.com>
9881
9882         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9883         (Has_Default_Component_Value): Removed
9884         * einfo.ads Comment updates
9885         (Has_Default_Aspect): Replaces Has_Default_Value
9886         (Has_Default_Component_Value): Removed
9887         * exp_ch13.adb
9888         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9889         * exp_ch3.adb
9890         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9891         (Get_Simple_Init_Val): Handle Default_Value aspect
9892         (Needs_Simple_Initialization): Handle Default_Value aspect
9893         * exp_ch3.ads: Needs_Simple_Initialization
9894         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9895         * par-prag.adb (Pragma_Default[_Component]Value) Removed
9896         * sem_ch13.adb
9897         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9898         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9899         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9900
9901 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9902
9903         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9904         package containing iteration primitives.
9905         exp_ch5.adb (Expand_Iterator_Loop): ditto.
9906
9907 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9908
9909         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9910         "of", pre-analyze expression in case it is a function call with
9911         finalization actions that must be placed ahead of the loop.
9912         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9913         on an Ada2012 iterator, insert them ahead of the rewritten loop.
9914
9915 2011-08-02  Geert Bosch  <bosch@adacore.com>
9916
9917         * cstand.adb (Create_Float_Types): Only consider C's long double for
9918         Long_Long_Float, in addition to double.
9919
9920 2011-08-02  Robert Dewar  <dewar@adacore.com>
9921
9922         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9923         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9924         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9925         Minor reformatting.
9926
9927 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9928
9929         * sem_attr.adb: handle properly 'Result when it is a prefix of an
9930         indexed component.
9931
9932 2011-08-02  Javier Miranda  <miranda@adacore.com>
9933
9934         * einfo.ads, einfo.adb
9935         (Original_Access_Type): Move this attribute to Node26 since there was
9936         an undocumented use of Node21 in E_Access_Subprogram_Type entities
9937         which causes conflicts and breaks the generation of the .NET compiler.
9938         (Interface_Name): Add missing documentation on JGNAT only uses of
9939         this attribute.
9940
9941 2011-08-02  Geert Bosch  <bosch@adacore.com>
9942
9943         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9944         (Find_Back_End_Float_Type): Likewise
9945         (Create_Back_End_Float_Types): Likewise
9946         (Create_Float_Types): Likewise
9947         (Register_Float_Type): Likewise
9948         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9949         Nlist and split out type selection in new local Find_Base_Type function.
9950         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9951         Nlist
9952         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9953
9954 2011-08-02  Robert Dewar  <dewar@adacore.com>
9955
9956         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9957         alpha order).
9958         * opt.ads: Minor comment change.
9959         * sem_ch12.adb: Minor code reorganization.
9960
9961 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9962
9963         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9964         subtype's list of rep items to the list on the full subtype in the case
9965         where the lists are the same.
9966
9967 2011-08-02  Geert Bosch  <bosch@adacore.com>
9968
9969         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9970         using the one from System.Strings, which also deallocates all strings.
9971
9972 2011-08-02  Geert Bosch  <bosch@adacore.com>
9973
9974         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9975         function.
9976         * gcc-interface/Make-lang.in: Update dependencies.
9977
9978 2011-08-02  Olivier Hainque  <hainque@adacore.com>
9979
9980         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9981         end_locus.
9982
9983 2011-08-02  Javier Miranda  <miranda@adacore.com>
9984
9985         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9986         associated with anonymous access to subprograms.
9987
9988 2011-08-02  Geert Bosch  <bosch@adacore.com>
9989
9990         * opt.ads
9991         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9992         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9993         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9994         (Add_Symbol_Definition): Move to switch-c.adb
9995         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9996         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9997         (Add_Symbol_Definition): Move to switch-c.adb.
9998         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9999         * sem_warn.adb
10000         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10001         Move to warnsw.adb.
10002         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10003         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10004         Move to warnsw.adb.
10005         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10006         (Add_Symbol_Definition): Moved from Prepcomp.
10007         * switch-c.ads: Update copyright notice. Use String_List instead of
10008         Argument_List, removing dependency on System.OS_Lib.
10009
10010 2011-08-02  Yannick Moy  <moy@adacore.com>
10011
10012         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10013         mode on initialization expression which does not respect SPARK
10014         restrictions.
10015         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10016         if the tree referenced by its argument represents an initialization
10017         expression in SPARK, suitable for initializing an object in an object
10018         declaration.
10019
10020 2011-08-02  Javier Miranda  <miranda@adacore.com>
10021
10022         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10023         internally generated access to subprogram with its associated protected
10024         subprogram type.
10025         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10026
10027 2011-08-02  Geert Bosch  <bosch@adacore.com>
10028
10029         * cstand.adb (Register_Float_Type): Print information about type to
10030         register, if the Debug_Flag_Dot_B is set.
10031         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10032         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10033         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10034         with a requested precision of more than Max_Digits digits and no more
10035         than Max_Base_Digits digits, if a range specification is present and the
10036         Predefined_Float_Types list has a suitable type to derive from.
10037         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10038         case of type completion with pragma Import
10039         * sem_prag.adb
10040         (Process_Import_Predefined_Type): Processing to complete a type
10041         with pragma Import. Currently supports floating point types only.
10042         (Set_Convention_From_Pragma): Do nothing without underlying type.
10043         (Process_Convention): Guard against absence of underlying type,
10044         which may happen when importing incomplete types.
10045         (Process_Import_Or_Interface): Handle case of importing predefined
10046         types. Tweak error message.
10047
10048 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10049
10050         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10051         functions to previous change.  Reorganize code slightly.
10052
10053 2011-08-02  Geert Bosch  <bosch@adacore.com>
10054
10055         * back_end.ads (Register_Type_Proc): New call back procedure type for
10056         allowing the back end to provide information about available types.
10057         (Register_Back_End_Types): New procedure to register back end types.
10058         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10059         available types.
10060         * cstand.adb (Back_End_Float_Types): New list for floating point types
10061         supported by the back end.
10062         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10063         (Copy_Float_Type): New procedure to make new copies of predefined types.
10064         (Register_Float_Type): New call back procedure to populate the BEFT list
10065         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10066         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10067         (Create_Float_Types): New procedure to create entities for floating
10068         point types predefined in Standard, and put these and any remaining
10069         BEFTs on the Predefined_Float_Types list.
10070         * stand.ads (Predefined_Float_Types): New list for predefined floating
10071         point types that do not have declarations in package Standard.
10072
10073 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10074
10075         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
10076         entity node for the unit containing the parameter.
10077         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10078         (Add_Inlined_Subprogram): Likewise.
10079         * gcc-interface/Make-lang.in: Update dependencies.
10080
10081 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10082
10083         * s-stusta.adb (Print): Make sure Pos is always initialized to a
10084         suitable value.
10085
10086 2011-08-02  Geert Bosch  <bosch@adacore.com>
10087
10088         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10089
10090 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10091
10092         * sem_type.adb (Covers): Move trivial case to the top and reuse the
10093         computed value of Base_Type.
10094
10095 2011-08-02  Yannick Moy  <moy@adacore.com>
10096
10097         * restrict.adb (Check_Restriction): issue an error for any use of
10098         class-wide, even if the No_Dispatch restriction is not set.
10099         * sem_aggr.adb: Correct typos in comments and messages in formal mode
10100         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10101         when completing a private extension, the type named in the private part
10102         is not the same as that named in the visible part.
10103         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10104         of an inherited primitive operations of a tagged type or type extension
10105         that returns the tagged type.
10106         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10107         function which returns True for an implicit operation inherited by the
10108         derived type declaration for the argument type.
10109         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10110         order.
10111
10112 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10113
10114         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10115         Process_Bounds, to perform analysis with expansion of a range or an
10116         expression that is the iteration scheme for a loop.
10117         (Analyze_Iterator_Specification): If domain of iteration is given by a
10118         function call with a controlled result, as is the case if call returns
10119         a predefined container, ensure that finalization actions are properly
10120         generated.
10121         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10122
10123 2011-08-02  Javier Miranda  <miranda@adacore.com>
10124
10125         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10126         * gcc-interface/Make-lang.in: Update dependencies.
10127
10128 2011-08-02  Javier Miranda  <miranda@adacore.com>
10129
10130         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10131         determine if the analysis is performed using N or Original_Node (N).
10132         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10133         functionality of routine Is_Variable avoids code duplication.
10134         * checks.adb (Determine_Range): Handle temporaries generated by
10135         Remove_Side_Effects.
10136
10137 2011-08-02  Javier Miranda  <miranda@adacore.com>
10138
10139         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10140         expansion of the condition. Required since the previous analysis was
10141         done with expansion disabled (see Resolve_Quantified_Expression) and
10142         hence checks were not inserted and record comparisons have not been
10143         expanded.
10144
10145 2011-08-02  Ed Falis  <falis@adacore.com>
10146
10147         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10148         Update header.
10149
10150 2011-08-02  Bob Duff  <duff@adacore.com>
10151
10152         * opt.ads: Minor comment fix.
10153
10154 2011-08-02  Bob Duff  <duff@adacore.com>
10155
10156         * sem_ch12.adb (Analyze_Package_Instantiation,
10157         Analyze_Subprogram_Instantiation): Turn off style checking while
10158         analyzing an instance. Whatever style checks that apply to the generic
10159         unit should apply, so it makes no sense to apply them in an instance.
10160         This was causing trouble when compiling an instance of a runtime
10161         unit that violates the -gnatyO switch.
10162         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10163         one of the two case statements, causing spurious errors.
10164
10165 2011-08-02  Robert Dewar  <dewar@adacore.com>
10166
10167         * uname.adb: Minor reformatting.
10168         * gnatcmd.adb: Minor reformatting.
10169         * exp_attr.adb: Minor reformatting.
10170
10171 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10172
10173         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10174         No_Dispatching_Calls, do not look for the Assign primitive, because
10175         predefined primitives are not created in this case.
10176
10177 2011-08-02  Bob Duff  <duff@adacore.com>
10178
10179         * stylesw.ads: Minor comment fixes.
10180
10181 2011-08-02  Robert Dewar  <dewar@adacore.com>
10182
10183         * freeze.adb (Add_To_Result): New procedure.
10184
10185 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10186
10187         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10188         time, if the specific run-time routines for handling streams of strings
10189         are not available, use the default mechanism.
10190
10191 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10192
10193         * s-regpat.ads: Fix typo.
10194
10195 2011-08-02  Vincent Celier  <celier@adacore.com>
10196
10197         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10198         not null, call it to create the in memory config project file without
10199         parsing an existing default config project file.
10200
10201 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10202
10203         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10204
10205 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10206
10207         * sem_elim.adb: an abstract subprogram does not need an eliminate
10208         pragma for its descendant to be eliminable.
10209
10210 2011-08-02  Ed Falis  <falis@adacore.com>
10211
10212         * init.c: revert to handling before previous checkin for VxWorks
10213         * s-intman-vxworks.adb: delete unnecessary declarations related to
10214         using Ada interrupt facilities for handling signals.
10215         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10216         * s-intman-vxworks.ads: Import __gnat_install_handler as
10217         Initialize_Interrupts.
10218         * s-taprop-vxworks.adb: Delete Signal_Mask.
10219         (Abort_Handler): change construction of mask to unblock exception
10220         signals.
10221
10222 2011-08-02  Jerome Guitton  <guitton@adacore.com>
10223
10224         * a-except-2005.adb (Raise_From_Signal_Handler): Call
10225         Debug_Raise_Exception before propagation starts.
10226
10227 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10228
10229         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10230         to Restriction_Check_Required.
10231         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10232         * sem_res.adb (Resolve_Call): Likewise.
10233         * sem_attr.adb (Check_Stream_Attribute): Likewise.
10234
10235 2011-08-02  Bob Duff  <duff@adacore.com>
10236
10237         * stylesw.ads: Update comment.
10238         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10239         * errout.ads: Remove obsolete comment.
10240
10241 2011-08-02  Javier Miranda  <miranda@adacore.com>
10242
10243         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10244         (Set_Is_Safe_To_Reevaluate): new procedure.
10245         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10246         assignment is allowed on safe-to-reevaluate variables.
10247         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10248         temporary created to remove side effects in expressions that use
10249         the secondary stack as safe-to-reevaluate.
10250         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10251         variables that are not true constants.
10252
10253 2011-08-02  Robert Dewar  <dewar@adacore.com>
10254
10255         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10256         sem_res.adb, sem_ch6.adb: Minor reformatting.
10257
10258 2011-08-02  Jerome Guitton  <guitton@adacore.com>
10259
10260         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10261
10262 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10263
10264         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10265         not set Overridden_Operation if subprogram is an initialization
10266         procedure.
10267
10268 2011-08-02  Yannick Moy  <moy@adacore.com>
10269
10270         * par-ch6.adb: Correct obsolete name in comments
10271         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10272         which takes two message arguments (existing function takes one), with
10273         second message used for continuation.
10274         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10275         block statements that originate from a source block statement, not
10276         generated block statements
10277         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10278         symmetry with procedure case
10279         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10280         function to issue an error in formal mode if a package specification
10281         contains more than one tagged type or type extension.
10282         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10283         parameters matching formals of tagged types are objects (or ancestor
10284         type conversions of objects), not general expressions. Issue an error
10285         on view conversions that are not involving ancestor conversion of an
10286         extended type.
10287         (Resolve_Type_Conversion): in formal mode, issue an error on the
10288         operand of an ancestor type conversion which is not an object
10289         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10290         procedure so that it works also for actuals of function calls
10291         (Is_Actual_Tagged_Parameter): new function which determines if its
10292         argument is an actual parameter of a formal of tagged type in a
10293         subprogram call
10294         (Is_SPARK_Object_Reference): new function which determines if the tree
10295         referenced by its argument represents an object in SPARK
10296
10297 2011-08-02  Robert Dewar  <dewar@adacore.com>
10298
10299         * sem_ch3.adb: Minor reformatting
10300         Minor comment addition
10301         Minor error msg text change
10302
10303 2011-08-02  Javier Miranda  <miranda@adacore.com>
10304
10305         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10306         function. Used to be more precise when we generate a variable plus one
10307         assignment to remove side effects in the evaluation of the Bound
10308         expressions.
10309         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10310         of the bound expression to force its re-analysis and thus expand the
10311         associated transient scope (if required). Code cleanup replacing the
10312         previous code that declared the constant entity by an invocation to
10313         routine Force_Evaluation which centralizes this work in the frontend.
10314
10315 2011-08-02  Robert Dewar  <dewar@adacore.com>
10316
10317         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10318         (Base_Type): Now uses improved Is_Base_Type function
10319         * einfo.ads (Base_Type): Inline this function
10320
10321 2011-08-02  Robert Dewar  <dewar@adacore.com>
10322
10323         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10324         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10325
10326 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10327
10328         * gcc-interface/Make-lang.in: Update dependencies.
10329         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10330         targets.
10331
10332 2011-08-02  Yannick Moy  <moy@adacore.com>
10333
10334         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10335         non-simple expression used in delta constraint
10336         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10337         index constraint which is not a subtype mark
10338         * par.adb: With and use Restrict
10339         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10340         mode on component type which is not a subtype mark and default
10341         expression on component
10342         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10343         of string which does not have a lower index bound equal to 1
10344         (Array_Type_Declaration): issue an error in formal mode on index or
10345         component type which is not a subtype mark, and on aliased keyword on
10346         component
10347         (Derived_Type_Declaration): issue an error in formal mode on interface,
10348         limited or abstract type
10349         (Record_Type_Declaration): issue an error in formal mode on interface
10350         (Record_Type_Definition): issue an error in formal mode on tagged types
10351         and type extensions not declared in the specification of a library unit
10352         package; on null non-tagged record; on variant part
10353
10354 2011-08-02  Vincent Celier  <celier@adacore.com>
10355
10356         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10357         not declared for qualified library project when Library_Name is not
10358         declared, but Library_Dir is.
10359
10360 2011-08-02  Robert Dewar  <dewar@adacore.com>
10361
10362         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10363         pragmas (affects aspects [Component_]Default_Value
10364         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10365         component type for the resolution
10366
10367 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10368
10369         * einfo.adb (Base_Type): Tune implementation for speed.
10370
10371 2011-08-02  Robert Dewar  <dewar@adacore.com>
10372
10373         * freeze.adb: Minor reformatting.
10374
10375 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10376
10377         * scos.ads: Update comments.
10378
10379 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10380
10381         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10382         base type, because the parent may be a subtype of a private type whose
10383         convention is established in a private part.
10384
10385 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10386
10387         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10388         statement in a block when the expansion of the return expression has
10389         created a finalization chain.
10390         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10391         with the parent node.
10392         Add N_Extended_Return_Statement to handle the case where a transient
10393         object declaration appears in the Return_Object_Declarations list of
10394         an extended return statement.
10395
10396 2011-08-02  Matthew Gingell  <gingell@adacore.com>
10397
10398         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10399         unused parameter 'name'.
10400
10401 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10402
10403         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10404         inherited operation, check whether its alias, which is the source
10405         operastion that it renames, has been marked eliminated.
10406
10407 2011-08-02  Javier Miranda  <miranda@adacore.com>
10408
10409         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10410         in-mode parameter whose type is an access type since it can be used to
10411         modify its designated object. Enforce code that handles as safe an
10412         access type that is not access-to-constant but it is the result of a
10413         previous removal of side-effects.
10414         (Remove_Side_Effects): Minor code reorganization of cases which require
10415         no action. Done to incorporate documentation on new cases uncovered
10416         working in this ticket: no action needed if this routine was invoked
10417         too early and the nodes are not yet decorated.
10418         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10419         to routine Remove_Side_Effects by calls to Force_Evaluation since they
10420         were issued with actuals that are implicitly provided by
10421         Force_Evaluation.
10422
10423 2011-08-02  Robert Dewar  <dewar@adacore.com>
10424
10425         * sem_ch3.adb, sem_res.adb: Minor reformatting.
10426
10427 2011-08-02  Yannick Moy  <moy@adacore.com>
10428
10429         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10430         to issue an error in formal mode on attribute not supported in this mode
10431         (Analyze_Attribute): issue errors on standard attributes not supported
10432         in formal mode.
10433         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10434         comment, and issue error in formal mode on modulus which is not a power
10435         of 2.
10436         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10437         range.
10438         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10439         subtype mark.
10440         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10441         operator on modular type (except 'not').
10442
10443 2011-08-02  Robert Dewar  <dewar@adacore.com>
10444
10445         * gnat_rm.texi: Minor reformatting.
10446
10447 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10448
10449         * s-osinte-linux.ads: Minor comment update and reformatting.
10450         * i-cexten.ads: Make this unit pure, as for its parent.
10451         Will allow its usage in more contexts if needed.
10452
10453 2011-08-02  Robert Dewar  <dewar@adacore.com>
10454
10455         * s-utf_32.ads: Minor comment fix.
10456
10457 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10458
10459         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10460         operation of a tagged synchronized type, handle the case where the
10461         controlling argument is overloaded.
10462
10463 2011-08-02  Yannick Moy  <moy@adacore.com>
10464
10465         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10466         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10467         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10468         SPARK mode and formal verification mode on processing SPARK restriction
10469         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10470         requiring consistency checking.
10471
10472 2011-08-02  Robert Dewar  <dewar@adacore.com>
10473
10474         * sem_res.adb: Minor reformatting.
10475
10476 2011-08-02  Robert Dewar  <dewar@adacore.com>
10477
10478         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10479         a-cforse.ads: Remove unneeded with of Ada.Containers
10480         Remove commented out pragma Inline's
10481         Move specifications of new subprograms to the actual specs
10482
10483 2011-08-02  Yannick Moy  <moy@adacore.com>
10484
10485         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10486         a-cforse.ads: Update comments.
10487
10488 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10489
10490         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10491
10492 2011-08-02  Robert Dewar  <dewar@adacore.com>
10493
10494         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10495         a-cforse.ads, a-cofove.ads: Minor reformatting.
10496
10497 2011-08-02  Claire Dross  <dross@adacore.com>
10498
10499         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10500         a-cofove.ads: Add comments.
10501
10502 2011-08-02  Yannick Moy  <moy@adacore.com>
10503
10504         * gnat_rm.texi: Document formal containers.
10505
10506 2011-08-02  Emmanuel Briot  <briot@adacore.com>
10507
10508         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10509         are empty sections.
10510
10511 2011-08-02  Robert Dewar  <dewar@adacore.com>
10512
10513         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10514         reformatting.
10515
10516 2011-08-02  Robert Dewar  <dewar@adacore.com>
10517
10518         * aspects.adb: New aspects Default_Value and Default_Component_Value
10519         New format of Aspect_Names table checks for omitted entries
10520         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10521         handling of boolean aspects for derived types.
10522         New aspects Default_Value and Default_Component_Value
10523         New format of Aspect_Names table checks for omitted entries
10524         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10525         (Has_Default_Value): New flag
10526         (Has_Default_Component_Value): New flag
10527         (Has_Default_Value): New flag
10528         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10529         table.
10530         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10531         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10532         Default_Value and Default_Component_Value
10533         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10534         New aspects Default_Value and Default_Component_Value
10535         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10536         * sprint.adb: Print N_Aspect_Specification node when called from gdb
10537
10538 2011-08-02  Vincent Celier  <celier@adacore.com>
10539
10540         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10541         inherit library kind.
10542
10543 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10544
10545         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10546         Minor reformatting.
10547
10548 2011-08-02  Robert Dewar  <dewar@adacore.com>
10549
10550         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10551
10552 2011-08-02  Yannick Moy  <moy@adacore.com>
10553
10554         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10555
10556 2011-08-02  Robert Dewar  <dewar@adacore.com>
10557
10558         * impunit.adb: Add comment.
10559
10560 2011-08-02  Yannick Moy  <moy@adacore.com>
10561
10562         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10563         qualification of aggregates in formal mode
10564         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10565         another aggregate
10566         (Resolve_Aggregate): complete the test that an aggregate is adequately
10567         qualified in formal mode
10568
10569 2011-08-02  Pascal Obry  <obry@adacore.com>
10570
10571         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10572         * mlib-prj.adb: Supress warning when compiling binder generated file.
10573         (Build_Library): Supress all warnings when compiling the binder
10574         generated file.
10575
10576 2011-08-02  Yannick Moy  <moy@adacore.com>
10577
10578         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10579         from here...
10580         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10581         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10582         Add with/use clauses to make Check_Formal_Restriction visible
10583
10584 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10585
10586         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10587         in-parameters when type of the generic formal is private in the generic
10588         spec and non-private in the body.
10589
10590 2011-08-02  Claire Dross  <dross@adacore.com>
10591
10592         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10593         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10594         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10595         * impunit.adb, Makefile.rtl: Take new files into account.
10596
10597 2011-08-02  Robert Dewar  <dewar@adacore.com>
10598
10599         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10600         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10601
10602 2011-08-02  Yannick Moy  <moy@adacore.com>
10603
10604         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10605         formal mode
10606         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10607         matching static array bounds, taking into account the special case of
10608         string literals
10609         * sem_ch3.adb: Typo in comment.
10610
10611 2011-08-02  Yannick Moy  <moy@adacore.com>
10612
10613         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10614         which issues an error in formal mode if its argument node is originally
10615         from source
10616         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10617         has a discriminant specification so that it does not include the case
10618         of derived types
10619         (Derived_Type_Declaration): move here the test that a derived type has a
10620         discriminant specification
10621         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10622         first element of a component association before accessing its choices
10623         (presence of component association is not enough)
10624         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10625         declaration is a library item before accessing the next element in a
10626         list, as library items are not member of lists
10627         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10628         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10629         Check_Formal_Restriction whenever possible.
10630
10631 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10632
10633         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10634         reference when needed.
10635
10636 2011-08-02  Bob Duff  <duff@adacore.com>
10637
10638         * gnat_ugn.texi: Fix typo.
10639
10640 2011-08-02  Vincent Celier  <celier@adacore.com>
10641
10642         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10643         archive file name. Do not use the full path name of archives for Open
10644         VMS.
10645
10646 2011-08-02  Robert Dewar  <dewar@adacore.com>
10647
10648         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10649         Analyze_Aspect_Specifications
10650         * sem_ch13.adb
10651         (Analyze_Aspect_Specifications): New handling for boolean aspects
10652         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10653         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10654         sequence for Analyze_Aspect_Specifications
10655         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10656         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10657
10658 2011-08-02  Robert Dewar  <dewar@adacore.com>
10659
10660         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10661         aspects, since these no longer exist.
10662
10663 2011-08-02  Robert Dewar  <dewar@adacore.com>
10664
10665         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10666         semicolon, do not try to see if there are aspects following it.
10667         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10668         aspect spec.
10669
10670 2011-08-02  Robert Dewar  <dewar@adacore.com>
10671
10672         * sem_ch8.adb, aspects.ads: Minor reformatting.
10673
10674 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10675
10676         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10677         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10678         extracted from...
10679         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
10680
10681 2011-08-02  Yannick Moy  <moy@adacore.com>
10682
10683         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10684         mode on subprogram declaration outside of package specification, unless
10685         it is followed by a pragma Import
10686         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10687         Access_Type_Declaration): issue error in formal mode on access type
10688         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10689         incomplete type
10690         (Analyze_Object_Declaration): issue error in formal mode on object
10691         declaration which does not respect SPARK restrictions
10692         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10693         declaration which does not respect SPARK restrictions
10694         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10695         error in formal mode on digits or delta constraint
10696         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10697         decimal fixed point type
10698         (Derived_Type_Declaration): issue error in formal mode on derived type
10699         other than type extensions of tagged record types
10700         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10701         with check on access definition
10702         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10703         mode on protected definition.
10704         (Analyze_Task_Definition): issue error in formal mode on task definition
10705
10706 2011-08-02  Robert Dewar  <dewar@adacore.com>
10707
10708         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10709
10710 2011-08-02  Javier Miranda  <miranda@adacore.com>
10711
10712         * sem_ch6.adb (Can_Override_Operator): New function.
10713         (Verify_Overriding_Indicator): Add missing code to check overriding
10714         indicator in operators. Fixes regression.
10715         (Check_Overriding_Indicator): Minor reformating after replacing the
10716         code that evaluates if the subprogram can override an operator by
10717         invocations to the above new function.
10718         * einfo.adb
10719         (Write_Field26_Name): Add missing code to ensure that, following
10720         the documentation in einfo.ads, this field is not shown as attribute
10721         "Static_Initialization" on non-dispatching functions.
10722
10723 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10724
10725         * sem_res.adb (Resolve_Call): A call to
10726         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10727         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10728         i.e., when the second parameter is of type Time_Span.
10729
10730 2011-08-02  Vincent Celier  <celier@adacore.com>
10731
10732         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10733         with an archive instead of -L<library dir> -l<library name>.
10734
10735 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10736
10737         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10738         mark the base types In_Use in addition to making the operations
10739         use_visible.
10740
10741 2011-08-02  Ed Falis  <falis@adacore.com>
10742
10743         * init.c: add and setup __gnat_signal_mask for the exception signals
10744         * s-inmaop-vxworks.adb: new file.
10745         * s-intman-vxworks.adb: remove unnecessary initializations and
10746         simplify remaining
10747         * s-intman-vxworks.ads: remove unnecessary variable
10748         * s-taprop-vxworks.adb: simplify signal initialization
10749
10750 2011-08-02  Robert Dewar  <dewar@adacore.com>
10751
10752         * sem_ch8.adb: Minor code reorganization, comment updates.
10753
10754 2011-08-02  Robert Dewar  <dewar@adacore.com>
10755
10756         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10757         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10758         here from Sem_Res.
10759         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10760         (Matching_Static_Array_Bounds): Moved here from Sem_Res
10761
10762 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10763
10764         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10765         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10766         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10767         use_type_clauses, to handle more efficiently use_type and use_all_type
10768         constructs.
10769         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10770         Ada2012 Use_All_Type clause.
10771         (Use_Class_Wide_Operations): new procedure.
10772
10773 2011-08-02  Robert Dewar  <dewar@adacore.com>
10774
10775         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10776         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10777         expression to expression function.
10778
10779 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10780
10781         * sem_ch4.adb: transform simple Ada2012 membership into equality only
10782         if types are compatible.
10783
10784 2011-08-02  Yannick Moy  <moy@adacore.com>
10785
10786         * sem_res.adb (Matching_Static_Array_Bounds): new function which
10787         returns True if its argument array types have same dimension and same
10788         static bounds at each index.
10789         (Resolve_Actuals): issue an error in formal mode on actuals passed as
10790         OUT or IN OUT paramaters which are not view conversions in SPARK.
10791         (Resolve_Arithmetic_Op): issue an error in formal mode on
10792         multiplication or division with operands of fixed point types which are
10793         not qualified or explicitly converted.
10794         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10795         Boolean or array type (except String) operands.
10796         (Resolve_Equality_Op): issue an error in formal mode on equality
10797         operators for array types other than String with non-matching static
10798         bounds.
10799         (Resolve_Logical_Op): issue an error in formal mode on logical operators
10800         for array types with non-matching static bounds. Factorize the code in
10801         Matching_Static_Array_Bounds.
10802         (Resolve_Qualified_Expression): issue an error in formal mode on
10803         qualified expressions for array types with non-matching static bounds.
10804         (Resolve_Type_Conversion): issue an error in formal mode on type
10805         conversion for array types with non-matching static bounds
10806
10807 2011-08-02  Robert Dewar  <dewar@adacore.com>
10808
10809         * par-ch10.adb: Minor code reorganization (use Nkind_In).
10810
10811 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10812
10813         * par-ch9.adb: save location of entry for proper error message.
10814
10815 2011-08-02  Javier Miranda  <miranda@adacore.com>
10816
10817         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10818         (Use_Full_View) which permits this routine to climb through the
10819         ancestors using the full-view of private parents.
10820         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10821         Use_Full_View to true in calls to Is_Ancestor.
10822         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10823         true in call to Is_Ancestor.
10824         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10825         Use_Full_View to true in call to Is_Ancestor.
10826         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10827         call to Is_Ancestor.
10828         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10829         Use_Full_View to true in calls to Is_Ancestor.
10830         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10831         Make_Select_Specific_Data_Table, Register_Primitive,
10832         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10833         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10834         to true in call to Is_Ancestor.
10835         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10836         Use_Full_View to true in calls to Is_Ancestor.
10837         * exp_cg.adb
10838         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10839         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10840
10841 2011-08-02  Robert Dewar  <dewar@adacore.com>
10842
10843         * gnat_rm.texi: Minor reformatting.
10844         * sem_prag.adb: Minor reformatting.
10845
10846 2011-08-02  Tristan Gingold  <gingold@adacore.com>
10847
10848         * vms_data.ads: Add VMS qualifier for -gnateP.
10849
10850 2011-08-02  Robert Dewar  <dewar@adacore.com>
10851
10852         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10853         * par-ch7.adb (P_Package): Proper placement of aspects for package
10854         decl/instantiation.
10855         * par-endh.adb (Check_End): Ad Is_Sloc parameter
10856         (End_Statements): Add Is_Sloc parameterr
10857         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10858         (Check_End): Ad Is_Sloc parameter
10859         (End_Statements): Add Is_Sloc parameterr
10860
10861 2011-08-02  Vincent Celier  <celier@adacore.com>
10862
10863         * ug_words: Add VMS qualifier equivalent to -gnateP:
10864         /SYMBOL_PREPROCESSING.
10865
10866 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10867
10868         * gnat-style.texi: For hexadecimal numeric literals the typical
10869         grouping of digits is 4 to represent 2 bytes.
10870         A procedure spec which is split into several lines is indented two
10871         characters.
10872
10873 2011-08-02  Yannick Moy  <moy@adacore.com>
10874
10875         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10876         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10877         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10878         properly qualified
10879         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10880         choice in array aggregate
10881         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10882         mark as ancestor
10883         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10884         positional and named aggregate for record, or others in record
10885         aggregate, or multiple choice in record aggregate
10886         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10887         array operands to logical operations AND, OR and XOR do not have the
10888         same static lower and higher bounds
10889         * sem_ch5.adb, sinfo.ads: Correct typos in comments
10890
10891 2011-08-01  Robert Dewar  <dewar@adacore.com>
10892
10893         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10894         Replaces Last_Source_Node_In_Sequence.
10895         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10896         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10897         parens and blank in string (this was inconsistently implemented).
10898         * errout.ads
10899         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10900         blank in string (this was inconsistently implemented).
10901         * gnat1drv.adb
10902         (Set_Global_Switches): Set formal mode switches appropriately
10903         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10904         * par-prag.adb
10905         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10906         call Set_Error_Msg_Lang to set "spark" as language name.
10907         * par.adb: Remove unnecessary call to set formal language for errout
10908         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10909         appropriately and call Set_Error_Msg_Lang to set "spark" as language
10910         name.
10911         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10912         calls to it, moved after resolution so that types are known
10913         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10914         result of concatenation is not of type String
10915         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10916         concatenation is not properly restricted
10917         * gnat_rm.texi: Add doc on pragma Spark_95.
10918         * gcc-interface/Makefile.in: Remove obsolete target pairs for
10919         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10920         * gcc-interface/Make-lang.in: Update dependencies.
10921
10922 2011-08-01  Javier Miranda  <miranda@adacore.com>
10923
10924         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10925         condition that detects if the overridden operation must replace an
10926         existing entity.
10927
10928 2011-08-01  Javier Miranda  <miranda@adacore.com>
10929
10930         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10931         code declarations inserted by Insert_Actions in each alternative of the
10932         N_Case_Expression node.
10933
10934 2011-08-01  Robert Dewar  <dewar@adacore.com>
10935
10936         * sem_ch6.adb: Minor code reorganization.
10937         * sem_util.adb: Minor reformatting.
10938
10939 2011-08-01  Pascal Obry  <obry@adacore.com>
10940
10941         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10942         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10943
10944 2011-08-01  Yannick Moy  <moy@adacore.com>
10945
10946         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10947         literal or operator symbol which is prefixed
10948         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10949         mode on access attributes.
10950         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10951         that concatenation operands are properly restricted in formal mode
10952         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10953         Analyze_Concatenation_Operand. Issue an error in formal mode if the
10954         result of the concatenation has a type different from String.
10955         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10956         Analyze_Quantified_Expression, Analyze_Slice,
10957         Analyze_Null): issue an error in formal mode on unsupported constructs
10958         * sem_ch5.adb
10959         (Analyze_Block_Statement): only issue error on source block statement
10960         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10961         function which returns the last node in a list of nodes for which
10962         Comes_From_Source returns True, if any
10963         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10964         Last_Source_Node_In_Sequence
10965         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10966         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10967         mode on unsupported constructs
10968         * sem_ch9.adb Do not return after issuing error in formal mode, as the
10969         rest of the actions may be needed later on since the error is marked as
10970         not serious.
10971         * sinfo.ads: Typos in comments.
10972
10973 2011-08-01  Pascal Obry  <obry@adacore.com>
10974
10975         * projects.texi: Minor editing.
10976
10977 2011-08-01  Yannick Moy  <moy@adacore.com>
10978
10979         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10980         insertion character ~~
10981         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10982         (Set_Error_Msg_Lang): new procedure which fixes the language for use
10983         with insertion character ~~
10984         (Set_Msg_Text): treat insertion character ~~
10985         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10986         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10987         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10988         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10989         errors related to the formal language restriction not serious
10990         (insertion character |).
10991         * par.adb (Par): set formal language for error messages if needed
10992         * sem_ch6.adb (Check_Missing_Return): take into account possible
10993         generated statements at the end of the function
10994         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10995         enumeration value to define a new pragma SPARK_95
10996         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10997         SPARK_Version): new type and variables to store the SPARK version
10998         (none by default).
10999         (SPARK_Mode): return True when SPARK_Version is set
11000         * par-prag.adb: Correct indentation
11001         (Prag): take Pragma_SPARK_95 into account
11002         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11003         into account.
11004
11005 2011-08-01  Robert Dewar  <dewar@adacore.com>
11006
11007         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11008         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11009         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11010
11011 2011-08-01  Pascal Obry  <obry@adacore.com>
11012
11013         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11014         Target_Name to Get_Path call.
11015         (Parse_Single_Project): Likewise.
11016         (Post_Parse_Context_Clause): Likewise.
11017         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11018         Call Initialise_Project_Path with the proper Target_Name.
11019         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11020         search path.
11021         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11022         with the proper Target_Name.
11023         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11024         Part.Parse routine.
11025         (Parse_Project_And_Apply_Config): Likewise.
11026         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11027         This is fine as this part of the code is supporting only native
11028         compilation.
11029         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11030         is fine as this part of the code is supporting only native compilation.
11031
11032 2011-08-01  Yannick Moy  <moy@adacore.com>
11033
11034         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11035         of homonym, unless the homonym is one of the cases allowed in SPARK
11036         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11037         package declaration occurring after a body.
11038
11039 2011-08-01  Robert Dewar  <dewar@adacore.com>
11040
11041         * checks.adb, exp_ch4.adb: Minor reformatting.
11042
11043 2011-08-01  Javier Miranda  <miranda@adacore.com>
11044
11045         * einfo.ads (Access_Disp_Table): Fix documentation.
11046         (Dispatch_Table_Wrappers): Fix documentation.
11047
11048 2011-08-01  Pascal Obry  <obry@adacore.com>
11049
11050         * prj-env.adb, prj-env.ads: Minor reformatting.
11051
11052 2011-08-01  Yannick Moy  <moy@adacore.com>
11053
11054         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11055         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11056         procedures out of these packages.
11057         * errout.ads, errout.adb
11058         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11059         procedures in of this package
11060         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11061         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11062         on misplaced later vs initial declarations, like in Ada 83
11063         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11064         formal mode on attribute of private type whose full type declaration
11065         is not visible
11066         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11067         package declaration inside a package specification
11068         (Analyze_Full_Type_Declaration): issue error in formal mode on
11069         controlled type or discriminant type
11070         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11071         user-defined operator means that it should come from the source
11072         (New_Overloaded_Entity): issue error in formal mode on overloaded
11073         entity.
11074         * sem_ch6.ads, sem_ch13.ads: typos in comments.
11075
11076 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11077
11078         * atree.adb: Minor reformatting.
11079         * checks.adb: Minor reformatting.
11080
11081 2011-08-01  Vincent Celier  <celier@adacore.com>
11082
11083         * s-parame-vms-ia64.ads: Fix typo in comment
11084         Minor reformatting
11085         * s-parame-vms-restrict.ads: Removed, unused.
11086
11087 2011-08-01  Javier Miranda  <miranda@adacore.com>
11088
11089         * exp_ch3.adb
11090         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11091         * sem_ch3.adb
11092         (Constrain_Index): Remove side effects in the evaluation of the bounds.
11093         * sem_ch3.ads, sem_ch3.adb
11094         (Is_Constant_Bound): New extended version of the subprogram that was
11095         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11096         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11097         * sem_aux.ads (Constant_Value): Fix typo in comment.
11098         * checks.adb (Generate_Index_Checks): New implementation which, for
11099         array objects with constant bounds, generates the runtime check
11100         referencing the bounds of the array type. For other cases this routine
11101         provides its previous behavior obtaining such values from the array
11102         object.
11103         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11104         parent type.
11105         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11106         we cannot have semantic interpretations of the new node.
11107
11108 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11109
11110         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11111         expressions.
11112
11113 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11114
11115         * sem_ch8.adb: Minor code editing.
11116         * s-vxwext.adb: Remove trailing space.
11117         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11118         consistency with other files.
11119
11120 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11121
11122         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11123
11124 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11125
11126         * par-ch10.adb: reject parameterized expressions as compilation unit.
11127         * sem_ch4.adb: handle properly conditional expression with overloaded
11128         then_clause and no else_clause.
11129
11130 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11131
11132         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11133         like done by System.Aux_DEC.
11134         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11135
11136 2011-08-01  Yannick Moy  <moy@adacore.com>
11137
11138         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11139         missing label at end of declaration (subprogram or package)
11140         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11141         of positional and named parameter association
11142         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11143         Error_Msg_SP which adds a prefix to the error message giving the name
11144         of the formal language analyzed
11145         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11146         access result type in subprogram, unconstrained array as result type,.
11147         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11148         procedure
11149         * sem_ch8.adb: Code clean up.
11150
11151 2011-08-01  Javier Miranda  <miranda@adacore.com>
11152
11153         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11154         * einfo.ads (Access_Disp_Table): Fix documentation.
11155         (Dispatch_Table_Wrappers): Fix documentation.
11156         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11157         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11158         to enforce the documentation of this attribute.
11159         (Set_Is_Interface): Cleanup the assertion.
11160         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11161         the Underlying_Type entity before reading attribute Access_Disp_Table.
11162         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11163         Locate the Underlying_Type before reading attribute Access_Disp_Table.
11164         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11165         the Underlying_Type entity before reading attribute Access_Disp_Table.
11166         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11167         Locate the Underlying_Type entity before reading attribute
11168         Access_Disp_Table.
11169
11170 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11171
11172         * s-poosiz.ads: Additional overriding indicators.
11173
11174 2011-08-01  Yannick Moy  <moy@adacore.com>
11175
11176         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11177         formal mode.
11178         (Analyze_Iteration_Scheme): issue error in formal mode when loop
11179         parameter specification does not include a subtype mark.
11180         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11181         formal mode on abstract subprogram.
11182         (Analyze_Subprogram_Specification): issue error in formal mode on
11183         user-defined operator.
11184         (Process_Formals): issue error in formal mode on access parameter and
11185         default expression.
11186         * sem_ch9.adb (Analyze_Abort_Statement,
11187         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11188         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11189         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11190         Analyze_Requeue, Analyze_Selective_Accept,
11191         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11192         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11193         issue error in formal mode on user-defined raise statement.
11194
11195 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11196
11197         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11198         declaration being hidden when overriding an implicit inherited
11199         subprogram.
11200         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11201         (-gnats), do not complain about a source file that contains only a
11202         pragma No_Body.
11203
11204 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11205
11206         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11207         variable if already set.
11208
11209 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11210
11211         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11212         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11213         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11214         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11215         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11216         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11217         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11218         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11219         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11220         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11221         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11222         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11223         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11224         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11225         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11226         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11227         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11228         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11229         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11230         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11231         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11232         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11233         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11234         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11235         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11236         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11237         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11238         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11239         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11240         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11241         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11242         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11243         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11244         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11245         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11246         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11247         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11248         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11249         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11250         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11251         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11252         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11253         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11254         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11255         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11256         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11257         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11258         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11259         s-osinte-mingw.ads: Update to GPLv3 run-time license.
11260         Use GNAT instead of GNARL.
11261
11262 2011-08-01  Bob Duff  <duff@adacore.com>
11263
11264         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11265         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11266         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11267         reformatting.
11268
11269 2011-08-01  Yannick Moy  <moy@adacore.com>
11270
11271         * debug.adb (d.D) reverve flag for the SPARK mode
11272         (d.E) reverve flag for SPARK generation mode
11273         (d.F) reverve flag for Why generation mode
11274         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11275         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
11276         functions which return True when the corresponding modes are set
11277         (Formal_Language): return "spark" or "alfa" when in formal verification
11278         mode.
11279         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11280         Error_Msg to prefix the error message with a tag giving the formal
11281         language
11282         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11283         message with a tag giving the formal language
11284         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11285         block statement
11286         (Analyze_Case_Statement): issue error in formal mode on case statement
11287         with a single "others" case alternative
11288         (Analyze_Exit_Statement): issue errors in formal mode on exit
11289         statements which do not respect SPARK restrictions
11290         (Analyze_Goto_Statement): issue error in formal mode on goto statement
11291         (Check_Unreachable_Code): always issue an error (not a warning) in
11292         formal mode on unreachable code (concerns both code after an infinite
11293         loop and after an unconditional jump, both not allowed in SPARK)
11294         * sem_ch6.adb (Analyze_Return_Statement): add call to
11295         Set_Return_Present for a procedure containing a return statement
11296         (already done for functions in Analyze_Function_Return)
11297         (Analyze_Function_Return): issue error in formal mode on extended
11298         return or if return is not last statement in function
11299         (Check_Missing_Return): issue error in formal mode if function does
11300         not end with return or if procedure contains a return
11301         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11302         function to detect if there is an inner scope of its parameter S which
11303         is a loop.
11304
11305 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11306
11307         * sem_ch6.ads: Minor reformatting.
11308
11309 2011-08-01  Javier Miranda  <miranda@adacore.com>
11310
11311         * sem_util.adb (Abstract_Interface_List): Complete condition when
11312         processing private type declarations to avoid reading unavailable
11313         attribute.
11314         (Is_Synchronized_Tagged_Type): Complete condition when processing
11315         private extension declaration nodes to avoid reading unavailable
11316         attribute.
11317
11318 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11319
11320         * sem_ch3.adb: Minor reformatting.
11321
11322 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11323
11324         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11325         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11326         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11327         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11328         for VMS, instead parametrize the common implementation with
11329         System.Parameters declarations.
11330
11331 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
11332
11333         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11334
11335 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11336
11337         * seh_init.c: Fix SEH handler installation on win64.
11338
11339 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11340
11341         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11342         double analysis of an anonymous access to subprogram, because it can
11343         lead to improper sharing of profiles and a back-end crash.
11344
11345 2011-08-01  Robert Dewar  <dewar@adacore.com>
11346
11347         * make.adb, sem_ch4.adb: Minor reformatting.
11348         * gcc-interface/Make-lang.in: Update dependencies.
11349         * sem_util.adb, exp_ch5.adb: Minor reformatting.
11350
11351 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11352
11353         * gnat_rm.texi: Fix definition of Long_Integer.
11354
11355 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11356
11357         * exp_aggr.adb: check limit size of static aggregate unconditionally,
11358         to prevent storage exhaustion.
11359         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11360         finalized is a function body, insert the cleanup code before the final
11361         return statement, to prevent spurious warnings.
11362         * s-pooglo.ads: add overriding indicator.
11363
11364 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11365
11366         * sem_ch4.adb (Operator_Check): improve error message when both a
11367         with_clause and a use_clause are needed to make operator usage legal.
11368         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11369         determine whether a compilation unit is visible within an other,
11370         either through a with_clause in the current unit, or a with_clause in
11371         its library unit or one one of its parents.
11372
11373 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11374
11375         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11376         over an arbitrary expression of an array or container type.
11377         * lib-xref.adb: clarify comment.
11378
11379 2011-08-01  Bob Duff  <duff@adacore.com>
11380
11381         * einfo.ads: Minor reformatting.
11382         * debug.adb: Minor comment improvement.
11383
11384 2011-08-01  Javier Miranda  <miranda@adacore.com>
11385
11386         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11387         consider hidden subprograms as valid candidates.
11388
11389 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11390
11391         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11392
11393 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
11394
11395         * gnat_ugn.texi: Fix typo.
11396
11397 2011-08-01  Robert Dewar  <dewar@adacore.com>
11398
11399         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11400         lib-xref.adb: Minor reformatting
11401
11402 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
11403
11404         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11405         when to generate a call to Move_Final_List.
11406         (Has_Controlled_Parts): Remove this function.
11407
11408 2011-08-01  Geert Bosch  <bosch@adacore.com>
11409
11410         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11411         "," in choice list.
11412
11413 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11414
11415         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11416         explicit raise of a predefined exception as Comes_From_Source if the
11417         original N_Raise_Statement comes from source.
11418
11419 2011-08-01  Robert Dewar  <dewar@adacore.com>
11420
11421         * sinfo.ads: Add comment.
11422         * sem_ch6.adb: Minor reformatting.
11423
11424 2011-08-01  Robert Dewar  <dewar@adacore.com>
11425
11426         * freeze.adb (Freeze_Entity): Refine check for bad component size
11427         clause to avoid rejecting confirming clause when atomic/aliased present.
11428
11429 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11430
11431         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11432         better determine whether an entity reference is a write.
11433         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11434         subcomponent.
11435         * lib-xref.adb (Output_References): Do no suppress a read reference at
11436         the same location as an immediately preceeding modify-reference, to
11437         handle properly in-out actuals.
11438
11439 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11440
11441         * env.c (__gnat_setenv) [VMS]: Refine previous change.
11442
11443 2011-08-01  Quentin Ochem  <ochem@adacore.com>
11444
11445         * i-cstrin.adb (New_String): Changed implementation, now uses only the
11446         heap to compute the result.
11447
11448 2011-08-01  Robert Dewar  <dewar@adacore.com>
11449
11450         * atree.ads: Minor reformatting.
11451
11452 2011-08-01  Emmanuel Briot  <briot@adacore.com>
11453
11454         * g-expect.adb (Get_Command_Output): Fix memory leak.
11455
11456 2011-08-01  Geert Bosch  <bosch@adacore.com>
11457
11458         * cstand.adb (P_Float_Type): New procedure to print the definition of
11459         predefined fpt types.
11460         (P_Mixed_Name): New procedure to print a name using mixed case
11461         (Print_Standard): Use P_Float_Type for printing floating point types
11462         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11463         precision IEEE float.
11464
11465 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11466
11467         * sem_ch3.adb: Minor reformatting.
11468
11469 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11470
11471         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11472         the completion of a generic function, insert the new body rather than
11473         rewriting the original.
11474
11475 2011-08-01  Yannick Moy  <moy@adacore.com>
11476
11477         * sinfo.ads, errout.ads: Typos in comments.
11478
11479 2011-08-01  Robert Dewar  <dewar@adacore.com>
11480
11481         * par-endh.adb: Minor reformatting.
11482
11483 2011-08-01  Robert Dewar  <dewar@adacore.com>
11484
11485         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11486         (Pre_Post_Aspects): New subtype.
11487         * par-ch12.adb (P_Generic): New syntax for aspects in packages
11488         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11489         * par-ch7.adb (P_Package): Remove Decl parameter
11490         (P_Package): Handle new syntax for aspects (before IS)
11491         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11492         new aspect syntax
11493         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11494         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11495         (P_Package): Remove Decl parameter
11496         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11497         aspects
11498         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11499         specs
11500         * sem_util.ads, sem_util.adb (Static_Boolean): New function
11501         * sinfo.ads: Document new syntax for aspects in packages etc.
11502         * sprint.adb: Handle new syntax of aspects before IS in package
11503
11504 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11505
11506         * atree.ads: Minor reformatting.
11507         * sem_prag.adb: Minor reformatting.
11508
11509 2011-08-01  Robert Dewar  <dewar@adacore.com>
11510
11511         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11512         case expr alternative.
11513
11514 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11515
11516         * sem_ch12.adb: Fix typo.
11517
11518 2011-08-01  Geert Bosch  <bosch@adacore.com>
11519
11520         * sem_prag.adb (Check_No_Link_Name): New procedure.
11521         (Process_Import_Or_Interface): Use Check_No_Link_Name.
11522         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11523         instead of Standard_Long_Long_Float_Size global. Preparation for
11524         eventual removal of per type constants.
11525         * exp_util.ads (Get_Stream_Size): New function returning the stream
11526         size value of subtype E.
11527         * exp_util.adb (Get_Stream_Size): Implement new function.
11528         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11529         function.
11530         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11531         * einfo.adb:
11532         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11533
11534 2011-08-01  Geert Bosch  <bosch@adacore.com>
11535
11536         * cstand.adb: Fix comments.
11537         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11538         count of arguments.
11539
11540 2011-08-01  Robert Dewar  <dewar@adacore.com>
11541
11542         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11543
11544 2011-08-01  Geert Bosch  <bosch@adacore.com>
11545
11546         * atree.ads: Fix comment.
11547
11548 2011-08-01  Robert Dewar  <dewar@adacore.com>
11549
11550         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11551         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11552         * par.adb: Add with for Namet.Sp.
11553         * par-tchk.adb: Minor reformatting.
11554
11555 2011-08-01  Vincent Celier  <celier@adacore.com>
11556
11557         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11558         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11559         of the init procedure of a SAL.
11560         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11561         New procedure.
11562
11563 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11564
11565         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11566         reformatting.
11567
11568 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11569
11570         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11571
11572 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11573
11574         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11575         conformant with its spec (return True only for types that have
11576         an overriding Initialize primitive operation that prevents them from
11577         having preelaborable initialization).
11578         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11579         initialization for controlled types in Ada 2005 or later mode.
11580
11581 2011-08-01  Robert Dewar  <dewar@adacore.com>
11582
11583         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11584         Postcondition.
11585         (Same_Aspect): New function.
11586         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11587         Type_Invariant, Precondition, Postcondition.
11588         * snames.ads-tmpl: Add Name_Type_Invariant.
11589
11590 2011-08-01  Robert Dewar  <dewar@adacore.com>
11591
11592         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11593         here.
11594         (Freeze_All_Ent): Fix error in handling inherited aspects.
11595         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11596         already analyzed, but don't skip entire processing of a declaration,
11597         that's wrong in some cases of declarations being rewritten.
11598         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11599         Don't delay for integer, string literals
11600         Treat predicates in usual manner for delay, remove special case code,
11601         not needed.
11602         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11603         (Build_Predicate_Function): Update saved expression in aspect
11604         (Build_Invariant_Procedure): Update saved expression in aspect
11605         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11606         of replacement of discriminant references if the reference is simple.
11607
11608 2011-08-01  Robert Dewar  <dewar@adacore.com>
11609
11610         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11611         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11612         Static_Predicate and Dynamic_Predicate.
11613         (Build_Predicate_Function): Add processing for Static_Predicate
11614         and Dynamic_Predicate.
11615         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11616         (From_Static_Predicate): New flag
11617         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11618
11619 2011-08-01  Robert Dewar  <dewar@adacore.com>
11620
11621         * usage.adb: Documentation cleanup for Ada version modes in usage.
11622         * expander.adb: Minor reformatting.
11623
11624 2011-08-01  Robert Dewar  <dewar@adacore.com>
11625
11626         * atree.ads: Minor comment fix.
11627         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11628         a-witeio.ads, sem_prag.adb: Minor reformatting.
11629
11630 2011-08-01  Doug Rupp  <rupp@adacore.com>
11631
11632         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11633         pointers. Use descrip.h header file for convenience. Add some
11634         comments.
11635
11636 2011-08-01  Robert Dewar  <dewar@adacore.com>
11637
11638         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11639         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11640         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11641         New procedure.
11642         (Check_Aspect_At_End_Of_Declarations): New procedure
11643         (Analye_Aspect_Specification): Minor changes for above procedures
11644         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11645         specification node as well.
11646
11647 2011-08-01  Pascal Obry  <obry@adacore.com>
11648
11649         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11650         Windows files. Use GetFilesAttributes() in this case to check for file
11651         existence instead of returning with an error code.
11652
11653 2011-08-01  Vincent Celier  <celier@adacore.com>
11654
11655         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11656         High is above Source length.
11657
11658 2011-08-01  Robert Dewar  <dewar@adacore.com>
11659
11660         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11661
11662 2011-08-01  Robert Dewar  <dewar@adacore.com>
11663
11664         * aspects.ads (Boolean_Aspects): New subtype.
11665         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11666         for derived types in cases where the parent type and derived type have
11667         aspects.
11668         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11669         with aspects when parent type also has aspects.
11670         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11671         boolean expression at this point).
11672         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11673         accordance with final decision on the Ada 2012 feature.
11674         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11675
11676 2011-08-01  Matthew Heaney  <heaney@adacore.com>
11677
11678         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11679
11680 2011-08-01  Pascal Obry  <obry@adacore.com>
11681
11682         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11683         Fix Replace_Slice when High is above current string size.
11684         (Replace_Slice): Fix DL computation when High is above current
11685         string length.
11686
11687 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
11688
11689         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11690
11691 2011-08-01  Matthew Heaney  <heaney@adacore.com>
11692
11693         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11694         of node.
11695
11696 2011-08-01  Pascal Obry  <obry@adacore.com>
11697
11698         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11699         reformatting.
11700
11701 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11702
11703         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11704         access to protected subprograms in generic bodies.
11705         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11706         protected type, indicate that the convention of the subprogram is
11707         Convention_Protected, because it may be used in subsequent declarations
11708         within the protected declaration.
11709
11710 2011-08-01  Vincent Celier  <celier@adacore.com>
11711
11712         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11713         and "final" procedures when the name of the library is "ada", to avoid
11714         duplicate symbols "adainit" and "adafinal" in executables.
11715
11716 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11717
11718         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11719         quantified expression that appears within a postcondition and uses the
11720         Ada2012 'Result attribute.
11721
11722 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11723
11724         * init.c (__gnat_error_handler): Cast reason to int.
11725         (__gnat_install_handler): Explain sa_sigaction use.
11726
11727 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11728
11729         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11730         subprogram has copy-in copy-out parameters, try to promote the mode of
11731         the return type if it is passed in registers.
11732
11733 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11734
11735         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11736         left operand as addressable.
11737
11738 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11739
11740         * gcc-interface/gigi.h (build_function_stub): Remove.
11741         (build_return_expr): Likewise.
11742         (convert_vms_descriptor): Declare.
11743         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11744         (build_function_stub): Move to...
11745         * gcc-interface/utils2.c (build_return_expr): Move to...
11746         * gcc-interface/trans.c (build_function_stub): ...here.
11747         (build_return_expr): ...here.
11748         (Subprogram_Body_to_gnu): Add local variable for language_function.
11749         Disconnect the parameter attributes cache, if any, once done with it.
11750         Call end_subprog_body only after setting the end_locus.
11751         Build the stub associated with the function, if any, at the very end.
11752         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11753         variables and streamline control flow.
11754
11755 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
11756
11757         PR ada/49819
11758         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11759         g-trasym-dwarf.adb.
11760
11761 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11762
11763         PR bootstrap/49794
11764         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11765         Assign to act.sa_sigaction.
11766         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11767         current->return_address to char * before arithmetic.
11768
11769 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11770
11771         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11772         Correct argument types.
11773         Extract code from reason.
11774         (__gnat_install_handler): Assign to act.sa_sigaction.
11775
11776 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
11777
11778         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11779         (GNAT1_OBJS): ...here.
11780
11781 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
11782
11783         PR ada/48711
11784         * g-socthi-mingw.adb (Fill): Fix formatting.
11785
11786         * gcc-interface/gigi.h: Move around comment.
11787
11788 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
11789
11790         PR ada/46350
11791         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11792
11793 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
11794
11795         PR ada/48711
11796         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11797
11798 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
11799
11800         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11801         range comparison if Pmode is SImode.
11802
11803 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
11804             Eric Botcazou  <ebotcazou@adacore.com>
11805
11806         * adadecode.c: Wrap up in extern "C" block.
11807         * adadecode.h: Likewise.
11808         * adaint.c: Likewise.  Remove 'const' keyword.
11809         * adaint.h: Likewise.
11810         * argv.c: Likewise.
11811         * atree.h: Likewise.
11812         * cio.c: Likewise.
11813         * cstreams.c: Likewise.
11814         * env.c: Likewise.
11815         * exit.c: Likewise.
11816         * fe.h: Likewise.
11817         * final.c: Likewise.
11818         * init.c: Likewise.
11819         * initialize.c: Likewise.
11820         * link.c: Likewise.
11821         * namet.h: Likewise.
11822         * nlists.h: Likewise.
11823         * raise.c: Likewise.
11824         * raise.h: Likewise.
11825         * repinfo.h: Likewise.
11826         * seh_init.c: Likewise.
11827         * targext.c: Likewise.
11828         * tracebak.c: Likewise.
11829         * uintp.h: Likewise.
11830         * urealp.h: Likewise.
11831         * xeinfo.adb: Wrap up generated C code in extern "C" block.
11832         * xsinfo.adb: Likewise.
11833         * xsnamest.adb: Likewise.
11834         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11835         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11836         * gcc-interface/misc.c: Likewise.
11837         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11838         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
11839         ada/targext.o here...
11840         (GNAT_ADA_OBJS): ...and not here.
11841         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11842         (GNATBIND_OBJS): Reorder.
11843
11844 2011-07-07  Richard Henderson  <rth@redhat.com>
11845
11846         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11847         dwarf2out_frame_init.
11848
11849 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
11850
11851         * gcc-interface/misc.c (gnat_init): Tweak previous change.
11852
11853 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11854
11855         PR target/39150
11856         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11857
11858 2011-07-06  Richard Guenther  <rguenther@suse.de>
11859
11860         * gcc-interface/misc.c (gnat_init): Merge calls to
11861         build_common_tree_nodes and build_common_tree_nodes_2.
11862         Re-initialize boolean_false_node.
11863
11864 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
11865             Olivier Hainque  <hainque@adacore.com>
11866             Nicolas Setton  <setton@adacore.com>
11867
11868         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11869         the type according to the ARTIFICIAL_P parameter.
11870         (create_type_decl): Likewise.
11871         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11872
11873 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
11874
11875         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11876         (gnatbind): Likewise.
11877
11878 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11879
11880         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11881
11882 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11883
11884         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11885         local variable throughout.  Remove useless call to Base_Type.
11886         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11887         Take it also into account for the volatileness of the field.  Set the
11888         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
11889
11890 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11891
11892         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11893         on a dereference built for a by-ref object if it has an address clause.
11894
11895 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11896
11897         * einfo.ads (Address_Taken): Document use for the second argument of
11898         Asm_Input and Asm_Output attributes.
11899         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11900         argument is an entity name, then set Address_Taken on it.
11901         <Attribute_Asm_Output>: Likewise.
11902         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11903         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11904         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11905         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11906
11907 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
11908
11909         PR middle-end/46500
11910         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11911
11912 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
11913
11914         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11915         (ada/utils.o): Update dependencies.
11916         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11917         ../../../libcpp/libcpp.a.
11918         * gcc-interface/utils.c: Include common/common-target.h.
11919         (process_attributes): Use targetm_common.have_named_sections.
11920
11921 2011-06-07  Richard Guenther  <rguenther@suse.de>
11922
11923         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11924         set_sizetype.
11925
11926 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11927
11928         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11929         TREE_THIS_NOTRAP flag.
11930
11931 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11932
11933         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11934         Fix thinko.
11935
11936 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11937
11938         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11939         constants whose full view has discriminants specially.
11940
11941 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11942
11943         * gcc-interface/utils.c: Include diagnostic.h.
11944         (gnat_write_global_declarations): Output debug information for all
11945         global type declarations before finalizing the compilation unit.
11946         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11947
11948 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
11949
11950         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11951
11952 2011-05-25  Kai Tietz  <ktietz@redhat.com>
11953
11954         * adaint.c (__gnat_to_canonical_file_list_next): Use array
11955         initialization instead of const/none-const pointer assignment.
11956
11957 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
11958
11959         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11960         $(EXTRA_GNAT1_OBJS).
11961         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11962         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11963         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11964         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11965         libcommon-target.a instead of prefix.o.
11966
11967 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
11968
11969         PR ada/49097
11970         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11971
11972 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
11973
11974         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11975         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11976         instead of version.o.
11977
11978 2011-05-18  Kai Tietz <ktietz@redhat.com>
11979
11980         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11981         boolean_false_node instead of integer_zero_node.
11982         (convert_with_check): Likewise.
11983         * gcc-interface/decl.c (choices_to_gnu): Likewise.
11984
11985 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
11986
11987         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11988         type of the parameter is an unconstrained array, convert the actual to
11989         the type of the formal in the In Out and Out cases as well.
11990
11991 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
11992
11993         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11994         call build_function_type_array or build_varargs_function_type_array
11995         instead.
11996         (create_subprog_type): Don't call build_function_type; call
11997         build_function_type_vec instead.
11998
11999 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
12000
12001         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12002         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12003         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12004
12005 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
12006
12007         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12008
12009         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12010         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12011
12012 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12013
12014         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12015
12016 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12017
12018         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12019         instead of accessing TYPE_ARG_TYPES directly.
12020         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12021
12022 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12023
12024         PR ada/48844
12025         * gcc-interface/gigi.h (get_variant_part): Declare.
12026         * gcc-interface/decl.c (get_variant_part): Make global.
12027         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12028         types have the same constant size, are record types and T1 has a
12029         variant part while T2 doesn't.
12030
12031 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12032
12033         * gcc-interface/utils.c (begin_subprog_body): Do not call
12034         get_pending_sizes.
12035         (end_subprog_body): Likewise.
12036
12037 2011-05-04  Richard Guenther  <rguenther@suse.de>
12038
12039         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12040         int_const_binop.
12041         (pos_to_constructor): Likewise.
12042
12043 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
12044             Eric Botcazou  <ebotcazou@adacore.com>
12045
12046         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12047         of build_function_type.  Adjust calls to...
12048         (build_raise_check): ...this.  Do not take a void_tree parameter.
12049         Call build_function_type_list instead of build_function_type.
12050         Fix head comment and swap couple of conditional blocks.
12051
12052 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
12053
12054         * gnatvsn.ads (Library_Version): Bump to 4.7.
12055         (Current_Year): Bump to 2011.
12056
12057 2011-04-29  Michael Matz  <matz@suse.de>
12058
12059         * gcc-interface/misc.c (gnat_handle_option): Set
12060         warn_maybe_uninitialized.
12061
12062 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
12063
12064         * gnat_ugn.texi (Complexity Metrics Control): Update link to
12065         the Watson/McCabe paper.
12066
12067 2011-04-23  Jim Meyering  <meyering@redhat.com>
12068
12069         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12070
12071 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12072
12073         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12074         onto the new type.
12075
12076 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12077
12078         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12079         parameter.
12080         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
12081         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12082         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12083         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12084         <all>: Do not set flags on the reused DECL node coming from an alias.
12085         Set DECL_IGNORED_P on the DECL node built for subprograms if they
12086         don't need debug info here...
12087         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12088         (gigi): Adjust calls to create_subprog_decl.
12089         (build_raise_check): Likewise.
12090         (establish_gnat_vms_condition_handler): Likewise.
12091         (Compilation_Unit_to_gnu): Likewise.
12092         (gnat_to_gnu): Likewise.
12093
12094 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
12095
12096         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12097         (NO_REORDER_ADAFLAGS): New variable.
12098         (EXTRA_GNATTOOLS): Always define.
12099         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12100         Clean up and adjust list of files compiled with special options.
12101         * gcc-interface/Make-lang.in: Likewise.
12102         (ada/decl.o): Cosmetical change.
12103         (ada/misc.o): Remove dependency on $(PLUGIN_H).
12104
12105 2011-04-20  Jim Meyering  <meyering@redhat.com>
12106
12107         * initialize.c (__gnat_initialize): Remove useless if-before-free.
12108
12109 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12110
12111         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12112         $(CFLAGS) on the link line.
12113
12114 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12115
12116         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12117         padded type built for the return type if it is unconstrained.
12118
12119 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
12120
12121         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12122
12123 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
12124
12125         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12126         before calling TREE_CHAIN.
12127         * gcc-interface/misc.c (gnat_init_ts): New function.
12128         (LANG_HOOKS_INIT_TS): Define.
12129
12130 2011-04-12  Martin Jambor  <mjambor@suse.cz>
12131
12132         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12133         instead of cgraph_node.
12134
12135 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12136
12137         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12138         alignment on fields of the RETURN type built for the Copy-In Copy-Out
12139         mechanism.
12140
12141 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12142
12143         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12144         of aggregate types that contain a placeholder.
12145
12146 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
12147
12148         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12149         TYPE_ARG_TYPES.
12150         (handle_type_generic_attribute): Likewise.
12151
12152 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
12153
12154         PR ada/47163
12155         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12156
12157 2011-04-04  Kai Tietz  <ktietz@redhat.com>
12158
12159         PR ada/47163
12160         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12161         to flag value.
12162
12163 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12164
12165         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12166         type case, do not strip a padding type around the array type.
12167
12168 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12169
12170         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12171         types.
12172
12173 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12174
12175         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12176         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12177         code for -feliminate-unused-debug-types.
12178         (gnat_post_options): Likewise.
12179
12180 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12181
12182         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12183         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12184         distinct copy.
12185
12186 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12187
12188         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12189         DECL_ARTIFICIAL flag on enumeration types.
12190
12191 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12192
12193         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12194         fat pointer types artificial unconditionally.
12195         <E_Array_Subtype>: Attach the base array type as a parallel type if it
12196         isn't artificial.
12197
12198 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12199
12200         * gcc-interface/gigi.h (get_dummy_type): Declare.
12201         (build_dummy_unc_pointer_types): Likewise.
12202         (finish_fat_pointer_type): Likewise.
12203         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12204         fat pointer type has been built, complete it in place.
12205         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12206         and thin pointers.  Remove useless variable.
12207         (finish_fat_pointer_type): Make global and move to...
12208         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12209         (get_dummy_type): New function.
12210         (build_dummy_unc_pointer_types): Likewise.
12211         (gnat_pushdecl): Propage the name to the anonymous variants only.
12212         (update_pointer_to): Only adjust the pointer types in the unconstrained
12213         array case.
12214
12215 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12216
12217         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12218         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12219         if this is a Taft amendment type and the full declaration is available.
12220         * gcc-interface/trans.c (process_type): Likewise.
12221         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12222         (process_freeze_entity): Likewise.
12223         * gcc-interface/utils.c (dummy_global): New static variable.
12224         (gnat_write_global_declarations): If there are types declared as used
12225         at the global level, insert them in the global hash table.
12226
12227 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12228
12229         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12230         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12231         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12232         copy.
12233         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
12234         flag of the type accordingly.
12235         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12236
12237 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12238
12239         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12240         finalizing types when updating the pointers to the designated type.
12241         <all>: Finalize the deferred types even if we didn't defer processing
12242         of incomplete types in this invocation.
12243
12244 2011-04-01  Olivier Hainque  <hainque@adacore.com>
12245             Nicolas Setton  <setton@adacore.com>
12246             Eric Botcazou  <ebotcazou@adacore.com>
12247
12248         * gcc-interface/misc.c (gnat_descriptive_type): New function.
12249         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12250
12251 2011-03-28  Kai Tietz  <ktietz@redhat.com>
12252
12253         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12254         Windows targets.
12255         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12256         * system-mingw.ads (System): Change ZCX_By_Default default to True.
12257
12258         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12259
12260 2011-03-28  Tristan Gingold  <gingold@adacore.com>
12261
12262         PR ada/44431
12263         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12264         Use ada output of gnatbind.
12265         (ada/b_gnatb.adb): Ditto.
12266         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12267         (ada.mostlyclean, ada.stage1)
12268         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12269         (ada.stagefeedback): Adjust.
12270         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12271         Use ada output of gnatbind.
12272         (b_gnatm.adb): Ditto.
12273         (b_gnatl.o, b_gnatm.o): New rules.
12274
12275 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12276
12277         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12278         for the padded type built to support a specified size or alignment.
12279
12280 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12281
12282         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12283         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12284         unconditionally to the end of the unit when the designated type is
12285         limited_with'ed.
12286         <all>: Rename local variable.  Attempt to un-defer types only and do it
12287         for limited_with'ed types as well.
12288         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
12289         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12290         consistently and remove redundant call to finalize_from_with_types.
12291
12292 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12293
12294         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12295         subprograms without a previous spec declared in the same unit.
12296         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12297         subprograms at the end of the unit instead of at the beginning.
12298         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12299         isn't public for the special handling of non-inline functions nested
12300         inside inline external functions.
12301
12302 2011-03-25  Jeff Law  <law@redhat.com>
12303
12304         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12305
12306 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
12307
12308         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12309         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12310         to compute Set_Size_Depends_On_Discriminant.
12311         (Layout_Type): Call it on array types in back-end layout mode.
12312         * sem_util.adb (Requires_Transient_Scope): Return true for array
12313         types only if the size depends on the value of discriminants.
12314         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12315         type if the RHS is a call to a function that returns an unconstrained
12316         type with default discriminant.
12317
12318 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
12319
12320         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12321         non-conversion to the nominal result type at the end.
12322
12323 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12324
12325         * gcc-interface/trans.c (create_temporary): New function taken from...
12326         (create_init_temporary): ...here.  Call it.
12327         (call_to_gnu): Create the temporary for the return value early, if any.
12328         Create it for a function with copy-in/copy-out parameters if there is
12329         no target; in other cases of copy-in/copy-out, use another temporary.
12330         Push the new binding level lazily.  Add and rename local variables.
12331
12332 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12333
12334         * gcc-interface/decl.c (validate_size): Improve comments and tweak
12335         error message.
12336         (set_rm_size): Likewise.
12337
12338 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12339
12340         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12341         for the padded type built in order to support a specified alignment.
12342         Fix incorrect formatting.
12343
12344 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12345
12346         PR bootstrap/48216
12347         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12348
12349 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12350
12351         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12352         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12353         to the end of the list.  Adjust recursive call.  Rename local variable.
12354         If REORDER is true, reorder components of the record type.
12355         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12356         components_to_record and adjust the parameter list.
12357
12358 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12359
12360         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12361         disabled, use the variable for bounds of loop iteration scheme.
12362
12363 2011-03-21  Kai Tietz  <ktietz@redhat.com>
12364
12365         PR target/12171
12366         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12367
12368 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
12369
12370         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12371         out whether the expression is read-only.  Short-circuit placeholder
12372         case and rename a couple of local variables.
12373
12374 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
12375
12376         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12377         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12378         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12379         (convert): Deal with conversions from a smaller form type specially.
12380
12381 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
12382
12383         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12384         its argument, except for the special -I- switch.
12385
12386 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
12387
12388         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12389         "Ada Issues".
12390
12391 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
12392
12393         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12394
12395 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
12396
12397         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12398         GNAT_FORMAL.
12399         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12400         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
12401         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
12402         Do not generate the check directly, instead instantiate the template
12403         check present in the descriptor.
12404         (make_descriptor_field): Move around.
12405         (build_vms_descriptor32): Build a template check in the POINTER field.
12406         (build_vms_descriptor): Remove useless suffixes.
12407         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12408
12409 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
12410
12411         PR bootstrap/47467
12412         * targext.c: Include target files if IN_RTS is defined.
12413
12414 2011-01-26  Richard Guenther  <rguenther@suse.de>
12415
12416         PR bootstrap/47467
12417         * targext.c: Include config.h.
12418         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12419         dependency.
12420
12421 2011-01-04  Pascal Obry  <obry@adacore.com>
12422             Eric Botcazou  <ebotcazou@adacore.com>
12423
12424         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12425
12426 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12427
12428         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12429         end-of-case on the end label and its associated gotos, if any.
12430
12431 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12432
12433         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12434         expressions of the parameter cache within the statement group of
12435         the CICO mechanism.
12436
12437 2011-01-04  Olivier Hainque  <hainque@adacore.com>
12438             Eric Botcazou  <ebotcazou@adacore.com>
12439
12440         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12441         (set_end_locus_from_node): New function.
12442         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12443         make and the function end_locus.
12444         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12445         for the elaboration subprogram.
12446         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12447         set the end_locus of the expression as well.
12448
12449 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12450
12451         PR ada/47131
12452         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12453         variables that are referenced in exception handlers volatile.
12454
12455
12456 \f
12457 Copyright (C) 2011 Free Software Foundation, Inc.
12458
12459 Copying and distribution of this file, with or without modification,
12460 are permitted in any medium without royalty provided the copyright
12461 notice and this notice are preserved.