OSDN Git Service

5bc7819d361cbe46acf731850ea96463ad9cb2e7
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
2
3         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
4         the expression to the nominal type if the latter is a record type with
5         a variant part and the type of the former is a record type without one.
6
7 2011-08-30  Yannick Moy  <moy@adacore.com>
8
9         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
10         expansion in Alfa mode.
11         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
12         * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
13         Alfa mode.
14         * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
15         * sem_res.adb: Ditto.
16         * gcc-interface/Make-lang.in: Update dependencies.
17
18 2011-08-30  Thomas Quinot  <quinot@adacore.com>
19
20         * g-socket.ads: Minor documentation adjustment.
21
22 2011-08-30  Robert Dewar  <dewar@adacore.com>
23
24         * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
25
26 2011-08-30  Yannick Moy  <moy@adacore.com>
27
28         * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
29         exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
30         exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
31         gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
32         Revert change which introduced files for "light"
33         expansion, to be replaced by a single file for Alfa expansion.
34
35 2011-08-30  Robert Dewar  <dewar@adacore.com>
36
37         * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
38         Minor code reorg/reformatting.
39
40 2011-08-30  Yannick Moy  <moy@adacore.com>
41
42         * opt.adb, opt.ads (Full_Expander_Active): New function defines a
43         common shorthand for (Expander_Active and not ALFA_Mode) that can be
44         used for testing full expansion, that is active expansion not in the
45         reduced mode for Alfa
46         * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
47         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
48         of the verbose (Expander_Active and not ALFA_Mode)
49
50 2011-08-30  Tristan Gingold  <gingold@adacore.com>
51
52         * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
53         s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
54         s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
55         Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
56
57 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
58
59         * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
60         access conversions to check that the conversion is a rewritten node,
61         rather than just having Comes_From_Source set to False, which wasn't
62         sufficient.
63
64 2011-08-30  Robert Dewar  <dewar@adacore.com>
65
66         * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
67         g-socket.ads: Minor reformatting.
68
69 2011-08-30  Thomas Quinot  <quinot@adacore.com>
70
71         * sem_util.adb: Minor reformatting.
72
73 2011-08-30  Tristan Gingold  <gingold@adacore.com>
74
75         * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
76         to be compliant with the ABI.
77
78 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
79
80         * sem_ch12.adb (Check_Private_View): Exchange the private and full view
81         of a designated type when the related access type is an actual in an
82         instance. This ensures that the full view of designated type is
83         available when inside the body of the instance.
84
85 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
86
87         * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
88         in a position to be modified, a slice is treated like an indexed
89         component.
90
91 2011-08-30  Thomas Quinot  <quinot@adacore.com>
92
93         * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
94         field tv_sec in struct timeval.
95
96 2011-08-30  Yannick Moy  <moy@adacore.com>
97
98         * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
99         blocks of code doing full expansion, previously only guarded by
100         Expander_Active, by anding the test that ALFA_Mode is not set
101
102 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
103
104         * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
105         add the function to the list of private dependents, for subsequent
106         legality check on Taft amendment types.
107         * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
108         Private_Dependents, as for other incomplete types.
109         * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
110         Taft-amendment type is used as the return type of a function.
111
112 2011-08-30  Javier Miranda  <miranda@adacore.com>
113
114         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
115         which emits an error by a call to a new routine which report the error.
116         * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
117         entity does not cover an existing interface.
118         * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
119         code.
120         * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
121         protected procedures or entries whose mode is not conformant.
122         (Check_Synchronized_Overriding): Code cleanup: replace code which emits
123         an error by a call to a new routine which report the error.
124
125 2011-08-30  Robert Dewar  <dewar@adacore.com>
126
127         * gnat_rm.texi: Minor change.
128         * exp_attr_light.adb: Minor reformatting.
129
130 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
131
132         * sem_ch3.adb: Patch inheritance of aspects in
133         Complete_Private_Subtype, to avoid infinite loop.
134
135 2011-08-30  Javier Miranda  <miranda@adacore.com>
136
137         * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
138         been reported and a subprogram covering an interface primitive is not
139         found then skip generating the internal entity. Done to avoid crashing
140         the frontend.
141         (Check_Abstract_Overriding): Change text of error of wrong formal of
142         protected subprogram or entry. Done for consistency to emit exactly the
143         same error reported by Check_Synchronized_Overriding. In addition, the
144         error is restricted to protected types (bug found working on AI05-0090)
145
146 2011-08-30  Yannick Moy  <moy@adacore.com>
147
148         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
149         expansion in Alfa mode.
150         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
151         * exp_light.adb, exp_light.ads: New package defining light expansion.
152         * expander.adb (Expand): Call light expansion in Alfa mode
153         * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
154         constructs.
155         * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
156         constructs.
157         * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
158         * gnat1drv.adb (Adjust_Global_Switches): Comment
159
160 2011-08-30  Yannick Moy  <moy@adacore.com>
161
162         * lib-xref-alfa.adb: Minor refactoring.
163
164 2011-08-30  Yannick Moy  <moy@adacore.com>
165
166         * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
167         mode.
168         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
169         expansion in Alfa mode.
170         * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
171         mode.
172
173 2011-08-30  Robert Dewar  <dewar@adacore.com>
174
175         * debug_a.adb: Update comment.
176
177 2011-08-30  Robert Dewar  <dewar@adacore.com>
178
179         * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
180         sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
181         exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
182         sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
183
184 2011-08-30  Robert Dewar  <dewar@adacore.com>
185
186         * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
187         volatile.
188
189 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
190
191         * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
192         Build_Finalization_Master by supplying an insertion node and enclosing
193         scope. In its old version, the call did not generate a finalization
194         master.
195         (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
196         recognize anonymous access-to-controlled components. Rewrite the
197         machinery which creates finalization masters to service anonymous
198         access-to-controlled components of a record type. In its current state,
199         only one heterogeneous master is necessary to handle multiple anonymous
200         components.
201         (Freeze_Type): Comment reformatting.
202         * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
203         RE_Unit_Table.
204         * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
205         associates TSS primitive Finalize_Address with either the master itself
206         or with the internal hash table depending on the mode of operation of
207         the master.
208
209 2011-08-30  Javier Miranda  <miranda@adacore.com>
210
211         * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
212         interface type then do not generate code to compare this component.
213         Required since they have no components and their equality operator is
214         abstract.
215
216 2011-08-30  Steve Baird  <baird@adacore.com>
217
218         * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
219         of a saooaaat (i.e, a stand-alone object of an anonymous access type),
220         returns the (static) accessibility level of the object. Otherwise, the
221         same as Type_Access_Level.
222         (Dynamic_Accessibility_Level): New function; given an expression which
223         could occur as the rhs of an assignment to a saooaaat (i.e., an
224         expression of an access-to-object type), return the new value for the
225         saooaaat's associated Extra_Accessibility object.
226         (Effective_Extra_Accessibility): New function; same as
227         Einfo.Extra_Accessibility except that object renames are looked through.
228         * sem_util.adb 
229         (Deepest_Type_Access_Level): New function; see sem_util.ads description.
230         (Dynamic_Accessibility_Level): New function; see sem_util.ads
231         description.
232         (Effective_Extra_Accessibility): New function; see sem_util.ads
233         description.
234         * einfo.ads (Is_Local_Anonymous_Access): Update comments.
235         (Extra_Accessibility): Update comments.
236         (Init_Object_Size_Align): New procedure; same as Init_Size_Align
237         except RM_Size field (which is only for types) is unaffected.
238         * einfo.adb
239         (Extra_Accessibility): Expand domain to allow objects, not just formals.
240         (Set_Extra_Accessibility): Expand domain to allow objects, not just
241         formals.
242         (Init_Size): Add assertion that we are not trashing the
243         Extra_Accessibility attribute of an object.
244         (Init_Size_Align): Add assertion that we are not trashing the
245         Extra_Accessibility attribute of an object.
246         (Init_Object_Size_Align): New procedure; see einfo.ads description.
247         * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
248         differently for the type of a (non-library-level) saooaaat depending
249         whether Ada_Version < Ada_2012. This is the only point where Ada_Version
250         is queried in this set of changes - everything else (in particular,
251         setting of the Extra_Accessibility attribute in exp_ch3.adb) is
252         driven off of the setting of the Is_Local_Anonymous_Access attribute.
253         The special treatment of library-level saooaaats is an optimization,
254         not required for correctnesss. This is based on the observation that the
255         Ada2012 rules (static and dynamic) for saooaaats turn out to be
256         equivalent to the Ada2005 rules in the case of a library-level saooaaat.
257         * exp_ch3.adb
258         (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
259         false for the type of a saooaaat, declare and initialize its
260         accessibility level object and set the Extra_Accessibility attribute
261         of the saooaaat to refer to this object.
262         * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
263         * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
264         calls to Effective_Extra_Accessibility in order to support
265         renames of saooaaats.
266         (Expand_N_Type_Conversion): Add new local function,
267         Has_Extra_Accessibility, and call it when determining whether an
268         accessibility check is needed.
269         It returns True iff Present (Effective_Extra_Accessibility (Id)) would
270         evaluate to True (without raising an exception).
271         * exp_ch5.adb
272         (Expand_N_Assignment_Statement): When assigning to an Ada2012
273         saooaaat, update its associated Extra_Accessibility object (if
274         it has one). This includes an accessibility check.
275         * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
276         a saooaaat, update its Extra_Accessibility object too (if it
277         has one).
278         (Expand_Call): Replace a couple of calls to Type_Access_Level
279         with calls to Dynamic_Access_Level to handle cases where
280         passing a literal (any literal) is incorrect.
281         * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
282         checks associated with "Saooaat := Some_Object'Access;"; this must
283         be rejected if Some_Object is declared in a more nested scope
284         than Saooaat.
285         * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
286         assignment to a saooaaat even if Is_Local_Anonymous_Access
287         returns False for its type (indicating a 2012-style saooaaat).
288         * sem_ch8.adb
289         (Analyze_Object_Renaming): Replace a call to Init_Size_Align
290         (which is only appropriate for objects, not types) with a call
291         of Init_Object_Size_Align in order to avoid trashing the
292         Extra_Accessibility attribute of a rename (the two attributes
293         share storage).
294         * sem_res.adb
295         (Valid_Conversion) Replace six calls to Type_Access_Level with
296         calls to Deepest_Type_Access_Level. This is a bit tricky. For an
297         Ada2012 non-library-level saooaaat, the former returns library level
298         while the latter returns the (static) accessibility level of the
299         saooaaat. A type conversion to the anonymous type of a saooaaat
300         can only occur as part of an assignment to the saooaaat, so we
301         know that such a conversion must be in a lhs context, so Deepest
302         yields the result that we need. If such a conversion could occur,
303         say, as the operand of an equality operator, then this might not
304         be right. Also add a test so that static accessibilty checks are
305         performed for converting to a saooaaat's type even if
306         Is_Local_Anonymous_Access yields False for the type.
307
308 2011-08-30  Javier Miranda  <miranda@adacore.com>
309
310         * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
311         controls generation of a warning associated with late declaration of
312         dispatching functions. Required to avoid generating spurious
313         warnings.
314
315 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
316
317         * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
318         return object has an anonymous access type and the function's type is
319         a named access type.
320         * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
321         conversions on implicit conversions, since such conversions can occur
322         for anonymous access cases due to expansion. Issue error for attempt
323         to rename an anonymous expression as an object of a named access type.
324         * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
325         to indicate whether this function should report errors on invalid
326         conversions.
327         * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
328         the expression is of an anonymous access type and the expected type is
329         a named general access type, rewrite the expression as a type
330         conversion, unless this is an expression of a membership test.
331         (Valid_Conversion.Error_Msg_N): New procedure that conditions the
332         calling of Error_Msg_N on new formal Report_Errs.
333         (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
334         calling of Error_Msg_NE on new formal Report_Errs.
335         (Valid_Conversion): Move declaration of this function to the package
336         spec, to allow calls from membership test processing. For Ada 2012,
337         enforce legality restrictions on implicit conversions of anonymous
338         access values to general access types, disallowing such conversions in
339         cases where the expression has a dynamic accessibility level (access
340         parameters, stand-alone anonymous access objects, or a component of a
341         dereference of one of the first two cases).
342         * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
343         in the context of a named general access expected type.
344         * exp_ch4.adb Add with and use of Exp_Ch2.
345         (Expand_N_In): Add processing for membership tests applied to
346         expressions of an anonymous access type. First, Valid_Conversion is
347         called to check whether the test is statically False, and then the
348         conversion is expanded to test that the expression's accessibility
349         level is no deeper than that of the tested type. In the case of
350         anonymous access-to-tagged types, a tagged membership test is applied
351         as well.
352         (Tagged_Membership): Extend to handle access type cases, applying the
353         test to the designated types.
354         * exp_ch6.adb (Expand_Call): When creating an extra actual for an
355         accessibility level, and the actual is a 'Access applied to a current
356         instance, pass the accessibility level of the type of the current
357         instance rather than applying Object_Access_Level to the prefix. Add a
358         ??? comment, since this level isn't quite right either (will eventually
359         need to pass an implicit level parameter to init procs).
360
361 2011-08-30  Bob Duff  <duff@adacore.com>
362
363         * s-taskin.ads: Minor comment fix.
364
365 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
366
367         * sem_res.adb (Check_Parameterless_Call): If the node is a selected
368         component and the selector is a dispatching operation, check if it is
369         a prefixed call before rewriting as a parameterless function call.
370
371 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
372
373         * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
374         tsystem.h into $(RTSDIR) instead of rts.
375
376 2011-08-29  Robert Dewar  <dewar@adacore.com>
377
378         * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
379         reformatting.
380         * gcc-interface/Make-lang.in: Update dependencies.
381
382 2011-08-29  Yannick Moy  <moy@adacore.com>
383
384         * alfa.ads (Name_Of_Heap_Variable): New constant name.
385         * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
386         table to hold dereferences.
387         (Add_ALFA_Xrefs): Take into account dereferences as special
388         reads/writes to the variable "HEAP".
389         (Enclosing_Subprogram_Or_Package): Move subprogram here.
390         (Generate_Dereference): New procedure to store a read/write dereferencew
391         in the table Drefs.
392         * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
393         the special "HEAP" var.
394         * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
395         in ALFA mode.
396         * sem_util.adb (Note_Possible_Modification): Store write dereference
397         in ALFA mode.
398
399 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
400
401         * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
402         ensures that the level of the subpool access type is not deeper than
403         that of the pool object.
404         * sem_util.adb (Object_Access_Level): Expand to handle defining
405         identifiers.
406         * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
407         subpool handle name of a rewritten allocator.
408
409 2011-08-29  Robert Dewar  <dewar@adacore.com>
410
411         * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
412
413 2011-08-29  Thomas Quinot  <quinot@adacore.com>
414
415         * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
416         values, we generate multiple triples of parameters in the TypeCode.
417         Bump Choice_Index for each such triple so that a subsequent default
418         choice is associated with the correct index in the typecode.
419
420 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
421
422         * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
423         container.
424         (First, Last): Handle properly an iterator over a null container.
425
426 2011-08-29  Bob Duff  <duff@adacore.com>
427
428         * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
429         processing if we run across a node with no Scope. This can happen if
430         we're with-ing an library-level instance, and that instance got errors
431         that caused "instantiation abandoned".
432         * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
433         an exception instead of using Assert, so it won't go into an infinite
434         loop, even when assertions are turned off.
435
436 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
437
438         * a-coorse.adb: Proper handling of empty ordered sets.
439
440 2011-08-29  Johannes Kanig  <kanig@adacore.com>
441
442         * debug.adb: Add comments.
443
444 2011-08-29  Thomas Quinot  <quinot@adacore.com>
445
446         * a-except.adb, a-except-2005.adb: Minor comment rewording and
447         reformatting.
448
449 2011-08-29  Yannick Moy  <moy@adacore.com>
450
451         * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
452         declaration for Itypes in Alfa mode.
453
454 2011-08-29  Robert Dewar  <dewar@adacore.com>
455
456         * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
457         a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
458         a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
459         reformatting.
460
461 2011-08-29  Tristan Gingold  <gingold@adacore.com>
462
463         * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
464         package spec.
465         * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
466         * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
467         while raising PE.
468
469 2011-08-29  Robert Dewar  <dewar@adacore.com>
470
471         * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
472
473 2011-08-29  Javier Miranda  <miranda@adacore.com>
474
475         * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
476         renamings of formal subprograms when the actual for a formal type is
477         class-wide.
478
479 2011-08-29  Matthew Heaney  <heaney@adacore.com>
480
481         * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
482         to Target.
483
484 2011-08-29  Matthew Heaney  <heaney@adacore.com>
485
486         * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
487         components of record type.
488         * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
489         to Target.
490
491 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
492
493         * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
494         a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
495         container packages.
496
497 2011-08-29  Robert Dewar  <dewar@adacore.com>
498
499         * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
500         reformatting.
501
502 2011-08-29  Matthew Heaney  <heaney@adacore.com>
503
504         * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
505         components of record type.
506
507 2011-08-29  Bob Duff  <duff@adacore.com>
508
509         * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
510         by the termination handler.
511
512 2011-08-29  Yannick Moy  <moy@adacore.com>
513
514         * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
515         created in Alfa mode, instead of inserting artificial declarations of
516         non-Itypes in the tree.
517         * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
518         know if an Itype has a corresponding declaration, as defined in
519         itypes.ads.
520
521 2011-08-29  Yannick Moy  <moy@adacore.com>
522
523         * gnat1drv.adb: Minor rewrite.
524
525 2011-08-29  Bob Duff  <duff@adacore.com>
526
527         * s-tasuti.adb (Make_Passive): Work around race condition in
528         Make_Independent, which can cause Wait_Count to be zero. So instead of
529         asserting that Wait_Count > 0, and then decrementing it, decrement it
530         only if Wait_Count > 0.
531         * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
532         should be nonnegative, so declare them Natural instead of Integer.
533
534 2011-08-29  Robert Dewar  <dewar@adacore.com>
535
536         * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
537         sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
538         a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
539         a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
540         exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
541
542 2011-08-29  Tristan Gingold  <gingold@adacore.com>
543
544         * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
545
546 2011-08-29  Vadim Godunko  <godunko@adacore.com>
547
548         * s-parint.ads: Minor comment clarification.
549
550 2011-08-29  Vincent Celier  <celier@adacore.com>
551
552         * prj.adb (Initialize): Make sure that new reserved words after Ada 95
553         may be used as identifiers.
554
555 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
556
557         * a-coinho.ads: Minor reformating.
558
559 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
560
561         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
562         container of a derived type.
563
564 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
565
566         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
567         a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
568
569 2011-08-29  Pascal Obry  <obry@adacore.com>
570
571         * exp_disp.adb: Minor comment fix.
572         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
573         to avoid warnings when compiling with -Wall.
574         (Make_Disp_Conditional_Select_Body): Likewise.
575         (Make_Disp_Timed_Select_Body): Likewise.
576
577 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
578
579         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
580         an entity name, generate reference for it.
581
582 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
583
584         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
585         iterator form.
586         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
587         the class-wide type.
588         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
589
590 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
591
592         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
593         subtype for an object whose type is an unconstrained union.
594
595 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
596
597         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
598         is allowed in a component definition, by AI95-406.
599
600 2011-08-29  Matthew Heaney  <heaney@adacore.com>
601
602         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
603
604 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
605
606         * a-except-2005.adb: Alphabetize all routines.
607         (Triggered_By_Abort): New routine.
608         * a-except-2005.ads (Triggered_By_Abort): New routine.
609         * a-except.adb Alphabetize all routines.
610         (Triggered_By_Abort): New routine.
611         * a-except.ads (Triggered_By_Abort): New routine.
612         * exp_ch7.adb: Update all comments involving the detection of aborts in
613         finalization code.
614         (Build_Object_Declarations): Do not generate code to detect the
615         presence of an abort at the start of finalization code, use a runtime
616         routine istead.
617         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
618         RE_Unit_Table.
619         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
620         allocate a task on a subpool.
621         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
622         The flag disables all actions related to the maintenance of
623         Finalize_Address_Table when subpools are not in use.
624         (Allocate_Any_Controlled): Signal the machinery that subpools are in
625         use.
626         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
627         performs costly task locking when subpools are not in use.
628
629 2011-08-29  Yannick Moy  <moy@adacore.com>
630
631         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
632         types and dispatching calls in Alfa mode.
633         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
634         correspondance between body and spec scopes, to reuse utility functions
635         (Traverse_Declarations_Or_Statements): Protect access to body for stub
636         by testing the presence of the library unit for the body
637         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
638         mode the expansion of accept statements is skipped
639         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
640         the unique entity corresponding to the one returned by
641         Unique_Defining_Entity applied to the enclosing declaration of the
642         argument.
643
644 2011-08-29  Bob Duff  <duff@adacore.com>
645
646         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
647         gdb when x is not a node (it can be a node list, name_id, etc). pp is
648         an alias for pn. ppp is an alias for pt.
649
650 2011-08-29  Javier Miranda  <miranda@adacore.com>
651
652         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
653         aggregate to take a consistent decision on the need to convert into
654         assignments aggregates that initialize constant objects.
655
656 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
657
658         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
659         Build_Allocate_Deallocate_Proc in order to handle allocation of
660         non-controlled objects on subpools.
661         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
662         to be end-user visible.
663         * s-finmas.adb: Add with and use clause for System.HTable.
664         Add an instantiation of Simple_HTable which provides a mapping between
665         the address of a controlled object and the corresponding
666         Finalize_Address used to clean up the object. The table is used when a
667         master is operating in heterogeneous mode.
668         (Attach): Explain why the input node is not verified on being already
669         attached.
670         (Delete_Finalize_Address): New routine.
671         (Detach): Add pragma Assert which ensures that a node is already
672         attached.
673         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
674         since nodes are no longer removed on traversal. Explain why node
675         detachment is undesirable in this case.
676         (Get_Finalize_Address): New routine.
677         (Hash): New routine.
678         (Is_Empty_List): Removed.
679         (pm): Renamed to Print_Master. Add output for discriminant
680         Is_Homogeneous.
681         Comment reformatting.
682         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
683         * s-finmas.ads: Various comments additions / improvements.
684         Type Finalization_Master has a discriminant which determines the mode of
685         operation.
686         (Delete_Finalize_Address): New routine.
687         (Get_Finalize_Address): New routine.
688         (pm): Renamed to Print_Master.
689         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
690         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
691         use clause for System.IO.
692         (Allocate_Any_Controlled): Add machinery to set TSS primitive
693         Finalize_Address depending on the mode of allocation and the mode of
694         the master.
695         (Deallocate_Any_Controlled): Remove the relation pair object -
696         Finalize_Address regardless of the master mode. Add comment explaining
697         the reason.
698         (Detach): Ensure that fields Prev and Next are null after detachment.
699         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
700         scheme to check whether the list of subpools is empty. There is no
701         longer need to store the next subpool or advance the current pointer.
702         (Is_Empty_List): New routine.
703         (Print_Pool): New routine.
704         (Print_Subpool): New routine.
705         * s-stposu.ads: Various comments additions / improvements.
706         Field Master of type Root_Subpool is now a heterogeneous collection.
707         (Print_Pool): New routine.
708         (Print_Subpool): New routine.
709
710 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
711
712         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
713         forms, using aspects of container types.
714         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
715         Has_Implicit_Dereference flags, that may be set on the partial view.
716         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
717         container type with an indexing aspect.
718         (Analyze_Quantified_Expression): Analyze construct with expansion
719         disabled, because it will be rewritten as a loop during expansion.
720         (Try_Container_Indexing): The prefix itself may be a container type
721         with an indexing aspect, as with a vector of vectors.
722         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
723         the original doamin of iteration, for name capture.
724         (Analyze_Iterator_Specification): If the domain is an expression that
725         needs finalization, create a separate declaration for it.
726         For an iterator with "of" retrieve default iterator info from aspect of
727         container type. For "in" iterator, retrieve type of Iterate function.
728         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
729         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
730         analysis, to prevent spurious errors about late attributes.
731         * sprint.adb: Handle quantified expression with either loop or iterator
732         specification.
733         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
734         iterator.
735
736 2011-08-29  Vincent Celier  <celier@adacore.com>
737
738         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
739         Binder or Linker of the main project file.
740
741 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
742
743         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
744         unit.
745
746 2011-08-29  Yannick Moy  <moy@adacore.com>
747
748         * exp_ch9.adb: Partial revert of previous change for Alfa mode
749
750 2011-08-29  Yannick Moy  <moy@adacore.com>
751
752         * exp_ch11.adb: Minor expansion of comment.
753
754 2011-08-29  Yannick Moy  <moy@adacore.com>
755
756         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
757
758 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
759
760         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
761         interpretation, set the type before resolving the operands, because
762         legality checks on an exponention operand need to know the type of the
763         context.
764
765 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
766
767         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
768         cleanups on a master if the instance is within a generic unit.
769         Complement to the corresponding fix to inline.adb for K520-030.
770
771 2011-08-29  Tristan Gingold  <gingold@adacore.com>
772
773         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
774         occurrence.
775         * exp_intr.adb: Minor comment fix.
776
777 2011-08-29  Bob Duff  <duff@adacore.com>
778
779         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
780         Delay_Required was used as an uninitialized variable.
781
782 2011-08-29  Robert Dewar  <dewar@adacore.com>
783
784         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
785         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
786         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
787
788 2011-08-29  Thomas Quinot  <quinot@adacore.com>
789
790         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
791         Remove unused variables.
792
793 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
794
795         * sem_res.adb: Remove Build_Explicit_Dereference.
796         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
797         from sem_res.adb, used in analysis of additional constructs.
798         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
799         expansion of iterators.
800         (Is_Object_Reference): Recognize variables rewritten as explicit
801         dereferences in Ada2012.
802         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
803         Reversible_Iterator names, for expansion of Ada2012 iterators.
804         * aspects.ads, aspects.adb (Find_Aspect): Utility.
805         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
806         linked list container.
807         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
808         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
809
810 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
811
812         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
813         containers.
814
815 2011-08-29  Vincent Celier  <celier@adacore.com>
816
817         * make.adb (Gnatmake): Get the maximum number of simultaneous
818         compilation processes after the Builder switches has been scanned, as
819         there may include -jnn.
820
821 2011-08-29  Matthew Heaney  <heaney@adacore.com>
822
823         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
824
825 2011-08-29  Tristan Gingold  <gingold@adacore.com>
826
827         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
828         GNAT_DRIVER_COMMAND_LINE to 255.
829
830 2011-08-29  Pascal Obry  <obry@adacore.com>
831
832         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
833         reformatting and style fix (class attribute casing).
834
835 2011-08-29  Yannick Moy  <moy@adacore.com>
836
837         * exp_ch11.adb: Yet another case where expansion should be common
838         between CodePeer and Alfa.
839
840 2011-08-29  Yannick Moy  <moy@adacore.com>
841
842         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
843
844 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
845
846         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
847         incomplete type and its completion match.
848
849 2011-08-29  Yannick Moy  <moy@adacore.com>
850
851         * exp_ch13.adb: Adjust previous change.
852
853 2011-08-29  Robert Dewar  <dewar@adacore.com>
854
855         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
856         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
857         Minor reformatting.
858
859 2011-08-29  Emmanuel Briot  <briot@adacore.com>
860
861         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
862         initialize aggregated projects.
863
864 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
865
866         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
867         depth of candidates to resolve a potentially spurious ambiguity between
868         two visible subprograms.
869
870 2011-08-29  Yannick Moy  <moy@adacore.com>
871
872         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
873         Requires/Ensures.
874         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
875         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
876         Requires/Ensures.
877
878 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
879
880         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
881         Add comment.
882
883 2011-08-29  Thomas Quinot  <quinot@adacore.com>
884
885         * sem_res.adb: Minor reformatting.
886
887 2011-08-29  Johannes Kanig  <kanig@adacore.com>
888
889         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
890         mode.
891         * gnat1drv.adb (Adjust_Global_Switches): Set
892         Use_Expressions_With_Actions to False in ALFA mode.
893         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
894         ALFA mode.
895
896 2011-08-29  Yannick Moy  <moy@adacore.com>
897
898         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
899         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
900         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
901         tagged types and dispatching calls in Alfa mode.
902
903 2011-08-29  Javier Miranda  <miranda@adacore.com>
904
905         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
906         we do not report an error on an Empty node.
907
908 2011-08-29  Geert Bosch  <bosch@adacore.com>
909
910         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
911         a-nlrear.o and a-nurear.o.
912
913 2011-08-29  Robert Dewar  <dewar@adacore.com>
914
915         * freeze.adb: Minor code reorganization.
916         Minor reformatting.
917         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
918         sem_ch6.adb: Minor reformatting
919
920 2011-08-29  Tristan Gingold  <gingold@adacore.com>
921
922         * s-except.ads, s-except.adb: Provide dummy body.
923
924 2011-08-29  Yannick Moy  <moy@adacore.com>
925
926         * sem_warn.adb (Within_Postcondition): Take into account the case of
927         an Ensures component in a Test_Case.
928
929 2011-08-29  Tristan Gingold  <gingold@adacore.com>
930
931         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
932         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
933         System_Exceptions_Debug
934         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
935         * a-except.adb: With and use System.Exceptions_Debug instead of
936         System.Exceptions.
937         * a-except-2005.adb: Likewise.
938         * s-assert.adb: Likewise.
939         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
940         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
941         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
942         s-excdeb. Update dependencies.
943         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
944         as these no longer need external libraries.
945
946 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
947
948         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
949         exponentiation operator on universal values in a context that requires
950         a fixed-point type.
951
952 2011-08-29  Tristan Gingold  <gingold@adacore.com>
953
954         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
955         before calling notify_handled_exception.
956         * a-exextr.adb: Fix comment.
957
958 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
959
960         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
961         Finalize_Address of the access type's finalization master.
962         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
963         access type's finalization master. Add a guard to prevent
964         Associated_Storage_Pool from being set on .NET/JVM.
965         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
966         attribute Finalize_Address of the access type's finalization master.
967         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
968         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
969         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
970         RE_Unit_Table.
971         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
972         use clause for System.IO
973         (Detach): Relax the assertion, to be reinstated later.
974         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
975         Relax the assertion on Finalize_Address, to be reinstated later.
976         (Is_Empty_List): New routine.
977         (pm): New debug routine.
978         (Set_Finalize_Address): New routine.
979         * s-finmas.ads (pm): New debug routine.
980         (Set_Finalize_Address): New routine.
981         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
982
983 2011-08-29  Tristan Gingold  <gingold@adacore.com>
984
985         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
986         Remove convention C.
987
988 2011-08-29  Tristan Gingold  <gingold@adacore.com>
989
990         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
991         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
992         (Finalize_TCB): Remove its finalization.
993         (Initialize): Remove assignment of GET_Exc_Stack_Addr
994         * s-soflin.adb (NT_Exc_Stack): Remove
995         (Get_Exc_Stack_Addr_NT): Likewise.
996         (Get_Exc_Stack_Addr_Soft): Likewise.
997         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
998         (Get_Exc_Stack_Addr): Likewise.
999         (Get_Exc_Stack_Addr_Soft): Likewise
1000         * s-taspri-vms.ads (Exc_Stack_T): Remove.
1001         (Exc_Stack_Ptr_T): Likewise.
1002         (Private_Data): Remove Exc_Stack_Ptr component.
1003
1004 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1005
1006         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
1007
1008 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1009
1010         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
1011
1012 2011-08-29  Geert Bosch  <bosch@adacore.com>
1013
1014         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
1015         L2_Norm, Swap_Column): New generic subprograms
1016         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
1017         L2_Norm, Swap_Column): Implement new subprograms in order to
1018         eliminate dependency on BLAS and LAPACK libraries in
1019         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
1020         version. Forward_Eliminate/Back_Substitute can be used to put a
1021         matrix in row echelon or reduced row echelon form using partial
1022         pivoting.
1023         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
1024         Swap_Column): Instantiate from System.Generic_Array_Operations.
1025         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
1026         (Sqrt): Local function for simple computation of square root without
1027         adding dependencies on Generic_Elementary_Functions.
1028         (Swap): New subprogram to exchange floating point numbers.
1029         (Inverse): Reimplement using Jordan-Gauss elimination.
1030         (Jacobi): New procedure implementing Jacobi's method for computation
1031         of eigensystems, based on Rutishauser's implementation.
1032         (L2_Norm): Implement directly using the inner product.
1033         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
1034         decreasing eigenvalue as required by the Ada RM.
1035         (Swap_Column): New helper procedure for Sort_Eigensystem.
1036         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
1037         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
1038         Sort_Eigensystems.
1039
1040 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1041
1042         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
1043         statements line.
1044
1045 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1046
1047         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
1048         than the current node.
1049         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
1050         Finalization_Master. The list headers have two fields instead of three.
1051         This should fix alignment issue but subpool allocations are now
1052         unusable. Alphabetize subprograms.
1053         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
1054         the size of the header when converting the beginning of the object to
1055         a FM_Node. Set the master's Finalize_Address attribute if not already
1056         set.
1057         (Deallocate_Any_Controlled): Use the offset rather than the size of the
1058         header when converting the beginning of the object to a FM_Node.
1059
1060 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
1061
1062         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
1063         reraise when compiling for CodePeer.
1064
1065 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1066
1067         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
1068         now needed by a-convec.adb. Fix warning.
1069
1070 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1071
1072         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
1073         processing of TSS routine Finalize_Address when compiling in
1074         CodePeer_Mode.
1075
1076 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1077
1078         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
1079         sem_warn.adb: Minor reformatting.
1080
1081 2011-08-29  Emmanuel Briot  <briot@adacore.com>
1082
1083         * prj-conf.adb (Get_Config_Switches): Also collect the list of
1084         languages from aggregated projects.
1085
1086 2011-08-29  Yannick Moy  <moy@adacore.com>
1087
1088         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
1089         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
1090         Traverse_Package_Declaration, Traverse_Subprogram_Body,
1091         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
1092         for stubs are traversed too when parameter is set
1093         (Traverse_All_Compilation_Units): Traverse without going inside stubs
1094         (Traverse_Declarations_Or_Statements): Do the special traversing for
1095         stubs when required.
1096         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
1097         return subprogram or package body from stub.
1098         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
1099         stubs without prior subprogram decl.
1100
1101 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
1102
1103         * gnat_ugn.texi: Fix typo.
1104
1105 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1106
1107         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
1108         which accounts for size vs alignment issues and calculates the size of
1109         the list header.
1110         (Deallocate_Any_Controlled): Ditto.
1111         (Nearest_Multiple_Rounded_Up): New routine.
1112
1113 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1114
1115         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
1116         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
1117         (Set_Exception_Msg): Ditto.
1118         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
1119         Private_Data.
1120         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
1121         Use Save_Occurrence instead of Save_Occurrence_No_Private.
1122         (Raise_With_Msg): Remove Cleanup_Flag.
1123         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
1124         Clean_Flag and Private_Data components.
1125
1126 2011-08-29  Yannick Moy  <moy@adacore.com>
1127
1128         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
1129         in CodePeer mode.
1130         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
1131         of an explicitly declared type, so that the base types of the original
1132         type and this generated type are the same, and a "type" (not a subtype
1133         like previously).
1134         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
1135         small" in Alfa mode, like in CodePeer mode.
1136         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
1137         clauses in Alfa mode.
1138
1139 2011-08-29  Javier Miranda  <miranda@adacore.com>
1140
1141         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
1142         function to the package spec.
1143         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
1144         internally generated bodies of null procedures locate the internally
1145         generated spec enforcing mode conformance.
1146         (Is_Interface_Conformant): Ensure that the controlling formal of the
1147         primitives match.
1148
1149 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1150
1151         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
1152         reject the pragma if it appears to apply to a formal subprogram.
1153
1154 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1155
1156         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
1157         inner expression, to prevent double evaluation.
1158
1159 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1160
1161         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
1162         they were unused.
1163         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
1164         * a-except-2005.adb (Propagate_Exception): Adjust spec.
1165         (Raise_Current_Excep): Adjust call.
1166         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
1167
1168 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1169
1170         * exp_disp.adb: Minor reformatting.
1171
1172 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1173
1174         * a-exexpr.adb (Setup_Exception): Removed.
1175         * a-exexpr-gcc.adb (Setup_Exception): Removed.
1176         * a-except.adb (Exception_Propagation): Removed.
1177         * a-except-2005.adb (Setup_Exception): Removed.
1178         (Reraise): Remove call to Setup_Exception.
1179         (Reraise_Occurrence): Ditto.
1180         (Reraise_Occurrence_Always): Ditto.
1181         (Reraise_Occurrence_No_Defer): Ditto.
1182         (Transfer_Occurrence): Ditto.
1183         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
1184         (Set_Exception_Msg): Ditto.
1185
1186 2011-08-29  Robert Dewar  <dewar@adacore.com>
1187
1188         * a-convec.adb, exp_disp.adb: Minor reformatting.
1189
1190 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1191
1192         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
1193
1194 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
1195
1196         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
1197         Exception_Handlers to No_List instead of Empty_List in the case where
1198         there are no handlers.
1199
1200 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1201
1202         * gcc-interface/gigi.h (enum standard_datatypes): Add
1203         ADT_reraise_zcx_decl
1204         (reraise_zcx_decl): New macro.
1205         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
1206         (gigi): Set reraise_zcx_decl.
1207         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
1208         (gnat_to_gnu): Handle N_Raise_Statement.
1209
1210 2011-08-29  Robert Dewar  <dewar@adacore.com>
1211
1212         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
1213         a-undesu.adb: Minor reformatting.
1214
1215 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1216
1217         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
1218         table, accept an unfrozen untagged component if it is an actual for a
1219         formal incomplete type.
1220         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
1221         provide new iterator forms over vectors.
1222         Introduce type Iterator in package body to implement operations of
1223         Reversible_Iterator interface.
1224         * a-iteint.ads: Make package pure so it is usable with new container
1225         packages, that are categorized Remote_Types.
1226
1227 2011-08-29  Robert Dewar  <dewar@adacore.com>
1228
1229         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
1230
1231 2011-08-29  Bob Duff  <duff@adacore.com>
1232
1233         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
1234         of <>, because this is the routine that checks for dimensionality
1235         errors (for example, for a two-dimensional array, (others => <>) should
1236         be (others => (others => <>)).
1237
1238 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1239
1240         * impunit.adb: Add new run-time units.
1241         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
1242         s-stposu.ads, s-stposu.adb: Code clean up.
1243         Handle protected class-wide or task class-wide types
1244         Handle C/C++/CIL/Java types.
1245         * s-spsufi.adb, s-spsufi.ads: New files.
1246
1247 2011-08-29  Yannick Moy  <moy@adacore.com>
1248
1249         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
1250         library-level subprogram.
1251         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
1252         placement.
1253         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
1254         component.
1255         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
1256         component.
1257         * gnat_rm.texi: Update doc for Test_Case pragma.
1258
1259 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1260
1261         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
1262         convention C.
1263         (GCC_Exception_Access): New type.
1264         (Unwind_DeleteException): New imported procedure
1265         (Foreign_Exception): Import it.
1266         (GNAT_GCC_Exception): Simply have the occurrence inside.
1267         (To_GCC_Exception): New function.
1268         (To_GNAT_GCC_Exception): New function.
1269         (GNAT_GCC_Exception_Cleanup): New procedure..
1270         (Propagate_GCC_Exception): New procedure.
1271         (Reraise_GCC_Exception): New procedure.
1272         (Setup_Current_Excep): New procedure.
1273         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
1274         (Unwind_RaiseException): Ditto.
1275         (Unwind_ForcedUnwind): Ditto.
1276         (Remove): Removed.
1277         (Begin_Handler): Change type of parameter.
1278         (End_Handler): Ditto. Now delete the exception if still present.
1279         (Setup_Key): Removed.
1280         (Is_Setup_And_Not_Propagated): Removed.
1281         (Set_Setup_And_Not_Propagated): Ditto.
1282         (Clear_Setup_And_Not_Propagated): Ditto.
1283         (Save_Occurrence_And_Private): Ditto.
1284         (EID_For): Add 'not null' constraint on parameter.
1285         (Setup_Exception): Does nothing.
1286         (Propagate_Exception): Simplified.
1287         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
1288         re-raise is not expanded anymore.
1289         * s-except.ads (Foreign_Exception): New exception - placeholder for
1290         non Ada exceptions.
1291         * raise-gcc.c (__gnat_setup_current_excep): Declare
1292         (CXX_EXCEPTION_CLASS): Define (not yet used)
1293         (GNAT_EXCEPTION_CLASS): Define.
1294         (is_handled_by): Handle foreign exceptions.
1295         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
1296
1297 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1298
1299         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
1300
1301 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1302
1303         * a-synbar-posix.adb: Minor reformatting.
1304
1305 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1306
1307         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
1308         a-exetim-default.ads (Interrupt_Clocks_Supported,
1309         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
1310         definitions to be compliant with AI-0171. The target systems do not
1311         support separate account for the execution time of interrupt handlers.
1312
1313 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1314
1315         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
1316         in the barrier to put first the easiest to evaluate (and the one which
1317         will be True more often). More efficient.
1318
1319 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
1320
1321         * s-atocou-x86.adb: Fix constraint in machine code insertion.
1322
1323 2011-08-29  Bob Duff  <duff@adacore.com>
1324
1325         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
1326         attributes that are now aspects, as specified by AI05-0229-1.
1327         * sem_ch13.adb (Analyze_Aspect_Specifications,
1328         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
1329         pragmas or attribute references, as appropriate.
1330
1331 2011-08-29  Robert Dewar  <dewar@adacore.com>
1332
1333         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
1334         a-synbar-posix.ads: Minor reformatting.
1335
1336 2011-08-29  Yannick Moy  <moy@adacore.com>
1337
1338         * snames.ads-tmpl: Add name Force.
1339
1340 2011-08-29  Pascal Obry  <obry@adacore.com>
1341
1342         * prj-nmsc.adb: Minor reformatting.
1343
1344 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1345
1346         * a-exetim.ads (Interrupt_Clocks_Supported,
1347         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
1348         definitions to be compliant with AI-0171.
1349
1350 2011-08-29  Robert Dewar  <dewar@adacore.com>
1351
1352         * a-ngelfu.adb: Add comments.
1353
1354 2011-08-29  Geert Bosch  <bosch@adacore.com>
1355
1356         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
1357         the closest machine number to Pi / 2.0.
1358
1359 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1360
1361         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
1362         package Ada.Synchronous_Barriers.
1363         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
1364         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
1365         default implementation using protected objects and another one
1366         a-synbar-posix using POSIX barriers as the underlying support.
1367         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
1368         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
1369         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
1370         Clean up dependencies.
1371         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
1372
1373 2011-08-29  Robert Dewar  <dewar@adacore.com>
1374
1375         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
1376         exp_dist.adb: Minor code reorganization.
1377         Minor reformatting.
1378
1379 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1380
1381         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
1382         primitive operation must support external streaming if it is not a
1383         controlling access result.
1384
1385 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1386
1387         * sinfo.ads, sem_ch7.adb: Minor reformatting.
1388
1389 2011-08-29  Bob Duff  <duff@adacore.com>
1390
1391         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
1392         restriction on allocators, as required by AI05-0013-1.
1393         * restrict.ads: Minor comment fix.
1394
1395 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1396
1397         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
1398         (To_Jmpbuf_Address): Ditto
1399         (builtin_longjmp): Ditto
1400
1401 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1402
1403         * sem_res.adb: Minor reformatting.
1404
1405 2011-08-29  Vincent Celier  <celier@adacore.com>
1406
1407         * make.adb (Gnatmake): Move special processing for VM targets after the
1408         call to Get_Target_Parameters.
1409
1410 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1411
1412         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
1413
1414 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1415
1416         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
1417         where an anonymous access discriminant of a limited designated type
1418         appears in a non-immutably limited discriminated type and issue an
1419         error message. Add local variable Desig_T and replace all occurrences
1420         of Designated_Type.
1421
1422 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1423
1424         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
1425         implementation is compliant to RM D.15(15/2) after the modification
1426         imposed by AI05-0094-1 (binding interpretation).
1427
1428 2011-08-29  Robert Dewar  <dewar@adacore.com>
1429
1430         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
1431         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
1432
1433 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1434
1435         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
1436         the scope name, do not report a missing label as a style violation (it
1437         will be diagnosed as an illegality).
1438         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
1439         variant records: Get_Enum_Lit_From_Pos already returns a usage
1440         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
1441         on Expr in Integer_Literal case so that it can be used by
1442         Build_To_Any_Call.
1443
1444 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1445
1446         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
1447         Adjust comment.
1448         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
1449         (Build_Abort_Block_Handler): New function to build an Abort_Signal
1450         exception handler.
1451         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
1452         Build_Abort_Block_Handler to build the exception handler. Do not
1453         undefer aborts for the Abort_Signal exception handler if back-end
1454         exception mechanism.
1455         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
1456         back_end exceptions for all others and abort_signal.
1457         * s-except.ads (ZCX_By_Default): New constant.
1458         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
1459         (Raise_Exception_Always): Ditto.
1460         (Raise_From_Signal_Handler): Ditto.
1461         (Raise_With_Location_And_Msg): Ditto.
1462         (Raise_With_Msg): Ditto.
1463         (Reraise): Ditto.
1464         (Reraise_Occurence): Ditto.
1465         (Reraise_Occurrence_Always): Ditto.
1466         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
1467         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
1468
1469 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1470
1471         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
1472
1473 2011-08-29  Robert Dewar  <dewar@adacore.com>
1474
1475         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
1476         Minor code reorganization.
1477
1478 2011-08-29  Bob Duff  <duff@adacore.com>
1479
1480         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
1481         2012, not just Ada 2005.
1482
1483 2011-08-29  Vincent Celier  <celier@adacore.com>
1484
1485         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
1486         with a project file or with gprbuid, if -gnatep= is specified, the
1487         builder may need to be invoked with -x.
1488
1489 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1490
1491         * a-exexpr-gcc.adb: Minor comment fix.
1492
1493 2011-08-29  Robert Dewar  <dewar@adacore.com>
1494
1495         * sem_ch8.adb: Minor reformatting.
1496
1497 2011-08-29  Bob Duff  <duff@adacore.com>
1498
1499         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
1500         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
1501         treating "some" as unreserved in earlier Ada versions. This is now
1502         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
1503         rather than Name_Some, since Tok_Some is now recognized as reserved.
1504         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
1505         reserved word.
1506         * scans.ads: Minor comment fixes.
1507         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
1508         for other language versions.
1509         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
1510         treating "some" as unreserved in earlier Ada versions. This is now
1511         handled in Snames.Is_Keyword_Name.
1512         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
1513         Ada 2012.
1514         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
1515         unreserved in earlier Ada versions. This is now handled in
1516         Snames.Is_Keyword_Name.
1517         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
1518         words as for other language versions.
1519         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
1520         Ada 2012, not just Ada 2005.
1521
1522 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1523
1524         * sem_ch13.adb: Additional semantic checks for aspects involved in
1525         iterators.
1526
1527 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1528
1529         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
1530         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
1531         Container parameter.
1532         (Ancestor_Find): ditto.
1533
1534 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1535
1536         * par-endh.adb: Minor reformatting.
1537
1538 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1539
1540         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
1541         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
1542         (Adjust_N_CLeanups_For): Remove.
1543         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
1544         stack is reached.
1545         (Propgate_Exception): Adjust.
1546         * raise-gcc.c: Add a few static/const.
1547         (Adjust_N_Cleanups_For): Remove declaration.
1548         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
1549
1550 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1551
1552         * sem_ch8.adb: Use type of function return when rewriting as object
1553         declaration.
1554
1555 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
1556
1557         * sem_type.adb: Minor reformatting.
1558
1559 2011-08-29  Robert Dewar  <dewar@adacore.com>
1560
1561         * makeutl.adb: Minor reformatting.
1562
1563 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1564
1565         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
1566         function call of a limited type, the expansion of the renaming is
1567         complicated by the presence of various temporaries and subtypes that
1568         capture constraints of the renamed object.
1569         Rewrite node as an object declaration, whose expansion is simpler.
1570         Given that the object is limited there is no copy involved and no
1571         performance hit.
1572
1573 2011-08-29  Robert Dewar  <dewar@adacore.com>
1574
1575         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
1576         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
1577
1578 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1579
1580         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
1581         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
1582         system-linux-hppa.ads, system-linux-s390.ads,
1583         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
1584         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
1585         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
1586         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
1587         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
1588         system-solaris-sparc.ads, system-lynxos-x86.ads,
1589         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
1590         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
1591         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
1592         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
1593         system-vxworks-x86.ads: Remove GCC_ZCX_Support
1594         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
1595         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
1596         * opt.ads: Adjust comment.
1597         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
1598         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
1599         * system.ads: Move GCC_ZCX_Support to obsolete entries.
1600
1601 2011-08-29  Emmanuel Briot  <briot@adacore.com>
1602
1603         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
1604         file name is specified on the gnatmake or gprbuild command line, and
1605         before we search for that file in the project.
1606
1607 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1608
1609         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
1610         used to determine whether a possible interpretation for an overloadable
1611         entity is declared within the current instantiation and should be
1612         included in the candidate set.
1613
1614 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
1615
1616         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
1617
1618 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1619
1620         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
1621         access subtype is access_to_subprogram, when applying checks for
1622         RM 3.10.2 (27).
1623
1624 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1625
1626         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
1627         for sibling when common parent.
1628
1629 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1630
1631         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
1632         "pragma_".
1633
1634 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1635
1636         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
1637         for the return type when in ASIS mode.
1638
1639 2011-08-29  Vincent Celier  <celier@adacore.com>
1640
1641         * make.adb (Gnatmake): Get the default search dirs, then the target
1642         parameters after getting the Builder switches, as the Builder switches
1643         may include --RTS= and that could change the default search dirs.
1644
1645 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1646
1647         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
1648         Make_Final_Call. Move the processing for class-wide types before the
1649         processing for derivations from [Limited_]Controlled.
1650         (Make_Final_Call): Move the processing for class-wide types before the
1651         processing for derivations from [Limited_]Controlled.
1652         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
1653         Add code to account for alignments larger than the list header. Add a
1654         comment illustrating the structure of the allocated object + padding +
1655         header.
1656         (Deallocate_Any_Controlled): Add code to account for alignments larger
1657         than the list header.
1658
1659 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1660
1661         * sinfo.ads, sinfo.adb: New node kind
1662         N_Formal_Incomplete_Type_Definition, related flags.
1663         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
1664         Parse formal incomplete types.
1665         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
1666         sem_ch12.
1667         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
1668         Formal incomplete types do not need completion.
1669         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
1670         Validate_Incomplete_Type_Instance): New procedures to handle formal
1671         incomplete types.
1672         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
1673         that corresponds to a formal incomplete type.
1674         * sprint.adb: Handle formal incomplete type declarations.
1675         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
1676         an insertion point.
1677
1678 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1679
1680         * a-fihema.ads, a-fihema.adb: Unit removed.
1681         * a-undesu.ads, a-undesu.adb: New unit implementing
1682         Ada.Unchecked_Deallocate_Subpool.
1683         * einfo.adb: Remove Associated_Collection from the node usage.
1684         Add Finalization_Master to the node usage.
1685         (Associated_Collection): Removed.
1686         (Finalization_Master): New routine.
1687         (Set_Associated_Collection): Removed.
1688         (Set_Finalization_Master): New routine.
1689         (Write_Field23_Name): Remove Associated_Collection from the output. Add
1690         Finalization_Master to the output.
1691         * einfo.ads: Remove attribute Associated_Collection and its uses in
1692         entities.
1693         Add new attribute Finalization_Master along with its uses in entitites.
1694         (Associated_Collection): Removed along with its pragma import.
1695         (Finalization_Master): New routine along with a pragma import.
1696         (Set_Associated_Collection): Removed along with its pragma import.
1697         (Set_Finalization_Master): New routine along with a pragma import.
1698         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
1699         Build_Finalization_Collection with Build_Finalization_Master.
1700         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
1701         before the bodies of the predefined routines. Add comment explaining
1702         this. Replace call to Build_Finalization_Collection with
1703         Build_Finalization_Master.
1704         (Freeze_Type): Replace call to Build_Finalization_Collection with
1705         Build_Finalization_Master.
1706         (Make_Finalize_Address_Body): Comment reformatting.
1707         (Make_Predefined_Primitive_Specs): Code reformatting.
1708         (Stream_Operation_OK): Update comment mentioning finalization
1709         collections. Replace RE_Finalization_Collection with
1710         RE_Finalization_Master.
1711         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
1712         Associated_Collection with Finalization_Master. Replace call to
1713         Build_Finalization_Collection with Build_Finalization_Master.
1714         (Expand_Allocator_Expression): Replace call to Associated_Collection
1715         with Finalization_Master. Replace call to Set_Associated_Collection with
1716         Set_Finalization_Master. Remove the generation of
1717         Set_Finalize_Address_Ptr.
1718         (Expand_N_Allocator): Replace call to Associated_Collection with
1719         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
1720         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
1721         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
1722         comment on usage. Replace call to Needs_BIP_Collection with
1723         Needs_BIP_Finalization_Master Remplace BIP_Collection with
1724         BIP_Finalization_Master. Update all comments which mention finalization
1725         collections. Replace Associated_Collection with
1726         Finalization_Master. Replace Build_Finalization_Collection with
1727         Build_Finalization_Master.
1728         (BIP_Formal_Suffix): Update BIP_Collection's case.
1729         (Build_Heap_Allocator): Update the related comment. Rename local
1730         variable Collect to Fin_Mas_Id and update its occurrences. Update
1731         comments which mention finalization collections. Replace
1732         Set_Associated_Collection with Set_Finalization_Master.
1733         (Expand_Call): Update the code which detects a special piece of library
1734         code for .NET/JVM.
1735         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
1736         Add_Collection_Actual_To_Build_In_Place_Call with
1737         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
1738         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
1739         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
1740         Add_Collection_Actual_To_Build_In_Place_Call with
1741         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1742         (Make_Build_In_Place_Call_In_Assignment): Replace call to
1743         Add_Collection_Actual_To_Build_In_Place_Call with
1744         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1745         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1746         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
1747         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1748         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
1749         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
1750         Replace call to Set_Associated_Collection with Set_Finalization_Master.
1751         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
1752         Replace the call to Associated_Collection with Finalization_Master.
1753         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
1754         Update the way finalization master names are generated. Update the
1755         retrieval of the correct access type which will carry the pool and
1756         master attributes.
1757         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
1758         (Make_Finalize_Address_Body): Abstract types do not need
1759         Finalize_Address. Code reformatting.
1760         (Make_Finalize_Address_Stmts): Update comment on usage.
1761         (Make_Set_Finalize_Address_Ptr_Call): Removed.
1762         (Process_Declarations): Update comments.
1763         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
1764         Build_Finalization_Master. Update associated comment.
1765         (Make_Set_Finalize_Address_Ptr_Call): Removed.
1766         * exp_ch13.adb: Update comments which mention finalization collections.
1767         (Expand_N_Free_Statement): Replace the call to Associated_Collection
1768         with Finalization_Master.
1769         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
1770         create calls to routines Allocate_Any_Controlled and
1771         Deallocate_Any_Controlled.
1772         (Find_Finalize_Address): New routine.
1773         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
1774         comparison.
1775         (Requires_Cleanup_Actions): Update the comment on freeze node
1776         inspection.
1777         * exp_util.ads: Remove comment on generated code for
1778         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
1779         is better to simply look in the body.
1780         * freeze.adb (Freeze_All): Update the comment of finalization
1781         collections. Replace the call to Associated_Collection with
1782         Finalization_Master. Replace the call to Build_Finalization_Collection
1783         with Build_Finalization_Master.
1784         * impunit.adb: Add a-undesu and s-stposu to the list of units.
1785         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
1786         a-fihema.
1787         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
1788         Ada.Finalization. Add processing for children of System.Storage_Pools.
1789         * rtsfind.ads: Remove the naming of second level children of
1790         Ada.Finalization.
1791         Remove Ada_Finalization_Heap_Management from the list of units.
1792         Remove subtype Ada_Finalization_Child.
1793         Remove the following subprogram entities:
1794         
1795            RE_Allocate
1796            RE_Deallocate
1797            RE_Finalization_Collection
1798            RE_Finalization_Collection_Ptr
1799            RE_Set_Finalize_Address_Ptr
1800         
1801         Add the naming of second level children of System.Storage_Pools.
1802         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
1803         the list of units.
1804         Add subtype System_Storage_Pools_Child.
1805         Add the following subprogram entities to System.Finalization_Masters:
1806         
1807            RE_Finalization_Master
1808            RE_Finalization_Master_Ptr
1809         
1810         Add the following subprogram entities to System.Storage_Pools.Subpools:
1811         
1812            RE_Allocate_Any_Controlled
1813            RE_Deallocate_Any_Controlled
1814            RE_Root_Storage_Pool_With_Subpools
1815            RE_Root_Subpool
1816            RE_Subpool_Handle
1817         
1818         Move the following subprogram entities from
1819         Ada.Finalization.Heap_Management to System.Finalization_Masters:
1820         
1821            RE_Add_Offset_To_Address
1822            RE_Attach
1823            RE_Base_Pool
1824            RE_Detach
1825         
1826         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
1827         Set_Associated_Collection with Set_Finalization_Master.
1828         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
1829         BIP_Finalization_Master is created.
1830         * s-finmas.adb: New unit System.Finalization_Masters.
1831         * s-finmas.ads: New unit System.Finalization_Masters.
1832         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
1833         * s-stposu.ads, s-stposu.adb: New unit implementing
1834         System.Storage_Pools.Subpools.
1835
1836 2011-08-29  Bob Duff  <duff@adacore.com>
1837
1838         * tbuild.adb: Add assertion.
1839
1840 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1841
1842         * s-pooglo.adb: Minor reformatting.
1843
1844 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1845
1846         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
1847         an indexed component of a packed array whose element type is a record
1848         with a representation clause different from that of the right-hand
1849         side, generate a temporary to minimuze the number of bit-field
1850         operations generated.
1851
1852 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1853
1854         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
1855         declarations, and thus are likely insertion points for actions.
1856
1857 2011-08-29  Bob Duff  <duff@adacore.com>
1858
1859         * einfo.ads: Minor comment fix.
1860
1861 2011-08-29  Robert Dewar  <dewar@adacore.com>
1862
1863         * frontend.adb, gnat1drv.adb: Minor reformatting.
1864
1865 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1866
1867         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
1868         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
1869         space in front of the header.
1870
1871 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1872
1873         * frontend.adb (Frontend): Exit after creating Standard package when
1874         -gnatd.H is present.
1875         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
1876         present.
1877
1878 2011-08-29  Robert Dewar  <dewar@adacore.com>
1879
1880         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
1881         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
1882         snames.ads-tmpl: Minor reformatting.
1883
1884 2011-08-29  Philippe Gil  <gil@adacore.com>
1885
1886         * prj.adb (Reset_Units_In_Table): New procedure.
1887         Reset units to avoid access to freed memory.
1888
1889 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1890
1891         * get_scos.adb: When reading a P statement SCO without a pragma name
1892         (from an older ALI file), ensure that the Pragma_Name component is set
1893         to Unknown_Pragma (not left uninitialized).
1894
1895 2011-08-29  Vincent Celier  <celier@adacore.com>
1896
1897         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
1898         modified to compute correctly the object path of a SAL project that is
1899         extending another library project.
1900         (Write_Path_File): New procedure.
1901         * makeutl.ads (Directories): New table moved from Buildgpr
1902         (Get_Directories): New procedure moved from Buildgpr
1903         (Write_Path_File): New procedure
1904         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
1905         paths before binding SALs, instead of Set_Ada_Paths.
1906         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
1907         Prj.
1908         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
1909         (Current_Source_Path_File_Of): New function
1910         (Set_Current_Object_Path_File_Of): New procedure
1911         (Current_Source_Object_File_Of): New function
1912         (Set_Current_Object_Path_File_Of): New procedure
1913         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
1914         (Current_Source_Path_File_Of): New function
1915         (Set_Current_Object_Path_File_Of): New procedure
1916         (Current_Source_Object_File_Of): New function
1917         (Set_Current_Object_Path_File_Of): New procedure
1918
1919 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1920
1921         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
1922         packed entity, use a bit-field assignment only if there is no change of
1923         representation.
1924
1925 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1926
1927         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
1928         Is_RTU instead of using Chars comparisons.
1929
1930 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1931
1932         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
1933         temporary object if the actual is constrained, and the discriminants
1934         read from the stream don't match.
1935
1936 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1937
1938         * sem_attr.adb, exp_attr.adb: Add handling of
1939         Attribute_System_Allocator_Alignment
1940         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
1941         Attribute_System_Allocator_Alignment.
1942         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
1943         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
1944         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
1945         get_target_system_allocator_alignment.
1946
1947 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1948
1949         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1950         dependencies.
1951
1952 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1953
1954         * exp_ch3.adb (In_Runtime): Fix typo.
1955
1956 2011-08-29  Bob Duff  <duff@adacore.com>
1957
1958         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
1959
1960 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1961
1962         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
1963         and a separate tag assignment is generated, ensure that the tag
1964         assignment is analyzed.
1965
1966 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1967
1968         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
1969         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
1970         of statement lists that may contain local declarations.
1971         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
1972         duplicate the triggering statements needed for the expansion of this
1973         construct, when the trigger is a dispatching call to a synchronized
1974         primitive.
1975
1976 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1977
1978         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
1979         * bindgen.adb: Add comments.
1980         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
1981         in CodePeer mode.
1982
1983 2011-08-29  Robert Dewar  <dewar@adacore.com>
1984
1985         * exp_attr.adb: Minor reformatting.
1986         Minor code reorganization and commenting.
1987         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
1988         reformatting.
1989
1990 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1991
1992         * get_scos.adb: Ignore chaining indicators not currently supported
1993         by Ada.
1994
1995 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1996
1997         * system.ads: Minor editing.
1998
1999 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
2000
2001         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
2002         CodePeer mode.
2003         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
2004         Attribute_Elab_Subp_Body.
2005         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
2006         * sem_util.adb: Update comments.
2007
2008 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2009
2010         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
2011         pragma name for each SCO statement corresponding to a pragma.
2012
2013 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
2014
2015         * opt.ads: Minor editing.
2016
2017 2011-08-29  Yannick Moy  <moy@adacore.com>
2018
2019         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
2020         that only made sense for CodePeer mode.
2021
2022 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
2023
2024         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
2025         which is no longer used.
2026         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
2027         handling of the 64-bit division check.
2028         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
2029         division available.
2030         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
2031         longer used.
2032
2033 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2034
2035         * get_scos.adb: Minor reformatting.
2036
2037 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
2038
2039         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
2040         statement list is wrapped in a block, the block is explicitly analyzed
2041         in order to properly redecorate the entities and create a servicing
2042         finalizer.
2043
2044 2011-08-29  Tristan Gingold  <gingold@adacore.com>
2045
2046         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
2047         (Set_Zero_Cost_Handling): Remove.
2048
2049 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2050
2051         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
2052
2053 2011-08-29  Geert Bosch  <bosch@adacore.com>
2054
2055         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
2056         instruction, as the latter may produce -0.0, which is not a valid VAX
2057         F float number.
2058         (Neg_G): Likewise for VAX F float.
2059
2060 2011-08-29  Robert Dewar  <dewar@adacore.com>
2061
2062         * exp_util.adb: Minor reformatting.
2063
2064 2011-08-29  Yannick Moy  <moy@adacore.com>
2065
2066         * sem_ch3.adb: Minor comment update.
2067
2068 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2069
2070         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
2071         the operand type.
2072
2073 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2074
2075         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
2076         current statement sequence on a generic instantiation or a subprogram
2077         declaration.
2078
2079 2011-08-29  Robert Dewar  <dewar@adacore.com>
2080
2081         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
2082         Minor reformatting.
2083
2084 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
2085
2086         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2087         Correct the check which involves the freeze node of a controlled or
2088         access-to-controlled type.
2089
2090 2011-08-29  Geert Bosch  <bosch@adacore.com>
2091
2092         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
2093         statements.
2094         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
2095         Asm statements.
2096
2097 2011-08-29  Yannick Moy  <moy@adacore.com>
2098
2099         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
2100         for every index type and component type that is not a subtype_mark.
2101         (Process_Subtype): Set Etype of subtype.
2102
2103 2011-08-29  Robert Dewar  <dewar@adacore.com>
2104
2105         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
2106         reorganization.  Minor reformatting.
2107
2108 2011-08-29  Steve Baird  <baird@adacore.com>
2109
2110         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
2111         for CodePeer and ALFA modes.
2112
2113 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2114
2115         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
2116         that comes from an enclosing scope if it is not the renaming of an
2117         actual, to handle properly a spurious ambiguity in an instance.
2118
2119 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
2120
2121         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
2122         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
2123         use it instead of the Esize of the first parameter.
2124         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
2125         above change.
2126         <Size>: Likewise.  Call it for composite types on the RM size.
2127
2128 2011-08-29  Yannick Moy  <moy@adacore.com>
2129
2130         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
2131         * sem_util.adb (Unique_Name): Correct behaviour for names of
2132         compilation units.
2133
2134 2011-08-29  Yannick Moy  <moy@adacore.com>
2135
2136         * sem_prag.adb (Check_Precondition_Postcondition): In formal
2137         verification mode, analyze pragma expression for correctness, for
2138         pre/post on library-level subprogram, as it is not expanded later.
2139
2140 2011-08-29  Yannick Moy  <moy@adacore.com>
2141
2142         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
2143         in formal verification.
2144
2145 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2146
2147         * sem_util.adb: Minor reformatting.
2148         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
2149         there's no pragma.
2150         * par_sco.ads, par_sco.adb: Update comments.
2151
2152 2011-08-29  Yannick Moy  <moy@adacore.com>
2153
2154         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
2155         associated getter/setter.
2156         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
2157
2158 2011-08-29  Vincent Celier  <celier@adacore.com>
2159
2160         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
2161         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
2162         with declarations for Language_Kind and Dependency_Kind for Ada.
2163         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
2164         (Process_Compiler): Take into account the new attributes Dependency_Kind
2165         and Language_Kind.
2166         (Check_Configuration): Check if language kind is unit based, not if the
2167         language name is Ada.
2168         (Process_Exceptions_Unit_Based): Ditto
2169         (Add_Language): Remove default additions of language and dependency kind
2170         * prj.ads: Minor comment change
2171         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
2172
2173 2011-08-29  Johannes Kanig  <kanig@adacore.com>
2174
2175         * debug.adb: Update comments.
2176
2177 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
2178
2179         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
2180         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
2181         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
2182         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
2183         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
2184
2185 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2186
2187         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
2188         (GNATLIBCFLAGS_FOR_C): Replace
2189         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
2190         (gnatlib-shared-default, gnatlib-shared-dual-win32)
2191         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
2192         (gnatlib-sjlj, gnatlib-zcx): Likewise.
2193
2194 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
2195
2196         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
2197
2198         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
2199
2200         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
2201
2202 2011-08-05  Nicolas Roche  <roche@adacore.com>
2203
2204         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
2205         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
2206         canadian cross.
2207         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
2208
2209 2011-08-05  Matthew Heaney  <heaney@adacore.com>
2210
2211         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
2212         subprogram bodies declared out-of-order.
2213
2214 2011-08-05  Yannick Moy  <moy@adacore.com>
2215
2216         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
2217         entities directly in package Standard, otherwise skip the standard
2218         prefix.
2219
2220 2011-08-05  Robert Dewar  <dewar@adacore.com>
2221
2222         * a-cbmutr.adb: Minor reformatting
2223         (Allocate_Node): refactor node allocation algorithm
2224
2225 2011-08-05  Robert Dewar  <dewar@adacore.com>
2226
2227         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
2228         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
2229         mode.
2230         (Analyze_Pragma, case Check_Policy): Ditto.
2231         * sem_prag.ads (Check_Disabled): New function
2232         * snames.ads-tmpl: Add Name_Disable.
2233
2234 2011-08-05  Robert Dewar  <dewar@adacore.com>
2235
2236         * gnat_rm.texi: Document implementation-defined policy DISABLE for
2237         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
2238
2239 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2240
2241         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
2242         that appears in a generic formal part and applies to a formal
2243         subprogram.
2244
2245 2011-08-05  Robert Dewar  <dewar@adacore.com>
2246
2247         * a-cbmutr.ads: Minor reformatting.
2248
2249 2011-08-05  Matthew Heaney  <heaney@adacore.com>
2250
2251         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
2252         to check count, check sign of value instead.
2253         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
2254         (Copy_Subtree): allocate copy of source element
2255         (Equal_Subtree): compare elements, not access objects
2256
2257 2011-08-05  Vincent Celier  <celier@adacore.com>
2258
2259         * gnat_ugn.texi: Fix VMS alternative.
2260
2261 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2262
2263         * sem_ch11.adb: Add comment.
2264
2265 2011-08-05  Robert Dewar  <dewar@adacore.com>
2266
2267         * exp_util.adb: Minor comment fix.
2268
2269 2011-08-05  Robert Dewar  <dewar@adacore.com>
2270
2271         * scng.adb (Error_Unterminated_String): Improve flag position when
2272         comma present.
2273
2274 2011-08-05  Matthew Heaney  <heaney@adacore.com>
2275
2276         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
2277         tree containers).
2278         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
2279         multiway tree containers.
2280
2281 2011-08-05  Robert Dewar  <dewar@adacore.com>
2282
2283         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
2284         * stylesw.adb: Implement -gnatyC to control comment spacing
2285         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
2286         -gnatyc/C).
2287         * usage.adb: Add line for -gnatyC.
2288
2289 2011-08-05  Robert Dewar  <dewar@adacore.com>
2290
2291         * gnat_ugn.texi: Document -gnatyC.
2292         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
2293         synonym for COMMENTS2).
2294
2295 2011-08-05  Robert Dewar  <dewar@adacore.com>
2296
2297         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
2298         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
2299         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
2300         a-comutr.ads, lib-xref.adb: Minor reformatting.
2301
2302 2011-08-05  Robert Dewar  <dewar@adacore.com>
2303
2304         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
2305         warning if there is an exception handler present.
2306
2307 2011-08-05  Pascal Obry  <obry@adacore.com>
2308
2309         * a-iteint.ads: Fix copyright year.
2310
2311 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2312
2313         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
2314         statement SCO for a USE clause or a representation clause.
2315
2316 2011-08-05  Yannick Moy  <moy@adacore.com>
2317
2318         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
2319         between body and spec for stub.
2320         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
2321         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
2322         pragma precondition or postcondition, for which the enclosing
2323         subprogram or package in the AST is not the desired one, return empty.
2324
2325 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2326
2327         * g-expect.adb: Minor reformatting.
2328
2329 2011-08-05  Bob Duff  <duff@adacore.com>
2330
2331         * a-fihema.adb: Comment out OS_Lib.
2332
2333 2011-08-05  Matthew Heaney  <heaney@adacore.com>
2334
2335         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
2336         (unbounded multiway tree containers) and a-iteint.ads.
2337         * a-comutr.ads, a-comutr.adb:
2338         This is the new Ada 2012 unit for unbounded multiway tree containers
2339         * a-cimutr.ads, a-cimutr.adb
2340         This is the new Ada 2012 unit for indefinite multiway tree containers
2341         * a-iteint.ads: New file.
2342
2343 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2344
2345         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
2346
2347 2011-08-05  Bob Duff  <duff@adacore.com>
2348
2349         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
2350         subpools.
2351         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
2352
2353 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2354
2355         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
2356         general indexing aspects of Ada2012. Called when analyzing indexed
2357         components when other interpretations fail.
2358         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
2359         in an expression context where overloading is meaningful. This excludes
2360         the occurrence in an aspect specification (efficiency only).
2361         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
2362         related to iterators can be set by an attribute specification, but
2363         cannot be queried.
2364         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
2365         Constant_Indexing and Variable_Indexing.
2366         (Check_Indexing_Functions): New procedure to perform legality checks.
2367         Additional semantic checks at end of declarations.
2368
2369 2011-08-05  Sergey Rybin  <rybin@adacore.com>
2370
2371         * tree_io.ads: Update ASIS_Version_Number because of the change of the
2372         order of calling Tree_Write/Tree_Read routines made for aspects.
2373
2374 2011-08-05  Bob Duff  <duff@adacore.com>
2375
2376         * a-fihema.adb (Finalize): Fix race condition.
2377
2378 2011-08-05  Yannick Moy  <moy@adacore.com>
2379
2380         * sem_ch12.adb (Analyze_Package_Instantiation,
2381         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
2382         mode.
2383
2384 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2385
2386         * sem_type.adb (Specific_Type): in an instance, the type-specific
2387         operand of an equality check that involves null may have a private
2388         type. Use full view to determine legality of construct.
2389
2390 2011-08-05  Vincent Celier  <celier@adacore.com>
2391
2392         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2393         delete or close the file when the call to gnatmake was successful.
2394
2395 2011-08-05  Yannick Moy  <moy@adacore.com>
2396
2397         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
2398         Global_Discard_Names.
2399
2400 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2401
2402         * sinfo.ads: comments on use of entity field for aspect specifications.
2403
2404 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2405
2406         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
2407         node is not itself an entity but a selected component, it is a
2408         rewritten parameterless call to an en enclosing synchronized operation,
2409         and this expansion will be performed again in the instance, so there is
2410         no global information to preserve.
2411
2412 2011-08-05  Javier Miranda  <miranda@adacore.com>
2413
2414         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
2415         for renamings of predefined primitives.
2416         (In_Predef_Prims_DT): New subprogram.
2417
2418 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2419
2420         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
2421         possible interpretation of name is a reference type, add an
2422         interpretation that is the designated type of the reference
2423         discriminant of that type.
2424         * sem_res.adb (resolve): If the interpretation imposed by context is an
2425         implicit dereference, rewrite the node as the deference of the
2426         reference discriminant.
2427         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
2428         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
2429         parent type or base type.
2430         * sem_ch4.adb (Process_Indexed_Component,
2431         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
2432         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
2433         Check for implicit dereference.
2434         (List_Operand_Interps): Indicate when an implicit dereference is
2435         ambiguous.
2436         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
2437
2438 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2439
2440         * scos.ads: Update documentation of SCO table. Pragma statements can now
2441         be marked as disabled (using 'p' instead of 'P' as the statement kind).
2442         * par_sco.ads, par_sco.adb: Implement the above change.
2443         (Process_Decisions_Defer): Generate a P decision for the first parameter
2444         of a dyadic pragma Debug.
2445         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
2446         necessary.
2447         * put_scos.adb: Code simplification based on above change.
2448
2449 2011-08-05  Robert Dewar  <dewar@adacore.com>
2450
2451         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
2452         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
2453         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
2454         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
2455
2456 2011-08-05  Bob Duff  <duff@adacore.com>
2457
2458         * a-stunau.ads, g-spipat.adb: Update comments.
2459
2460 2011-08-05  Bob Duff  <duff@adacore.com>
2461
2462         * a-fihema.ads: Minor comment fix.
2463         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
2464         correct.
2465         (Attach, Detach): Remove some unnecessary code.
2466         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
2467
2468 2011-08-05  Bob Duff  <duff@adacore.com>
2469
2470         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
2471         allocation for Objects component. This simplifies the code somewhat. It
2472         is also a little more efficient in the not-so-unusual case where there
2473         are no controlled objects allocated.
2474         Make Finalization_Started flag atomic.
2475         (Finalize): Avoid unnecessary detachment of items from the list.
2476         (pcol): Minor cleanup.
2477
2478 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2479
2480         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
2481         package whose name is the same as that of the generic unit, or its
2482         ultimate prefix.
2483
2484 2011-08-05  Bob Duff  <duff@adacore.com>
2485
2486         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
2487         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
2488         Minor comment fixes.
2489
2490 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
2491
2492         * make.adb (Linking_Phase): No longer need to set source search path
2493         before calling gnatlink in CodePeer mode.
2494         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
2495         gcc in CodePeer mode, since the binder generated file no longer has a
2496         'with Main'.
2497         * switch.ads, switch.adb (Is_Language_Switch): Removed.
2498         * switch-c.adb: Update comment.
2499
2500 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2501
2502         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
2503
2504 2011-08-05  Nicolas Roche  <roche@adacore.com>
2505
2506         * gnat_ugn.texi: Fix minor syntax error issue.
2507
2508 2011-08-05  Vincent Celier  <celier@adacore.com>
2509
2510         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2511         delete or close the file when the call to gnatmake returns a non
2512         successful return code.
2513
2514 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2515
2516         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
2517         check, indicate that the copy of the original node does not come from
2518         source, to prevent an infinite recursion of the expansion.
2519
2520 2011-08-05  Johannes Kanig  <kanig@adacore.com>
2521
2522         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
2523         VC generation for subprogram bodies.
2524
2525 2011-08-05  Yannick Moy  <moy@adacore.com>
2526
2527         * einfo.ads: Typo.
2528         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
2529         the base type with the smallest allowed base type.
2530
2531 2011-08-05  Sergey Rybin  <rybin@adacore.com>
2532
2533         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
2534         aspects.
2535
2536 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2537
2538         * sem_ch12.ads: minor comment updates.
2539
2540 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2541
2542         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
2543         instantiation and a formal package the compiler generates a package
2544         renaming declaration so that the generic name within the declaration
2545         is interpreted as a renaming of the instance. At the end of a formal
2546         package declaration, this renaming must become invisible.
2547
2548 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2549
2550         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
2551         comparison and rely on concrete entities instead.
2552
2553 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2554
2555         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
2556         and discriminants, to indicate that the type has an access discriminant
2557         that supports implicit dereference.
2558         * snames.ads-tmpl: Add names of aspects and attributes related to
2559         Ada2012 iterators: constant_indexing, default_iterator,
2560         iterator_element, implicit_dereference, variable_indexing.
2561         * aspects.ads, aspects.adb: entries for iterator-related aspects.
2562         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
2563         iterator-related aspects.
2564         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
2565
2566 2011-08-05  Sergey Rybin  <rybin@adacore.com>
2567
2568         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
2569         metrics in gnatmetric to cover new kinds of coupling mentrics.
2570
2571 2011-08-05  Steve Baird  <baird@adacore.com>
2572
2573         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2574         of calling the user-defined main subprogram.
2575         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
2576         is set) Call_Main_Subprogram ahead of, as opposed to
2577         inside of, Main.
2578         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
2579         generation of a "with" of the user-defined main subprogram.
2580         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
2581         (which is now called from Gen_Main instead).
2582
2583 2011-08-05  Emmanuel Briot  <briot@adacore.com>
2584
2585         * projects.texi: Added reference to the Makefile package.
2586
2587 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2588
2589         * exp_ch7.adb: Minor comment rewording.
2590
2591 2011-08-05  Ed Falis  <falis@adacore.com>
2592
2593         * env.c: Fix comment.
2594
2595 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2596
2597         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
2598         character comparison and rely on concrete entities instead.
2599
2600 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2601
2602         * sem_ch3.adb: (Check_Private_Overriding): better error message,
2603         suggested by AI95-0068.
2604
2605 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2606
2607         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
2608         the two potential initialization calls. This accounts for any
2609         access-before-elaboration checks which may precede the initialization
2610         calls.
2611         (Next_Suitable_Statement): New routine. Returns the next real statement
2612         after the input node while skipping generated checks.
2613         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
2614         with comment on usage.
2615         Do not generate Elaborate_All when the trigger is a finalization call
2616         coming from a type init proc.
2617         (Check_Elab_Call): Propagate the initialization procedure context to
2618         subsequent calls to Check_A_Call.
2619         (Check_Internal_Call_Continue): Propagate the initialization procedure
2620         context to subsequent calls to Check_Elab_Call.
2621         (Is_Finalization_Procedure): New routine. Returns True if the input
2622         entity denotes a [Deep_]Finalize routine.
2623         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
2624         along with comment on usage.
2625
2626 2011-08-05  Vadim Godunko  <godunko@adacore.com>
2627
2628         * s-atocou.ads: Add list of supported platforms.
2629
2630 2011-08-05  Yannick Moy  <moy@adacore.com>
2631
2632         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
2633
2634         * opt.ads (Disable_ALI_File): new Boolean flag
2635         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
2636
2637 2011-08-05  Ed Falis  <falis@adacore.com>
2638
2639         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
2640         environ is properly defined.
2641
2642 2011-08-05  Vincent Celier  <celier@adacore.com>
2643
2644         * make.adb (Compilation_Phase): Exit immediately when all objects have
2645         been found up to date, to avoid multiple exit messages.
2646         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
2647         same project for languages with no compiler.
2648         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
2649         -eI.
2650 2011-08-05  Robert Dewar  <dewar@adacore.com>
2651
2652         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
2653         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
2654         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
2655         s-atocou-builtin.adb: Minor reformatting.
2656
2657 2011-08-05  Yannick Moy  <moy@adacore.com>
2658
2659         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
2660         if the node to wrap is a pragma check, this node and enclosed
2661         expression are not expanded, so do not apply any transformations here.
2662         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
2663         introducing transient scopes.
2664
2665 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
2666
2667         * adaint.c (__gnat_set_writable, __gnat_set_readable,
2668         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
2669         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
2670         routine is available, so we use the default implementation of these
2671         functions.
2672         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
2673         support for copying attributes on VxWorks 6.
2674
2675 2011-08-05  Yannick Moy  <moy@adacore.com>
2676
2677         * debug.adb: Remove use of -gnatd.D.
2678         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
2679         * opt.ads: Simplify variables for ALFA mode, to keep one only
2680         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
2681         to ALFA mode.
2682
2683 2011-08-05  Vincent Celier  <celier@adacore.com>
2684
2685         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
2686         Builder'Default_Switches.
2687
2688 2011-08-05  Vincent Celier  <celier@adacore.com>
2689
2690         * makeusg.adb: Add lines for --create-map-file switches.
2691
2692 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2693
2694         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
2695         profile is incomplete and the full view is available, replace it with
2696         the full view.
2697         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
2698         incomplete, freezing the subprogram is delayed until the full view is
2699         frozen.
2700         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
2701         fixed-point multiplication operator and the predefined operator is
2702         resolved in favor of the user-defined one.
2703
2704 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2705
2706         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
2707         CONST_CAST.
2708
2709 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2710
2711         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
2712         whether a type lacks user-defined Read or Write operations, or has a
2713         component that lacks them.
2714         * sem_attr.adb (Check_Stream_Attribute): if restriction
2715         No_Default_Stream_Attributes is active, verify that all subcomponent
2716         types of the target have user-defined stream operations, and report
2717         error otherwise.
2718         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
2719         * exp_strm.adb: Build_Elementary_Input_Call,
2720         Build_Elementary_Write_Call): remove checks for restriction
2721         No_Default_Stream_Attributes, now checked in semantics.
2722
2723 2011-08-04  Vincent Celier  <celier@adacore.com>
2724
2725         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
2726         switches on the command line, look for all valid --RTS switches in the
2727         Builder switches and for each language use the first runtime name found
2728         to invoke gprconfig.
2729         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
2730         command line and there is no auto-configuration.
2731         (Runtime_Name_Set_For): New function.
2732
2733 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2734
2735         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
2736         elaborate initialization expression for variable Abort when processing
2737         a package body or a declaration.
2738         (Create_Finalizer): Propagate the package context when creating the
2739         exception-related variables.
2740         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
2741         For_Package along with usage comment.
2742
2743 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2744
2745         * gcc-interface/Makefile.in: Clean up targets.
2746         Enable new package for atomic counters and copy-on-write implementation
2747         of unbounded strings on x86 platforms.
2748         * gcc-interface/Make-lang.in: Update dependencies.
2749
2750 2011-08-04  Robert Dewar  <dewar@adacore.com>
2751
2752         * exp_ch7.adb: Minor reformatting.
2753
2754 2011-08-04  Robert Dewar  <dewar@adacore.com>
2755
2756         * exp_strm.adb: Minor reformatting.
2757
2758 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2759
2760         * s-atocou.adb: Replace by dummy version and use on targets where atomic
2761         operations are not supported.
2762         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
2763         * s-atocou-x86.adb: New file.
2764         * Makefile.rtl: Add s-atocou.o file
2765
2766 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2767
2768         * make.adb (Compile): Move setting of CodePeer_Mode to ...
2769         (Compilation_Phase): ... here.
2770         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
2771
2772 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2773
2774         * Make-generated.in: Fix minor typo in comment.
2775
2776 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2777
2778         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
2779         the project path.
2780
2781 2011-08-04  Robert Dewar  <dewar@adacore.com>
2782
2783         * a-coinho.adb: Minor reformatting.
2784
2785 2011-08-04  Robert Dewar  <dewar@adacore.com>
2786
2787         * a-coinho.ads: Minor reformatting.
2788
2789 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2790
2791         * s-atocou.ads, s-atocou.adb: New files.
2792         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
2793         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
2794         direct use of GCC's atomic builtins and replace them by use of new
2795         atomic counter package.
2796
2797 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2798
2799         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
2800
2801 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2802
2803         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
2804         with a call to Get_External_Tag.
2805         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
2806         subprogram usage. Remove the guard against package declarations and
2807         bodies since Build_Cleanup_Statements is no longer invoked in that
2808         context.
2809         (Build_Components): Initialize Tagged_Type_Stmts when the context
2810         contains at least one library-level tagged type.
2811         (Build_Finalizer): New local variables Has_Tagged_Types and
2812         Tagged_Type_Stmts along with associated comments on usage. Update the
2813         logic to include tagged type processing.
2814         (Create_Finalizer): Insert all library-level tagged type unregistration
2815         code before the jump block circuitry.
2816         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
2817         (Expand_N_Package_Declaration): Remove the call to
2818         Build_Cleanup_Statements.
2819         (Process_Tagged_Type_Declaration): New routine. Generate a call to
2820         unregister the external tag of a tagged type.
2821         (Processing_Actions): Reimplemented to handle tagged types.
2822         (Process_Declarations): Detect the declaration of a library-level
2823         tagged type and carry out the appropriate actions.
2824         (Unregister_Tagged_Types): Removed. The machinery has been directly
2825         merged with Build_Finalizer.
2826
2827 2011-08-04  Robert Dewar  <dewar@adacore.com>
2828
2829         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
2830         gnatls.adb, exp_ch3.adb: Minor reformatting.
2831
2832 2011-08-04  Marc Sango  <sango@adacore.com>
2833
2834         * sem_attr.adb (Analyze_Attribute): Replace the message
2835         "invisible attribute of}" of the spark restriction violation in
2836         attribute reference by the simple message "invisible attribute of type".
2837         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
2838         two insertion characters: '&' and '}'.
2839
2840 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2841
2842         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
2843         * a-coinho.ads, a-coinho.adb: New file.
2844         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
2845
2846 2011-08-04  Nicolas Roche  <roche@adacore.com>
2847
2848         * alfa_test.adb: Not all ali files are containing alfa information even
2849         if compiled with -gnatd.F. So suppress warning about missing ALFA
2850         information.
2851
2852 2011-08-04  Yannick Moy  <moy@adacore.com>
2853
2854         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
2855         scope.
2856         * put_alfa.adb: Check that scope name is not empty.
2857
2858 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2859
2860         * exp_ch3.adb (Stream_Operation_Ok): new predicate
2861         Needs_Elementary_Stream_Operation, to determine whether user-defined
2862         Read and Write attributes are available for the elementary components
2863         of the given type. If only the predefined attributes are available,
2864         then when restriction No_Default_Stream_Attributes is active the
2865         predefined stream attributes for the composite type cannot be created.
2866
2867 2011-08-04  Robert Dewar  <dewar@adacore.com>
2868
2869         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
2870         Put routines in alpha order
2871
2872 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
2873
2874         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
2875         * gcc-interface/Make-lang.in: Update dependencies.
2876
2877 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2878
2879         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
2880         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
2881         gnat1why).
2882
2883 2011-08-04  Robert Dewar  <dewar@adacore.com>
2884
2885         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
2886         lib-xref-alfa.adb: Minor reformatting.
2887
2888 2011-08-04  Marc Sango  <sango@adacore.com>
2889
2890         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
2891         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
2892         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
2893         mode.
2894
2895 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2896
2897         * bindgen.adb (Gen_Adainit_C): Remove.
2898         (Gen_Adafinal_C): Ditto.
2899         (Gen_Elab_Externals_C): Ditto.
2900         (Gen_Elab_Calls_C): Ditto.
2901         (Gen_Elab_Order_C): Ditto.
2902         (Gen_Elab_Defs_C): Ditto.
2903         (Gen_Finalize_Library_C): Ditto.
2904         (Gen_Finalize_Library_Defs_C): Ditto.
2905         (Gen_Main_C): Ditto.
2906         (Gen_Output_File_C): Ditto.
2907         (Gen_Restrictions_C): Ditto.
2908         (Gen_Versions_C): Ditto.
2909         (Write_Info_Ada_C): Ditto.
2910         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
2911         (Gen_Output_File): Do not force Ada_Bind_File anymore.
2912         Always call Gen_Output_File_Ada.
2913         * gnatlink.adb (Begin_Info): Now a constant.
2914         (End_Info): Ditto.
2915         (Ada_Bind_File): Remove
2916         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
2917         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
2918         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
2919         * opt.ads (Ada_Bind_File): Remove.
2920
2921 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2922
2923         * projects.texi: Document target-specific directory in default project
2924         path for gnatmake.
2925
2926 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2927
2928         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
2929         path in all cases .
2930
2931 2011-08-04  Yannick Moy  <moy@adacore.com>
2932
2933         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
2934         opt.ads, lib-xref.ads: Code clean up.
2935
2936 2011-08-04  Yannick Moy  <moy@adacore.com>
2937
2938         * gnat_rm.texi: Update description of Test_Case
2939         * gnat_ugn.texi: Typo.
2940
2941 2011-08-04  Ed Falis  <falis@adacore.com>
2942
2943         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
2944
2945 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2946
2947         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
2948         it is of type Root_Controlled. This action eliminates fields Prev and
2949         Next from type equality.
2950
2951 2011-08-04  Yannick Moy  <moy@adacore.com>
2952
2953         * lib-xref-alfa.adb: Correct typo.
2954
2955 2011-08-04  Matthew Heaney  <heaney@adacore.com>
2956
2957         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
2958         component.
2959
2960 2011-08-04  Yannick Moy  <moy@adacore.com>
2961
2962         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
2963         (Analyze_Pragma): allow static string expression for name of Test_Case,
2964         instead of simply string literals.
2965         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
2966         expressions.
2967
2968 2011-08-04  Vincent Celier  <celier@adacore.com>
2969
2970         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
2971         case suffixes to find truncated main sources.
2972
2973 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2974
2975         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
2976         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
2977         (Compute_Current_Task): Ditto.
2978
2979 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2980
2981         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
2982
2983 2011-08-04  Yannick Moy  <moy@adacore.com>
2984
2985         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
2986         library-level constant.
2987         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
2988         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
2989         used as selector of parameter association, in ALFA mode.
2990
2991 2011-08-04  Robert Dewar  <dewar@adacore.com>
2992
2993         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
2994         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
2995         reformatting.
2996
2997 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2998
2999         * make.adb (Linking_Phase): Set source search path before calling
3000         gnatlink in CodePeer mode.
3001
3002 2011-08-04  Javier Miranda  <miranda@adacore.com>
3003
3004         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
3005         Remove code which takes care of building TSDs.
3006         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
3007         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
3008         the accessibility check in VM targets.
3009         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
3010         (Building_Static_DT): Now returns false for VM targets.
3011         (Build_VM_TSDs): Removed.
3012         (Expand_Interface_Conversion): Generate missing runtime check for
3013         conversions to interface types whose target type is unknown at compile
3014         time.
3015         (Make_VM_TSD): Add missing code to disable the generation of calls to
3016         Check_TSD if the tagged type is not defined at library level, or not
3017         has a representation clause specifying its external tag, or -gnatdQ is
3018         active.
3019         * exp_disp.ads (Build_VM_TSDs): Removed.
3020         (Make_VM_TSDs): Spec relocated from exp_disp.adb
3021         * sem_disp.adb (Check_Dispatching_Operation): No code required to
3022         register primitives in the dispatch tables in VM targets.
3023         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
3024         initialization of class-wide interface objects in VM targets.
3025         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
3026         of Make_DT).
3027
3028 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3029
3030         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
3031         when dotnet-ld cannot be found.
3032
3033 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3034
3035         * bindgen.adb: Simplify significantly generation of binder body file in
3036         CodePeer mode.
3037         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
3038         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
3039         not expanded).
3040
3041 2011-08-04  Yannick Moy  <moy@adacore.com>
3042
3043         * sem_prag.adb, sem.ads: Code cleanup.
3044
3045 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3046
3047         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
3048         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
3049         results if possible.
3050         * s-stusta.adb (Print): Adjust after changes in s-stausa.
3051         * gnat_ugn.texi: Update dynamic stack usage section.
3052
3053 2011-08-04  Steve Baird  <baird@adacore.com>
3054
3055         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
3056         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
3057         contains only a call to the user-defined main subprogram.
3058         (Gen_Main_Ada) - If CodePeer_Mode is set, then
3059         call the "wrapper" subprogram instead of directly
3060         calling the user-defined main subprogram.
3061
3062 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3063
3064         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
3065         alternatives of a case statement for controlled objects. Rename local
3066         variable A to Dead_Alt.
3067         (Expand_N_If_Statement): Check the then and else statements of an if
3068         statement for controlled objects. Check the then statements of all
3069         elsif parts of an if statement for controlled objects.
3070         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
3071         objects.
3072         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
3073         detects a loop associated with the expansion of an array object.
3074         Augment the processing of the loop statements to account for a possible
3075         wrap done by Process_Statements_For_Controlled_Objects.
3076         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
3077         statements and abortable part of an asynchronous select for controlled
3078         objects.
3079         (Expand_N_Conditional_Entry_Call): Check the else statements of a
3080         conditional entry call for controlled objects.
3081         (Expand_N_Selective_Accept): Check the alternatives of a selective
3082         accept for controlled objects.
3083         (Expand_N_Timed_Entry_Call): Check the entry call and delay
3084         alternatives of a timed entry call for controlled objects.
3085         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
3086         exception handler for controlled objects.
3087         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3088         Add formal parameter Nested_Constructs along with its associated
3089         comment.
3090         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
3091         Requires_Cleanup_Actions.
3092         (Process_Statements_For_Controlled_Objects): New routine.
3093         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
3094         routine. Inspect a node which contains a non-handled sequence of
3095         statements for controlled objects. If such an object is found, the
3096         statements are wrapped in a block.
3097
3098 2011-08-04  Bob Duff  <duff@adacore.com>
3099
3100         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
3101         need to compare with Class_Wide_Type (T2), in order to get at the
3102         original class-wide type node.
3103         * sem_type.ads (Covers): Improve the comment.
3104         * einfo.ads (Class_Wide_Type): Improve the comment.
3105         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
3106         the type of the Deref.
3107
3108 2011-08-04  Yannick Moy  <moy@adacore.com>
3109
3110         * gnat_rm.texi: Document that Test_Case pragma can only appear on
3111         separate declarations.
3112         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
3113         check identifier of pragma argument.
3114         (Chain_TC): check that no other test case associated to the same entity
3115         share the same name.
3116         (Check_Test_Case): disallow test case inside subprogram body
3117         (Analyze_Pragma): correct call to check identifier and not argument
3118         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
3119         function gets name from test case pragma.
3120
3121 2011-08-04  Yannick Moy  <moy@adacore.com>
3122
3123         * gnat_rm.texi: Document new pragma and aspect.
3124         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
3125         (No_Duplicates_Allowed): new constant array defining whether duplicates
3126         aspects of each kind can appear on the same declaration.
3127         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
3128         field, which points to a node holding the previous Spec_PPC_List.
3129         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
3130         through the indirection with Contract.
3131         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
3132         * par-prag.adb (Prag): do nothing on Test_Case pragma
3133         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
3134         be called directly.
3135         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
3136         component Ensures of Test_Case.
3137         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
3138         (Analyze_Generic_Subprogram_Declaration,
3139         Analyze_Subprogram_Instantiation,
3140         Analyze_Abstract_Subprogram_Declaration,
3141         Analyze_Subprogram_Body_Helper,
3142         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
3143         insert contract in subprogram node at point of definition
3144         * sem_ch13.adb
3145         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
3146         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
3147         corresponding pragma
3148         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
3149         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
3150         similar to the analysis of pre/post
3151         (Derive_Subprogram): insert contract in subprogram node at point of
3152         derivation.
3153         * sem_prag.adb, sem_prag.ads
3154         (Check_Arg_Is_String_Literal, Check_Identifier):
3155         new checking procedures to be called in treatment of pragmas
3156         (Check_Test_Case): new procedure to check that a Test_Case aspect or
3157         pragma is well-formed. This does not check currently that 'Result is
3158         used only in the Ensures component of a Test_Case.
3159         (Analyze_Pragma): add case for Test_Case
3160         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
3161         components of a Test_Case.
3162         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
3163         expressions in the 3rd (and 4th if present) arguments of a Test_Case
3164         pragma, treated as spec expressions.
3165         (Sig_Flags): add value -1 for Test_Case.
3166         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
3167         Get_Requires_From_Test_Case_Pragma): getters for both expression
3168         components of a Test_Case.
3169         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
3170         indirection between an entry or [generic] subprogram entity and its
3171         pre/post + test-cases.
3172         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
3173         get/set for fields of an N_Contract node.
3174         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
3175         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
3176         names and pragma for Test_Case.
3177         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
3178
3179 2011-08-04  Vincent Celier  <celier@adacore.com>
3180
3181         * gnat_ugn.texi: Improve documentation of gnatmake switch
3182         --source-info-file=.
3183
3184 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3185
3186         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
3187         type). Initialize Atyp to the appropriate type which is later checked
3188         for completion. Rewrite the assertion associated with private type
3189         completion.
3190
3191 2011-08-04  Ed Falis  <falis@adacore.com>
3192
3193         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
3194         initialize the number of CPUs.
3195
3196 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3197
3198         * sem_type.adb (Disambiguate): New subsidiary routine
3199         In_Same_Declaration_List, to implement AI05-0020: a user-defined
3200         equality on an anonymous access type whose designated type is private
3201         does not lead to an ambiguity with the universal access equality
3202         operator in the body or child units of the defining package. The same
3203         is true for a multiplication operator on a private type completed with
3204         a fixed-point-type.
3205
3206 2011-08-04  Javier Miranda  <miranda@adacore.com>
3207
3208         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
3209         (Normalize_Scalars_Config): Removed.
3210         * opt.adb
3211         (Register_Opt_Config_Switches): Remove registering config values of
3212         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
3213         (Restore_Opt_Config_Switches): Remove code which restores the values of
3214         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3215         Init_Or_Norm_Scalars.
3216         (Save_Opt_Config_Switches): Remove code which saves values of
3217         Init_Or_Norm_Scalars and Normalize_Scalars.
3218         (Set_Opt_Config_Switches): Remove code which restores config values of
3219         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3220         Init_Or_Norm_Scalars.
3221
3222 2011-08-04  Yannick Moy  <moy@adacore.com>
3223
3224         * frontend.adb (Frontend): remove previous patch to avoid full
3225         qualification in ALFA mode.
3226         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
3227         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
3228         unique name for an entity, which could be used to identify the entity
3229         across compilation units.
3230
3231 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3232
3233         * prj-env.adb
3234         (Initialize_Default_Project_Path): Add target specific directory
3235         ($prefix/$target/lib/gnat) in front of project path in all cases
3236         (making gnatmake's behaviour consistent with gprbuild).
3237         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
3238         Pass target name from Sdefault to project subsystem.
3239         * gnatls.adb: Show new target specific default project directory.
3240
3241 2011-08-04  Johannes Kanig  <kanig@adacore.com>
3242
3243         * cstand.adb: Add Information to Identifier in Standard
3244         (Identifer_For): Set Entity to the corresponding entity
3245
3246 2011-08-04  Sergey Rybin  <rybin@adacore.com>
3247
3248         * gnat_ugn.texi: Update doc on gnatcheck.
3249
3250 2011-08-04  Yannick Moy  <moy@adacore.com>
3251
3252         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
3253         xrefs in a scope.
3254
3255 2011-08-04  Yannick Moy  <moy@adacore.com>
3256
3257         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
3258         performing expansion.
3259         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
3260         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
3261         it is not called in ALFA mode.
3262
3263 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3264
3265         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
3266         after all, so removed.
3267
3268 2011-08-04  Sergey Rybin  <rybin@adacore.com>
3269
3270         * vms_data.ads: Add missing VMS qualifiers.
3271
3272 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3273
3274         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
3275         the list of files on the command line after processing it through
3276         Complete_Mains.
3277
3278 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3279
3280         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
3281         processing for .NET/JVM. These targets can now benefit from
3282         Raise_From_Controlled_Operation and they share the same processing with
3283         standard targets.
3284         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
3285         These targets need transient scopes in order to properly finalize short
3286         lived controlled objects.
3287         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
3288          NET/JVM. These targets can now benefit from
3289         Raise_From_Controlled_Operation and they share the same processing with
3290         standard targets.
3291
3292 2011-08-04  Geert Bosch  <bosch@adacore.com>
3293
3294         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
3295
3296 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3297
3298         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
3299         Expand_Record_Aggregate, to determine whether aggregate must be
3300         expanded into assignments. This is the case if the ancestor part is
3301         private, regarless of the setting of the flag Has_Private_Ancestor.
3302
3303 2011-08-04  Ed Falis  <falis@adacore.com>
3304
3305         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
3306
3307 2011-08-04  Bob Duff  <duff@adacore.com>
3308
3309         * sinfo.ads: Fix comment.
3310
3311 2011-08-04  Steve Baird  <baird@adacore.com>
3312
3313         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
3314         choose a package name in much the same way as is
3315         done for JGNAT when VM_Target /= No_VM, except that
3316         a slightly more distinctive prefix string is used.
3317
3318 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3319
3320         * makeutl.adb (Complete_Mains): no longer accept unit names on the
3321         gnatmake command line.
3322         This behavior was never documented (and was supported only because of
3323         an early bug in the code). This case might lead to ambiguous cases
3324         (between unit names and truncated base names without suffixes).
3325
3326 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3327
3328         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
3329         Remove the external tag of a tagged type from the internal hash table.
3330         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
3331         expanded usage of the routine. Strenghten the check for Is_Master. Add
3332         processing for tagged types.
3333         (Build_Finalizer): Create all the necessary lists used in finalizer
3334         creation when the processed context is a package that may contain
3335         tagged types.
3336         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
3337         Requires_Cleanup_Actions.
3338         (Expand_N_Package_Body): Package bodies may need clean up code
3339         depending on whether they contain tagged types.
3340         (Expand_N_Package_Declaration): Package declarations may need clean up
3341         code depending on whether they contain tagged types.
3342         (Unregister_Tagged_Types): New routine. Search through a list of
3343         declarations or statements, looking for non-abstract Ada tagged types.
3344         For each such type, generate code to unregister the external tag.
3345         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
3346         Requires_Cleanup_Actions.
3347         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
3348         through a list of declarations or statements looking for non-abstract
3349         Ada tagged types or controlled objects.
3350         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
3351         Requires_Cleanup_Actions.
3352         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
3353         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
3354         RE_Unit_Table.
3355
3356 2011-08-04  Vincent Celier  <celier@adacore.com>
3357
3358         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
3359         has Ada sources, not project Project, because if the root project
3360         Project has no sources of its own, all projects will be deemed without
3361         sources.
3362
3363 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3364
3365         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
3366         of the No_Param_Proc acc-to-subp type used for initialization of
3367         __gnat_finalize_library_objects so that it's declared at library level
3368         rather than nested inside of the adainit routine.
3369
3370 2011-08-04  Javier Miranda  <miranda@adacore.com>
3371
3372         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
3373         if the tagged type has a representation clause which specifies its
3374         external tag.
3375
3376 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3377
3378         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
3379         Remove previous procedure with that name.
3380         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
3381         when appropriate.
3382         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
3383         subtype mark, the ancestor cannot have unknown discriminants.
3384         (Resolve_Record_Aggregate): if the type has invisible components
3385         because of a private ancestor, the aggregate is illegal.
3386
3387 2011-08-04  Vincent Celier  <celier@adacore.com>
3388
3389         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
3390         account switches -gnat2005, -gnat12 and -gnat2012.
3391
3392 2011-08-04  Bob Duff  <duff@adacore.com>
3393
3394         * s-tasdeb.ads: Minor comment fix.
3395
3396 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3397
3398         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
3399         CodePeer mode.
3400         * switch.ads, switch.adb (Is_Language_Switch): New function.
3401
3402 2011-08-04  Vincent Celier  <celier@adacore.com>
3403
3404         * switch-c.adb: Minor comment addition.
3405
3406 2011-08-04  Vincent Celier  <celier@adacore.com>
3407
3408         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
3409         ending with '=' is followed by a space (missing file name).
3410
3411 2011-08-04  Pascal Obry  <obry@adacore.com>
3412
3413         * g-regist.ads: Fix size of HKEY on x86_64-windows.
3414
3415 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3416
3417         * sem_ch12.adb (Analyze_Associations): New routine
3418         Check_Overloaded_Formal_Subprogram to reject a formal package when
3419         there is a named association or a box initialisation for an overloaded
3420         formal subprogram of the corresponding generic.
3421
3422 2011-08-04  Yannick Moy  <moy@adacore.com>
3423
3424         * alfa.ads (ALFA_Xref_Record): add component for type of entity
3425         * get_alfa.adb, put_alfa.adb: Read and write new component of
3426         cross-reference.
3427         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
3428
3429 2011-08-04  Pascal Obry  <obry@adacore.com>
3430
3431         * urealp.adb: Minor reformatting.
3432
3433 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3434
3435         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
3436         Handle the case when Cleanup_Protected_Object returns Empty.
3437
3438 2011-08-04  Yannick Moy  <moy@adacore.com>
3439
3440         * frontend.adb (Frontend): only qualify names in non-ALFA mode
3441
3442 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3443
3444         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
3445         call, ignore functions.
3446
3447 2011-08-04  Geert Bosch  <bosch@adacore.com>
3448
3449         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
3450         point.
3451
3452 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3453
3454         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
3455         as an index for Builder'Switches. This conforms to the documentation.
3456         * make.adb (Insert_Project_Sources): avoid duplicate code
3457
3458 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3459
3460         * makeutl.adb (Complete_Mains): if the user has passed a relative file
3461         name on the command line (for instance "../dummy"), never assume it can
3462         be a unit name.
3463
3464 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3465
3466         * bindgen.adb: Remove code the reference or create the
3467         Break_Start/__gnat_break_start procedure.
3468         * s-stalib.adb (Break_Start): Removed.
3469
3470 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3471
3472         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
3473         shared with gprbuild.
3474
3475 2011-08-04  Yannick Moy  <moy@adacore.com>
3476
3477         * par-ch4.adb (P_Primary): preferentially issue an error message about
3478         a missing parenthesis arount a conditional or case expression in Ada
3479         2012 mode, if we detect that the alignment is not correct for a
3480         statement.
3481
3482 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3483
3484         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
3485         tag-to-class-wide conversion as needing finalization actions.
3486         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
3487         a tag-to-class-wide conversion as needing finalization actions.
3488         (Is_Finalizable_Transient): The result of a tag-to-class-wide
3489         conversion does not need finalization actions.
3490         (Is_Tag_To_CW_Conversion): New routine.
3491         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
3492         whether an object is the result of a tag-to-class-wide conversion.
3493
3494 2011-08-04  Yannick Moy  <moy@adacore.com>
3495
3496         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
3497         the left-hand-side and right-hand-side of a conjunct are inserted when
3498         translating a pre- or postcondition
3499         * sem_ch6.adb: Correct typo in comment
3500
3501 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3502
3503         * gnat_rm.texi: Ravenscar does not prohibit dependence on
3504         Unchecked_Conversion and Unchecked_Deallocation.
3505
3506 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3507
3508         * make.adb: Minor reformatting.
3509
3510 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3511
3512         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
3513         sources in the project and its imported projects, but not in the whole
3514         tree.
3515
3516 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3517
3518         * make.adb: Remove debug trace.
3519
3520 2011-08-04  Vincent Celier  <celier@adacore.com>
3521
3522         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
3523         path in canonical form, to be able to compare path names on platforms
3524         such as Windows or Darwin.
3525
3526 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3527
3528         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
3529         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
3530         * scos.ads: Update documentation accordingly.
3531         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
3532         pragmas.
3533
3534 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3535
3536         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
3537         attribute only if prefix type is scalar.
3538
3539 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3540
3541         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
3542         in gnatmake for specifying mains on the command line that do not belong
3543         to the main project. These mains must currently all belong to the same
3544         project, though.
3545         (Ultimate_Extension_Of): removed, since duplicated
3546         Ultimate_Extending_Project.
3547
3548 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3549
3550         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
3551         instead.
3552         (CodePeer_Mode_String): New.
3553         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
3554         CodePeer mode.
3555         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
3556         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
3557         mode, since no useful elaboration subprogram is needed by CodePeer.
3558         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
3559         In this mode, compile binder file with -gnatC and do stop after this
3560         step.
3561
3562 2011-08-04  Vincent Celier  <celier@adacore.com>
3563
3564         * exp_ch7.adb: Minor comment fix.
3565
3566 2011-08-04  Robert Dewar  <dewar@adacore.com>
3567
3568         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
3569         exp_ch4.adb, makeutl.adb: Minor reformatting.
3570
3571 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3572
3573         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
3574         Create several new subprograms to move code out of Make. This makes the
3575         code more readable, removes code duplication, and is a preparation work
3576         for adding support for aggregate projects.
3577
3578 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3579
3580         * s-po32gl.ads, s-po32gl.adb: New files.
3581         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
3582         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
3583         (Build_Finalization_Collection): Use it.
3584         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
3585         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
3586         literals.
3587         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
3588         * gcc-interface/Make-lang.in: Update dependencies.
3589
3590 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3591
3592         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
3593         the command line.
3594
3595 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3596
3597         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
3598         command line is not a file name, also check whether it could be a unit
3599         name.
3600
3601 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3602
3603         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
3604         the header of the finalization routine.
3605         If the unit has no finalizer but is a body whose spec has one, then
3606         generate the decrement of the elaboration entity only.
3607         If the unit has a finalizer and is a spec, then do not generate the
3608         decrement of the elaboration entity.
3609         (Gen_Finalize_Library_C): Likewise.
3610
3611 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3612
3613         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
3614         (Bounds_Size_Expression): Removed.
3615         (Double_Alignment_Of): New subsidiary routine.
3616         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
3617         for a hole in the dope vector of unconstrained arrays due to different
3618         index and element alignments.
3619
3620 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3621
3622         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
3623         raise program_error because body has not been seen yet.
3624
3625 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3626
3627         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
3628         an unresolved name.
3629
3630 2011-08-04  Vincent Celier  <celier@adacore.com>
3631
3632         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
3633
3634 2011-08-04  Yannick Moy  <moy@adacore.com>
3635
3636         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
3637         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
3638
3639 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3640
3641         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
3642         instantiation in RCI.
3643
3644 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3645
3646         * make.adb: Share more code with gprbuild
3647
3648 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3649
3650         * projects.texi: Added documentation for the IDE'Gnat project file
3651         attribute.
3652
3653 2011-08-04  Nicolas Roche  <roche@adacore.com>
3654
3655         * gnat_rm.texi: Minor editing.
3656
3657 2011-08-04  Javier Miranda  <miranda@adacore.com>
3658
3659         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
3660         and the library case for VM targets.
3661         (Gen_Adainit_Ada): Likewise.
3662
3663 2011-08-04  Robert Dewar  <dewar@adacore.com>
3664
3665         * g-altive.ads: Minor comment updates.
3666         * prj-nmsc.adb: Minor reformatting.
3667
3668 2011-08-04  Javier Miranda  <miranda@adacore.com>
3669
3670         * opt.ads
3671         (Normalize_Scalars_Config): Value of the configuration switch set by
3672         pragma Normalize_Scalars when it appears in the gnat.adc file.
3673         (Normalize_Scalars): New field for record Config_Switches_Type. Used
3674         to save and restore settings of this pragma.
3675         * opt.adb
3676         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
3677         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
3678
3679 2011-08-04  Vincent Celier  <celier@adacore.com>
3680
3681         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
3682
3683 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3684
3685         * makeutl.adb: Minor reformatting.
3686
3687 2011-08-04  Olivier Hainque  <hainque@adacore.com>
3688
3689         * g-altive.ads: Update comments to reflect that only the soft
3690         binding is available today.
3691
3692 2011-08-04  Robert Dewar  <dewar@adacore.com>
3693
3694         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
3695         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
3696         * gcc-interface/Make-lang.in: Update dependencies.
3697
3698 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3699
3700         * prj-env.adb: Remove local debug traces.
3701
3702 2011-08-04  Yannick Moy  <moy@adacore.com>
3703
3704         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
3705         was used instead of Hi_OK, which could cause a read of an uninitialized
3706         value later on. Detected while working on the new warning.
3707         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
3708         to local variable.
3709         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
3710         in more cases, in order to detect more unreferenced values.
3711         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
3712         object for expression, if any.
3713
3714 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3715
3716         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
3717         the operand types instead of the Esize.
3718
3719 2011-08-04  Steve Baird  <baird@adacore.com>
3720
3721         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
3722         enable CodePeer_Mode.
3723         * bindusg.adb (Display): Add help message describing -P binder switch.
3724         * gnat_ugn.texi: Document -P binder switch.
3725         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
3726         user-defined main program directly.
3727         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
3728         user-defined main program in the context clause of the package body.
3729
3730 2011-08-04  Yannick Moy  <moy@adacore.com>
3731
3732         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
3733         duplicate of Defining_Entity
3734         (Get_Unique_Entity_For_Decl): rename function into
3735         Unique_Defining_Entity
3736         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
3737         (Formal_Proof_On): remove synthesized flag
3738         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3739         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
3740         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
3741         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
3742         Annotate (Formal_Proof)
3743
3744 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3745
3746         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
3747         source files with non-standard naming schemes, in imported projects
3748
3749 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3750
3751         * makeutl.adb (Complete_Mains): when a multi-unit source file is
3752         specified on the gprbuild command line, we need to compile all units
3753         within that file, not just the first one we find
3754         Fix error message for mains that are not found.
3755
3756 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3757
3758         * sem_ch6.adb: Update comment.
3759         * sem_ch12.adb: Minor reformatting.
3760
3761 2011-08-04  Bob Duff  <duff@adacore.com>
3762
3763         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
3764         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
3765         race condition whose symptom is to fail to lock Parent. That, in turn,
3766         causes Parent.Awake_Count to be accessed without locking Parent, which
3767         causes another race condition whose symptom is that Parent.Awake_Count
3768         can be off by 1 (either too high or too low). The solution is to lock
3769         Parent unconditionally, and then lock Acceptor, before reading
3770         Acceptor.Terminate_Alternative.
3771
3772 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3773
3774         * debug.adb: Update comment.
3775
3776 2011-08-04  Robert Dewar  <dewar@adacore.com>
3777
3778         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
3779         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
3780         exp_ch6.adb: Minor reformatting.
3781
3782 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3783
3784         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
3785         checks for -gnateE.
3786
3787 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3788
3789         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
3790
3791 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3792
3793         * sinfo.ads: Minor reformatting.
3794
3795 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3796
3797         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
3798         even if there is no location.
3799
3800 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3801
3802         * sem_res.adb, sem_ch4.adb: move check for restriction
3803         No_Task_Hierarchy to resolve_allocator.
3804
3805 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3806
3807         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
3808         This flag of N_Pragma nodes is not used, remove it as well as all of
3809         the associated circuitry.
3810
3811 2011-08-04  Javier Miranda  <miranda@adacore.com>
3812
3813         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
3814         runtime check on duplicated externa tags
3815         * debug.adb Document switch -gnatdQ.
3816
3817 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3818
3819         * a-fihema.ads: Minor typo fix.
3820
3821 2011-08-04  Yannick Moy  <moy@adacore.com>
3822
3823         * sem_ch10.adb: Minor comment update.
3824
3825 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3826
3827         * einfo.adb: Update the node field usage to reflect the renaming of
3828         Return_Flag to Return_ Flag_Or_Transient_Decl.
3829         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
3830         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
3831         (Write_Field15_Name): Change Return_Flag to
3832         Return_Flag_Or_Transient_Decl.
3833         * einfo.ads: Rename node field Return_Flag to
3834         Return_Flag_Or_Transient_Decl. Update the associated comment and all
3835         occurrences in entities.
3836         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
3837         associated Inline pragma.
3838         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
3839         associated Inline pragma.
3840         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
3841         routine.
3842         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
3843         Return_Flag and Set_Return_Flag.
3844         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
3845         objects generated for controlled transients declared inside an
3846         Exception_With_Actions. Update the calls to Return_Flag.
3847         (Process_Object_Declaration): Add code to add a null guard for hook
3848         objects generated for controlled transients declared inside an
3849         Exception_With_Actions. Update related comment.
3850         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
3851         objects generated for controlled transients declared inside an
3852         Exception_With_Actions. Update the calls to Return_Flag.
3853         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
3854
3855 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3856
3857         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
3858         positional aggregate.
3859
3860 2011-08-04  Vincent Celier  <celier@adacore.com>
3861
3862         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
3863         SLOC only for pragmas.
3864
3865 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3866
3867         * projects.texi: Minor typo fix.
3868
3869 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3870
3871         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
3872         on case-sensitive file systems.
3873
3874 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3875
3876         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
3877         nested in a disabled pragma.
3878         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
3879         enclosing pragma, if any, for X decisions.
3880
3881 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3882
3883         * sem_prag.adb: Minor reformatting.
3884
3885 2011-08-04  Vincent Celier  <celier@adacore.com>
3886
3887         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
3888         allowed in no run time mode.
3889
3890 2011-08-04  Vincent Celier  <celier@adacore.com>
3891
3892         * make.adb (Check): When -gnatc is used, check for the source file
3893         inside the ALI file with a canonical case file name.
3894
3895 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3896
3897         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
3898         overriding the separator.
3899
3900 2011-08-04  Robert Dewar  <dewar@adacore.com>
3901
3902         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
3903         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
3904
3905 2011-08-04  Robert Dewar  <dewar@adacore.com>
3906
3907         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
3908
3909 2011-08-04  Yannick Moy  <moy@adacore.com>
3910
3911         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
3912         'Result only appears in postcondition of function.
3913
3914 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3915
3916         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
3917         external tag, include the value of the external tag in the exception
3918         message.
3919
3920 2011-08-04  Yannick Moy  <moy@adacore.com>
3921
3922         * sem_attr.adb (Result): modify error message for misplaced 'Result
3923
3924 2011-08-04  Sergey Rybin  <rybin@adacore.com>
3925
3926         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
3927         clear that the second argument must be an identifier.
3928
3929 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3930
3931         * exp_ch9.adb (Build_Barrier_Function): When compiling with
3932         -fpreserve-control-flow, insert an IF statement on the barrier
3933         condition to ensure that a conditional branch instruction is generated.
3934
3935 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3936
3937         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
3938         (Processing_Flags.Ignore_Missing_With): new flag.
3939
3940 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3941
3942         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
3943         Source_List_File on case-insensitive systems where the file is actually
3944         on a case-sensitive file system (NFS,...).
3945
3946 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3947
3948         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
3949         function return contains a controlled [extension] aggregate and the
3950         return statement is not part of a handled sequence of statements, wrap
3951         the return in a block. This ensures that all controlled temporaries
3952         generated during aggregate resolution will be picked up by the
3953         finalization machinery.
3954
3955 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3956
3957         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
3958         components, freeze type before resolution, to ensure that default
3959         initializations are present for all components.
3960         * sem_res.adb (Resolve_Actuals): the designated object of an
3961         accces-to-constant type is a legal actual in a call to an
3962         initialization procedure.
3963
3964 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3965
3966         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
3967         N_Unchecked_Type_Conversion to the possible containers of a renamed
3968         transient variable.
3969
3970 2011-08-04  Yannick Moy  <moy@adacore.com>
3971
3972         * par-ch13.adb (Aspect_Specifications_Present): recognize
3973         "with Identifier'Class =>" as an aspect, so that a meaningful warning
3974         is issued in Strict mode.
3975         * par.adb: Fix typos in comments.
3976
3977 2011-08-04  Yannick Moy  <moy@adacore.com>
3978
3979         * sem_attr.adb (Result): modify error message to take into account Post
3980         aspect when compiling Ada 2012 (or newer) code.
3981
3982 2011-08-04  Nicolas Roche  <roche@adacore.com>
3983
3984         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
3985         remove need for GCC exceptions.
3986
3987 2011-08-04  Vincent Celier  <celier@adacore.com>
3988
3989         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
3990         project, not the source file name.
3991         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
3992         excluded, continue looking. This excluded source will only be returned
3993         if there is no other source with the same base name that is not locally
3994         removed.
3995
3996 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3997
3998         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
3999         private and one of the operands is a real literal, use a qualified
4000         expression rather than a conversion which is not meaningful to the
4001         back-end.
4002
4003 2011-08-04  Yannick Moy  <moy@adacore.com>
4004
4005         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
4006         corresponding aspect X'Class are allowed, proceed with analysis of the
4007         aspect instead of skipping it.
4008
4009 2011-08-04  Tristan Gingold  <gingold@adacore.com>
4010
4011         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
4012         This will allow to have an Ada implementation for the subprogram.
4013
4014 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4015
4016         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
4017         completion and aspects are present, apply them to the entity for the
4018         type which is currently the partial view, but which is the one that
4019         will be frozen.
4020         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
4021         applies to a partial view, indicate that the full view has predicates
4022         and delayed aspects.
4023         (Replace_Type_Reference): Handle properly predicates that apply to the
4024         full view of a private completion.
4025
4026 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4027
4028         * layout.adb (Layout_Type): For composite types, do not set Esize.
4029         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
4030         set Esize.
4031         (Size_Known): Look at the RM size of components instead of the Esize.
4032         (Freeze_Record_Type): Look at the RM size instead of the Esize to
4033         issue warning and activate Implicit_Packing.
4034         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
4035         if the Esize is not known.
4036         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
4037         for elementary types only.
4038         (Analyze_Record_Representation_Clause): Look at the RM size instead
4039         of the Esize to issue errors.
4040         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
4041         is not known.
4042         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
4043         obsolete block.
4044         Look at the RM size instead of the Esize for types if the latter is
4045         not known.
4046         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
4047
4048 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4049
4050         * sem_type.adb: proper handling of equality not involving anonymous
4051         access types.
4052
4053 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4054
4055         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
4056         Vis_Decls. When creating a library-level finalizer for a package spec,
4057         both the declaration and body of the finalizer are inserted either in
4058         the visible or private declarations of the package spec.
4059
4060 2011-08-04  Javier Miranda  <miranda@adacore.com>
4061
4062         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
4063         use of the full-view of a type when invoking Is_Ancestor.
4064         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
4065         the full-view of private parents is requested, then use also the
4066         full-view of the parent of the first derivation.
4067
4068 2011-08-04  Tristan Gingold  <gingold@adacore.com>
4069
4070         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
4071         instead of the locally imported procedure.
4072         * s-taprop-mingw.adb (Enter_Task): Ditto.
4073         * s-valrea.adb (Scan_Real): Ditto.
4074         * s-imgrea.adb (Set_Image_Real): Ditto.
4075         * s-flocon.ads: Make the package pure.
4076
4077 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4078
4079         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
4080         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
4081         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
4082         New subprogram, moved here from...
4083         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
4084         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
4085         rewriting of the last argument into a procedure call statement here...
4086         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
4087         instead.
4088
4089 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4090
4091         * par_sco.adb: Minor reformatting.
4092
4093 2011-08-04  Robert Dewar  <dewar@adacore.com>
4094
4095         * erroutc.adb: Minor reformatting.
4096
4097 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4098
4099         * par_sco.adb: Comment update.
4100
4101 2011-08-04  Tristan Gingold  <gingold@adacore.com>
4102
4103         * s-flocon.ads: New file.
4104         * g-flocon.ads: Now a renaming of s-flocon.
4105         * Makefile.rtl: Add s-flocon.o
4106
4107 2011-08-04  Javier Miranda  <miranda@adacore.com>
4108
4109         * exp_strm.adb (Build_Array_Input_Function): if the array type is
4110         constrained, do not attempt to build a subtype of it.
4111
4112 2011-08-04  Yannick Moy  <moy@adacore.com>
4113
4114         * errout.ads Change comments: remove 'R'M as an example where quotes
4115         are needed; add ALFA as another case where quotes are not needed
4116         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
4117         case where quotes are not needed.
4118         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4119         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
4120         Remove all occurrences of 'A'L'F'A
4121
4122 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4123
4124         * sem_ch13.adb: check legality of invariant pragma.
4125
4126 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4127
4128         * bindgen.adb: Add comments.
4129
4130 2011-08-04  Yannick Moy  <moy@adacore.com>
4131
4132         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
4133         synthesized flag.
4134         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
4135         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
4136
4137 2011-08-04  Robert Dewar  <dewar@adacore.com>
4138
4139         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
4140         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
4141         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
4142
4143 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4144
4145         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
4146
4147 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4148
4149         PR ada/47880
4150         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
4151         allocated object.
4152
4153 2011-08-04  Robert Dewar  <dewar@adacore.com>
4154
4155         * einfo.ads, exp_ch4.adb: Minor reformatting.
4156
4157 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
4158
4159         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
4160
4161 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4162
4163         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
4164         type in all cases to compute list of primitive operations, because full
4165         view may be an itype that is not attached to the list of declarations.
4166
4167 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4168
4169         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
4170         library has already been finalized.
4171         (Gen_Adafinal_C): Likewise.
4172         (Gen_Adainit_Ada): Generate an early return if the library has
4173         already been elaborated.
4174         (Gen_Adainit_C): Likewise.
4175         (Gen_Output_File_Ada): Generate an elaboration flag.
4176         (Gen_Output_File_C): Likewise.
4177
4178 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4179
4180         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
4181         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
4182         built in the first place.
4183         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
4184         for CodePeer because Finalize_Address was not built to begin with.
4185         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
4186
4187 2011-08-04  Pascal Obry  <obry@adacore.com>
4188
4189         * adaint.c (__gnat_tmp_name): Use current process id to create temp
4190         filenames, this ensures unicity of filenames across processes.
4191
4192 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4193
4194         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
4195         Raise_Controlled to Raise_From_Controlled_Operation. Update the
4196         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
4197         Add False as the actual to From_Abort in the generated call to
4198         Raise_From_Controlled_Operation.
4199
4200 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
4201
4202         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
4203         so that the ali file name can be retrieved from outside of this package.
4204         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
4205         doing nothing in the general case, but used to update the object file
4206         timestamp if directly generated by the backend.
4207         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
4208         to a later time than the ali file one.
4209
4210 2011-08-04  Yannick Moy  <moy@adacore.com>
4211
4212         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
4213         entities whose body contains an Annotate pragma which forces formal
4214         proof on this body.
4215         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4216         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
4217         Mark_Non_ALFA_Subprogram to pass in a message and node.
4218         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
4219         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
4220         surrounding subprogram.
4221         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
4222         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
4223         as not in ALFA is annotated with Formal_Proof being On, then an error
4224         is issued based on the additional parameters for message and node.
4225         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
4226         * gcc-interface/Make-lang.in: Update dependencies.
4227
4228 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4229
4230         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
4231         Finalize_Address when CodePeer is enabled.
4232
4233 2011-08-04  Pascal Obry  <obry@adacore.com>
4234
4235         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
4236         the latter returns a pointer to a static buffer which is deallocated
4237         at the end of the routine.
4238
4239 2011-08-04  Yannick Moy  <moy@adacore.com>
4240
4241         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
4242         after index creation; mark unconstrained base array type generated as
4243         being in/not in ALFA as well
4244         (Make_Index): mark subtype created as in/not in ALFA
4245         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
4246         over a loop as in/not in ALFA, depending on its type and form of loop
4247         iteration.
4248
4249 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4250
4251         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
4252         directly to False on .NET and JVM.
4253
4254 2011-08-04  Yannick Moy  <moy@adacore.com>
4255
4256         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
4257         constraint that subtype must come from source code to be in ALFA, so
4258         that anonymous subtypes can be in ALFA too.
4259
4260 2011-08-04  Yannick Moy  <moy@adacore.com>
4261
4262         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
4263         reference for ALFA mode.
4264         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
4265         procedure public so as to use it from formal verification back-end.
4266
4267 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
4268
4269         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
4270         invalid checks of the Parameter, making Remove_Switch not working
4271         correctly.
4272
4273 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
4274
4275         * targparm.ads: Update header: no run-time exception is needed on this
4276         file.
4277
4278 2011-08-04  Vincent Celier  <celier@adacore.com>
4279
4280         * a-fihema.adb: Use System.IO instead of GNAT.IO
4281
4282 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4283
4284         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
4285         are forbidden in Compiler_Unit mode.
4286
4287 2011-08-04  Robert Dewar  <dewar@adacore.com>
4288
4289         * sem_util.adb: Minor reformatting.
4290
4291 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4292
4293         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
4294         library-level finalizers.
4295         (Gen_Finalize_Library_C): Update the import string for library-level
4296         finalizers.
4297         (Gen_Finalize_Library_Defs_C): Update the definition name of a
4298         library-level finalizer.
4299         * exp_ch7.adb: Remove with and use clauses for Stringt.
4300         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
4301         Spec_Decl. Add local variable Body_Id. The names of library-level
4302         finalizers are now manually fully qualified and are no longer external.
4303         A single name is now capable of servicing .NET, JVM and non-VM targets.
4304         Pragma Export is no longer required to provide visibility for the name.
4305         (Create_Finalizer_String): Removed.
4306         (New_Finalizer_Name): New routine which mimics New_..._Name.
4307
4308 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4309
4310         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
4311         elaboration counter to Standard_Short_Integer.
4312         * sem_util.adb (Build_Elaboration_Entity): Likewise.
4313         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
4314         (Gen_Elab_Externals_C): Likewise.
4315
4316 2011-08-04  Ed Falis  <falis@adacore.com>
4317
4318         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
4319         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
4320         system-vxworks-mips.ads, system-vxworks-x86.ads
4321         (Always_Compatible_Rep): set to False for all VxWorks targets.
4322
4323 2011-08-04  Robert Dewar  <dewar@adacore.com>
4324
4325         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
4326         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
4327         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
4328         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
4329         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
4330         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
4331         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
4332         Minor reformatting and code reorganization.
4333
4334 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4335
4336         * projects.texi: Added doc for aggregate projects.
4337
4338 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4339
4340         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
4341         Add support for overriding the Project_Path in aggregate projects.
4342
4343 2011-08-04  Robert Dewar  <dewar@adacore.com>
4344
4345         * a-cofove.ads: Minor reformatting.
4346
4347 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4348
4349         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
4350         on the generated code.
4351         (Build_Finalize_Statements): Update the comment on the generated code.
4352         (Build_Initialize_Statements): Update the comment on the generated code.
4353         (Build_Object_Declarations): Add local variable Result. The object
4354         declarations are now built in sequence.
4355         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
4356         RE_Unit_Table.
4357
4358 2011-08-04  Robert Dewar  <dewar@adacore.com>
4359
4360         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
4361
4362 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4363
4364         * einfo.ads (Elaboration_Entity): Document new definition and use.
4365         (Elaboration_Entity_Required): Adjust to above change.
4366         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
4367         * exp_ch12.adb: And with and use for Snames.
4368         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
4369         * exp_util.adb (Set_Elaboration_Flag): Likewise.
4370         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
4371         <Check_Unit_Name>: Deal with N_Expanded_Name.
4372         <Attribute_Elaborated>: Extend to all unit names.
4373         * sem_elab.adb: And with and use for Uintp.
4374         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
4375         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
4376         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
4377         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
4378         from Gen_Adainit_Ada.
4379         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
4380         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
4381         case, do not call System.Standard_Library.Adafinal; instead call
4382         finalize_library if needed.
4383         (Gen_Adafinal_C): Likewise.
4384         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
4385         non-main program case.
4386         (Gen_Adainit_C): Generate a couple of external declarations here.
4387         In the main program case, set SSL.Finalize_Library_Objects.
4388         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
4389         (Gen_Elab_Calls_C): Likewise.
4390         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
4391         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
4392         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
4393         objects here.
4394         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
4395         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
4396         Gen_Adafinal_Ada.
4397         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
4398         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
4399         of external declarations.  Call Gen_Finalize_Library_C.
4400
4401 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4402
4403         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
4404         Compute_Compilation_Phases): new subprogram.
4405         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
4406         The number of mains as well as the various compilation phases that
4407         need to be run are now project tree specific, since various
4408         aggregated trees might have different requirements. In particular,
4409         they do not all require bind or link phases.
4410
4411 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4412
4413         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
4414         (Project_Tree_Appdata): New type.
4415         It is now possible to associate application-specific data to a project
4416         tree. In particular, this is used in the gprbuild builder to avoid a
4417         number of global tables and htables, especially now that there can be
4418         several project trees loaded at once because of aggregate projects.
4419         (Debug_Name): new procedure.
4420         * projects.texi: Clarify syntax of "**" for Source_Dirs
4421
4422 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4423
4424         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
4425         the "roots" for a main.
4426         (Fill_From_Project): add support for aggregate projects. Main units
4427         in aggregated projects are now automatically added in the list of
4428         files to build (although this fails later on in gprbuild, because
4429         these files are not using the root proejct tree, so this needs
4430         further cleanup)
4431         * gcc-interface/Make-lang.in: Update dependencies.
4432
4433 2011-08-03  Yannick Moy  <moy@adacore.com>
4434
4435         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
4436         conditional expression in ALFA.
4437         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
4438         expressions as not in ALFA.
4439
4440 2011-08-03  Robert Dewar  <dewar@adacore.com>
4441
4442         * a-cofove.adb: Minor reformatting.
4443
4444 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4445
4446         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
4447         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
4448         gprbuild sources.
4449         These packages are more logically placed in the Queue package, since
4450         they manipulate the queue. It is also likely that they can be adapted
4451         for gnatmake, thus sharing more code.
4452         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
4453         that we could move the above.
4454
4455 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4456
4457         * errutil.adb (Finalize): clean up the list of error messages on exit.
4458         Calling this subprogram multiple times will no longer show duplicate
4459         error messages on stderr.
4460
4461 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4462
4463         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
4464         Getopt_Switches when we have already define a command line
4465         configuration.
4466
4467 2011-08-03  Yannick Moy  <moy@adacore.com>
4468
4469         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
4470         in ALFA. Instead, they are considered as assertions to prove.
4471         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
4472         nodes as not in ALFA. Instead, include conditional expressions in ALFA
4473         if they have no ELSE part, or if they occur in pre- and postconditions,
4474         where the Condition cannot have side-effects in ALFA
4475         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
4476         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
4477         Instead, include type conversion between scalar types in ALFA.
4478         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
4479         if-and-only-if its type is in ALFA.
4480
4481 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4482
4483         * scos.adb, get_scos.adb, put_scos.adb
4484         New code letter for decisions: G (entry guard)
4485         * par_sco.adb
4486         (Traverse_Subprogram_Body): Rename to...
4487         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
4488         (Traverse_Protected_Body): New subprogram
4489         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
4490         protected bodies and entry bodies.
4491
4492 2011-08-03  Yannick Moy  <moy@adacore.com>
4493
4494         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
4495         entities with get/set subprograms, which is set on procedure entities
4496         generated by the compiler for a postcondition.
4497         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
4498         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
4499         entity for a declaration
4500         (Get_Unique_Entity_For_Decl): new function returning an entity which
4501         represents a declaration, so that matching spec and body have the same
4502         entity.
4503
4504 2011-08-03  Robert Dewar  <dewar@adacore.com>
4505
4506         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
4507         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
4508
4509 2011-08-03  Yannick Moy  <moy@adacore.com>
4510
4511         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
4512         library-level because retriction No_Implicit_Dynamic_Code in the
4513         front-end prevents its definition as a local subprogram
4514         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
4515         for reuse in other contexts
4516         (Traverse_Declarations_Or_Statements,
4517         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4518         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
4519         procedures take a callback parameter to be called on all declarations
4520         * lib-xref.ads
4521         (Traverse_All_Compilation_Units): new generic function to traverse a
4522         compilation unit and call a callback parameter on all declarations
4523
4524 2011-08-03  Javier Miranda  <miranda@adacore.com>
4525
4526         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
4527         in Java since they are always enclosed in a namespace that
4528         differentiates them, and overloaded entities are supported by the VM.
4529
4530 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4531
4532         * checks.adb (Determine_Range): If a computed bound of an operation is
4533         outside the range of the base type of the expression, and overflow
4534         checks are enabled, the result is unknown and cannot be used for any
4535         subsequent constant folding.
4536         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
4537         unknown, so is the result of the comparison.
4538
4539 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4540
4541         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
4542         From_Abort. When finalization was triggered by an abort, propagate
4543         Standard'Abort_Signal rather than Program_Error.
4544         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
4545         From_Abort.
4546         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
4547         From_Abort. When finalization was triggered by an abort, propagate
4548         Standard'Abort_Signal rather than Program_Error.
4549         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
4550         From_Abort.
4551         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
4552         Abort_Id. Update the calls to Build_Object_Declarations and
4553         Build_Raise_Statement to include Abort_Id.
4554         (Build_Adjust_Statements): New local variable Abort_Id. Update the
4555         calls to Build_Object_Declarations and Build_Raise_Statement to include
4556         Abort_Id.
4557         (Build_Finalize_Statements): New local variable Abort_Id. Update the
4558         calls to Build_Object_Declarations and Build_Raise_Statement to include
4559         Abort_Id.
4560         (Build_Components): Create an entity for Abort_Id when exceptions are
4561         allowed on the target.
4562         (Build_Finalizer): New local variable Abort_Id.
4563         (Build_Initialize_Statements): New local variable Abort_Id. Update the
4564         calls to Build_Object_Declarations and Build_Raise_Statement to include
4565         Abort_Id.
4566         (Build_Object_Declarations): Add new formal Abort_Id. Create the
4567         declaration of flag Abort_Id to preserve the original abort status
4568         before finalization code is executed.
4569         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
4570         runtime routine Raise_From_Controlled_Operation.
4571         (Create_Finalizer): Update the call to Build_Raise_Statement to include
4572         Abort_Id. Update the call to Build_Object_Declarations to include
4573         Abort_Id. Update the layout of the finalizer body.
4574         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
4575         (Process_Transient_Objects): New local variable Abort_Id. Remove the
4576         clunky code to create all flags and objects related to
4577         exception propagation and replace it with a call to
4578         Build_Object_Declarations. Update the call to Build_Raise_Statement to
4579         include Abort_Id.
4580         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
4581         Add new formal Abort_Id and associated comment on its use.
4582         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
4583         on its use.
4584         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
4585         Remove the clunky code to create all flags and objects related to
4586         exception propagation and replace it with a call to
4587         Build_Object_Declarations. Update the call to Build_Raise_Statement.
4588
4589 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4590
4591         * s-tassta.adb: Fix minor typos.
4592
4593 2011-08-03  Robert Dewar  <dewar@adacore.com>
4594
4595         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
4596         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
4597
4598 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4599
4600         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
4601         to packages. This ensures that the finalizer body will not end up
4602         inside the freeze node.
4603         (Process_Declarations): Add code to detect whether a freeze node has a
4604         nested finalization collection.
4605
4606 2011-08-03  Pascal Obry  <obry@adacore.com>
4607
4608         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
4609         (Current_Session): Return a not null access to Session_Type.
4610         (Default_Session): Likewise.
4611
4612 2011-08-03  Robert Dewar  <dewar@adacore.com>
4613
4614         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
4615         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
4616
4617 2011-08-03  Pascal Obry  <obry@adacore.com>
4618
4619         * g-awk.ads: Minor comment fix.
4620
4621 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4622
4623         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4624         the tree structure related to discriminant constraints.
4625         Original_Discriminant cannot be used any more for computing the
4626         defining name for the reference to a discriminant.
4627
4628 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4629
4630         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
4631         function is not visibly tagged, this is not a dispatching call and
4632         therfore is not Tag_Indeterminate, even if the function is marked as
4633         dispatching on result.
4634
4635 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4636
4637         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
4638         (Expand_N_Free_Statement): Add a guard to protect against run-times
4639         which do not support controlled types.
4640         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
4641         against run-times which do not support controlled types.
4642         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
4643         against run-times which do not support controlled types.
4644         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
4645         against run-times which do not support controlled types.
4646         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
4647         protect against run-times which do not support controlled types.
4648
4649 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4650
4651         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
4652         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
4653
4654 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4655
4656         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
4657         modified in the source, to prevent spurious warnings when compiling
4658         with -gnatg.
4659
4660 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4661
4662         * a-except-2005.adb: Minor reformatting.
4663
4664 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4665
4666         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
4667         is a renaming declaration in the private part of a package, do not emit
4668         a warning that the with_clause could be moved because the renaming may
4669         be used in the body or in a child unit.
4670
4671 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4672
4673         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4674         Propagate the Comes_From_Source attribute from the original return
4675         object to the renaming.
4676
4677 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4678
4679         * exp_ch7.adb (Build_Raise_Statement): Do not call
4680         Raise_From_Controlled_Operation when this routine is not present in
4681         the run-time library.
4682         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
4683         libraries (Ravenscar), tasks are non-terminating, and protected objects
4684         and tasks can only appear at library level, so we do not want
4685         finalization of protected objects nor tasks.
4686         * exp_intr.adb: Minor clarification in comment.
4687         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
4688         Gen_Output_File_C): Remove references to finalization of library-level
4689         objects when using restricted run-time libraries.
4690
4691 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4692
4693         * sem_ch3.adb (Build_Discriminant_Constraints): Set
4694         Original_Discriminant only if the parent type is a generic formal.
4695
4696 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4697
4698         * exp_ch13.adb: Add with and use clause for Targparm;
4699         (Expand_N_Free_Statement): Prevent the generation of a custom
4700         Deallocate on .NET/JVM targets since this requires pools and address
4701         arithmetic.
4702         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
4703         .NET/JVM targets, attach the newly allocated object to the access
4704         type's finalization collection. Do not generate a call to
4705         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
4706         exist in the runtime.
4707         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
4708         create a custom Allocate for object that do not require initialization.
4709         Attach a newly allocated object to the access type's finalization
4710         collection on .NET/JVM.
4711         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
4712         assignment of controlled types on .NET/JVM. The two hidden pointers
4713         Prev and Next and stored and later restored after the assignment takes
4714         place.
4715         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
4716         kludge for .NET/JVM to recognize a particular piece of code coming from
4717         Heap_Management and change the call to Finalize into Deep_Finalize.
4718         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
4719         finalization collections on .NET/JVM only for types derived from
4720         Controlled. Separate the association of storage pools with a collection
4721         and only allow it on non-.NET/JVM targets.
4722         (Make_Attach_Call): New routine.
4723         (Make_Detach_Call): New routine.
4724         (Process_Object_Declarations): Suppress the generation of
4725         build-in-place return object clean up code on .NET/JVM since it uses
4726         pools.
4727         * exp_ch7.ads (Make_Attach_Call): New routine.
4728         (Make_Detach_Call): New routine.
4729         * exp_intr.adb Add with and use clause for Targparm.
4730         (Expand_Unc_Deallocation): Detach a controlled object from a collection
4731         on .NET/JVM targets.
4732         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
4733         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
4734         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
4735         names used in finalization.
4736
4737 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4738
4739         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
4740         (Attach, Detach): Lock the current task when chaining an object onto a
4741         collection.
4742
4743 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4744
4745         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
4746         Rewritten to create the message strings when the exception is not
4747         raised by an abort during finalization.
4748         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
4749         Raise_From_Controlled_Operation and update its associated comment.
4750         * a-fihema.ads, a-fihema.adb: New GNAT unit.
4751         Ada.Finalization.Heap_Management provides key functionality
4752         associated with controlled objects on the heap, their creation,
4753         finalization and reclamation. Type Finalization_Collection is
4754         effectively a wrapper which sits ontop of a storage pool and performs
4755         all necessary bookkeeping for all the objects it contains. Each
4756         access-to-controlled or access-to-class-wide type receives a collection
4757         as part of its expansion. The compiler generates buffer code and
4758         invokes Allocate / Deallocate to create and destroy allocated
4759         controlled objects.
4760         * a-finali.adb ("="): Removed.
4761         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
4762         fields Prev and Next.
4763         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
4764         A library unit with at least one controlled object on the library level
4765         has a special finalizer which is invoked by the binder. To signal this,
4766         ali files carry field PF.
4767         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
4768         associated comment on field usage.
4769         * a-tags.adb (Get_RC_Offset): Removed.
4770         (Needs_Finalization): New routine.
4771         * a-tags.ads: Update the structure of the GNAT dispatch tables.
4772         Dispatch tables now carry field Needs_Finalization which provides
4773         runtime indication whether a type is controlled or has controlled
4774         components or both. Remove field RC_Offset.
4775         (Get_RC_Offset): Removed along with its associated pragma Export.
4776         Since tagged types with controlled components no longer carry hidden
4777         field _controller, the special mechanism to retrieve its location is no
4778         longer needed.
4779         (Needs_Finalization): New routine.
4780         * atree.ads, atree.adb (Elist24): New routine.
4781         (Set_Elist24): New routine.
4782         * atree.h: Add a define clause for Elist24.
4783         * bindgen.adb New library-level variable Lib_Final_Built.
4784         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
4785         presence of a VM target, the routine generates calls to the proper
4786         library finalization routine.
4787         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
4788         targets. Set the correct library finalization routine depending on
4789         whether the library has controlled objects or this is a VM compilation.
4790         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
4791         to library-level finalizers of compiled units in reverse order of
4792         elaboration. It also produces exception management code and reraises a
4793         potential exception after all units have been finalized.
4794         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
4795         library-level finalizers of compiled units in reverse order of
4796         elaboration.
4797         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
4798         definitions of all library-level finalizers available to the compilation
4799         (Gen_Main_Ada): Directly call Adafinal which now contails all target
4800         dependent code.
4801         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
4802         System.Standard_Library.Adafinal directly. If the library needs
4803         finalization actions, create the sequence of finalization calls.
4804         (Gen_Output_File_Ada): Alphabetize local variables and constants.
4805         Generate a with clause for System.Soft_Links when compiling for a VM.
4806         Remove the code which imports System.Standard_Library.Adafinal as
4807         Do_Finalize. Generate the library finalization routine.
4808         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
4809         If the library needs finalization actions, create all the definitions
4810         of library- level finalizers.
4811         (Has_Finalizer): New routine. Determines whether at least one compiled
4812         unit has a library-level finalizer.
4813         Add type Qualification_Mode.
4814         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
4815         * einfo.adb: New usage of field 15 as Return_Flag.
4816         Remove Finalization_Chain_Entity from the usages of field 19.
4817         Remove Associated_Final_Chain from the usages of field 23.
4818         New usage of field 23 as Associated_Collection.
4819         New usage of field 24 as Finalizer.
4820         New usage of flag 252 as Is_Processed_Transient.
4821         (Associated_Final_Chain): Removed.
4822         (Associated_Collection): New routine.
4823         (Finalization_Chain_Entity): Removed.
4824         (Finalizer): New routine.
4825         (Is_Finalizer): New routine.
4826         (Is_Processed_Transient): New routine.
4827         (Return_Flag): New routine.
4828         (Set_Associated_Final_Chain): Removed.
4829         (Set_Associated_Collection): New routine.
4830         (Set_Finalization_Chain_Entity): Removed.
4831         (Set_Finalizer): New routine.
4832         (Set_Is_Processed_Transient): New routine.
4833         (Set_Return_Flag): New routine.
4834         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
4835         displayed flags.
4836         (Write_Field8_Name): Alphabetize the output.
4837         (Write_Field11_Name): Alphabetize the output.
4838         (Write_Field12_Name): Alphabetize the output.
4839         (Write_Field13_Name): Alphabetize the output.
4840         (Write_Field14_Name): Alphabetize the output.
4841         (Write_Field15_Name): Alphabetize the output.
4842         (Write_Field16_Name): Alphabetize the output.
4843         (Write_Field17_Name): Alphabetize the output.
4844         (Write_Field18_Name): Alphabetize the output.
4845         (Write_Field19_Name): Alphabetize the output. Remove the output of
4846         Finalization_Chain_Entity.
4847         (Write_Field20_Name): Alphabetize the output.
4848         (Write_Field21_Name): Alphabetize the output.
4849         (Write_Field22_Name): Alphabetize the output.
4850         (Write_Field23_Name): Alphabetize the output. Remove the output of
4851         Associated_Final_Chain. Add output for Associated_Collection.
4852         (Write_Field24_Name): Alphabetize the output.
4853         (Write_Field25_Name): Add output for Finalizer.
4854         (Write_Field26_Name): Alphabetize the output.
4855         (Write_Field27_Name): Alphabetize the output.
4856         (Write_Field28_Name): Alphabetize the output.
4857         * einfo.ads: Add new field description for Associated_Collection and
4858         its uses in nodes.
4859         Remove Associated_Final_Chain and its uses in nodes.
4860         Remove Finalization_Chain_Entity and its uses in nodes.
4861         Add new field description for Finalizer and its uses in nodes.
4862         Add new synthesized attribute Is_Finalizer.
4863         Add new flag description for Is_Processed_Transient and its uses in
4864         nodes.
4865         Add new field description for Return_Flag and its uses in nodes.
4866         (Associated_Final_Chain): Removed along with its pragma Inline.
4867         (Associated_Collection): New routine and pragma Inline.
4868         (Finalization_Chain_Entity): Removed along with its pragma Inline.
4869         (Finalizer): New routine and pragma Inline.
4870         (Is_Finalizer): New routine and pragma Inline.
4871         (Is_Processed_Transient): New routine and pragma Inline.
4872         (Return_Flag): New routine and pragma Inline.
4873         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
4874         (Set_Associated_Collection): New routine and pragma Inline.
4875         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
4876         (Set_Finalizer): New routine and pragma Inline.
4877         (Set_Is_Processed_Transient): New routine and pragma Inline.
4878         (Set_Return_Flag): New routine and pragma Inline.
4879         * exp_aggr.adb: Alphabetize subprograms.
4880         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
4881         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
4882         associated comments. Remove local variables External_Final_List and
4883         Attach.
4884         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
4885         Ancestor. Remove the retrieval of finalization lists. Update the call to
4886         Make_Adjust_Call.
4887         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
4888         lists. Update the call to Late_Expansion.
4889         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
4890         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
4891         (Gen_Assign): Remove the retrieval of the finalization list used to
4892         build the assignment. Update the calls to Make_Init_Call and
4893         Make_Adjust_Call.
4894         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
4895         Remove the mechanism to determine attachment levels and finalization
4896         list retrieval. Remove the processing for coextensions.
4897         (Init_Controller): Removed. Controllers no longer exist.
4898         (Late_Expansion): Remove formals Flist and Obj along with their
4899         associated comments. Update the calls to Build_Record_Aggr_Code and
4900         Build_Array_Aggr_Code.
4901         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
4902         (Expand_N_Freeze_Entity): Add special processing for finalizers which
4903         appear in entry bodies, protected subprograms and task bodies.
4904         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
4905         * exp_ch3.adb (Add_Final_Chain): Removed.
4906         (Build_Array_Init_Proc): Alphabetize local variables.
4907         (Build_Assignment): Alphabetize local variables. Update the call to
4908         Maked_Adjust_Call.
4909         (Build_Class_Wide_Master): Rename local variables to better reflect
4910         their role.
4911         (Build_Discriminant_Assignments): Code reformatting.
4912         (Build_Init_Call_Thru): Code reformatting.
4913         (Build_Init_Procedure): Code reformatting. Generate a special version
4914         of Deep_Finalize which is capable of finalizing all initialized
4915         components and ignore the rest.
4916         (Build_Init_Statements): Rename local variables to better reflect their
4917         role.
4918         Reimplement the mechanism to include the creation and update of an index
4919         variable called a "counter". It is used as a bookmark for tracing
4920         initialized and non-initialized components.
4921         (Build_Initialization_Call): Remove local variable Controller_Typ.
4922         Alphabetize all local variables. Remove the initialization of the
4923         record controller and update the call to Make_Init_Call.
4924         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
4925         New local variable Counter.
4926         (Constrain_Array): Alphabetize.
4927         (Expand_Freeze_Array_Type): Create a collection instead of a
4928         finalization list.
4929         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
4930         Finalize_Address which is used in conjunction with allocated controlled
4931         objects.
4932         (Expand_N_Object_Declaration): Remove the creation of a finalization
4933         list for anonymous access types. Update the calls to Make_Init_Call and
4934         Make_Adjust_Call.
4935         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
4936         retrieval of finalization lists. Remove the expansion of the record
4937         controller. Create TSS primitive Finalize_Address used in conjunction
4938         with controlled objects on the heap. Create finalization collections
4939         for access-to-controlled record components.
4940         (Expand_Record_Controller): Removed.
4941         (Freeze_Type): Remove the freezing of record controllers. Freezing of
4942         class-wide types now requires additional processing. Create
4943         finalization collections for access-to-controlled types.
4944         (Increment_Counter): New routine.
4945         (Make_Counter): New routine.
4946         (Make_Eq_If): Remove the mention of Name_uController.
4947         (Make_Predefined_Primitive_Specs): There is no longer need to skip
4948         types coming from System.Finalization_Root.
4949         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
4950         (Predefined_Primitive_Bodies): There is no longer need to skip types
4951         coming from System.Finalization_Root.
4952         (Stream_Operation_OK): Do not generate stream routines for
4953         type Ada.Finalization.Heap_Management.Finalization_Collection.
4954         * exp_ch3.ads: Alphabetize subprograms.
4955         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
4956         Add with and use clause for Lib.
4957         (Complete_Coextension_Finalization): Removed.
4958         (Complete_Controlled_Allocation): New routine. Create a finalization
4959         collection for anonymous access-to-controlled types. Create a custom
4960         Allocate which interfaces with the back end and the machinery in
4961         Heap_Management.
4962         (Expand_Allocator_Expression): Add necessary calls to
4963         Complete_Controlled_Allocation. Remove the retrieval of finalization
4964         lists. Update the calls to Make_Adjust_Call. Generate a call to
4965         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4966         the associated collection.
4967         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
4968         Code clean up. Remove the retrieval of finalization lists and
4969         attachment levels.
4970         Update the call to Make_Init_Call. Generate a call to
4971         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4972         the associated collection.
4973         (Get_Allocator_Final_List): Removed. Finalization lists are not
4974         available.
4975         (Suitable_Element): Remove the mention of Name_uController.
4976         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
4977         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
4978         the left hand side, carry out the assignment and adjust the left hand
4979         side.
4980         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
4981         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
4982         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
4983         BIP_Collection and BIPcollection.
4984         (Build_Heap_Allocator): New routine used to allocate the return object
4985         of a build-in-place function onto a collection.
4986         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
4987         (Expand_Call): Do not replace direct calls to Deep routines with their
4988         aliases.
4989         (Expand_N_Extended_Return_Statement): Give all variables shorter names
4990         and update their occurrences. Add a special return flag to monitor the
4991         [ab]normal execution of the function. The flag is set right before the
4992         return statement.
4993         Rewrite the mechanism used to allocate a build-in-place return object
4994         on the heap or on a storage pool.
4995         (Is_Direct_Deep_Call): New routine.
4996         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
4997         build-in-place function call instead of a final list. Build a call to
4998         Set_Finalize_Address_Ptr to decorate the associated collection.
4999         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
5000         order to name the build-in-place function call's result for later
5001         finalization. Add a collection to a build-in-place function call
5002         instead of a final list.
5003         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
5004         build-in-place function call instead of a final list. Remove the code
5005         which moves one final list and transforms it into the actual in a
5006         nested build-in-place call.
5007         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
5008         build-in-place function call instead of a final list.
5009         (Move_Final_List): Removed.
5010         (Needs_BIP_Collection): New routine.
5011         (Needs_BIP_Final_List): Removed.
5012         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
5013         enumeration type BIP_Formal_Kind.
5014         Update the related comment.
5015         (Needs_BIP_Collection): New routine.
5016         (Needs_BIP_Final_List): Removed.
5017         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
5018         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
5019         majority of subprograms in this unit. Add Name_Finalize_Address to
5020         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
5021         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
5022         statements for an array type.
5023         (Build_Adjust_Statements): Create the adjust statements for a record
5024         type.
5025         (Build_Cleanup_Statements): New routine. A procedure which given any
5026         construct containing asynchronous calls, references to _master, or is a
5027         task body, a task allocation or a protected body produces the necessary
5028         runtime calls to clean up these constructs.
5029         (Build_Exception_Handler): New routine.
5030         (Build_Final_List): Removed.
5031         (Build_Finalization_Collection): New routine. A core procedure which
5032         creates a collection to service heap allocated controlled objects
5033         associated with an access-to-controlled type.
5034         (Build_Finalize_Statements): Create the finalization statements for a
5035         record types.
5036         (Build_Finalizer): New routine. A core procedure which given any
5037         construct with declarations and/or statements detects all objects which
5038         need any type of clean up (controlled objects, protected objects) and
5039         generates all necessary code to clean up the said objects in the proper
5040         order.
5041         (Build_Finalizer_Call): New routine.
5042         (Build_Initialize_Statements): Create the initialization statements for
5043         an array type. The generated routine contains code to finalize partially
5044         initialized arrays.
5045         (Build_Object_Declarations): New routine.
5046         (Build_Raise_Statement): New routine.
5047         (Clean_Simple_Protected_Objects): Removed.
5048         (Controller_Component): Removed.
5049         (Enclosing_Function): New routine.
5050         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
5051         either declarations or statements or both.
5052         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
5053         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
5054         package.
5055         (Find_Final_List): Removed.
5056         (Global_Flist_Ref): Removed.
5057         (In_Finalization_Root): Removed.
5058         (Insert_Actions_In_Scope_Around): Determine the range of the transient
5059         scope in terms of tree nodes. Process all transient variables within
5060         that range.
5061         (Make_Adjust_Call): Rewritten. There is no longer an attach call
5062         generated after the adjust.
5063         (Make_Attach_Call): Removed.
5064         (Make_Call): New routine.
5065         (Make_Clean): Removed.
5066         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
5067         build routines.
5068         (Make_Deep_Proc): Rewritten to generate the new profile signature used
5069         in Deep routines.
5070         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
5071         build routines.
5072         (Make_Final_Call): Modified to simply create a call to either
5073         Deep_Finalize or Finalize.
5074         (Make_Finalize_Address_Body): New routine.
5075         (Make_Finalize_Address_Stmts): New routine. A function which produces
5076         TSS primitive Finalize_Address used in conjunction with heap allocated
5077         controlled objects.
5078         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
5079         (Make_Init_Call): Rewritten. There is no longer an attach call
5080         generated after initialization.
5081         (Make_Local_Deep_Finalize): New routine.
5082         (Make_Set_Finalize_Address_Ptr_Call): New routine.
5083         (Make_Transient_Block): Remove the finalization list retrieval and
5084         manipulation.
5085         (Needs_Finalization): Moved to Exp_Util.
5086         (Parent_Field_Type): New routine.
5087         (Preprocess_Components): New routine.
5088         (Process_Transient_Objects): New routine.
5089         (Wrap_HSS_In_Block): New routine.
5090         (Wrap_Transient_Declaration): Remove finalization list management and
5091         controller insertion.
5092         (Wrap_Transient_Expression): Code reformatting.
5093         (Wrap_Transient_Statement): Code reformatting.
5094         * exp_ch7.ads (Build_Final_List): Removed.
5095         (Build_Finalization_Collection): New routine.
5096         (Build_Raise_Statement): New routine.
5097         (Controller_Component): Removed.
5098         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
5099         (Find_Final_List): Removed.
5100         (In_Finalization_Root): Removed.
5101         (Is_Simple_Protected_Type): Update related comment.
5102         (Make_Adjust_Call): New parameter profile and associated comments.
5103         (Make_Attach_Call): Removed.
5104         (Make_Final_Call): New parameter profile and associated comments.
5105         (Make_Finalize_Address_Body): New routine.
5106         (Make_Init_Call): New parameter profile and associated comments.
5107         (Make_Local_Deep_Finalize): New routine.
5108         (Make_Set_Finalize_Address_Ptr_Call): New routine.
5109         (Needs_Finalization): Moved to Exp_Util.
5110         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
5111         (Expand_N_Protected_Body): Remove the handling of finalization lists.
5112         (Find_Protection_Type): Moved to Exp_Util.
5113         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
5114         (Make_DT): Update sequence of dispatch table initialization. Remove the
5115         initialization of field RC_Offset. Add initialization of field Needs_
5116         Finalization.
5117         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
5118         Reimplement how an object is first finalized, then deallocated.
5119         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
5120         Code reformatting.
5121         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
5122         Register TSS_Finalize_Address with type TSS_Names.
5123         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
5124         procedure provides the interface between an allocation / deallocation
5125         and the support machinery in Ada.Finalization.Heap_Management.
5126         (Find_Init_Call): Code reformatting.
5127         (Find_Init_Call_In_List): Code reformatting.
5128         (Find_Protection_Type): Moved from Exp_Ch9.
5129         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
5130         (Has_Controlled_Coextensions): Removed.
5131         (Has_Controlled_Objects): New routine.
5132         (In_Library_Level_Package_Body): New routine.
5133         (Insert_Action_After): New routine.
5134         (Is_Finalizable_Transient): New routine. This predicate determines
5135         whether an object declaration is one of the many variants of controlled
5136         transients.
5137         (Is_Null_Access_BIP_Func_Call): New routine.
5138         (Is_Non_BIP_Func_Call): New routine.
5139         (Is_Related_To_Func_Return): New routine.
5140         (Needs_Finalization): Moved from Exp_Ch7.
5141         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
5142         (Find_Protection_Type): Moved from Exp_Ch9.
5143         (Has_Controlled_Coextensions): Removed.
5144         (Has_Controlled_Objects): New routine.
5145         (In_Library_Level_Package_Body): New routine.
5146         (Insert_Action_After): New routine.
5147         (Is_Finalizable_Transient): New routine.
5148         (Is_Null_Access_BIP_Func_Call): New routine.
5149         (Is_Non_BIP_Func_Call): New routine.
5150         (Is_Related_To_Func_Return): New routine.
5151         (Needs_Finalization): Moved from Exp_ch7.
5152         * expander.adb (Expand): Add a case for N_Free_Statement.
5153         * freeze.adb (Freeze_All): Replace the generation of a finalization
5154         list with a collection for access-to-controlled types.
5155         (Freeze_Entity): Code reformatting.
5156         (Freeze_Record_Type): Remove the freezing of a record controller
5157         component.
5158         (Freeze_Subprogram): Code reformatting.
5159         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
5160         finalization list.
5161         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
5162         has a library-level finalizer.
5163         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
5164         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
5165         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
5166         files. Add a-fihema to the list of object files.
5167         * par-ch4.adb:
5168         Alphabetize the associations in type Is_Parameterless_Attribute.
5169         * rtsfind.ads: Ada.Finalization_List.Controller and
5170         System.Finalization_Implementation are no longer a GNAT unit.
5171         Update the range of type Ada_Finalization_Child. Remove the following
5172         recoverable entities:
5173
5174            RE_Attach_To_Final_List
5175            RE_Deep_Tag_Attach
5176            RE_Finalize_List
5177            RE_Finalize_One
5178            RE_Finalizable_Ptr_Ptr
5179            RE_Global_Final_List
5180            RE_Limited_Record_Controller
5181            RE_List_Controller
5182            RE_Move_Final_List
5183            RE_Record_Controller
5184            RE_Simple_List_Controller
5185
5186         Add the following recoverable entities:
5187
5188            RE_Add_Offset_To_Address
5189            RE_Allocate
5190            RE_Base_Pool
5191            RE_Deallocate
5192            RE_Exception_Identity
5193            RE_Finalization_Collection
5194            RE_Finalization_Collection_Ptr
5195            RE_Needs_Finalization
5196            RE_Save_Library_Occurrence
5197            RE_Set_Finalize_Address_Ptr
5198            RE_Set_Storage_Pool_Ptr
5199            RE_Storage_Count
5200         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
5201         Name_uController.
5202         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
5203         (First_Stored_Discriminant): Remove the mention of Name_uController.
5204         * sem_aux.ads: Comment reformatting.
5205         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
5206         to redecorate an already existing class-wide type.
5207         (Decorate_Tagged_Type): New parameter profile and associated comment.
5208         Create a "shadow class-wide type" for a shadow entity.
5209         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
5210         of the final chain along with the associated comment.
5211         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
5212         Full_Desig and set it to the full view of the designated type.
5213         Initialize the finalization collection to empty.
5214         (Build_Derived_Record_Type): Alphabetize local variables. Code
5215         reformatting.
5216         (Collect_Fixed_Components): Remove the mention of Name_uController.
5217         (Create_Constrained_Components): Remove the mention of Name_uController.
5218         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
5219         class-wide type of a shadow entity.
5220         (Process_Full_View): Update the machinery which marks type
5221         Limited_Controlled's entity as limited.
5222         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
5223         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
5224         list, instead make a collection build-in-place formal.
5225         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
5226         a designated type in order to establish a match between the renaming
5227         and the renamed entity.
5228         (Find_Selected_Component): Add guard to prevent spurious exceptions
5229         from being raised on .NET/JVM.
5230         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
5231         to the list of primitive that need special processing. Update arrays
5232         C_Names and D_Names.
5233         (Replace_Types): Handle class-wide types.
5234         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
5235         different parameter profile, look at the first formal.
5236         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
5237         use clauses for Exp_Util.
5238         * sem_res.adb: Remove with and use clauses for Elists.
5239         (Propagate_Coextensions): Removed.
5240         (Resolve_Allocator): Do not propagate the list of coextensions from one
5241         allocator to another.
5242         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
5243         Deaccessed_T to Desig_Typ.
5244         (Enter_Name): Remove the mention of Name_uController.
5245         (Gather_Components): Remove the mention of Name_uController.
5246         (Incomplete_Or_Private_View): New routine.
5247         (Is_Coextension_Root): Removed.
5248         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
5249         * sem_util.ads (Incomplete_Or_Private_View): New routine.
5250         (Is_Coextension_Root): Removed.
5251         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
5252         Controlled types are now derived from a null tagged record. Remove
5253         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
5254         * sinfo.adb (Coextensions): Removed.
5255         (Set_Coextensions): Removed.
5256         * sinfo.ads: Remove Coextensions from the explanation of node fields
5257         and its uses in nodes.
5258         Update the field usage of N_Allocator.
5259         (Coextensions): Removed along with its pragma Inline.
5260         (Set_Coextensions): Removed along with its pragma Inline.
5261         * snames.ads-tmpl: Remove names
5262
5263           Name_uClean
5264           Name_uController
5265           Name_uFinal_List
5266           Name_uLocal_Final_List
5267           Name_Finalization_Root
5268           Name_Next
5269           Name_Prev
5270
5271         Add names
5272
5273           Name_uFinalizer
5274           Name_Finalize_Address
5275         * s-pooglo.adb (Allocate): Add overriding indicator.
5276         (Deallocate): Add overriding indicator.
5277         (Storage_Size): Add overriding indicator.
5278         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
5279         than Finalize_Global_List.
5280         (Null_Finalize_Global_List): Removed.
5281         (Save_Library_Occurrence): New routine.
5282         * s-soflin.ads: Remove variable Finalize_Global_List along with its
5283         initialization. Add variable Finalize_Library_Objects along with its
5284         pragma Export. Add variables Library_Exception and
5285         Library_Exception_Set along with their pragma Export.
5286         (Null_Finalize_Global_List): Removed.
5287         (Save_Library_Occurrence): New routine.
5288         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
5289         rather than Finalize_Global_List.
5290         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
5291         of the constructed node.
5292
5293 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5294
5295         * link.c: Include "auto-host.h" before system headers.
5296
5297 2011-08-03  Vincent Celier  <celier@adacore.com>
5298
5299         * make.adb (Gnatmake): Add to table Library_Projs only library projects
5300         that are not extended. Do not check if a library project that is
5301         extended should be regenerated. Do not add to table Library_Paths the
5302         libraries that are in extended projects. Link only with libraries that
5303         are in libray projects that are not extended.
5304         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
5305         for a library project that is extended.
5306
5307 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5308
5309         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
5310         conforming subprogram renamings that appear to be completions if they
5311         are not fully conformant.
5312         Such renamings are homographs but not completions.
5313         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
5314         names in a subprogram renaming that appears in an instance.
5315
5316 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5317
5318         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
5319         not immutably limited, build actual subtype from expression to provide
5320         proper bounds to caller.
5321
5322 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5323
5324         * sem_ch8.adb: Minor comment correction.
5325
5326 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5327
5328         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
5329         returning a limited array, use an extended return statement.
5330
5331 2011-08-03  Vincent Celier  <celier@adacore.com>
5332
5333         * make.adb (Initialize): If --subdirs= is used, but no project file is
5334         specified, attempt to create the specify subdir if it does not already
5335         exist and use it as the object directory as if -D had been specified.
5336
5337 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5338
5339         * s-tpopsp-vms.adb: New file.
5340         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
5341         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
5342
5343 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5344
5345         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
5346         package.
5347
5348 2011-08-03  Yannick Moy  <moy@adacore.com>
5349
5350         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
5351         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
5352         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
5353         detect that an array has static bounds.
5354
5355 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5356
5357         * exp_dist.adb: Minor reformatting.
5358
5359 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5360
5361         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
5362         (ATCB_Key): Removed, not always used.
5363
5364 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5365
5366         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
5367         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
5368         most remaining global variables.
5369
5370 2011-08-03  Robert Dewar  <dewar@adacore.com>
5371
5372         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
5373         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
5374         reformatting.
5375
5376 2011-08-03  Javier Miranda  <miranda@adacore.com>
5377
5378         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
5379         that must be passed by copy in VM targets.
5380
5381 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5382
5383         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
5384         duplicates a similar htable now in the project tree.
5385
5386 2011-08-03  Claire Dross  <dross@adacore.com>
5387
5388         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
5389         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
5390         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
5391         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
5392         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
5393         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
5394         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
5395         update.
5396
5397 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5398
5399         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
5400         (ATCB_Key): Removed, not always used.
5401         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
5402         s-taprop-posix.adb.
5403         * s-tpopsp-tls.adb: New file.
5404         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
5405         x86/x64/ia64/powerpc/sparc Linux.
5406
5407 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5408
5409         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
5410         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
5411
5412 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5413
5414         * rtsfind.ads, exp_dist.adb, exp_dist.ads
5415         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
5416         Fix type selection for mapping integer types to PolyORB types.
5417
5418 2011-08-03  Bob Duff  <duff@adacore.com>
5419
5420         * sem_ch7.adb: Minor comment clarification.
5421
5422 2011-08-03  Bob Duff  <duff@adacore.com>
5423
5424         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
5425         an error analyzing a choice, skip further processing. Further
5426         processing could cause a crash or cascade errors.
5427
5428 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5429
5430         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
5431         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
5432         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
5433         prj-env.ads (Shared_Project_Tree_Data): new type
5434         An aggregate project and its aggregated trees need to share the common
5435         data structures used for lists of strings, packages,... This makes the
5436         code simpler since otherwise we have to pass the root tree (also used
5437         for the configuration file data) in addition to the current project
5438         tree. This also avoids ambiguities as to which tree should be used.
5439         And finally this saves a bit of memory.
5440         (For_Every_Project_Imported): new parameter Tree.
5441         Since aggregated projects are using a different tree, we need to let
5442         the caller know which tree to use to manipulate the returned project.
5443
5444 2011-08-03  Robert Dewar  <dewar@adacore.com>
5445
5446         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
5447         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
5448         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
5449         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
5450
5451 2011-08-03  Javier Miranda  <miranda@adacore.com>
5452
5453         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
5454         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
5455
5456 2011-08-03  Bob Duff  <duff@adacore.com>
5457
5458         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
5459         the Base_Type.
5460
5461 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
5462
5463         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
5464         g-sehash.ads: Fix typo. Update header.
5465
5466 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5467
5468         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
5469         expansion.
5470
5471 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5472
5473         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
5474         prefixes of private types along with records, since the selector may be
5475         a discriminant.
5476         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
5477         private types along with records, since the selector may be a
5478         discriminant.
5479
5480 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5481
5482         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
5483
5484 2011-08-03  Javier Miranda  <miranda@adacore.com>
5485
5486         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
5487         Tagged_Type_Expansion.
5488
5489 2011-08-03  Yannick Moy  <moy@adacore.com>
5490
5491         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
5492         violation when the argument of concatenation is the name of a
5493         constant.
5494
5495 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5496
5497         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
5498         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
5499         (Process_Declarative_Items): new parameter Child_Env.
5500
5501 2011-08-03  Yannick Moy  <moy@adacore.com>
5502
5503         * alfa.ads: Update format of ALFA section in ALI file in order to
5504         add a mapping from bodies to specs when both are present.
5505         (ALFA_Scope_Record): Add components for spec file/scope.
5506         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
5507         present.
5508         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
5509         collected, fill in the spec information when relevant.
5510         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
5511         present.
5512
5513 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5514
5515         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
5516         code unit to decide whether to add internally generated subprograms.
5517
5518 2011-08-03  Javier Miranda  <miranda@adacore.com>
5519
5520         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
5521         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
5522         be handled by copy in VM targets.
5523
5524 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5525
5526         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
5527         code with Makeutl.Get_Switches.
5528         * prj-tree.adb: Update comment.
5529
5530 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5531
5532         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
5533         subprogram with a limited formal that does not support external
5534         streaming.
5535
5536 2011-08-03  Yannick Moy  <moy@adacore.com>
5537
5538         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
5539         continuation line
5540         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
5541         not from current unit in two phases, because it is not possible to
5542         change the table while iterating over its content.
5543         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
5544
5545 2011-08-03  Sergey Rybin  <rybin@adacore.com>
5546
5547         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
5548         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
5549
5550 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5551
5552         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
5553         and the component type is composite, this is ambiguous for predefined
5554         concatenation, but if the node is not overloaded and the entity is a use
5555         -defined function its profile can be used to resolve that aggregate.
5556
5557 2011-08-03  Robert Dewar  <dewar@adacore.com>
5558
5559         * exp_ch4.adb: Minor code cleanup.
5560
5561 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5562
5563         * exp_dist.adb: Do not generate distribution stubs if serious errors
5564         have been diagnosed.
5565
5566 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5567
5568         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
5569         the first formal of a primitive operation, go to the base type to
5570         handle properly an access to a derived type with constrained
5571         discriminants.
5572         * sem_type.adb (Disambiguate): an immediately visible operator hides a
5573         user-defined function that is only use-visible.
5574
5575 2011-08-03  Robert Dewar  <dewar@adacore.com>
5576
5577         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
5578         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
5579         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
5580         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
5581         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
5582         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
5583         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
5584         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
5585
5586 2011-08-03  Robert Dewar  <dewar@adacore.com>
5587
5588         * repinfo.adb (List_Mechanism): Add handling of
5589         Convention_Ada_Pass_By_XXX.
5590         * sem_mech.adb (Set_Mechanism): Ditto.
5591         * sem_prag.adb (Process_Convention): Add entries for
5592         Convention_Ada_Pass_By_XXX.
5593         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
5594
5595 2011-08-03  Pascal Obry  <obry@adacore.com>
5596
5597         * makeutl.adb: Minor reformatting.
5598
5599 2011-08-03  Vincent Celier  <celier@adacore.com>
5600
5601         * fname-uf.adb
5602         (Get_File_Name) If the file cannot be found when there are no config
5603         pragmas file and May_Fail is True, return No_File instead of the file
5604         name, to be consistent.
5605
5606 2011-08-03  Pascal Obry  <obry@adacore.com>
5607
5608         * adaint.c (__gnat_is_executable_file_attr): Avoid access
5609         to null pointer.
5610
5611 2011-08-03  Javier Miranda  <miranda@adacore.com>
5612
5613         * sem_ch13.adb
5614         (Same_Representation): In VM targets the representation of arrays with
5615         aliased components differs from arrays with non-aliased components.
5616
5617 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5618
5619         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
5620         not systematically lower case attribute indexes that contain no "."
5621         Fix definition of several Naming attributes, which take
5622         a unit name as index and therefore should be case insensitive.
5623         Minor refactoring (reduce length of variable names).
5624
5625 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5626
5627         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
5628
5629 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5630
5631         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
5632         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
5633         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
5634         prj-tree.ads (Prj.Tree.Environment): new type.
5635
5636 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5637
5638         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
5639         prj-tree.adb, prj-tree.ads (Environment): new type.
5640
5641 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5642
5643         * prj-tree.ads: Remove unused variable.
5644
5645 2011-08-03  Yannick Moy  <moy@adacore.com>
5646
5647         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
5648         issuing messages related to SPARK restriction violation.
5649
5650 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5651
5652         * sem_ch6.adb: guard against error nodes in return statements.
5653
5654 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5655
5656         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
5657         a warning can only appear on a configuration file, so emit warning
5658         without further checks.
5659
5660 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5661
5662         * s-interr.ads: add overriding keyword.
5663
5664 2011-08-03  Geert Bosch  <bosch@adacore.com>
5665
5666         * exp_attr.adb: Fix minor typo.
5667
5668 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5669
5670         * par-ch4.adb: improve error recovery.
5671
5672 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5673
5674         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
5675         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
5676         to Errout_Handling.
5677
5678 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5679
5680         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
5681         "external" as an attribute name in aggregate projects.
5682
5683 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
5684
5685         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
5686         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
5687         from 0, so we need to adjust.
5688
5689 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5690
5691         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
5692         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
5693
5694 2011-08-03  Yannick Moy  <moy@adacore.com>
5695
5696         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
5697         restriction on overloaded entity if the entity is not an operator.
5698
5699 2011-08-03  Yannick Moy  <moy@adacore.com>
5700
5701         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
5702         restrict.ads: Rename remaining Check_Formal_Restriction* into
5703         Check_SPARK_Restriction*.
5704
5705 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5706
5707         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
5708         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
5709         qualifier.
5710         (Project_Empty): removed
5711         (Empty_Project): new parameter Qualifier
5712         This is used to have fields specific to aggregate projects, cleaner
5713         New field to store the list of aggregated projects.
5714         (Check_Aggregate_Project): removed
5715         (Process_Aggregated_Projects, Free): new subprograms.
5716
5717 2011-08-03  Olivier Hainque  <hainque@adacore.com>
5718
5719         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
5720
5721 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5722
5723         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
5724         explicit dereference of an unconstrained type, create a constrained
5725         subtype for it, as is done for function calls that return an
5726         unconstrained type.
5727
5728 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5729
5730         * g-pehage.adb (Finalize): Avoid possible double-free.
5731
5732 2011-08-03  Steve Baird  <baird@adacore.com>
5733
5734         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
5735         Elab_Spec/Body attrs in CodePeer_Mode.
5736
5737 2011-08-03  Javier Miranda  <miranda@adacore.com>
5738
5739         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
5740         low bound is not known at compile time but they have no others choice.
5741         Done because in this case the bounds can be obtained directly from the
5742         aggregate.
5743
5744 2011-08-03  Ed Falis  <falis@adacore.com>
5745
5746         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
5747         on VxWorks SMP. Remove unusable constant ANY_CPU.
5748
5749 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5750
5751         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
5752         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
5753         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
5754         Prj.Env.Initialize_Empty): new subprograms
5755         (Get_Env, Find_Project): remove parameter Target_Name.
5756
5757 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5758
5759         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
5760         as a condition for the delayed call to Derived_Subprograms done for the
5761         case of the rewriting of a derived type that constrains the
5762         discriminants of its parent type.
5763         Avoids redundant subprogram derivations for private subtype derivations.
5764
5765 2011-08-03  Javier Miranda  <miranda@adacore.com>
5766
5767         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
5768         Build_Record_Aggr_Code.
5769         (Build_Record_Aggr_Code): Add missing support to initialize hidden
5770         discriminants in extension aggregates.
5771
5772 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5773
5774         * prj-pp.adb (Print): also output project qualifiers, since in
5775         particular "aggregate" is mandatory in an aggregate project.
5776
5777 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5778
5779         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
5780         (Debug_Output): new function.
5781
5782 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5783
5784         * gnat_ugn.texi: Document -Wstack-usage.
5785         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
5786
5787 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5788
5789         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
5790         have keyword LIMITED.
5791
5792 2011-08-03  Yannick Moy  <moy@adacore.com>
5793
5794         * alfa.adb, alfa.ads, alfa_test.adb: New files.
5795         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
5796         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
5797         section (does not happen in compiler, only if code directly calls
5798         Scan_ALI).
5799         * get_alfa.adb, get_alfa.ads: New files.
5800         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
5801         needed.
5802         * lib-xref-alfa.adb: New file.
5803         * lib-xref.adb, lib-xref.ads
5804         (Xref_Entry): redefine information needed in cross-references for ALFA.
5805         Push ALFA treatments in separated local package.
5806         (Enclosing_Subpragram_Or_Package): treat specially subprogram
5807         identifiers. Return entity of package body instead of spec. Return
5808         Empty for a scope with no location.
5809         (Generate_Reference): adapt to new components for ALFA information.
5810         Remove the need for D references on definitions.
5811         (Is_Local_Reference): moved to ALFA local package
5812         (Output_References): extract subfunction as Extract_Source_Name
5813         (Output_Local_References): remove procedure, replaced by filtering of
5814         cross-references in package ALFA and printing in Put_ALFA.
5815         (Write_Entity_Name): remove procedure
5816         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
5817         print exact name of entity as it appears in source file
5818         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
5819         * put_alfa.adb, put_alfa.ads: New files.
5820         * xref_lib.adb (Search_Xref): protect read of cross-references against
5821         reading other sections of the ALI file, in gnatxref
5822         (Search): protect read of cross-references against reading other
5823         sections of the ALI file, in gnatfind.
5824         * gcc-interface/Make-lang.in: Update dependencies.
5825
5826 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5827
5828         * sem_ch3.adb: Minor reformatting.
5829
5830 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
5831
5832         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
5833         raising an exception.
5834
5835 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5836
5837         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
5838         type, always use 1 as the lower bound or string, even if lower bound of
5839         context is not static, to handle properly null strings in a non-static
5840         context.
5841
5842 2011-08-03  Bob Duff  <duff@adacore.com>
5843
5844         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
5845         always legal on the right-hand side of an assignment statement; there
5846         is always an applicable index constraint in this case. Therefore, the
5847         check for Pkind = N_Assignment_Statement is now unconditional -- it
5848         doesn't depend on whether Is_Constrained (Typ).
5849
5850 2011-08-03  Robert Dewar  <dewar@adacore.com>
5851
5852         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
5853
5854 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5855
5856         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
5857         for an itype created within a generic unit.
5858
5859 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5860
5861         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
5862         suppresses all inlining.
5863
5864 2011-08-03  Robert Dewar  <dewar@adacore.com>
5865
5866         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
5867         exp_aggr.adb: Minor reformatting.
5868
5869 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5870
5871         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
5872         tagged assignment when discriminant checks are suppressed. This is
5873         useless and extremely costly in terms of static stack usage.
5874
5875 2011-08-03  Bob Duff  <duff@adacore.com>
5876
5877         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
5878         of generics, because this leads to the wrong entity in the wrong scope,
5879         causing (e.g.) pragma Export_Procedure to get an error if the entity is
5880         an instance.
5881         (Process_Interface_Name): Follow Alias for instances of generics, to
5882         correct for the above change.
5883
5884 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5885
5886         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
5887         is an integer literal it is always safe to replace the reference. In
5888         addition, if the reference appears in the generated code for an object
5889         declaration it is necessary to copy because otherwise the reference
5890         might be to the uninitilized value of the discriminant of the object
5891         itself.
5892
5893 2011-08-03  Pascal Obry  <obry@adacore.com>
5894
5895         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
5896         ACL used, in this case we want to check for ending .exe, not .exe
5897         anywhere in the path.
5898
5899 2011-08-03  Sergey Rybin  <rybin@adacore.com>
5900
5901         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5902         the tree structure (semantic decoration of references to record
5903         discriminants).
5904
5905 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5906
5907         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
5908         choices of a named array aggregate, bail out when any choices are
5909         marked as Errors_Posted.
5910
5911 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5912
5913         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
5914         in which entity is frozen, to handle properly loop variables in
5915         iterators.
5916
5917 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5918
5919         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
5920         subtype is not static, compute the upper bound using attributes, to
5921         handle properly index types that are not integer types.
5922
5923 2011-08-03  Bob Duff  <duff@adacore.com>
5924
5925         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
5926         Update copyright notice.
5927
5928 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5929
5930         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
5931         Original_Discriminant if within an instance.
5932         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
5933
5934 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5935
5936         * einfo.ads: Minor reformatting.
5937
5938 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5939
5940         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
5941         composite type with an unfrozen subcomponent, in the profile of a
5942         primitive operation.
5943
5944 2011-08-03  Robert Dewar  <dewar@adacore.com>
5945
5946         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5947
5948 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5949
5950         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
5951         unconstrained type with discriminants is initialized with an aggregate,
5952         use the constrained subtype of the aggregate as the type of the object,
5953         because it is immutable, and this allows the back-end to generate no
5954         code for the object declaration.
5955
5956 2011-08-03  Robert Dewar  <dewar@adacore.com>
5957
5958         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
5959         comparison operand is variable, and turns out to be zero or negative.
5960
5961 2011-08-03  Javier Miranda  <miranda@adacore.com>
5962
5963         * exp_intr.adb
5964         (Expand_Dispatching_Constructor_Call): Disable expansion of
5965         code required for native targets. Done to avoid generating
5966         references to unavailable runtime entities in VM targets.
5967         * exp_ch3.adb
5968         (Expand_N_Object_Declaration): Add missing support to handle
5969         the explicit initialization of class-wide interface objects.
5970         Fix documentation.
5971
5972 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5973
5974         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
5975
5976 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5977
5978         * a-cbdlli.adb (Splice): move source items from first to last
5979
5980 2011-08-03  Yannick Moy  <moy@adacore.com>
5981
5982         * sem_util.ads: comment added.
5983
5984 2011-08-03  Javier Miranda  <miranda@adacore.com>
5985
5986         * exp_aggr.adb
5987         (Expand_Record_Aggregate): In VM targets disable the expansion into
5988         assignments of aggregates whose type is not known at compile time.
5989
5990 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5991
5992         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
5993         protected entries and task entries, to build the proper renaming
5994         declaration for entry formals, used in debugging.
5995         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
5996         parameters in the same way.
5997
5998 2011-08-02  Robert Dewar  <dewar@adacore.com>
5999
6000         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
6001         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
6002         code reorganization.
6003
6004 2011-08-02  Robert Dewar  <dewar@adacore.com>
6005
6006         * debug.adb: Debug flag d.P to suppress length comparison optimization
6007         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
6008         comparison of Length by comparing First/Last instead.
6009
6010 2011-08-02  Matthew Heaney  <heaney@adacore.com>
6011
6012         * a-cobove.ads: Code clean up.
6013
6014 2011-08-02  Vincent Celier  <celier@adacore.com>
6015
6016         * adaint.c (file_names_case_sensitive_cache): New static int.
6017         (__gnat_get_file_names_case_sensitive): Cache the return value in
6018         file_names_case_sensitive_cache at the first invocation, to avoid
6019         multiple calls to getenv.
6020
6021 2011-08-02  Bob Duff  <duff@adacore.com>
6022
6023         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
6024
6025 2011-08-02  Yannick Moy  <moy@adacore.com>
6026
6027         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
6028         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
6029         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
6030         indicate that we are in a precondition or postcondition. This is used in
6031         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
6032         decide whether to flag the spec or body of the current subprogram as
6033         not in ALFA.
6034
6035 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
6036
6037         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
6038         list.
6039         * a-extiin.ads: New file.
6040
6041 2011-08-02  Bob Duff  <duff@adacore.com>
6042
6043         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
6044         now raises Name_Error instead of Use_Error in certain cases. The other
6045         parts of this AI were already implemented properly.
6046
6047 2011-08-02  Vincent Celier  <celier@adacore.com>
6048
6049         * link.c: Only import "auto-host.h" when building the gnattools.
6050
6051 2011-08-02  Yannick Moy  <moy@adacore.com>
6052
6053         * sem_util.adb: Inter-unit inlining does not work for a subprogram
6054         which calls a local subprogram, so extract subprogram
6055         from Mark_Non_ALFA_Subprogram_Body.
6056
6057 2011-08-02  Javier Miranda  <miranda@adacore.com>
6058
6059         * exp_ch9.adb
6060         (Extract_Dispatching_Call): If the type of the dispatching object is an
6061         access type then return an explicit dereference in the Object out-mode
6062         parameter.
6063
6064 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6065
6066         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
6067         compatibility checks for all indexes of an array subtype, not just the
6068         first. Reset Has_Dynamic_Range_Check on the subtype before each
6069         potential check to ensure that Insert_Range_Checks will not elide any
6070         of the dynamic checks.
6071
6072 2011-08-02  Yannick Moy  <moy@adacore.com>
6073
6074         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
6075         SPARK restriction at parsing time.
6076         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
6077         directive only if the SPARK restriction is set for this unit.
6078
6079 2011-08-02  Yannick Moy  <moy@adacore.com>
6080
6081         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
6082         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
6083         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
6084         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
6085         Mark_Non_ALFA_Subprogram_Body.
6086         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
6087         inlined.
6088
6089 2011-08-02  Yannick Moy  <moy@adacore.com>
6090
6091         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
6092         might be costly.
6093
6094 2011-08-02  Robert Dewar  <dewar@adacore.com>
6095
6096         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
6097         exp_ch3.adb: Minor reformatting.
6098
6099 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6100
6101         * adaint.c (__gnat_locate_exec_on_path): only returns executable
6102         files, not any regular file.
6103         (__gnat_locate_file_with_predicate): new subprogram.
6104
6105 2011-08-02  Yannick Moy  <moy@adacore.com>
6106
6107         * sinfo.adb, sinfo.ads: Restrict the use of flags
6108         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
6109         nodes, plus N_Subtype_Declaration for the 2nd one.
6110
6111 2011-08-02  Sergey Rybin  <rybin@adacore.com>
6112
6113         * gnat_rm.texi: Ramification of pragma Eliminate documentation
6114          - fix bugs in the description of Source_Trace;
6115          - get rid of UNIT_NAME;
6116
6117 2011-08-02  Javier Miranda  <miranda@adacore.com>
6118
6119         * exp_ch9.adb
6120         (Build_Dispatching_Requeue): Adding support for VM targets
6121         since we cannot directly reference the Tag entity.
6122         * exp_sel.adb (Build_K): Adding support for VM targets.
6123         (Build_S_Assignment): Adding support for VM targets.
6124         * exp_disp.adb
6125         (Default_Prim_Op_Position): In VM targets do not restrict availability
6126         of predefined interface primitives to compiling in Ada 2005 mode.
6127         (Is_Predefined_Interface_Primitive): In VM targets this service is not
6128         restricted to compiling in Ada 2005 mode.
6129         (Make_VM_TSD): Generate code that declares and initializes the OSD
6130         record. Needed to support dispatching calls through synchronized
6131         interfaces.
6132         * exp_ch3.adb
6133         (Make_Predefined_Primitive_Specs): Enable generation of predefined
6134         primitives associated with synchronized interfaces.
6135         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6136         primitives associated with synchronized interfaces.
6137
6138 2011-08-02  Yannick Moy  <moy@adacore.com>
6139
6140         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6141         statements hidden in SPARK if preceded by the HIDE directive
6142         (Parse_Exception_Handlers): mark each exception handler in a sequence of
6143         exception handlers as hidden in SPARK if preceded by the HIDE directive
6144         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6145         if starting with the HIDE directive
6146         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6147         starting with the HIDE directive; mark the declarations in a private
6148         part as hidden in SPARK if the private part starts with the HIDE
6149         directive
6150         * restrict.adb, restrict.ads
6151         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6152         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6153         argument node belongs to a part which is hidden in SPARK
6154         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6155         parts in SPARK; protect the possibly costly call to
6156         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6157         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6158         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6159         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6160         Tok_SPARK_Hide.
6161         (Scan): recognize special comment starting with '#' and followed by
6162         SPARK keyword "hide" as a HIDE directive.
6163
6164 2011-08-02  Yannick Moy  <moy@adacore.com>
6165
6166         * types.ads, erroutc.ads: Minor reformatting.
6167
6168 2011-08-02  Vincent Celier  <celier@adacore.com>
6169
6170         * link.c: Add response file support for cross platforms.
6171
6172 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6173
6174         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
6175         in an association, set parent field of copy before partial analysis.
6176         * sem_res.adb (Resolve_Slice): create reference to itype only when
6177         expansion is enabled.
6178
6179 2011-08-02  Yannick Moy  <moy@adacore.com>
6180
6181         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
6182         for new flag denoting which subprogram bodies are in ALFA
6183         * restrict.adb, sem_ch7.adb: Update comment
6184         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6185         sem_ch9.adb, sem_res.adb: Add calls to
6186         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
6187         * sem_ch6.adb (Analyze_Function_Return): add calls to
6188         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
6189         middle of the body, and extended return.
6190         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
6191         False when missing return.
6192         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
6193         to True for subprograms whose spec is in ALFA. Remove later on the flag
6194         on the entity used for a subprogram body when there exists a separate
6195         declaration.
6196         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
6197         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
6198         False, otherwise do nothing.
6199
6200 2011-08-02  Robert Dewar  <dewar@adacore.com>
6201
6202         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6203
6204 2011-08-02  Yannick Moy  <moy@adacore.com>
6205
6206         * sem_ch4.ads: minor formatting.
6207
6208 2011-08-02  Yannick Moy  <moy@adacore.com>
6209
6210         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
6211         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
6212         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
6213         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
6214         opt.ads: cleanup of SPARK mode
6215
6216 2011-08-02  Yannick Moy  <moy@adacore.com>
6217
6218         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
6219         types.
6220         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
6221         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
6222         * sem_ch3.adb
6223         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
6224         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
6225         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
6226         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
6227         types.
6228         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
6229         non-static range.
6230         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
6231         functions whose return type is not in ALFA.
6232         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
6233         specifications.
6234         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
6235         parameter's type is not in ALFA.
6236         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
6237         types are in ALFA.
6238
6239 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6240
6241         * sem_ch6 (Analyze_Expression_Function): treat the function as
6242         Inline_Always, and introduce a subprogram declaration for it when it is
6243         not a completion.
6244         * inline.adb (Add_Inlined_Body): recognize bodies that come from
6245         expression functions, so that the back-end can determine whether they
6246         can in fact be inlined.
6247         * sem_util.adb (Is_Expression_Function): predicate to determine whether
6248         a function body comes from an expression function.
6249
6250 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6251
6252         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
6253         null exclusions to test Can_Never_Be_Null on the anonymous access types
6254         of the formals rather than testing the formals themselves. Exclude this
6255         check in cases where the Old_Formal is marked as a controlling formal,
6256         to avoid issuing spurious errors for bodies completing dispatching
6257         operations (due to the flag not getting set on controlling access
6258         formals in body specs).
6259         (Find_Corresponding_Spec): When checking full and subtype conformance of
6260         subprogram bodies in instances, pass Designated and E in that order, for
6261         consistency with the expected order of the formals (New_Id followed by
6262         Old_Id).
6263
6264 2011-08-02  Robert Dewar  <dewar@adacore.com>
6265
6266         * sem_ch8.adb: Minor reformatting.
6267
6268 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6269
6270         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
6271         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
6272         primitive operations of class-wide actuals.
6273
6274 2011-08-02  Javier Miranda  <miranda@adacore.com>
6275
6276         * exp_atag.ads, exp_atag.adb
6277         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
6278         since its value is implicitly passed in argument Typ.
6279         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
6280         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
6281         Build_Common_Dispatching_Select_Statements.
6282
6283 2011-08-02  Robert Dewar  <dewar@adacore.com>
6284
6285         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
6286         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
6287         Minor reformatting.
6288
6289 2011-08-02  Robert Dewar  <dewar@adacore.com>
6290
6291         * sem_res.adb: Minor reformatting.
6292         * sem_prag.adb: Minor reformatting.
6293
6294 2011-08-02  Javier Miranda  <miranda@adacore.com>
6295
6296         * exp_atag.adb, exp_atags.ads
6297         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
6298         by the tagged type Entity. Required to use this routine in the VM
6299         targets since we do not have available the Tag entity in the VM
6300         platforms.
6301         * exp_ch6.adb
6302         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
6303         Ada.Tags has not been previously loaded.
6304         * exp_ch7.adb
6305         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
6306         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
6307         * sem_aux.adb
6308         (Enclosing_Dynamic_Scope): Add missing support to handle the full
6309         view of enclosing scopes. Required to handle enclosing scopes that
6310         are synchronized types whose full view is a task type.
6311         * exp_disp.adb
6312         (Build_VM_TSDs): Minor code improvement to avoid generating and
6313         analyzing lists with empty nodes.
6314         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
6315         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
6316         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
6317         (Make_Disp_Timed_Select_Body): Add support for VM targets.
6318         (Make_Select_Specific_Data_Table): Add support for VM targets.
6319         (Make_VM_TSD): Generate code to initialize the SSD structure of
6320         the TSD.
6321
6322 2011-08-02  Yannick Moy  <moy@adacore.com>
6323
6324         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
6325         cross-references section in ALI.
6326         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
6327         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
6328         Sub).
6329         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
6330         subprogram or package entity of a node
6331         (Is_Local_Reference_Type): new function returns True for references
6332         selected in local cross-references.
6333         (Lt): function extracted from Lt in Output_References
6334         (Write_Entity_Name): function extracted from Output_References
6335         (Generate_Definition): generate reference with type 'D' for definition
6336         of objects (object declaration and parameter specification), with
6337         appropriate locations and units, for use in local cross-references.
6338         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
6339         references of type 'I' for initialization in object definition.
6340         (Output_References): move part of function Lt and procedure
6341         Write_Entity_Name outside of the body. Ignore references of types 'D'
6342         and 'I' introduced for local cross-references.
6343         (Output_Local_References): new procedure to output the local
6344         cross-references sections.
6345         (Lref_Entity_Status): new array defining whether an entity is a local
6346         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
6347         with 'I' type when initialization expression is present.
6348         * get_scos.adb, get_scos.ads: Correct comments and typos
6349
6350 2011-08-02  Javier Miranda  <miranda@adacore.com>
6351
6352         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
6353         the JVM target.
6354         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
6355         the JVM target.
6356         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
6357         TSD support.
6358
6359 2011-08-02  Vincent Celier  <celier@adacore.com>
6360
6361         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
6362         (No_Space_Img): New function
6363         (Find_Excluded_Sources): When reading from a file, record the file name
6364         and the line number for each excluded source.
6365         (Mark_Excluded_Sources): When reporting an error, if the excluded
6366         sources were read from a file, include file name and line number in
6367         the error message.
6368
6369 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6370
6371         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
6372
6373 2011-08-02  Robert Dewar  <dewar@adacore.com>
6374
6375         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
6376
6377 2011-08-02  Javier Miranda  <miranda@adacore.com>
6378
6379         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
6380         generation of TSDs to the DOTNET compiler.
6381         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
6382         generation of TSDs to the DOTNET compiler.
6383
6384 2011-08-02  Javier Miranda  <miranda@adacore.com>
6385
6386         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
6387         record of all the tagged types declared inside library level package
6388         declarations, library level package bodies or library level subprograms.
6389         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
6390         associated with a given tagged type.
6391         (Build_VM_TSDs): New subprogram.
6392         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
6393         compilation units that are subprograms.
6394         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
6395         compilation units that are package bodies.
6396         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
6397         units that are a package declaration or a package instantiation.
6398         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
6399         reorganization to improve the error generated by the frontend when the
6400         function Ada.Tags.Secondary_Tag is not available.
6401         * rtsfind.ads (RE_Register_TSD): New runtime entity.
6402         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
6403
6404 2011-08-02  Javier Miranda  <miranda@adacore.com>
6405
6406         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
6407
6408 2011-08-02  Robert Dewar  <dewar@adacore.com>
6409
6410         * s-imenne.ads: Minor reformatting.
6411
6412 2011-08-02  Robert Dewar  <dewar@adacore.com>
6413
6414         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
6415         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
6416         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
6417
6418 2011-08-02  Robert Dewar  <dewar@adacore.com>
6419
6420         * einfo.ads (Materialize_Entity): Document this is only for renamings
6421         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
6422         required debug information in the case where we transform the object
6423         declaration into a renaming declaration.
6424         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
6425         object
6426         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
6427         Materialize_Entity.
6428
6429 2011-08-02  Robert Dewar  <dewar@adacore.com>
6430
6431         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
6432         Suppress_Init_Procs.
6433         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
6434         Suppress_Initialization/Initialization_Suppressed.
6435         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
6436         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
6437         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
6438         * sem_prag.adb: New processing for pragma Suppress_Initialization.
6439
6440 2011-08-02  Robert Dewar  <dewar@adacore.com>
6441
6442         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
6443         Minor reformatting.
6444
6445 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6446
6447         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
6448         only have inheritable classwide pre/postconditions.
6449
6450 2011-08-02  Javier Miranda  <miranda@adacore.com>
6451
6452         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
6453         * rtsfind.ads (RE_Check_TSD): New runtime entity.
6454         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
6455         checks if the external tag of a type is the same as the external tag
6456         of some other declaration.
6457
6458 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6459
6460         * s-taskin.ads: Minor reformatting.
6461
6462 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6463
6464         * g-comlin.adb (Display_Help): swap the order in which it prints the
6465         short help and the general usage.
6466
6467 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6468
6469         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
6470         the aspect declarations and attach them to the generic copy for
6471         subsequent analysis.
6472         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
6473         declarations of the generic tree to the new subprogram declarations.
6474         * sem_attr.adb (Check_Precondition_Postcondition): recognize
6475         conditions that apply to a subprogram instance.
6476
6477 2011-08-02  Robert Dewar  <dewar@adacore.com>
6478
6479         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
6480
6481 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6482
6483         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
6484         private type with a tagged full view is not derived in the immediate
6485         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
6486
6487 2011-08-02  Robert Dewar  <dewar@adacore.com>
6488
6489         * exp_ch4.adb: Minor reformatting.
6490
6491 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6492
6493         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
6494         Ada2012 iterator, the loop will be rewritten during expansion into a
6495         while loop with a cursor and an element declaration. Do not analyze the
6496         body in this case, because if the container is for indefinite types the
6497         actual subtype of the elements will only be determined when the cursor
6498         declaration is analyzed.
6499
6500 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6501
6502         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
6503         size/alignment related attributes in CodePeer_Mode.
6504
6505 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6506
6507         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
6508         Prepend_Element, since this can result in the operation getting the
6509         wrong slot in the full type's dispatch table if the full type has
6510         inherited operations. The incomplete type's operation will get added
6511         to the proper position in the full type's primitives
6512         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
6513         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
6514         dispatching operations, since there are cases where nonprimitive
6515         subprograms can get added to the list of incomplete dependents (such
6516         as subprograms in nested packages).
6517         * sem_ch6.adb (Process_Formals): First, remove test for being in a
6518         private part when determining whether to add a primitive with a
6519         parameter of a tagged incomplete type to the Private_Dependents list.
6520         Such primitives can also occur in the visible part, and should not have
6521         been excluded from being private dependents.
6522         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
6523         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
6524         list of a Taft-amendment incomplete type is a primitive before issuing
6525         an error that the full type must appear in the same unit. There are
6526         cases where nonprimitives can be in the list (such as subprograms in
6527         nested packages).
6528         * sem_disp.adb (Derives_From): Use correct condition for checking that
6529         a formal's type is derived from the type of the corresponding formal in
6530         the parent subprogram (the condition was completely wrong). Add
6531         checking that was missing for controlling result types being derived
6532         from the result type of the parent operation.
6533
6534 2011-08-02  Yannick Moy  <moy@adacore.com>
6535
6536         * errout.adb (First_Node): minor renaming
6537         * restrict.adb (Check_Formal_Restriction): put restriction warning on
6538         first node.
6539
6540 2011-08-02  Yannick Moy  <moy@adacore.com>
6541
6542         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
6543         before accessing operands.
6544         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
6545         decide whether an initialization expression respects SPARK rules, as
6546         the plain node is the expanded one. This allows for more valid warnings
6547         to be issued.
6548         * gnat_rm.texi: Minor update.
6549
6550 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6551
6552         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
6553         previous change.
6554
6555 2011-08-02  Robert Dewar  <dewar@adacore.com>
6556
6557         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
6558
6559 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6560
6561         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
6562         loop statements and the element renaming declaration with a block when
6563         the element type is controlled.
6564
6565 2011-08-02  Yannick Moy  <moy@adacore.com>
6566
6567         * sinfo.ads: Minor formatting.
6568
6569 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6570
6571         * sem_aggr.adb (Add_Association): if the association has a box and no
6572         expression, use the Sloc of the aggregate itself for the new
6573         association.
6574         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
6575         the Original_Node.
6576
6577 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6578
6579         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
6580         When a container is provided via a function call, generate a renaming
6581         of the function result. This avoids the creation of a transient scope
6582         and the premature finalization of the container.
6583         * exp_ch7.adb (Is_Container_Cursor): Removed.
6584         (Wrap_Transient_Declaration): Remove the supression of the finalization
6585         of the list controller when the declaration denotes a container cursor,
6586         it is not needed.
6587
6588 2011-08-02  Yannick Moy  <moy@adacore.com>
6589
6590         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
6591         node is from source, instead of the original node being from source.
6592         * sem_aggr.adb
6593         (Resolve_Array_Aggregate): refine the check for a static expression, to
6594         recognize also static ranges
6595         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
6596         Array_Type_Declaration): postpone the test for the type being a subtype
6597         mark after the type has been resolved, so that component-selection and
6598         expanded-name are discriminated.
6599         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
6600         to distinguish the case of an iteration scheme, so that an error is
6601         issed on a non-static range in SPARK except in an iteration scheme.
6602         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
6603         In_Iter_Schm = True.
6604         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
6605         user-defined operators so that they are allowed in renaming
6606         * sem_ch8.adb
6607         (Find_Selected_Component): refine the check for prefixing of operators
6608         so that they are allowed in renaming. Move the checks for restrictions
6609         on selector name after analysis discriminated between
6610         component-selection and expanded-name.
6611         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
6612         concatenation argument of string type if it is static.
6613         * sem_util.adb, sem_util.ads
6614         (Check_Later_Vs_Basic_Declarations): add a new function
6615         Is_Later_Declarative_Item to decice which declarations are allowed as
6616         later items, in the two different modes Ada 83 and SPARK. In the SPARK
6617         mode, add that renamings are considered as later items.
6618         (Enclosing_Package): new function to return the enclosing package
6619         (Enter_Name): correct the rule for homonyms in SPARK
6620         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
6621         from source (result of expansion) to avoid issuing wrong warnings.
6622
6623 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6624
6625         * errout.adb: On anything but an expression First_Node returns its
6626         argument.
6627
6628 2011-08-02  Pascal Obry  <obry@adacore.com>
6629
6630         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6631
6632 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6633
6634         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6635         Set the associated loop as the related expression of internally
6636         generated cursors.
6637         * exp_ch7.adb (Is_Container_Cursor): New routine.
6638         (Wrap_Transient_Declaration): Supress the finalization of the list
6639         controller when the declaration denotes a container cursor.
6640
6641 2011-08-02  Yannick Moy  <moy@adacore.com>
6642
6643         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6644         command line now.
6645         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6646         expression is a simple expression. This check cannot be performed in
6647         the semantics, so just drop it.
6648         (P_Index_Or_Discriminant_Constraint): move check that the index or
6649         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6650         semantics. Other cases were previously checked in the semantics.
6651         * par-ch4.adb (P_Name): move checks that a selector name is not
6652         character literal or an operator symbol to Find_Selected_Component in
6653         the semantics
6654         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6655         declarations are not placed after later declarations in a separate
6656         procedure in Sem_Util (possibly not the best choice?), to be used both
6657         during parsing, for Ada 83 mode, and during semantic analysis, for
6658         SPARK mode.
6659         * par-endh.adb (Check_End): move check that end label is not missing
6660         to Process_End_Label in the semantics
6661         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6662         the special case for SPARK restriction
6663         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6664         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6665         parameter Force to issue the error message even on internal node (used
6666         for generated end label). Call Check_Restriction to check when an error
6667         must be issued. In SPARK mode, issue an error message even if the
6668         restriction is not set.
6669         (Check_Restriction): new procedure with an additional out parameter to
6670         inform the caller that a message has been issued
6671         * sem_aggr.adb: Minor modification of message
6672         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6673         instead of issuing an error message directly
6674         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6675         declarations are not placed after later declarations, by calling
6676         Check_Later_Vs_Basic_Declarations
6677         (Analyze_Subtype_Declaration): move here the check that an index or
6678         discriminant constraint must be a subtype mark. Change the check that
6679         a subtype of String must start at one so that it works on subtype marks.
6680         * sem_ch4.adb (Analyze_Call): move here the check that a named
6681         association cannot follow a positional one in a call
6682         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6683         instead of issuing an error message directly
6684         * sem_ch8.adb (Find_Selected_Component): move here the check that a
6685         selector name is not a character literal or an operator symbol. Move
6686         here the check that the prefix of an expanded name cannot be a
6687         subprogram or a loop statement.
6688         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6689         procedure called from parsing and semantics to check that basic
6690         declarations are not placed after later declarations
6691         (Process_End_Label): move here the check that end label is not missing
6692
6693 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6694
6695         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
6696         representation clause in codepeer mode, since it confuses CodePeer and
6697         does not bring useful info.
6698
6699 2011-08-02  Ed Falis  <falis@adacore.com>
6700
6701         * init.c: initialize fp hw on MILS.
6702
6703 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6704
6705         * errout.adb (First_Node): for bodies, return the node itself (small
6706         optimization). For other nodes, do not check source_unit if the node
6707         comes from Standard.
6708
6709 2011-08-02  Robert Dewar  <dewar@adacore.com>
6710
6711         * exp_ch3.adb: Minor comment additions.
6712         * sem_ch13.adb: Minor reformatting.
6713
6714 2011-08-02  Pascal Obry  <obry@adacore.com>
6715
6716         * make.adb, makeutl.adb: Removes some superfluous directory separator.
6717
6718 2011-08-02  Robert Dewar  <dewar@adacore.com>
6719
6720         * sem_attr.adb: Minor reformatting.
6721
6722 2011-08-02  Robert Dewar  <dewar@adacore.com>
6723
6724         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
6725         (Has_Default_Component_Value): Removed
6726         * einfo.ads Comment updates
6727         (Has_Default_Aspect): Replaces Has_Default_Value
6728         (Has_Default_Component_Value): Removed
6729         * exp_ch13.adb
6730         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
6731         * exp_ch3.adb
6732         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
6733         (Get_Simple_Init_Val): Handle Default_Value aspect
6734         (Needs_Simple_Initialization): Handle Default_Value aspect
6735         * exp_ch3.ads: Needs_Simple_Initialization
6736         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
6737         * par-prag.adb (Pragma_Default[_Component]Value) Removed
6738         * sem_ch13.adb
6739         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
6740         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
6741         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
6742
6743 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6744
6745         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
6746         package containing iteration primitives.
6747         exp_ch5.adb (Expand_Iterator_Loop): ditto.
6748
6749 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6750
6751         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
6752         "of", pre-analyze expression in case it is a function call with
6753         finalization actions that must be placed ahead of the loop.
6754         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
6755         on an Ada2012 iterator, insert them ahead of the rewritten loop.
6756
6757 2011-08-02  Geert Bosch  <bosch@adacore.com>
6758
6759         * cstand.adb (Create_Float_Types): Only consider C's long double for
6760         Long_Long_Float, in addition to double.
6761
6762 2011-08-02  Robert Dewar  <dewar@adacore.com>
6763
6764         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
6765         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
6766         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
6767         Minor reformatting.
6768
6769 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6770
6771         * sem_attr.adb: handle properly 'Result when it is a prefix of an
6772         indexed component.
6773
6774 2011-08-02  Javier Miranda  <miranda@adacore.com>
6775
6776         * einfo.ads, einfo.adb
6777         (Original_Access_Type): Move this attribute to Node26 since there was
6778         an undocumented use of Node21 in E_Access_Subprogram_Type entities
6779         which causes conflicts and breaks the generation of the .NET compiler.
6780         (Interface_Name): Add missing documentation on JGNAT only uses of
6781         this attribute.
6782
6783 2011-08-02  Geert Bosch  <bosch@adacore.com>
6784
6785         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
6786         (Find_Back_End_Float_Type): Likewise
6787         (Create_Back_End_Float_Types): Likewise
6788         (Create_Float_Types): Likewise
6789         (Register_Float_Type): Likewise
6790         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6791         Nlist and split out type selection in new local Find_Base_Type function.
6792         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6793         Nlist
6794         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6795
6796 2011-08-02  Robert Dewar  <dewar@adacore.com>
6797
6798         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6799         alpha order).
6800         * opt.ads: Minor comment change.
6801         * sem_ch12.adb: Minor code reorganization.
6802
6803 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6804
6805         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6806         subtype's list of rep items to the list on the full subtype in the case
6807         where the lists are the same.
6808
6809 2011-08-02  Geert Bosch  <bosch@adacore.com>
6810
6811         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6812         using the one from System.Strings, which also deallocates all strings.
6813
6814 2011-08-02  Geert Bosch  <bosch@adacore.com>
6815
6816         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6817         function.
6818         * gcc-interface/Make-lang.in: Update dependencies.
6819
6820 2011-08-02  Olivier Hainque  <hainque@adacore.com>
6821
6822         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6823         end_locus.
6824
6825 2011-08-02  Javier Miranda  <miranda@adacore.com>
6826
6827         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6828         associated with anonymous access to subprograms.
6829
6830 2011-08-02  Geert Bosch  <bosch@adacore.com>
6831
6832         * opt.ads
6833         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6834         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6835         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6836         (Add_Symbol_Definition): Move to switch-c.adb
6837         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6838         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6839         (Add_Symbol_Definition): Move to switch-c.adb.
6840         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6841         * sem_warn.adb
6842         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6843         Move to warnsw.adb.
6844         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6845         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6846         Move to warnsw.adb.
6847         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6848         (Add_Symbol_Definition): Moved from Prepcomp.
6849         * switch-c.ads: Update copyright notice. Use String_List instead of
6850         Argument_List, removing dependency on System.OS_Lib.
6851
6852 2011-08-02  Yannick Moy  <moy@adacore.com>
6853
6854         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6855         mode on initialization expression which does not respect SPARK
6856         restrictions.
6857         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6858         if the tree referenced by its argument represents an initialization
6859         expression in SPARK, suitable for initializing an object in an object
6860         declaration.
6861
6862 2011-08-02  Javier Miranda  <miranda@adacore.com>
6863
6864         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6865         internally generated access to subprogram with its associated protected
6866         subprogram type.
6867         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6868
6869 2011-08-02  Geert Bosch  <bosch@adacore.com>
6870
6871         * cstand.adb (Register_Float_Type): Print information about type to
6872         register, if the Debug_Flag_Dot_B is set.
6873         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6874         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6875         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6876         with a requested precision of more than Max_Digits digits and no more
6877         than Max_Base_Digits digits, if a range specification is present and the
6878         Predefined_Float_Types list has a suitable type to derive from.
6879         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6880         case of type completion with pragma Import
6881         * sem_prag.adb
6882         (Process_Import_Predefined_Type): Processing to complete a type
6883         with pragma Import. Currently supports floating point types only.
6884         (Set_Convention_From_Pragma): Do nothing without underlying type.
6885         (Process_Convention): Guard against absence of underlying type,
6886         which may happen when importing incomplete types.
6887         (Process_Import_Or_Interface): Handle case of importing predefined
6888         types. Tweak error message.
6889
6890 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6891
6892         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6893         functions to previous change.  Reorganize code slightly.
6894
6895 2011-08-02  Geert Bosch  <bosch@adacore.com>
6896
6897         * back_end.ads (Register_Type_Proc): New call back procedure type for
6898         allowing the back end to provide information about available types.
6899         (Register_Back_End_Types): New procedure to register back end types.
6900         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6901         available types.
6902         * cstand.adb (Back_End_Float_Types): New list for floating point types
6903         supported by the back end.
6904         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6905         (Copy_Float_Type): New procedure to make new copies of predefined types.
6906         (Register_Float_Type): New call back procedure to populate the BEFT list
6907         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6908         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6909         (Create_Float_Types): New procedure to create entities for floating
6910         point types predefined in Standard, and put these and any remaining
6911         BEFTs on the Predefined_Float_Types list.
6912         * stand.ads (Predefined_Float_Types): New list for predefined floating
6913         point types that do not have declarations in package Standard.
6914
6915 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6916
6917         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
6918         entity node for the unit containing the parameter.
6919         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6920         (Add_Inlined_Subprogram): Likewise.
6921         * gcc-interface/Make-lang.in: Update dependencies.
6922
6923 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6924
6925         * s-stusta.adb (Print): Make sure Pos is always initialized to a
6926         suitable value.
6927
6928 2011-08-02  Geert Bosch  <bosch@adacore.com>
6929
6930         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6931
6932 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6933
6934         * sem_type.adb (Covers): Move trivial case to the top and reuse the
6935         computed value of Base_Type.
6936
6937 2011-08-02  Yannick Moy  <moy@adacore.com>
6938
6939         * restrict.adb (Check_Restriction): issue an error for any use of
6940         class-wide, even if the No_Dispatch restriction is not set.
6941         * sem_aggr.adb: Correct typos in comments and messages in formal mode
6942         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6943         when completing a private extension, the type named in the private part
6944         is not the same as that named in the visible part.
6945         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6946         of an inherited primitive operations of a tagged type or type extension
6947         that returns the tagged type.
6948         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6949         function which returns True for an implicit operation inherited by the
6950         derived type declaration for the argument type.
6951         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6952         order.
6953
6954 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6955
6956         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6957         Process_Bounds, to perform analysis with expansion of a range or an
6958         expression that is the iteration scheme for a loop.
6959         (Analyze_Iterator_Specification): If domain of iteration is given by a
6960         function call with a controlled result, as is the case if call returns
6961         a predefined container, ensure that finalization actions are properly
6962         generated.
6963         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6964
6965 2011-08-02  Javier Miranda  <miranda@adacore.com>
6966
6967         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6968         * gcc-interface/Make-lang.in: Update dependencies.
6969
6970 2011-08-02  Javier Miranda  <miranda@adacore.com>
6971
6972         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6973         determine if the analysis is performed using N or Original_Node (N).
6974         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6975         functionality of routine Is_Variable avoids code duplication.
6976         * checks.adb (Determine_Range): Handle temporaries generated by
6977         Remove_Side_Effects.
6978
6979 2011-08-02  Javier Miranda  <miranda@adacore.com>
6980
6981         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6982         expansion of the condition. Required since the previous analysis was
6983         done with expansion disabled (see Resolve_Quantified_Expression) and
6984         hence checks were not inserted and record comparisons have not been
6985         expanded.
6986
6987 2011-08-02  Ed Falis  <falis@adacore.com>
6988
6989         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6990         Update header.
6991
6992 2011-08-02  Bob Duff  <duff@adacore.com>
6993
6994         * opt.ads: Minor comment fix.
6995
6996 2011-08-02  Bob Duff  <duff@adacore.com>
6997
6998         * sem_ch12.adb (Analyze_Package_Instantiation,
6999         Analyze_Subprogram_Instantiation): Turn off style checking while
7000         analyzing an instance. Whatever style checks that apply to the generic
7001         unit should apply, so it makes no sense to apply them in an instance.
7002         This was causing trouble when compiling an instance of a runtime
7003         unit that violates the -gnatyO switch.
7004         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7005         one of the two case statements, causing spurious errors.
7006
7007 2011-08-02  Robert Dewar  <dewar@adacore.com>
7008
7009         * uname.adb: Minor reformatting.
7010         * gnatcmd.adb: Minor reformatting.
7011         * exp_attr.adb: Minor reformatting.
7012
7013 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7014
7015         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7016         No_Dispatching_Calls, do not look for the Assign primitive, because
7017         predefined primitives are not created in this case.
7018
7019 2011-08-02  Bob Duff  <duff@adacore.com>
7020
7021         * stylesw.ads: Minor comment fixes.
7022
7023 2011-08-02  Robert Dewar  <dewar@adacore.com>
7024
7025         * freeze.adb (Add_To_Result): New procedure.
7026
7027 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
7028
7029         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7030         time, if the specific run-time routines for handling streams of strings
7031         are not available, use the default mechanism.
7032
7033 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7034
7035         * s-regpat.ads: Fix typo.
7036
7037 2011-08-02  Vincent Celier  <celier@adacore.com>
7038
7039         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7040         not null, call it to create the in memory config project file without
7041         parsing an existing default config project file.
7042
7043 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7044
7045         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7046
7047 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7048
7049         * sem_elim.adb: an abstract subprogram does not need an eliminate
7050         pragma for its descendant to be eliminable.
7051
7052 2011-08-02  Ed Falis  <falis@adacore.com>
7053
7054         * init.c: revert to handling before previous checkin for VxWorks
7055         * s-intman-vxworks.adb: delete unnecessary declarations related to
7056         using Ada interrupt facilities for handling signals.
7057         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7058         * s-intman-vxworks.ads: Import __gnat_install_handler as
7059         Initialize_Interrupts.
7060         * s-taprop-vxworks.adb: Delete Signal_Mask.
7061         (Abort_Handler): change construction of mask to unblock exception
7062         signals.
7063
7064 2011-08-02  Jerome Guitton  <guitton@adacore.com>
7065
7066         * a-except-2005.adb (Raise_From_Signal_Handler): Call
7067         Debug_Raise_Exception before propagation starts.
7068
7069 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7070
7071         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7072         to Restriction_Check_Required.
7073         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7074         * sem_res.adb (Resolve_Call): Likewise.
7075         * sem_attr.adb (Check_Stream_Attribute): Likewise.
7076
7077 2011-08-02  Bob Duff  <duff@adacore.com>
7078
7079         * stylesw.ads: Update comment.
7080         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7081         * errout.ads: Remove obsolete comment.
7082
7083 2011-08-02  Javier Miranda  <miranda@adacore.com>
7084
7085         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7086         (Set_Is_Safe_To_Reevaluate): new procedure.
7087         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7088         assignment is allowed on safe-to-reevaluate variables.
7089         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7090         temporary created to remove side effects in expressions that use
7091         the secondary stack as safe-to-reevaluate.
7092         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7093         variables that are not true constants.
7094
7095 2011-08-02  Robert Dewar  <dewar@adacore.com>
7096
7097         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7098         sem_res.adb, sem_ch6.adb: Minor reformatting.
7099
7100 2011-08-02  Jerome Guitton  <guitton@adacore.com>
7101
7102         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7103
7104 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7105
7106         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7107         not set Overridden_Operation if subprogram is an initialization
7108         procedure.
7109
7110 2011-08-02  Yannick Moy  <moy@adacore.com>
7111
7112         * par-ch6.adb: Correct obsolete name in comments
7113         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7114         which takes two message arguments (existing function takes one), with
7115         second message used for continuation.
7116         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7117         block statements that originate from a source block statement, not
7118         generated block statements
7119         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7120         symmetry with procedure case
7121         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7122         function to issue an error in formal mode if a package specification
7123         contains more than one tagged type or type extension.
7124         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7125         parameters matching formals of tagged types are objects (or ancestor
7126         type conversions of objects), not general expressions. Issue an error
7127         on view conversions that are not involving ancestor conversion of an
7128         extended type.
7129         (Resolve_Type_Conversion): in formal mode, issue an error on the
7130         operand of an ancestor type conversion which is not an object
7131         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7132         procedure so that it works also for actuals of function calls
7133         (Is_Actual_Tagged_Parameter): new function which determines if its
7134         argument is an actual parameter of a formal of tagged type in a
7135         subprogram call
7136         (Is_SPARK_Object_Reference): new function which determines if the tree
7137         referenced by its argument represents an object in SPARK
7138
7139 2011-08-02  Robert Dewar  <dewar@adacore.com>
7140
7141         * sem_ch3.adb: Minor reformatting
7142         Minor comment addition
7143         Minor error msg text change
7144
7145 2011-08-02  Javier Miranda  <miranda@adacore.com>
7146
7147         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7148         function. Used to be more precise when we generate a variable plus one
7149         assignment to remove side effects in the evaluation of the Bound
7150         expressions.
7151         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7152         of the bound expression to force its re-analysis and thus expand the
7153         associated transient scope (if required). Code cleanup replacing the
7154         previous code that declared the constant entity by an invocation to
7155         routine Force_Evaluation which centralizes this work in the frontend.
7156
7157 2011-08-02  Robert Dewar  <dewar@adacore.com>
7158
7159         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7160         (Base_Type): Now uses improved Is_Base_Type function
7161         * einfo.ads (Base_Type): Inline this function
7162
7163 2011-08-02  Robert Dewar  <dewar@adacore.com>
7164
7165         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7166         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7167
7168 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7169
7170         * gcc-interface/Make-lang.in: Update dependencies.
7171         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7172         targets.
7173
7174 2011-08-02  Yannick Moy  <moy@adacore.com>
7175
7176         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
7177         non-simple expression used in delta constraint
7178         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
7179         index constraint which is not a subtype mark
7180         * par.adb: With and use Restrict
7181         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
7182         mode on component type which is not a subtype mark and default
7183         expression on component
7184         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
7185         of string which does not have a lower index bound equal to 1
7186         (Array_Type_Declaration): issue an error in formal mode on index or
7187         component type which is not a subtype mark, and on aliased keyword on
7188         component
7189         (Derived_Type_Declaration): issue an error in formal mode on interface,
7190         limited or abstract type
7191         (Record_Type_Declaration): issue an error in formal mode on interface
7192         (Record_Type_Definition): issue an error in formal mode on tagged types
7193         and type extensions not declared in the specification of a library unit
7194         package; on null non-tagged record; on variant part
7195
7196 2011-08-02  Vincent Celier  <celier@adacore.com>
7197
7198         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
7199         not declared for qualified library project when Library_Name is not
7200         declared, but Library_Dir is.
7201
7202 2011-08-02  Robert Dewar  <dewar@adacore.com>
7203
7204         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
7205         pragmas (affects aspects [Component_]Default_Value
7206         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
7207         component type for the resolution
7208
7209 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7210
7211         * einfo.adb (Base_Type): Tune implementation for speed.
7212
7213 2011-08-02  Robert Dewar  <dewar@adacore.com>
7214
7215         * freeze.adb: Minor reformatting.
7216
7217 2011-08-02  Thomas Quinot  <quinot@adacore.com>
7218
7219         * scos.ads: Update comments.
7220
7221 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7222
7223         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
7224         base type, because the parent may be a subtype of a private type whose
7225         convention is established in a private part.
7226
7227 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
7228
7229         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
7230         statement in a block when the expansion of the return expression has
7231         created a finalization chain.
7232         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
7233         with the parent node.
7234         Add N_Extended_Return_Statement to handle the case where a transient
7235         object declaration appears in the Return_Object_Declarations list of
7236         an extended return statement.
7237
7238 2011-08-02  Matthew Gingell  <gingell@adacore.com>
7239
7240         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
7241         unused parameter 'name'.
7242
7243 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7244
7245         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
7246         inherited operation, check whether its alias, which is the source
7247         operastion that it renames, has been marked eliminated.
7248
7249 2011-08-02  Javier Miranda  <miranda@adacore.com>
7250
7251         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
7252         in-mode parameter whose type is an access type since it can be used to
7253         modify its designated object. Enforce code that handles as safe an
7254         access type that is not access-to-constant but it is the result of a
7255         previous removal of side-effects.
7256         (Remove_Side_Effects): Minor code reorganization of cases which require
7257         no action. Done to incorporate documentation on new cases uncovered
7258         working in this ticket: no action needed if this routine was invoked
7259         too early and the nodes are not yet decorated.
7260         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
7261         to routine Remove_Side_Effects by calls to Force_Evaluation since they
7262         were issued with actuals that are implicitly provided by
7263         Force_Evaluation.
7264
7265 2011-08-02  Robert Dewar  <dewar@adacore.com>
7266
7267         * sem_ch3.adb, sem_res.adb: Minor reformatting.
7268
7269 2011-08-02  Yannick Moy  <moy@adacore.com>
7270
7271         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
7272         to issue an error in formal mode on attribute not supported in this mode
7273         (Analyze_Attribute): issue errors on standard attributes not supported
7274         in formal mode.
7275         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
7276         comment, and issue error in formal mode on modulus which is not a power
7277         of 2.
7278         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
7279         range.
7280         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
7281         subtype mark.
7282         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
7283         operator on modular type (except 'not').
7284
7285 2011-08-02  Robert Dewar  <dewar@adacore.com>
7286
7287         * gnat_rm.texi: Minor reformatting.
7288
7289 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7290
7291         * s-osinte-linux.ads: Minor comment update and reformatting.
7292         * i-cexten.ads: Make this unit pure, as for its parent.
7293         Will allow its usage in more contexts if needed.
7294
7295 2011-08-02  Robert Dewar  <dewar@adacore.com>
7296
7297         * s-utf_32.ads: Minor comment fix.
7298
7299 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7300
7301         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
7302         operation of a tagged synchronized type, handle the case where the
7303         controlling argument is overloaded.
7304
7305 2011-08-02  Yannick Moy  <moy@adacore.com>
7306
7307         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
7308         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
7309         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
7310         SPARK mode and formal verification mode on processing SPARK restriction
7311         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
7312         requiring consistency checking.
7313
7314 2011-08-02  Robert Dewar  <dewar@adacore.com>
7315
7316         * sem_res.adb: Minor reformatting.
7317
7318 2011-08-02  Robert Dewar  <dewar@adacore.com>
7319
7320         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7321         a-cforse.ads: Remove unneeded with of Ada.Containers
7322         Remove commented out pragma Inline's
7323         Move specifications of new subprograms to the actual specs
7324
7325 2011-08-02  Yannick Moy  <moy@adacore.com>
7326
7327         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7328         a-cforse.ads: Update comments.
7329
7330 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7331
7332         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
7333
7334 2011-08-02  Robert Dewar  <dewar@adacore.com>
7335
7336         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7337         a-cforse.ads, a-cofove.ads: Minor reformatting.
7338
7339 2011-08-02  Claire Dross  <dross@adacore.com>
7340
7341         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
7342         a-cofove.ads: Add comments.
7343
7344 2011-08-02  Yannick Moy  <moy@adacore.com>
7345
7346         * gnat_rm.texi: Document formal containers.
7347
7348 2011-08-02  Emmanuel Briot  <briot@adacore.com>
7349
7350         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
7351         are empty sections.
7352
7353 2011-08-02  Robert Dewar  <dewar@adacore.com>
7354
7355         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
7356         reformatting.
7357
7358 2011-08-02  Robert Dewar  <dewar@adacore.com>
7359
7360         * aspects.adb: New aspects Default_Value and Default_Component_Value
7361         New format of Aspect_Names table checks for omitted entries
7362         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
7363         handling of boolean aspects for derived types.
7364         New aspects Default_Value and Default_Component_Value
7365         New format of Aspect_Names table checks for omitted entries
7366         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
7367         (Has_Default_Value): New flag
7368         (Has_Default_Component_Value): New flag
7369         (Has_Default_Value): New flag
7370         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
7371         table.
7372         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
7373         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
7374         Default_Value and Default_Component_Value
7375         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
7376         New aspects Default_Value and Default_Component_Value
7377         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
7378         * sprint.adb: Print N_Aspect_Specification node when called from gdb
7379
7380 2011-08-02  Vincent Celier  <celier@adacore.com>
7381
7382         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
7383         inherit library kind.
7384
7385 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7386
7387         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
7388         Minor reformatting.
7389
7390 2011-08-02  Robert Dewar  <dewar@adacore.com>
7391
7392         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
7393
7394 2011-08-02  Yannick Moy  <moy@adacore.com>
7395
7396         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
7397
7398 2011-08-02  Robert Dewar  <dewar@adacore.com>
7399
7400         * impunit.adb: Add comment.
7401
7402 2011-08-02  Yannick Moy  <moy@adacore.com>
7403
7404         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
7405         qualification of aggregates in formal mode
7406         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
7407         another aggregate
7408         (Resolve_Aggregate): complete the test that an aggregate is adequately
7409         qualified in formal mode
7410
7411 2011-08-02  Pascal Obry  <obry@adacore.com>
7412
7413         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
7414         * mlib-prj.adb: Supress warning when compiling binder generated file.
7415         (Build_Library): Supress all warnings when compiling the binder
7416         generated file.
7417
7418 2011-08-02  Yannick Moy  <moy@adacore.com>
7419
7420         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
7421         from here...
7422         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
7423         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
7424         Add with/use clauses to make Check_Formal_Restriction visible
7425
7426 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7427
7428         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
7429         in-parameters when type of the generic formal is private in the generic
7430         spec and non-private in the body.
7431
7432 2011-08-02  Claire Dross  <dross@adacore.com>
7433
7434         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
7435         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
7436         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
7437         * impunit.adb, Makefile.rtl: Take new files into account.
7438
7439 2011-08-02  Robert Dewar  <dewar@adacore.com>
7440
7441         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
7442         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7443
7444 2011-08-02  Yannick Moy  <moy@adacore.com>
7445
7446         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
7447         formal mode
7448         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
7449         matching static array bounds, taking into account the special case of
7450         string literals
7451         * sem_ch3.adb: Typo in comment.
7452
7453 2011-08-02  Yannick Moy  <moy@adacore.com>
7454
7455         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
7456         which issues an error in formal mode if its argument node is originally
7457         from source
7458         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
7459         has a discriminant specification so that it does not include the case
7460         of derived types
7461         (Derived_Type_Declaration): move here the test that a derived type has a
7462         discriminant specification
7463         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
7464         first element of a component association before accessing its choices
7465         (presence of component association is not enough)
7466         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
7467         declaration is a library item before accessing the next element in a
7468         list, as library items are not member of lists
7469         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
7470         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
7471         Check_Formal_Restriction whenever possible.
7472
7473 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7474
7475         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
7476         reference when needed.
7477
7478 2011-08-02  Bob Duff  <duff@adacore.com>
7479
7480         * gnat_ugn.texi: Fix typo.
7481
7482 2011-08-02  Vincent Celier  <celier@adacore.com>
7483
7484         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
7485         archive file name. Do not use the full path name of archives for Open
7486         VMS.
7487
7488 2011-08-02  Robert Dewar  <dewar@adacore.com>
7489
7490         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
7491         Analyze_Aspect_Specifications
7492         * sem_ch13.adb
7493         (Analyze_Aspect_Specifications): New handling for boolean aspects
7494         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
7495         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
7496         sequence for Analyze_Aspect_Specifications
7497         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
7498         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
7499
7500 2011-08-02  Robert Dewar  <dewar@adacore.com>
7501
7502         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
7503         aspects, since these no longer exist.
7504
7505 2011-08-02  Robert Dewar  <dewar@adacore.com>
7506
7507         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
7508         semicolon, do not try to see if there are aspects following it.
7509         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
7510         aspect spec.
7511
7512 2011-08-02  Robert Dewar  <dewar@adacore.com>
7513
7514         * sem_ch8.adb, aspects.ads: Minor reformatting.
7515
7516 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7517
7518         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
7519         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
7520         extracted from...
7521         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
7522
7523 2011-08-02  Yannick Moy  <moy@adacore.com>
7524
7525         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
7526         mode on subprogram declaration outside of package specification, unless
7527         it is followed by a pragma Import
7528         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
7529         Access_Type_Declaration): issue error in formal mode on access type
7530         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
7531         incomplete type
7532         (Analyze_Object_Declaration): issue error in formal mode on object
7533         declaration which does not respect SPARK restrictions
7534         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
7535         declaration which does not respect SPARK restrictions
7536         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
7537         error in formal mode on digits or delta constraint
7538         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
7539         decimal fixed point type
7540         (Derived_Type_Declaration): issue error in formal mode on derived type
7541         other than type extensions of tagged record types
7542         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
7543         with check on access definition
7544         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
7545         mode on protected definition.
7546         (Analyze_Task_Definition): issue error in formal mode on task definition
7547
7548 2011-08-02  Robert Dewar  <dewar@adacore.com>
7549
7550         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
7551
7552 2011-08-02  Javier Miranda  <miranda@adacore.com>
7553
7554         * sem_ch6.adb (Can_Override_Operator): New function.
7555         (Verify_Overriding_Indicator): Add missing code to check overriding
7556         indicator in operators. Fixes regression.
7557         (Check_Overriding_Indicator): Minor reformating after replacing the
7558         code that evaluates if the subprogram can override an operator by
7559         invocations to the above new function.
7560         * einfo.adb
7561         (Write_Field26_Name): Add missing code to ensure that, following
7562         the documentation in einfo.ads, this field is not shown as attribute
7563         "Static_Initialization" on non-dispatching functions.
7564
7565 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
7566
7567         * sem_res.adb (Resolve_Call): A call to
7568         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
7569         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
7570         i.e., when the second parameter is of type Time_Span.
7571
7572 2011-08-02  Vincent Celier  <celier@adacore.com>
7573
7574         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
7575         with an archive instead of -L<library dir> -l<library name>.
7576
7577 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7578
7579         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
7580         mark the base types In_Use in addition to making the operations
7581         use_visible.
7582
7583 2011-08-02  Ed Falis  <falis@adacore.com>
7584
7585         * init.c: add and setup __gnat_signal_mask for the exception signals
7586         * s-inmaop-vxworks.adb: new file.
7587         * s-intman-vxworks.adb: remove unnecessary initializations and
7588         simplify remaining
7589         * s-intman-vxworks.ads: remove unnecessary variable
7590         * s-taprop-vxworks.adb: simplify signal initialization
7591
7592 2011-08-02  Robert Dewar  <dewar@adacore.com>
7593
7594         * sem_ch8.adb: Minor code reorganization, comment updates.
7595
7596 2011-08-02  Robert Dewar  <dewar@adacore.com>
7597
7598         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
7599         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
7600         here from Sem_Res.
7601         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
7602         (Matching_Static_Array_Bounds): Moved here from Sem_Res
7603
7604 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7605
7606         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
7607         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
7608         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
7609         use_type_clauses, to handle more efficiently use_type and use_all_type
7610         constructs.
7611         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
7612         Ada2012 Use_All_Type clause.
7613         (Use_Class_Wide_Operations): new procedure.
7614
7615 2011-08-02  Robert Dewar  <dewar@adacore.com>
7616
7617         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
7618         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
7619         expression to expression function.
7620
7621 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7622
7623         * sem_ch4.adb: transform simple Ada2012 membership into equality only
7624         if types are compatible.
7625
7626 2011-08-02  Yannick Moy  <moy@adacore.com>
7627
7628         * sem_res.adb (Matching_Static_Array_Bounds): new function which
7629         returns True if its argument array types have same dimension and same
7630         static bounds at each index.
7631         (Resolve_Actuals): issue an error in formal mode on actuals passed as
7632         OUT or IN OUT paramaters which are not view conversions in SPARK.
7633         (Resolve_Arithmetic_Op): issue an error in formal mode on
7634         multiplication or division with operands of fixed point types which are
7635         not qualified or explicitly converted.
7636         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7637         Boolean or array type (except String) operands.
7638         (Resolve_Equality_Op): issue an error in formal mode on equality
7639         operators for array types other than String with non-matching static
7640         bounds.
7641         (Resolve_Logical_Op): issue an error in formal mode on logical operators
7642         for array types with non-matching static bounds. Factorize the code in
7643         Matching_Static_Array_Bounds.
7644         (Resolve_Qualified_Expression): issue an error in formal mode on
7645         qualified expressions for array types with non-matching static bounds.
7646         (Resolve_Type_Conversion): issue an error in formal mode on type
7647         conversion for array types with non-matching static bounds
7648
7649 2011-08-02  Robert Dewar  <dewar@adacore.com>
7650
7651         * par-ch10.adb: Minor code reorganization (use Nkind_In).
7652
7653 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7654
7655         * par-ch9.adb: save location of entry for proper error message.
7656
7657 2011-08-02  Javier Miranda  <miranda@adacore.com>
7658
7659         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7660         (Use_Full_View) which permits this routine to climb through the
7661         ancestors using the full-view of private parents.
7662         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7663         Use_Full_View to true in calls to Is_Ancestor.
7664         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7665         true in call to Is_Ancestor.
7666         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7667         Use_Full_View to true in call to Is_Ancestor.
7668         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7669         call to Is_Ancestor.
7670         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7671         Use_Full_View to true in calls to Is_Ancestor.
7672         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7673         Make_Select_Specific_Data_Table, Register_Primitive,
7674         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7675         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7676         to true in call to Is_Ancestor.
7677         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7678         Use_Full_View to true in calls to Is_Ancestor.
7679         * exp_cg.adb
7680         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7681         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7682
7683 2011-08-02  Robert Dewar  <dewar@adacore.com>
7684
7685         * gnat_rm.texi: Minor reformatting.
7686         * sem_prag.adb: Minor reformatting.
7687
7688 2011-08-02  Tristan Gingold  <gingold@adacore.com>
7689
7690         * vms_data.ads: Add VMS qualifier for -gnateP.
7691
7692 2011-08-02  Robert Dewar  <dewar@adacore.com>
7693
7694         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7695         * par-ch7.adb (P_Package): Proper placement of aspects for package
7696         decl/instantiation.
7697         * par-endh.adb (Check_End): Ad Is_Sloc parameter
7698         (End_Statements): Add Is_Sloc parameterr
7699         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
7700         (Check_End): Ad Is_Sloc parameter
7701         (End_Statements): Add Is_Sloc parameterr
7702
7703 2011-08-02  Vincent Celier  <celier@adacore.com>
7704
7705         * ug_words: Add VMS qualifier equivalent to -gnateP:
7706         /SYMBOL_PREPROCESSING.
7707
7708 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
7709
7710         * gnat-style.texi: For hexadecimal numeric literals the typical
7711         grouping of digits is 4 to represent 2 bytes.
7712         A procedure spec which is split into several lines is indented two
7713         characters.
7714
7715 2011-08-02  Yannick Moy  <moy@adacore.com>
7716
7717         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
7718         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
7719         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
7720         properly qualified
7721         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
7722         choice in array aggregate
7723         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
7724         mark as ancestor
7725         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
7726         positional and named aggregate for record, or others in record
7727         aggregate, or multiple choice in record aggregate
7728         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
7729         array operands to logical operations AND, OR and XOR do not have the
7730         same static lower and higher bounds
7731         * sem_ch5.adb, sinfo.ads: Correct typos in comments
7732
7733 2011-08-01  Robert Dewar  <dewar@adacore.com>
7734
7735         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
7736         Replaces Last_Source_Node_In_Sequence.
7737         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
7738         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
7739         parens and blank in string (this was inconsistently implemented).
7740         * errout.ads
7741         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
7742         blank in string (this was inconsistently implemented).
7743         * gnat1drv.adb
7744         (Set_Global_Switches): Set formal mode switches appropriately
7745         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
7746         * par-prag.adb
7747         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
7748         call Set_Error_Msg_Lang to set "spark" as language name.
7749         * par.adb: Remove unnecessary call to set formal language for errout
7750         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
7751         appropriately and call Set_Error_Msg_Lang to set "spark" as language
7752         name.
7753         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
7754         calls to it, moved after resolution so that types are known
7755         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
7756         result of concatenation is not of type String
7757         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
7758         concatenation is not properly restricted
7759         * gnat_rm.texi: Add doc on pragma Spark_95.
7760         * gcc-interface/Makefile.in: Remove obsolete target pairs for
7761         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
7762         * gcc-interface/Make-lang.in: Update dependencies.
7763
7764 2011-08-01  Javier Miranda  <miranda@adacore.com>
7765
7766         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
7767         condition that detects if the overridden operation must replace an
7768         existing entity.
7769
7770 2011-08-01  Javier Miranda  <miranda@adacore.com>
7771
7772         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
7773         code declarations inserted by Insert_Actions in each alternative of the
7774         N_Case_Expression node.
7775
7776 2011-08-01  Robert Dewar  <dewar@adacore.com>
7777
7778         * sem_ch6.adb: Minor code reorganization.
7779         * sem_util.adb: Minor reformatting.
7780
7781 2011-08-01  Pascal Obry  <obry@adacore.com>
7782
7783         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
7784         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
7785
7786 2011-08-01  Yannick Moy  <moy@adacore.com>
7787
7788         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7789         literal or operator symbol which is prefixed
7790         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7791         mode on access attributes.
7792         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7793         that concatenation operands are properly restricted in formal mode
7794         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7795         Analyze_Concatenation_Operand. Issue an error in formal mode if the
7796         result of the concatenation has a type different from String.
7797         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7798         Analyze_Quantified_Expression, Analyze_Slice,
7799         Analyze_Null): issue an error in formal mode on unsupported constructs
7800         * sem_ch5.adb
7801         (Analyze_Block_Statement): only issue error on source block statement
7802         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7803         function which returns the last node in a list of nodes for which
7804         Comes_From_Source returns True, if any
7805         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7806         Last_Source_Node_In_Sequence
7807         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7808         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7809         mode on unsupported constructs
7810         * sem_ch9.adb Do not return after issuing error in formal mode, as the
7811         rest of the actions may be needed later on since the error is marked as
7812         not serious.
7813         * sinfo.ads: Typos in comments.
7814
7815 2011-08-01  Pascal Obry  <obry@adacore.com>
7816
7817         * projects.texi: Minor editing.
7818
7819 2011-08-01  Yannick Moy  <moy@adacore.com>
7820
7821         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7822         insertion character ~~
7823         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7824         (Set_Error_Msg_Lang): new procedure which fixes the language for use
7825         with insertion character ~~
7826         (Set_Msg_Text): treat insertion character ~~
7827         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7828         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7829         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7830         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7831         errors related to the formal language restriction not serious
7832         (insertion character |).
7833         * par.adb (Par): set formal language for error messages if needed
7834         * sem_ch6.adb (Check_Missing_Return): take into account possible
7835         generated statements at the end of the function
7836         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7837         enumeration value to define a new pragma SPARK_95
7838         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7839         SPARK_Version): new type and variables to store the SPARK version
7840         (none by default).
7841         (SPARK_Mode): return True when SPARK_Version is set
7842         * par-prag.adb: Correct indentation
7843         (Prag): take Pragma_SPARK_95 into account
7844         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7845         into account.
7846
7847 2011-08-01  Robert Dewar  <dewar@adacore.com>
7848
7849         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7850         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7851         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7852
7853 2011-08-01  Pascal Obry  <obry@adacore.com>
7854
7855         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7856         Target_Name to Get_Path call.
7857         (Parse_Single_Project): Likewise.
7858         (Post_Parse_Context_Clause): Likewise.
7859         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7860         Call Initialise_Project_Path with the proper Target_Name.
7861         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7862         search path.
7863         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7864         with the proper Target_Name.
7865         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7866         Part.Parse routine.
7867         (Parse_Project_And_Apply_Config): Likewise.
7868         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7869         This is fine as this part of the code is supporting only native
7870         compilation.
7871         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7872         is fine as this part of the code is supporting only native compilation.
7873
7874 2011-08-01  Yannick Moy  <moy@adacore.com>
7875
7876         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7877         of homonym, unless the homonym is one of the cases allowed in SPARK
7878         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7879         package declaration occurring after a body.
7880
7881 2011-08-01  Robert Dewar  <dewar@adacore.com>
7882
7883         * checks.adb, exp_ch4.adb: Minor reformatting.
7884
7885 2011-08-01  Javier Miranda  <miranda@adacore.com>
7886
7887         * einfo.ads (Access_Disp_Table): Fix documentation.
7888         (Dispatch_Table_Wrappers): Fix documentation.
7889
7890 2011-08-01  Pascal Obry  <obry@adacore.com>
7891
7892         * prj-env.adb, prj-env.ads: Minor reformatting.
7893
7894 2011-08-01  Yannick Moy  <moy@adacore.com>
7895
7896         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7897         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7898         procedures out of these packages.
7899         * errout.ads, errout.adb
7900         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7901         procedures in of this package
7902         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7903         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7904         on misplaced later vs initial declarations, like in Ada 83
7905         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7906         formal mode on attribute of private type whose full type declaration
7907         is not visible
7908         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7909         package declaration inside a package specification
7910         (Analyze_Full_Type_Declaration): issue error in formal mode on
7911         controlled type or discriminant type
7912         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7913         user-defined operator means that it should come from the source
7914         (New_Overloaded_Entity): issue error in formal mode on overloaded
7915         entity.
7916         * sem_ch6.ads, sem_ch13.ads: typos in comments.
7917
7918 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7919
7920         * atree.adb: Minor reformatting.
7921         * checks.adb: Minor reformatting.
7922
7923 2011-08-01  Vincent Celier  <celier@adacore.com>
7924
7925         * s-parame-vms-ia64.ads: Fix typo in comment
7926         Minor reformatting
7927         * s-parame-vms-restrict.ads: Removed, unused.
7928
7929 2011-08-01  Javier Miranda  <miranda@adacore.com>
7930
7931         * exp_ch3.adb
7932         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7933         * sem_ch3.adb
7934         (Constrain_Index): Remove side effects in the evaluation of the bounds.
7935         * sem_ch3.ads, sem_ch3.adb
7936         (Is_Constant_Bound): New extended version of the subprogram that was
7937         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7938         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7939         * sem_aux.ads (Constant_Value): Fix typo in comment.
7940         * checks.adb (Generate_Index_Checks): New implementation which, for
7941         array objects with constant bounds, generates the runtime check
7942         referencing the bounds of the array type. For other cases this routine
7943         provides its previous behavior obtaining such values from the array
7944         object.
7945         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7946         parent type.
7947         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7948         we cannot have semantic interpretations of the new node.
7949
7950 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7951
7952         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7953         expressions.
7954
7955 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7956
7957         * sem_ch8.adb: Minor code editing.
7958         * s-vxwext.adb: Remove trailing space.
7959         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7960         consistency with other files.
7961
7962 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7963
7964         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7965
7966 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7967
7968         * par-ch10.adb: reject parameterized expressions as compilation unit.
7969         * sem_ch4.adb: handle properly conditional expression with overloaded
7970         then_clause and no else_clause.
7971
7972 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7973
7974         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7975         like done by System.Aux_DEC.
7976         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7977
7978 2011-08-01  Yannick Moy  <moy@adacore.com>
7979
7980         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7981         missing label at end of declaration (subprogram or package)
7982         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7983         of positional and named parameter association
7984         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7985         Error_Msg_SP which adds a prefix to the error message giving the name
7986         of the formal language analyzed
7987         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7988         access result type in subprogram, unconstrained array as result type,.
7989         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7990         procedure
7991         * sem_ch8.adb: Code clean up.
7992
7993 2011-08-01  Javier Miranda  <miranda@adacore.com>
7994
7995         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7996         * einfo.ads (Access_Disp_Table): Fix documentation.
7997         (Dispatch_Table_Wrappers): Fix documentation.
7998         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7999         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8000         to enforce the documentation of this attribute.
8001         (Set_Is_Interface): Cleanup the assertion.
8002         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8003         the Underlying_Type entity before reading attribute Access_Disp_Table.
8004         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8005         Locate the Underlying_Type before reading attribute Access_Disp_Table.
8006         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8007         the Underlying_Type entity before reading attribute Access_Disp_Table.
8008         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8009         Locate the Underlying_Type entity before reading attribute
8010         Access_Disp_Table.
8011
8012 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8013
8014         * s-poosiz.ads: Additional overriding indicators.
8015
8016 2011-08-01  Yannick Moy  <moy@adacore.com>
8017
8018         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8019         formal mode.
8020         (Analyze_Iteration_Scheme): issue error in formal mode when loop
8021         parameter specification does not include a subtype mark.
8022         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8023         formal mode on abstract subprogram.
8024         (Analyze_Subprogram_Specification): issue error in formal mode on
8025         user-defined operator.
8026         (Process_Formals): issue error in formal mode on access parameter and
8027         default expression.
8028         * sem_ch9.adb (Analyze_Abort_Statement,
8029         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8030         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8031         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8032         Analyze_Requeue, Analyze_Selective_Accept,
8033         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8034         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8035         issue error in formal mode on user-defined raise statement.
8036
8037 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8038
8039         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8040         declaration being hidden when overriding an implicit inherited
8041         subprogram.
8042         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8043         (-gnats), do not complain about a source file that contains only a
8044         pragma No_Body.
8045
8046 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8047
8048         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8049         variable if already set.
8050
8051 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
8052
8053         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8054         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8055         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8056         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8057         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8058         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8059         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8060         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8061         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8062         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8063         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8064         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8065         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8066         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8067         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8068         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8069         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8070         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8071         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8072         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8073         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8074         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8075         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8076         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8077         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8078         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8079         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8080         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8081         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8082         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8083         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8084         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8085         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8086         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8087         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8088         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8089         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8090         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8091         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8092         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8093         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8094         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8095         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8096         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8097         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8098         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8099         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8100         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8101         s-osinte-mingw.ads: Update to GPLv3 run-time license.
8102         Use GNAT instead of GNARL.
8103
8104 2011-08-01  Bob Duff  <duff@adacore.com>
8105
8106         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8107         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8108         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8109         reformatting.
8110
8111 2011-08-01  Yannick Moy  <moy@adacore.com>
8112
8113         * debug.adb (d.D) reverve flag for the SPARK mode
8114         (d.E) reverve flag for SPARK generation mode
8115         (d.F) reverve flag for Why generation mode
8116         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8117         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
8118         functions which return True when the corresponding modes are set
8119         (Formal_Language): return "spark" or "alfa" when in formal verification
8120         mode.
8121         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8122         Error_Msg to prefix the error message with a tag giving the formal
8123         language
8124         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8125         message with a tag giving the formal language
8126         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8127         block statement
8128         (Analyze_Case_Statement): issue error in formal mode on case statement
8129         with a single "others" case alternative
8130         (Analyze_Exit_Statement): issue errors in formal mode on exit
8131         statements which do not respect SPARK restrictions
8132         (Analyze_Goto_Statement): issue error in formal mode on goto statement
8133         (Check_Unreachable_Code): always issue an error (not a warning) in
8134         formal mode on unreachable code (concerns both code after an infinite
8135         loop and after an unconditional jump, both not allowed in SPARK)
8136         * sem_ch6.adb (Analyze_Return_Statement): add call to
8137         Set_Return_Present for a procedure containing a return statement
8138         (already done for functions in Analyze_Function_Return)
8139         (Analyze_Function_Return): issue error in formal mode on extended
8140         return or if return is not last statement in function
8141         (Check_Missing_Return): issue error in formal mode if function does
8142         not end with return or if procedure contains a return
8143         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8144         function to detect if there is an inner scope of its parameter S which
8145         is a loop.
8146
8147 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8148
8149         * sem_ch6.ads: Minor reformatting.
8150
8151 2011-08-01  Javier Miranda  <miranda@adacore.com>
8152
8153         * sem_util.adb (Abstract_Interface_List): Complete condition when
8154         processing private type declarations to avoid reading unavailable
8155         attribute.
8156         (Is_Synchronized_Tagged_Type): Complete condition when processing
8157         private extension declaration nodes to avoid reading unavailable
8158         attribute.
8159
8160 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8161
8162         * sem_ch3.adb: Minor reformatting.
8163
8164 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8165
8166         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8167         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8168         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8169         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8170         for VMS, instead parametrize the common implementation with
8171         System.Parameters declarations.
8172
8173 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
8174
8175         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
8176
8177 2011-08-01  Tristan Gingold  <gingold@adacore.com>
8178
8179         * seh_init.c: Fix SEH handler installation on win64.
8180
8181 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8182
8183         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
8184         double analysis of an anonymous access to subprogram, because it can
8185         lead to improper sharing of profiles and a back-end crash.
8186
8187 2011-08-01  Robert Dewar  <dewar@adacore.com>
8188
8189         * make.adb, sem_ch4.adb: Minor reformatting.
8190         * gcc-interface/Make-lang.in: Update dependencies.
8191         * sem_util.adb, exp_ch5.adb: Minor reformatting.
8192
8193 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
8194
8195         * gnat_rm.texi: Fix definition of Long_Integer.
8196
8197 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8198
8199         * exp_aggr.adb: check limit size of static aggregate unconditionally,
8200         to prevent storage exhaustion.
8201         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
8202         finalized is a function body, insert the cleanup code before the final
8203         return statement, to prevent spurious warnings.
8204         * s-pooglo.ads: add overriding indicator.
8205
8206 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8207
8208         * sem_ch4.adb (Operator_Check): improve error message when both a
8209         with_clause and a use_clause are needed to make operator usage legal.
8210         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
8211         determine whether a compilation unit is visible within an other,
8212         either through a with_clause in the current unit, or a with_clause in
8213         its library unit or one one of its parents.
8214
8215 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8216
8217         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
8218         over an arbitrary expression of an array or container type.
8219         * lib-xref.adb: clarify comment.
8220
8221 2011-08-01  Bob Duff  <duff@adacore.com>
8222
8223         * einfo.ads: Minor reformatting.
8224         * debug.adb: Minor comment improvement.
8225
8226 2011-08-01  Javier Miranda  <miranda@adacore.com>
8227
8228         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
8229         consider hidden subprograms as valid candidates.
8230
8231 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
8232
8233         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
8234
8235 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
8236
8237         * gnat_ugn.texi: Fix typo.
8238
8239 2011-08-01  Robert Dewar  <dewar@adacore.com>
8240
8241         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
8242         lib-xref.adb: Minor reformatting
8243
8244 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
8245
8246         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
8247         when to generate a call to Move_Final_List.
8248         (Has_Controlled_Parts): Remove this function.
8249
8250 2011-08-01  Geert Bosch  <bosch@adacore.com>
8251
8252         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
8253         "," in choice list.
8254
8255 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8256
8257         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
8258         explicit raise of a predefined exception as Comes_From_Source if the
8259         original N_Raise_Statement comes from source.
8260
8261 2011-08-01  Robert Dewar  <dewar@adacore.com>
8262
8263         * sinfo.ads: Add comment.
8264         * sem_ch6.adb: Minor reformatting.
8265
8266 2011-08-01  Robert Dewar  <dewar@adacore.com>
8267
8268         * freeze.adb (Freeze_Entity): Refine check for bad component size
8269         clause to avoid rejecting confirming clause when atomic/aliased present.
8270
8271 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8272
8273         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
8274         better determine whether an entity reference is a write.
8275         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
8276         subcomponent.
8277         * lib-xref.adb (Output_References): Do no suppress a read reference at
8278         the same location as an immediately preceeding modify-reference, to
8279         handle properly in-out actuals.
8280
8281 2011-08-01  Tristan Gingold  <gingold@adacore.com>
8282
8283         * env.c (__gnat_setenv) [VMS]: Refine previous change.
8284
8285 2011-08-01  Quentin Ochem  <ochem@adacore.com>
8286
8287         * i-cstrin.adb (New_String): Changed implementation, now uses only the
8288         heap to compute the result.
8289
8290 2011-08-01  Robert Dewar  <dewar@adacore.com>
8291
8292         * atree.ads: Minor reformatting.
8293
8294 2011-08-01  Emmanuel Briot  <briot@adacore.com>
8295
8296         * g-expect.adb (Get_Command_Output): Fix memory leak.
8297
8298 2011-08-01  Geert Bosch  <bosch@adacore.com>
8299
8300         * cstand.adb (P_Float_Type): New procedure to print the definition of
8301         predefined fpt types.
8302         (P_Mixed_Name): New procedure to print a name using mixed case
8303         (Print_Standard): Use P_Float_Type for printing floating point types
8304         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
8305         precision IEEE float.
8306
8307 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8308
8309         * sem_ch3.adb: Minor reformatting.
8310
8311 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8312
8313         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
8314         the completion of a generic function, insert the new body rather than
8315         rewriting the original.
8316
8317 2011-08-01  Yannick Moy  <moy@adacore.com>
8318
8319         * sinfo.ads, errout.ads: Typos in comments.
8320
8321 2011-08-01  Robert Dewar  <dewar@adacore.com>
8322
8323         * par-endh.adb: Minor reformatting.
8324
8325 2011-08-01  Robert Dewar  <dewar@adacore.com>
8326
8327         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
8328         (Pre_Post_Aspects): New subtype.
8329         * par-ch12.adb (P_Generic): New syntax for aspects in packages
8330         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
8331         * par-ch7.adb (P_Package): Remove Decl parameter
8332         (P_Package): Handle new syntax for aspects (before IS)
8333         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
8334         new aspect syntax
8335         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
8336         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
8337         (P_Package): Remove Decl parameter
8338         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
8339         aspects
8340         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
8341         specs
8342         * sem_util.ads, sem_util.adb (Static_Boolean): New function
8343         * sinfo.ads: Document new syntax for aspects in packages etc.
8344         * sprint.adb: Handle new syntax of aspects before IS in package
8345
8346 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8347
8348         * atree.ads: Minor reformatting.
8349         * sem_prag.adb: Minor reformatting.
8350
8351 2011-08-01  Robert Dewar  <dewar@adacore.com>
8352
8353         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
8354         case expr alternative.
8355
8356 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8357
8358         * sem_ch12.adb: Fix typo.
8359
8360 2011-08-01  Geert Bosch  <bosch@adacore.com>
8361
8362         * sem_prag.adb (Check_No_Link_Name): New procedure.
8363         (Process_Import_Or_Interface): Use Check_No_Link_Name.
8364         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
8365         instead of Standard_Long_Long_Float_Size global. Preparation for
8366         eventual removal of per type constants.
8367         * exp_util.ads (Get_Stream_Size): New function returning the stream
8368         size value of subtype E.
8369         * exp_util.adb (Get_Stream_Size): Implement new function.
8370         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
8371         function.
8372         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
8373         * einfo.adb:
8374         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
8375
8376 2011-08-01  Geert Bosch  <bosch@adacore.com>
8377
8378         * cstand.adb: Fix comments.
8379         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
8380         count of arguments.
8381
8382 2011-08-01  Robert Dewar  <dewar@adacore.com>
8383
8384         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
8385
8386 2011-08-01  Geert Bosch  <bosch@adacore.com>
8387
8388         * atree.ads: Fix comment.
8389
8390 2011-08-01  Robert Dewar  <dewar@adacore.com>
8391
8392         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
8393         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
8394         * par.adb: Add with for Namet.Sp.
8395         * par-tchk.adb: Minor reformatting.
8396
8397 2011-08-01  Vincent Celier  <celier@adacore.com>
8398
8399         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
8400         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
8401         of the init procedure of a SAL.
8402         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
8403         New procedure.
8404
8405 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8406
8407         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
8408         reformatting.
8409
8410 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8411
8412         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
8413
8414 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8415
8416         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
8417         conformant with its spec (return True only for types that have
8418         an overriding Initialize primitive operation that prevents them from
8419         having preelaborable initialization).
8420         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
8421         initialization for controlled types in Ada 2005 or later mode.
8422
8423 2011-08-01  Robert Dewar  <dewar@adacore.com>
8424
8425         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
8426         Postcondition.
8427         (Same_Aspect): New function.
8428         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
8429         Type_Invariant, Precondition, Postcondition.
8430         * snames.ads-tmpl: Add Name_Type_Invariant.
8431
8432 2011-08-01  Robert Dewar  <dewar@adacore.com>
8433
8434         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
8435         here.
8436         (Freeze_All_Ent): Fix error in handling inherited aspects.
8437         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
8438         already analyzed, but don't skip entire processing of a declaration,
8439         that's wrong in some cases of declarations being rewritten.
8440         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
8441         Don't delay for integer, string literals
8442         Treat predicates in usual manner for delay, remove special case code,
8443         not needed.
8444         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
8445         (Build_Predicate_Function): Update saved expression in aspect
8446         (Build_Invariant_Procedure): Update saved expression in aspect
8447         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
8448         of replacement of discriminant references if the reference is simple.
8449
8450 2011-08-01  Robert Dewar  <dewar@adacore.com>
8451
8452         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
8453         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
8454         Static_Predicate and Dynamic_Predicate.
8455         (Build_Predicate_Function): Add processing for Static_Predicate
8456         and Dynamic_Predicate.
8457         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
8458         (From_Static_Predicate): New flag
8459         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
8460
8461 2011-08-01  Robert Dewar  <dewar@adacore.com>
8462
8463         * usage.adb: Documentation cleanup for Ada version modes in usage.
8464         * expander.adb: Minor reformatting.
8465
8466 2011-08-01  Robert Dewar  <dewar@adacore.com>
8467
8468         * atree.ads: Minor comment fix.
8469         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
8470         a-witeio.ads, sem_prag.adb: Minor reformatting.
8471
8472 2011-08-01  Doug Rupp  <rupp@adacore.com>
8473
8474         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
8475         pointers. Use descrip.h header file for convenience. Add some
8476         comments.
8477
8478 2011-08-01  Robert Dewar  <dewar@adacore.com>
8479
8480         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
8481         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
8482         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
8483         New procedure.
8484         (Check_Aspect_At_End_Of_Declarations): New procedure
8485         (Analye_Aspect_Specification): Minor changes for above procedures
8486         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
8487         specification node as well.
8488
8489 2011-08-01  Pascal Obry  <obry@adacore.com>
8490
8491         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
8492         Windows files. Use GetFilesAttributes() in this case to check for file
8493         existence instead of returning with an error code.
8494
8495 2011-08-01  Vincent Celier  <celier@adacore.com>
8496
8497         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
8498         High is above Source length.
8499
8500 2011-08-01  Robert Dewar  <dewar@adacore.com>
8501
8502         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
8503
8504 2011-08-01  Robert Dewar  <dewar@adacore.com>
8505
8506         * aspects.ads (Boolean_Aspects): New subtype.
8507         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
8508         for derived types in cases where the parent type and derived type have
8509         aspects.
8510         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
8511         with aspects when parent type also has aspects.
8512         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
8513         boolean expression at this point).
8514         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
8515         accordance with final decision on the Ada 2012 feature.
8516         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
8517
8518 2011-08-01  Matthew Heaney  <heaney@adacore.com>
8519
8520         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
8521
8522 2011-08-01  Pascal Obry  <obry@adacore.com>
8523
8524         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
8525         Fix Replace_Slice when High is above current string size.
8526         (Replace_Slice): Fix DL computation when High is above current
8527         string length.
8528
8529 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
8530
8531         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
8532
8533 2011-08-01  Matthew Heaney  <heaney@adacore.com>
8534
8535         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
8536         of node.
8537
8538 2011-08-01  Pascal Obry  <obry@adacore.com>
8539
8540         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
8541         reformatting.
8542
8543 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8544
8545         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
8546         access to protected subprograms in generic bodies.
8547         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
8548         protected type, indicate that the convention of the subprogram is
8549         Convention_Protected, because it may be used in subsequent declarations
8550         within the protected declaration.
8551
8552 2011-08-01  Vincent Celier  <celier@adacore.com>
8553
8554         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
8555         and "final" procedures when the name of the library is "ada", to avoid
8556         duplicate symbols "adainit" and "adafinal" in executables.
8557
8558 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8559
8560         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
8561         quantified expression that appears within a postcondition and uses the
8562         Ada2012 'Result attribute.
8563
8564 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8565
8566         * init.c (__gnat_error_handler): Cast reason to int.
8567         (__gnat_install_handler): Explain sa_sigaction use.
8568
8569 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8570
8571         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
8572         subprogram has copy-in copy-out parameters, try to promote the mode of
8573         the return type if it is passed in registers.
8574
8575 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8576
8577         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
8578         left operand as addressable.
8579
8580 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8581
8582         * gcc-interface/gigi.h (build_function_stub): Remove.
8583         (build_return_expr): Likewise.
8584         (convert_vms_descriptor): Declare.
8585         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
8586         (build_function_stub): Move to...
8587         * gcc-interface/utils2.c (build_return_expr): Move to...
8588         * gcc-interface/trans.c (build_function_stub): ...here.
8589         (build_return_expr): ...here.
8590         (Subprogram_Body_to_gnu): Add local variable for language_function.
8591         Disconnect the parameter attributes cache, if any, once done with it.
8592         Call end_subprog_body only after setting the end_locus.
8593         Build the stub associated with the function, if any, at the very end.
8594         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
8595         variables and streamline control flow.
8596
8597 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
8598
8599         PR ada/49819
8600         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
8601         g-trasym-dwarf.adb.
8602
8603 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8604
8605         PR bootstrap/49794
8606         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
8607         Assign to act.sa_sigaction.
8608         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
8609         current->return_address to char * before arithmetic.
8610
8611 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8612
8613         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
8614         Correct argument types.
8615         Extract code from reason.
8616         (__gnat_install_handler): Assign to act.sa_sigaction.
8617
8618 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
8619
8620         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
8621         (GNAT1_OBJS): ...here.
8622
8623 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
8624
8625         PR ada/48711
8626         * g-socthi-mingw.adb (Fill): Fix formatting.
8627
8628         * gcc-interface/gigi.h: Move around comment.
8629
8630 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
8631
8632         PR ada/46350
8633         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8634
8635 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
8636
8637         PR ada/48711
8638         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8639
8640 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
8641
8642         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8643         range comparison if Pmode is SImode.
8644
8645 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
8646             Eric Botcazou  <ebotcazou@adacore.com>
8647
8648         * adadecode.c: Wrap up in extern "C" block.
8649         * adadecode.h: Likewise.
8650         * adaint.c: Likewise.  Remove 'const' keyword.
8651         * adaint.h: Likewise.
8652         * argv.c: Likewise.
8653         * atree.h: Likewise.
8654         * cio.c: Likewise.
8655         * cstreams.c: Likewise.
8656         * env.c: Likewise.
8657         * exit.c: Likewise.
8658         * fe.h: Likewise.
8659         * final.c: Likewise.
8660         * init.c: Likewise.
8661         * initialize.c: Likewise.
8662         * link.c: Likewise.
8663         * namet.h: Likewise.
8664         * nlists.h: Likewise.
8665         * raise.c: Likewise.
8666         * raise.h: Likewise.
8667         * repinfo.h: Likewise.
8668         * seh_init.c: Likewise.
8669         * targext.c: Likewise.
8670         * tracebak.c: Likewise.
8671         * uintp.h: Likewise.
8672         * urealp.h: Likewise.
8673         * xeinfo.adb: Wrap up generated C code in extern "C" block.
8674         * xsinfo.adb: Likewise.
8675         * xsnamest.adb: Likewise.
8676         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8677         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8678         * gcc-interface/misc.c: Likewise.
8679         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8680         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
8681         ada/targext.o here...
8682         (GNAT_ADA_OBJS): ...and not here.
8683         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8684         (GNATBIND_OBJS): Reorder.
8685
8686 2011-07-07  Richard Henderson  <rth@redhat.com>
8687
8688         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8689         dwarf2out_frame_init.
8690
8691 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
8692
8693         * gcc-interface/misc.c (gnat_init): Tweak previous change.
8694
8695 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8696
8697         PR target/39150
8698         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
8699
8700 2011-07-06  Richard Guenther  <rguenther@suse.de>
8701
8702         * gcc-interface/misc.c (gnat_init): Merge calls to
8703         build_common_tree_nodes and build_common_tree_nodes_2.
8704         Re-initialize boolean_false_node.
8705
8706 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
8707             Olivier Hainque  <hainque@adacore.com>
8708             Nicolas Setton  <setton@adacore.com>
8709
8710         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
8711         the type according to the ARTIFICIAL_P parameter.
8712         (create_type_decl): Likewise.
8713         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
8714
8715 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
8716
8717         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
8718         (gnatbind): Likewise.
8719
8720 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8721
8722         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
8723
8724 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8725
8726         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
8727         local variable throughout.  Remove useless call to Base_Type.
8728         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
8729         Take it also into account for the volatileness of the field.  Set the
8730         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
8731
8732 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8733
8734         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
8735         on a dereference built for a by-ref object if it has an address clause.
8736
8737 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8738
8739         * einfo.ads (Address_Taken): Document use for the second argument of
8740         Asm_Input and Asm_Output attributes.
8741         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
8742         argument is an entity name, then set Address_Taken on it.
8743         <Attribute_Asm_Output>: Likewise.
8744         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
8745         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
8746         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
8747         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
8748
8749 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
8750
8751         PR middle-end/46500
8752         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
8753
8754 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
8755
8756         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
8757         (ada/utils.o): Update dependencies.
8758         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
8759         ../../../libcpp/libcpp.a.
8760         * gcc-interface/utils.c: Include common/common-target.h.
8761         (process_attributes): Use targetm_common.have_named_sections.
8762
8763 2011-06-07  Richard Guenther  <rguenther@suse.de>
8764
8765         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
8766         set_sizetype.
8767
8768 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8769
8770         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
8771         TREE_THIS_NOTRAP flag.
8772
8773 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8774
8775         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
8776         Fix thinko.
8777
8778 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8779
8780         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
8781         constants whose full view has discriminants specially.
8782
8783 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8784
8785         * gcc-interface/utils.c: Include diagnostic.h.
8786         (gnat_write_global_declarations): Output debug information for all
8787         global type declarations before finalizing the compilation unit.
8788         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8789
8790 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
8791
8792         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8793
8794 2011-05-25  Kai Tietz  <ktietz@redhat.com>
8795
8796         * adaint.c (__gnat_to_canonical_file_list_next): Use array
8797         initialization instead of const/none-const pointer assignment.
8798
8799 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
8800
8801         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8802         $(EXTRA_GNAT1_OBJS).
8803         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8804         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8805         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8806         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8807         libcommon-target.a instead of prefix.o.
8808
8809 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
8810
8811         PR ada/49097
8812         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8813
8814 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
8815
8816         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8817         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8818         instead of version.o.
8819
8820 2011-05-18  Kai Tietz <ktietz@redhat.com>
8821
8822         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8823         boolean_false_node instead of integer_zero_node.
8824         (convert_with_check): Likewise.
8825         * gcc-interface/decl.c (choices_to_gnu): Likewise.
8826
8827 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
8828
8829         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8830         type of the parameter is an unconstrained array, convert the actual to
8831         the type of the formal in the In Out and Out cases as well.
8832
8833 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
8834
8835         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8836         call build_function_type_array or build_varargs_function_type_array
8837         instead.
8838         (create_subprog_type): Don't call build_function_type; call
8839         build_function_type_vec instead.
8840
8841 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
8842
8843         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8844         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8845         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8846
8847 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
8848
8849         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8850
8851         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8852         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8853
8854 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
8855
8856         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8857
8858 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
8859
8860         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8861         instead of accessing TYPE_ARG_TYPES directly.
8862         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8863
8864 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8865
8866         PR ada/48844
8867         * gcc-interface/gigi.h (get_variant_part): Declare.
8868         * gcc-interface/decl.c (get_variant_part): Make global.
8869         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8870         types have the same constant size, are record types and T1 has a
8871         variant part while T2 doesn't.
8872
8873 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8874
8875         * gcc-interface/utils.c (begin_subprog_body): Do not call
8876         get_pending_sizes.
8877         (end_subprog_body): Likewise.
8878
8879 2011-05-04  Richard Guenther  <rguenther@suse.de>
8880
8881         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8882         int_const_binop.
8883         (pos_to_constructor): Likewise.
8884
8885 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
8886             Eric Botcazou  <ebotcazou@adacore.com>
8887
8888         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8889         of build_function_type.  Adjust calls to...
8890         (build_raise_check): ...this.  Do not take a void_tree parameter.
8891         Call build_function_type_list instead of build_function_type.
8892         Fix head comment and swap couple of conditional blocks.
8893
8894 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
8895
8896         * gnatvsn.ads (Library_Version): Bump to 4.7.
8897         (Current_Year): Bump to 2011.
8898
8899 2011-04-29  Michael Matz  <matz@suse.de>
8900
8901         * gcc-interface/misc.c (gnat_handle_option): Set
8902         warn_maybe_uninitialized.
8903
8904 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
8905
8906         * gnat_ugn.texi (Complexity Metrics Control): Update link to
8907         the Watson/McCabe paper.
8908
8909 2011-04-23  Jim Meyering  <meyering@redhat.com>
8910
8911         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8912
8913 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8914
8915         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8916         onto the new type.
8917
8918 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8919
8920         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8921         parameter.
8922         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
8923         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8924         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8925         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8926         <all>: Do not set flags on the reused DECL node coming from an alias.
8927         Set DECL_IGNORED_P on the DECL node built for subprograms if they
8928         don't need debug info here...
8929         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8930         (gigi): Adjust calls to create_subprog_decl.
8931         (build_raise_check): Likewise.
8932         (establish_gnat_vms_condition_handler): Likewise.
8933         (Compilation_Unit_to_gnu): Likewise.
8934         (gnat_to_gnu): Likewise.
8935
8936 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
8937
8938         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8939         (NO_REORDER_ADAFLAGS): New variable.
8940         (EXTRA_GNATTOOLS): Always define.
8941         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8942         Clean up and adjust list of files compiled with special options.
8943         * gcc-interface/Make-lang.in: Likewise.
8944         (ada/decl.o): Cosmetical change.
8945         (ada/misc.o): Remove dependency on $(PLUGIN_H).
8946
8947 2011-04-20  Jim Meyering  <meyering@redhat.com>
8948
8949         * initialize.c (__gnat_initialize): Remove useless if-before-free.
8950
8951 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8952
8953         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8954         $(CFLAGS) on the link line.
8955
8956 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8957
8958         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8959         padded type built for the return type if it is unconstrained.
8960
8961 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
8962
8963         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8964
8965 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
8966
8967         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8968         before calling TREE_CHAIN.
8969         * gcc-interface/misc.c (gnat_init_ts): New function.
8970         (LANG_HOOKS_INIT_TS): Define.
8971
8972 2011-04-12  Martin Jambor  <mjambor@suse.cz>
8973
8974         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8975         instead of cgraph_node.
8976
8977 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8978
8979         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8980         alignment on fields of the RETURN type built for the Copy-In Copy-Out
8981         mechanism.
8982
8983 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8984
8985         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8986         of aggregate types that contain a placeholder.
8987
8988 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
8989
8990         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8991         TYPE_ARG_TYPES.
8992         (handle_type_generic_attribute): Likewise.
8993
8994 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
8995
8996         PR ada/47163
8997         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8998
8999 2011-04-04  Kai Tietz  <ktietz@redhat.com>
9000
9001         PR ada/47163
9002         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9003         to flag value.
9004
9005 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9006
9007         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9008         type case, do not strip a padding type around the array type.
9009
9010 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9011
9012         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9013         types.
9014
9015 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9016
9017         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9018         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9019         code for -feliminate-unused-debug-types.
9020         (gnat_post_options): Likewise.
9021
9022 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9023
9024         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9025         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9026         distinct copy.
9027
9028 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9029
9030         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9031         DECL_ARTIFICIAL flag on enumeration types.
9032
9033 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9034
9035         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9036         fat pointer types artificial unconditionally.
9037         <E_Array_Subtype>: Attach the base array type as a parallel type if it
9038         isn't artificial.
9039
9040 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9041
9042         * gcc-interface/gigi.h (get_dummy_type): Declare.
9043         (build_dummy_unc_pointer_types): Likewise.
9044         (finish_fat_pointer_type): Likewise.
9045         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9046         fat pointer type has been built, complete it in place.
9047         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9048         and thin pointers.  Remove useless variable.
9049         (finish_fat_pointer_type): Make global and move to...
9050         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9051         (get_dummy_type): New function.
9052         (build_dummy_unc_pointer_types): Likewise.
9053         (gnat_pushdecl): Propage the name to the anonymous variants only.
9054         (update_pointer_to): Only adjust the pointer types in the unconstrained
9055         array case.
9056
9057 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9058
9059         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9060         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9061         if this is a Taft amendment type and the full declaration is available.
9062         * gcc-interface/trans.c (process_type): Likewise.
9063         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9064         (process_freeze_entity): Likewise.
9065         * gcc-interface/utils.c (dummy_global): New static variable.
9066         (gnat_write_global_declarations): If there are types declared as used
9067         at the global level, insert them in the global hash table.
9068
9069 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9070
9071         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9072         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9073         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9074         copy.
9075         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
9076         flag of the type accordingly.
9077         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9078
9079 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9080
9081         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9082         finalizing types when updating the pointers to the designated type.
9083         <all>: Finalize the deferred types even if we didn't defer processing
9084         of incomplete types in this invocation.
9085
9086 2011-04-01  Olivier Hainque  <hainque@adacore.com>
9087             Nicolas Setton  <setton@adacore.com>
9088             Eric Botcazou  <ebotcazou@adacore.com>
9089
9090         * gcc-interface/misc.c (gnat_descriptive_type): New function.
9091         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9092
9093 2011-03-28  Kai Tietz  <ktietz@redhat.com>
9094
9095         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9096         Windows targets.
9097         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9098         * system-mingw.ads (System): Change ZCX_By_Default default to True.
9099
9100         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9101
9102 2011-03-28  Tristan Gingold  <gingold@adacore.com>
9103
9104         PR ada/44431
9105         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9106         Use ada output of gnatbind.
9107         (ada/b_gnatb.adb): Ditto.
9108         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9109         (ada.mostlyclean, ada.stage1)
9110         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9111         (ada.stagefeedback): Adjust.
9112         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9113         Use ada output of gnatbind.
9114         (b_gnatm.adb): Ditto.
9115         (b_gnatl.o, b_gnatm.o): New rules.
9116
9117 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
9118
9119         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9120         for the padded type built to support a specified size or alignment.
9121
9122 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
9123
9124         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9125         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9126         unconditionally to the end of the unit when the designated type is
9127         limited_with'ed.
9128         <all>: Rename local variable.  Attempt to un-defer types only and do it
9129         for limited_with'ed types as well.
9130         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
9131         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9132         consistently and remove redundant call to finalize_from_with_types.
9133
9134 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
9135
9136         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9137         subprograms without a previous spec declared in the same unit.
9138         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9139         subprograms at the end of the unit instead of at the beginning.
9140         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9141         isn't public for the special handling of non-inline functions nested
9142         inside inline external functions.
9143
9144 2011-03-25  Jeff Law  <law@redhat.com>
9145
9146         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9147
9148 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
9149
9150         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9151         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9152         to compute Set_Size_Depends_On_Discriminant.
9153         (Layout_Type): Call it on array types in back-end layout mode.
9154         * sem_util.adb (Requires_Transient_Scope): Return true for array
9155         types only if the size depends on the value of discriminants.
9156         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9157         type if the RHS is a call to a function that returns an unconstrained
9158         type with default discriminant.
9159
9160 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
9161
9162         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9163         non-conversion to the nominal result type at the end.
9164
9165 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
9166
9167         * gcc-interface/trans.c (create_temporary): New function taken from...
9168         (create_init_temporary): ...here.  Call it.
9169         (call_to_gnu): Create the temporary for the return value early, if any.
9170         Create it for a function with copy-in/copy-out parameters if there is
9171         no target; in other cases of copy-in/copy-out, use another temporary.
9172         Push the new binding level lazily.  Add and rename local variables.
9173
9174 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
9175
9176         * gcc-interface/decl.c (validate_size): Improve comments and tweak
9177         error message.
9178         (set_rm_size): Likewise.
9179
9180 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
9181
9182         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9183         for the padded type built in order to support a specified alignment.
9184         Fix incorrect formatting.
9185
9186 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
9187
9188         PR bootstrap/48216
9189         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
9190
9191 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
9192
9193         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
9194         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
9195         to the end of the list.  Adjust recursive call.  Rename local variable.
9196         If REORDER is true, reorder components of the record type.
9197         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
9198         components_to_record and adjust the parameter list.
9199
9200 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
9201
9202         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
9203         disabled, use the variable for bounds of loop iteration scheme.
9204
9205 2011-03-21  Kai Tietz  <ktietz@redhat.com>
9206
9207         PR target/12171
9208         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
9209
9210 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
9211
9212         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
9213         out whether the expression is read-only.  Short-circuit placeholder
9214         case and rename a couple of local variables.
9215
9216 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
9217
9218         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
9219         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
9220         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
9221         (convert): Deal with conversions from a smaller form type specially.
9222
9223 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
9224
9225         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
9226         its argument, except for the special -I- switch.
9227
9228 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
9229
9230         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
9231         "Ada Issues".
9232
9233 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
9234
9235         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
9236
9237 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
9238
9239         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
9240         GNAT_FORMAL.
9241         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
9242         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
9243         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
9244         Do not generate the check directly, instead instantiate the template
9245         check present in the descriptor.
9246         (make_descriptor_field): Move around.
9247         (build_vms_descriptor32): Build a template check in the POINTER field.
9248         (build_vms_descriptor): Remove useless suffixes.
9249         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
9250
9251 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
9252
9253         PR bootstrap/47467
9254         * targext.c: Include target files if IN_RTS is defined.
9255
9256 2011-01-26  Richard Guenther  <rguenther@suse.de>
9257
9258         PR bootstrap/47467
9259         * targext.c: Include config.h.
9260         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
9261         dependency.
9262
9263 2011-01-04  Pascal Obry  <obry@adacore.com>
9264             Eric Botcazou  <ebotcazou@adacore.com>
9265
9266         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
9267
9268 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
9269
9270         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
9271         end-of-case on the end label and its associated gotos, if any.
9272
9273 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
9274
9275         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
9276         expressions of the parameter cache within the statement group of
9277         the CICO mechanism.
9278
9279 2011-01-04  Olivier Hainque  <hainque@adacore.com>
9280             Eric Botcazou  <ebotcazou@adacore.com>
9281
9282         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
9283         (set_end_locus_from_node): New function.
9284         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
9285         make and the function end_locus.
9286         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
9287         for the elaboration subprogram.
9288         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
9289         set the end_locus of the expression as well.
9290
9291 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
9292
9293         PR ada/47131
9294         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
9295         variables that are referenced in exception handlers volatile.
9296
9297
9298 \f
9299 Copyright (C) 2011 Free Software Foundation, Inc.
9300
9301 Copying and distribution of this file, with or without modification,
9302 are permitted in any medium without royalty provided the copyright
9303 notice and this notice are preserved.
9304
9305         * gnat_rm.texi: Ramification of pragma Eliminate documentation
9306          - fix bugs in the description of Source_Trace;
9307          - get rid of UNIT_NAME;
9308
9309 2011-08-02  Javier Miranda  <miranda@adacore.com>
9310
9311         * exp_ch9.adb
9312         (Build_Dispatching_Requeue): Adding support for VM targets
9313         since we cannot directly reference the Tag entity.
9314         * exp_sel.adb (Build_K): Adding support for VM targets.
9315         (Build_S_Assignment): Adding support for VM targets.
9316         * exp_disp.adb
9317         (Default_Prim_Op_Position): In VM targets do not restrict availability
9318         of predefined interface primitives to compiling in Ada 2005 mode.
9319         (Is_Predefined_Interface_Primitive): In VM targets this service is not
9320         restricted to compiling in Ada 2005 mode.
9321         (Make_VM_TSD): Generate code that declares and initializes the OSD
9322         record. Needed to support dispatching calls through synchronized
9323         interfaces.
9324         * exp_ch3.adb
9325         (Make_Predefined_Primitive_Specs): Enable generation of predefined
9326         primitives associated with synchronized interfaces.
9327         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9328         primitives associated with synchronized interfaces.
9329
9330 2011-08-02  Yannick Moy  <moy@adacore.com>
9331
9332         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9333         statements hidden in SPARK if preceded by the HIDE directive
9334         (Parse_Exception_Handlers): mark each exception handler in a sequence of
9335         exception handlers as hidden in SPARK if preceded by the HIDE directive
9336         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9337         if starting with the HIDE directive
9338         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9339         starting with the HIDE directive; mark the declarations in a private
9340         part as hidden in SPARK if the private part starts with the HIDE
9341         directive
9342         * restrict.adb, restrict.ads
9343         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9344         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9345         argument node belongs to a part which is hidden in SPARK
9346         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9347         parts in SPARK; protect the possibly costly call to
9348         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9349         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9350         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9351         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9352         Tok_SPARK_Hide.
9353         (Scan): recognize special comment starting with '#' and followed by
9354         SPARK keyword "hide" as a HIDE directive.
9355
9356 2011-08-02  Yannick Moy  <moy@adacore.com>
9357
9358         * types.ads, erroutc.ads: Minor reformatting.
9359
9360 2011-08-02  Vincent Celier  <celier@adacore.com>
9361
9362         * link.c: Add response file support for cross platforms.
9363
9364 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9365
9366         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9367         in an association, set parent field of copy before partial analysis.
9368         * sem_res.adb (Resolve_Slice): create reference to itype only when
9369         expansion is enabled.
9370
9371 2011-08-02  Yannick Moy  <moy@adacore.com>
9372
9373         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9374         for new flag denoting which subprogram bodies are in ALFA
9375         * restrict.adb, sem_ch7.adb: Update comment
9376         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9377         sem_ch9.adb, sem_res.adb: Add calls to
9378         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9379         * sem_ch6.adb (Analyze_Function_Return): add calls to
9380         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9381         middle of the body, and extended return.
9382         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9383         False when missing return.
9384         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9385         to True for subprograms whose spec is in ALFA. Remove later on the flag
9386         on the entity used for a subprogram body when there exists a separate
9387         declaration.
9388         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9389         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9390         False, otherwise do nothing.
9391
9392 2011-08-02  Robert Dewar  <dewar@adacore.com>
9393
9394         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9395
9396 2011-08-02  Yannick Moy  <moy@adacore.com>
9397
9398         * sem_ch4.ads: minor formatting.
9399
9400 2011-08-02  Yannick Moy  <moy@adacore.com>
9401
9402         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9403         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9404         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9405         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9406         opt.ads: cleanup of SPARK mode
9407
9408 2011-08-02  Yannick Moy  <moy@adacore.com>
9409
9410         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9411         types.
9412         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9413         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9414         * sem_ch3.adb
9415         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9416         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9417         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9418         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9419         types.
9420         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9421         non-static range.
9422         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9423         functions whose return type is not in ALFA.
9424         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9425         specifications.
9426         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9427         parameter's type is not in ALFA.
9428         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9429         types are in ALFA.
9430
9431 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9432
9433         * sem_ch6 (Analyze_Expression_Function): treat the function as
9434         Inline_Always, and introduce a subprogram declaration for it when it is
9435         not a completion.
9436         * inline.adb (Add_Inlined_Body): recognize bodies that come from
9437         expression functions, so that the back-end can determine whether they
9438         can in fact be inlined.
9439         * sem_util.adb (Is_Expression_Function): predicate to determine whether
9440         a function body comes from an expression function.
9441
9442 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9443
9444         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9445         null exclusions to test Can_Never_Be_Null on the anonymous access types
9446         of the formals rather than testing the formals themselves. Exclude this
9447         check in cases where the Old_Formal is marked as a controlling formal,
9448         to avoid issuing spurious errors for bodies completing dispatching
9449         operations (due to the flag not getting set on controlling access
9450         formals in body specs).
9451         (Find_Corresponding_Spec): When checking full and subtype conformance of
9452         subprogram bodies in instances, pass Designated and E in that order, for
9453         consistency with the expected order of the formals (New_Id followed by
9454         Old_Id).
9455
9456 2011-08-02  Robert Dewar  <dewar@adacore.com>
9457
9458         * sem_ch8.adb: Minor reformatting.
9459
9460 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9461
9462         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9463         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9464         primitive operations of class-wide actuals.
9465
9466 2011-08-02  Javier Miranda  <miranda@adacore.com>
9467
9468         * exp_atag.ads, exp_atag.adb
9469         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9470         since its value is implicitly passed in argument Typ.
9471         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9472         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9473         Build_Common_Dispatching_Select_Statements.
9474
9475 2011-08-02  Robert Dewar  <dewar@adacore.com>
9476
9477         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9478         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9479         Minor reformatting.
9480
9481 2011-08-02  Robert Dewar  <dewar@adacore.com>
9482
9483         * sem_res.adb: Minor reformatting.
9484         * sem_prag.adb: Minor reformatting.
9485
9486 2011-08-02  Javier Miranda  <miranda@adacore.com>
9487
9488         * exp_atag.adb, exp_atags.ads
9489         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9490         by the tagged type Entity. Required to use this routine in the VM
9491         targets since we do not have available the Tag entity in the VM
9492         platforms.
9493         * exp_ch6.adb
9494         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9495         Ada.Tags has not been previously loaded.
9496         * exp_ch7.adb
9497         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9498         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9499         * sem_aux.adb
9500         (Enclosing_Dynamic_Scope): Add missing support to handle the full
9501         view of enclosing scopes. Required to handle enclosing scopes that
9502         are synchronized types whose full view is a task type.
9503         * exp_disp.adb
9504         (Build_VM_TSDs): Minor code improvement to avoid generating and
9505         analyzing lists with empty nodes.
9506         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9507         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9508         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9509         (Make_Disp_Timed_Select_Body): Add support for VM targets.
9510         (Make_Select_Specific_Data_Table): Add support for VM targets.
9511         (Make_VM_TSD): Generate code to initialize the SSD structure of
9512         the TSD.
9513
9514 2011-08-02  Yannick Moy  <moy@adacore.com>
9515
9516         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9517         cross-references section in ALI.
9518         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9519         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9520         Sub).
9521         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9522         subprogram or package entity of a node
9523         (Is_Local_Reference_Type): new function returns True for references
9524         selected in local cross-references.
9525         (Lt): function extracted from Lt in Output_References
9526         (Write_Entity_Name): function extracted from Output_References
9527         (Generate_Definition): generate reference with type 'D' for definition
9528         of objects (object declaration and parameter specification), with
9529         appropriate locations and units, for use in local cross-references.
9530         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9531         references of type 'I' for initialization in object definition.
9532         (Output_References): move part of function Lt and procedure
9533         Write_Entity_Name outside of the body. Ignore references of types 'D'
9534         and 'I' introduced for local cross-references.
9535         (Output_Local_References): new procedure to output the local
9536         cross-references sections.
9537         (Lref_Entity_Status): new array defining whether an entity is a local
9538         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9539         with 'I' type when initialization expression is present.
9540         * get_scos.adb, get_scos.ads: Correct comments and typos
9541
9542 2011-08-02  Javier Miranda  <miranda@adacore.com>
9543
9544         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9545         the JVM target.
9546         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9547         the JVM target.
9548         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9549         TSD support.
9550
9551 2011-08-02  Vincent Celier  <celier@adacore.com>
9552
9553         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9554         (No_Space_Img): New function
9555         (Find_Excluded_Sources): When reading from a file, record the file name
9556         and the line number for each excluded source.
9557         (Mark_Excluded_Sources): When reporting an error, if the excluded
9558         sources were read from a file, include file name and line number in
9559         the error message.
9560
9561 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9562
9563         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9564
9565 2011-08-02  Robert Dewar  <dewar@adacore.com>
9566
9567         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9568
9569 2011-08-02  Javier Miranda  <miranda@adacore.com>
9570
9571         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9572         generation of TSDs to the DOTNET compiler.
9573         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9574         generation of TSDs to the DOTNET compiler.
9575
9576 2011-08-02  Javier Miranda  <miranda@adacore.com>
9577
9578         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9579         record of all the tagged types declared inside library level package
9580         declarations, library level package bodies or library level subprograms.
9581         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9582         associated with a given tagged type.
9583         (Build_VM_TSDs): New subprogram.
9584         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9585         compilation units that are subprograms.
9586         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9587         compilation units that are package bodies.
9588         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9589         units that are a package declaration or a package instantiation.
9590         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9591         reorganization to improve the error generated by the frontend when the
9592         function Ada.Tags.Secondary_Tag is not available.
9593         * rtsfind.ads (RE_Register_TSD): New runtime entity.
9594         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9595
9596 2011-08-02  Javier Miranda  <miranda@adacore.com>
9597
9598         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9599
9600 2011-08-02  Robert Dewar  <dewar@adacore.com>
9601
9602         * s-imenne.ads: Minor reformatting.
9603
9604 2011-08-02  Robert Dewar  <dewar@adacore.com>
9605
9606         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9607         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9608         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9609
9610 2011-08-02  Robert Dewar  <dewar@adacore.com>
9611
9612         * einfo.ads (Materialize_Entity): Document this is only for renamings
9613         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9614         required debug information in the case where we transform the object
9615         declaration into a renaming declaration.
9616         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9617         object
9618         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9619         Materialize_Entity.
9620
9621 2011-08-02  Robert Dewar  <dewar@adacore.com>
9622
9623         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9624         Suppress_Init_Procs.
9625         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9626         Suppress_Initialization/Initialization_Suppressed.
9627         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9628         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9629         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9630         * sem_prag.adb: New processing for pragma Suppress_Initialization.
9631
9632 2011-08-02  Robert Dewar  <dewar@adacore.com>
9633
9634         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9635         Minor reformatting.
9636
9637 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9638
9639         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9640         only have inheritable classwide pre/postconditions.
9641
9642 2011-08-02  Javier Miranda  <miranda@adacore.com>
9643
9644         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9645         * rtsfind.ads (RE_Check_TSD): New runtime entity.
9646         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9647         checks if the external tag of a type is the same as the external tag
9648         of some other declaration.
9649
9650 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9651
9652         * s-taskin.ads: Minor reformatting.
9653
9654 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9655
9656         * g-comlin.adb (Display_Help): swap the order in which it prints the
9657         short help and the general usage.
9658
9659 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9660
9661         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9662         the aspect declarations and attach them to the generic copy for
9663         subsequent analysis.
9664         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9665         declarations of the generic tree to the new subprogram declarations.
9666         * sem_attr.adb (Check_Precondition_Postcondition): recognize
9667         conditions that apply to a subprogram instance.
9668
9669 2011-08-02  Robert Dewar  <dewar@adacore.com>
9670
9671         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9672
9673 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9674
9675         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9676         private type with a tagged full view is not derived in the immediate
9677         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9678
9679 2011-08-02  Robert Dewar  <dewar@adacore.com>
9680
9681         * exp_ch4.adb: Minor reformatting.
9682
9683 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9684
9685         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
9686         Ada2012 iterator, the loop will be rewritten during expansion into a
9687         while loop with a cursor and an element declaration. Do not analyze the
9688         body in this case, because if the container is for indefinite types the
9689         actual subtype of the elements will only be determined when the cursor
9690         declaration is analyzed.
9691
9692 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9693
9694         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9695         size/alignment related attributes in CodePeer_Mode.
9696
9697 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9698
9699         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9700         Prepend_Element, since this can result in the operation getting the
9701         wrong slot in the full type's dispatch table if the full type has
9702         inherited operations. The incomplete type's operation will get added
9703         to the proper position in the full type's primitives
9704         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9705         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9706         dispatching operations, since there are cases where nonprimitive
9707         subprograms can get added to the list of incomplete dependents (such
9708         as subprograms in nested packages).
9709         * sem_ch6.adb (Process_Formals): First, remove test for being in a
9710         private part when determining whether to add a primitive with a
9711         parameter of a tagged incomplete type to the Private_Dependents list.
9712         Such primitives can also occur in the visible part, and should not have
9713         been excluded from being private dependents.
9714         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9715         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9716         list of a Taft-amendment incomplete type is a primitive before issuing
9717         an error that the full type must appear in the same unit. There are
9718         cases where nonprimitives can be in the list (such as subprograms in
9719         nested packages).
9720         * sem_disp.adb (Derives_From): Use correct condition for checking that
9721         a formal's type is derived from the type of the corresponding formal in
9722         the parent subprogram (the condition was completely wrong). Add
9723         checking that was missing for controlling result types being derived
9724         from the result type of the parent operation.
9725
9726 2011-08-02  Yannick Moy  <moy@adacore.com>
9727
9728         * errout.adb (First_Node): minor renaming
9729         * restrict.adb (Check_Formal_Restriction): put restriction warning on
9730         first node.
9731
9732 2011-08-02  Yannick Moy  <moy@adacore.com>
9733
9734         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9735         before accessing operands.
9736         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9737         decide whether an initialization expression respects SPARK rules, as
9738         the plain node is the expanded one. This allows for more valid warnings
9739         to be issued.
9740         * gnat_rm.texi: Minor update.
9741
9742 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9743
9744         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9745         previous change.
9746
9747 2011-08-02  Robert Dewar  <dewar@adacore.com>
9748
9749         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9750
9751 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9752
9753         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9754         loop statements and the element renaming declaration with a block when
9755         the element type is controlled.
9756
9757 2011-08-02  Yannick Moy  <moy@adacore.com>
9758
9759         * sinfo.ads: Minor formatting.
9760
9761 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9762
9763         * sem_aggr.adb (Add_Association): if the association has a box and no
9764         expression, use the Sloc of the aggregate itself for the new
9765         association.
9766         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9767         the Original_Node.
9768
9769 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9770
9771         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9772         When a container is provided via a function call, generate a renaming
9773         of the function result. This avoids the creation of a transient scope
9774         and the premature finalization of the container.
9775         * exp_ch7.adb (Is_Container_Cursor): Removed.
9776         (Wrap_Transient_Declaration): Remove the supression of the finalization
9777         of the list controller when the declaration denotes a container cursor,
9778         it is not needed.
9779
9780 2011-08-02  Yannick Moy  <moy@adacore.com>
9781
9782         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9783         node is from source, instead of the original node being from source.
9784         * sem_aggr.adb
9785         (Resolve_Array_Aggregate): refine the check for a static expression, to
9786         recognize also static ranges
9787         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9788         Array_Type_Declaration): postpone the test for the type being a subtype
9789         mark after the type has been resolved, so that component-selection and
9790         expanded-name are discriminated.
9791         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9792         to distinguish the case of an iteration scheme, so that an error is
9793         issed on a non-static range in SPARK except in an iteration scheme.
9794         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9795         In_Iter_Schm = True.
9796         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9797         user-defined operators so that they are allowed in renaming
9798         * sem_ch8.adb
9799         (Find_Selected_Component): refine the check for prefixing of operators
9800         so that they are allowed in renaming. Move the checks for restrictions
9801         on selector name after analysis discriminated between
9802         component-selection and expanded-name.
9803         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9804         concatenation argument of string type if it is static.
9805         * sem_util.adb, sem_util.ads
9806         (Check_Later_Vs_Basic_Declarations): add a new function
9807         Is_Later_Declarative_Item to decice which declarations are allowed as
9808         later items, in the two different modes Ada 83 and SPARK. In the SPARK
9809         mode, add that renamings are considered as later items.
9810         (Enclosing_Package): new function to return the enclosing package
9811         (Enter_Name): correct the rule for homonyms in SPARK
9812         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9813         from source (result of expansion) to avoid issuing wrong warnings.
9814
9815 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9816
9817         * errout.adb: On anything but an expression First_Node returns its
9818         argument.
9819
9820 2011-08-02  Pascal Obry  <obry@adacore.com>
9821
9822         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9823
9824 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9825
9826         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9827         Set the associated loop as the related expression of internally
9828         generated cursors.
9829         * exp_ch7.adb (Is_Container_Cursor): New routine.
9830         (Wrap_Transient_Declaration): Supress the finalization of the list
9831         controller when the declaration denotes a container cursor.
9832
9833 2011-08-02  Yannick Moy  <moy@adacore.com>
9834
9835         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9836         command line now.
9837         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9838         expression is a simple expression. This check cannot be performed in
9839         the semantics, so just drop it.
9840         (P_Index_Or_Discriminant_Constraint): move check that the index or
9841         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9842         semantics. Other cases were previously checked in the semantics.
9843         * par-ch4.adb (P_Name): move checks that a selector name is not
9844         character literal or an operator symbol to Find_Selected_Component in
9845         the semantics
9846         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9847         declarations are not placed after later declarations in a separate
9848         procedure in Sem_Util (possibly not the best choice?), to be used both
9849         during parsing, for Ada 83 mode, and during semantic analysis, for
9850         SPARK mode.
9851         * par-endh.adb (Check_End): move check that end label is not missing
9852         to Process_End_Label in the semantics
9853         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9854         the special case for SPARK restriction
9855         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9856         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9857         parameter Force to issue the error message even on internal node (used
9858         for generated end label). Call Check_Restriction to check when an error
9859         must be issued. In SPARK mode, issue an error message even if the
9860         restriction is not set.
9861         (Check_Restriction): new procedure with an additional out parameter to
9862         inform the caller that a message has been issued
9863         * sem_aggr.adb: Minor modification of message
9864         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9865         instead of issuing an error message directly
9866         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9867         declarations are not placed after later declarations, by calling
9868         Check_Later_Vs_Basic_Declarations
9869         (Analyze_Subtype_Declaration): move here the check that an index or
9870         discriminant constraint must be a subtype mark. Change the check that
9871         a subtype of String must start at one so that it works on subtype marks.
9872         * sem_ch4.adb (Analyze_Call): move here the check that a named
9873         association cannot follow a positional one in a call
9874         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9875         instead of issuing an error message directly
9876         * sem_ch8.adb (Find_Selected_Component): move here the check that a
9877         selector name is not a character literal or an operator symbol. Move
9878         here the check that the prefix of an expanded name cannot be a
9879         subprogram or a loop statement.
9880         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9881         procedure called from parsing and semantics to check that basic
9882         declarations are not placed after later declarations
9883         (Process_End_Label): move here the check that end label is not missing
9884
9885 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9886
9887         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9888         representation clause in codepeer mode, since it confuses CodePeer and
9889         does not bring useful info.
9890
9891 2011-08-02  Ed Falis  <falis@adacore.com>
9892
9893         * init.c: initialize fp hw on MILS.
9894
9895 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9896
9897         * errout.adb (First_Node): for bodies, return the node itself (small
9898         optimization). For other nodes, do not check source_unit if the node
9899         comes from Standard.
9900
9901 2011-08-02  Robert Dewar  <dewar@adacore.com>
9902
9903         * exp_ch3.adb: Minor comment additions.
9904         * sem_ch13.adb: Minor reformatting.
9905
9906 2011-08-02  Pascal Obry  <obry@adacore.com>
9907
9908         * make.adb, makeutl.adb: Removes some superfluous directory separator.
9909
9910 2011-08-02  Robert Dewar  <dewar@adacore.com>
9911
9912         * sem_attr.adb: Minor reformatting.
9913
9914 2011-08-02  Robert Dewar  <dewar@adacore.com>
9915
9916         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9917         (Has_Default_Component_Value): Removed
9918         * einfo.ads Comment updates
9919         (Has_Default_Aspect): Replaces Has_Default_Value
9920         (Has_Default_Component_Value): Removed
9921         * exp_ch13.adb
9922         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9923         * exp_ch3.adb
9924         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9925         (Get_Simple_Init_Val): Handle Default_Value aspect
9926         (Needs_Simple_Initialization): Handle Default_Value aspect
9927         * exp_ch3.ads: Needs_Simple_Initialization
9928         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9929         * par-prag.adb (Pragma_Default[_Component]Value) Removed
9930         * sem_ch13.adb
9931         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9932         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9933         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9934
9935 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9936
9937         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9938         package containing iteration primitives.
9939         exp_ch5.adb (Expand_Iterator_Loop): ditto.
9940
9941 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9942
9943         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9944         "of", pre-analyze expression in case it is a function call with
9945         finalization actions that must be placed ahead of the loop.
9946         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9947         on an Ada2012 iterator, insert them ahead of the rewritten loop.
9948
9949 2011-08-02  Geert Bosch  <bosch@adacore.com>
9950
9951         * cstand.adb (Create_Float_Types): Only consider C's long double for
9952         Long_Long_Float, in addition to double.
9953
9954 2011-08-02  Robert Dewar  <dewar@adacore.com>
9955
9956         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9957         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9958         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9959         Minor reformatting.
9960
9961 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9962
9963         * sem_attr.adb: handle properly 'Result when it is a prefix of an
9964         indexed component.
9965
9966 2011-08-02  Javier Miranda  <miranda@adacore.com>
9967
9968         * einfo.ads, einfo.adb
9969         (Original_Access_Type): Move this attribute to Node26 since there was
9970         an undocumented use of Node21 in E_Access_Subprogram_Type entities
9971         which causes conflicts and breaks the generation of the .NET compiler.
9972         (Interface_Name): Add missing documentation on JGNAT only uses of
9973         this attribute.
9974
9975 2011-08-02  Geert Bosch  <bosch@adacore.com>
9976
9977         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9978         (Find_Back_End_Float_Type): Likewise
9979         (Create_Back_End_Float_Types): Likewise
9980         (Create_Float_Types): Likewise
9981         (Register_Float_Type): Likewise
9982         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9983         Nlist and split out type selection in new local Find_Base_Type function.
9984         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9985         Nlist
9986         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9987
9988 2011-08-02  Robert Dewar  <dewar@adacore.com>
9989
9990         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9991         alpha order).
9992         * opt.ads: Minor comment change.
9993         * sem_ch12.adb: Minor code reorganization.
9994
9995 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9996
9997         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9998         subtype's list of rep items to the list on the full subtype in the case
9999         where the lists are the same.
10000
10001 2011-08-02  Geert Bosch  <bosch@adacore.com>
10002
10003         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10004         using the one from System.Strings, which also deallocates all strings.
10005
10006 2011-08-02  Geert Bosch  <bosch@adacore.com>
10007
10008         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10009         function.
10010         * gcc-interface/Make-lang.in: Update dependencies.
10011
10012 2011-08-02  Olivier Hainque  <hainque@adacore.com>
10013
10014         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10015         end_locus.
10016
10017 2011-08-02  Javier Miranda  <miranda@adacore.com>
10018
10019         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10020         associated with anonymous access to subprograms.
10021
10022 2011-08-02  Geert Bosch  <bosch@adacore.com>
10023
10024         * opt.ads
10025         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10026         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10027         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10028         (Add_Symbol_Definition): Move to switch-c.adb
10029         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10030         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10031         (Add_Symbol_Definition): Move to switch-c.adb.
10032         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10033         * sem_warn.adb
10034         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10035         Move to warnsw.adb.
10036         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10037         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10038         Move to warnsw.adb.
10039         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10040         (Add_Symbol_Definition): Moved from Prepcomp.
10041         * switch-c.ads: Update copyright notice. Use String_List instead of
10042         Argument_List, removing dependency on System.OS_Lib.
10043
10044 2011-08-02  Yannick Moy  <moy@adacore.com>
10045
10046         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10047         mode on initialization expression which does not respect SPARK
10048         restrictions.
10049         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10050         if the tree referenced by its argument represents an initialization
10051         expression in SPARK, suitable for initializing an object in an object
10052         declaration.
10053
10054 2011-08-02  Javier Miranda  <miranda@adacore.com>
10055
10056         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10057         internally generated access to subprogram with its associated protected
10058         subprogram type.
10059         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10060
10061 2011-08-02  Geert Bosch  <bosch@adacore.com>
10062
10063         * cstand.adb (Register_Float_Type): Print information about type to
10064         register, if the Debug_Flag_Dot_B is set.
10065         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10066         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10067         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10068         with a requested precision of more than Max_Digits digits and no more
10069         than Max_Base_Digits digits, if a range specification is present and the
10070         Predefined_Float_Types list has a suitable type to derive from.
10071         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10072         case of type completion with pragma Import
10073         * sem_prag.adb
10074         (Process_Import_Predefined_Type): Processing to complete a type
10075         with pragma Import. Currently supports floating point types only.
10076         (Set_Convention_From_Pragma): Do nothing without underlying type.
10077         (Process_Convention): Guard against absence of underlying type,
10078         which may happen when importing incomplete types.
10079         (Process_Import_Or_Interface): Handle case of importing predefined
10080         types. Tweak error message.
10081
10082 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10083
10084         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10085         functions to previous change.  Reorganize code slightly.
10086
10087 2011-08-02  Geert Bosch  <bosch@adacore.com>
10088
10089         * back_end.ads (Register_Type_Proc): New call back procedure type for
10090         allowing the back end to provide information about available types.
10091         (Register_Back_End_Types): New procedure to register back end types.
10092         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10093         available types.
10094         * cstand.adb (Back_End_Float_Types): New list for floating point types
10095         supported by the back end.
10096         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10097         (Copy_Float_Type): New procedure to make new copies of predefined types.
10098         (Register_Float_Type): New call back procedure to populate the BEFT list
10099         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10100         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10101         (Create_Float_Types): New procedure to create entities for floating
10102         point types predefined in Standard, and put these and any remaining
10103         BEFTs on the Predefined_Float_Types list.
10104         * stand.ads (Predefined_Float_Types): New list for predefined floating
10105         point types that do not have declarations in package Standard.
10106
10107 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10108
10109         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
10110         entity node for the unit containing the parameter.
10111         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10112         (Add_Inlined_Subprogram): Likewise.
10113         * gcc-interface/Make-lang.in: Update dependencies.
10114
10115 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10116
10117         * s-stusta.adb (Print): Make sure Pos is always initialized to a
10118         suitable value.
10119
10120 2011-08-02  Geert Bosch  <bosch@adacore.com>
10121
10122         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10123
10124 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10125
10126         * sem_type.adb (Covers): Move trivial case to the top and reuse the
10127         computed value of Base_Type.
10128
10129 2011-08-02  Yannick Moy  <moy@adacore.com>
10130
10131         * restrict.adb (Check_Restriction): issue an error for any use of
10132         class-wide, even if the No_Dispatch restriction is not set.
10133         * sem_aggr.adb: Correct typos in comments and messages in formal mode
10134         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10135         when completing a private extension, the type named in the private part
10136         is not the same as that named in the visible part.
10137         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10138         of an inherited primitive operations of a tagged type or type extension
10139         that returns the tagged type.
10140         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10141         function which returns True for an implicit operation inherited by the
10142         derived type declaration for the argument type.
10143         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10144         order.
10145
10146 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10147
10148         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10149         Process_Bounds, to perform analysis with expansion of a range or an
10150         expression that is the iteration scheme for a loop.
10151         (Analyze_Iterator_Specification): If domain of iteration is given by a
10152         function call with a controlled result, as is the case if call returns
10153         a predefined container, ensure that finalization actions are properly
10154         generated.
10155         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10156
10157 2011-08-02  Javier Miranda  <miranda@adacore.com>
10158
10159         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10160         * gcc-interface/Make-lang.in: Update dependencies.
10161
10162 2011-08-02  Javier Miranda  <miranda@adacore.com>
10163
10164         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10165         determine if the analysis is performed using N or Original_Node (N).
10166         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10167         functionality of routine Is_Variable avoids code duplication.
10168         * checks.adb (Determine_Range): Handle temporaries generated by
10169         Remove_Side_Effects.
10170
10171 2011-08-02  Javier Miranda  <miranda@adacore.com>
10172
10173         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10174         expansion of the condition. Required since the previous analysis was
10175         done with expansion disabled (see Resolve_Quantified_Expression) and
10176         hence checks were not inserted and record comparisons have not been
10177         expanded.
10178
10179 2011-08-02  Ed Falis  <falis@adacore.com>
10180
10181         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10182         Update header.
10183
10184 2011-08-02  Bob Duff  <duff@adacore.com>
10185
10186         * opt.ads: Minor comment fix.
10187
10188 2011-08-02  Bob Duff  <duff@adacore.com>
10189
10190         * sem_ch12.adb (Analyze_Package_Instantiation,
10191         Analyze_Subprogram_Instantiation): Turn off style checking while
10192         analyzing an instance. Whatever style checks that apply to the generic
10193         unit should apply, so it makes no sense to apply them in an instance.
10194         This was causing trouble when compiling an instance of a runtime
10195         unit that violates the -gnatyO switch.
10196         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10197         one of the two case statements, causing spurious errors.
10198
10199 2011-08-02  Robert Dewar  <dewar@adacore.com>
10200
10201         * uname.adb: Minor reformatting.
10202         * gnatcmd.adb: Minor reformatting.
10203         * exp_attr.adb: Minor reformatting.
10204
10205 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10206
10207         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10208         No_Dispatching_Calls, do not look for the Assign primitive, because
10209         predefined primitives are not created in this case.
10210
10211 2011-08-02  Bob Duff  <duff@adacore.com>
10212
10213         * stylesw.ads: Minor comment fixes.
10214
10215 2011-08-02  Robert Dewar  <dewar@adacore.com>
10216
10217         * freeze.adb (Add_To_Result): New procedure.
10218
10219 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10220
10221         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10222         time, if the specific run-time routines for handling streams of strings
10223         are not available, use the default mechanism.
10224
10225 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10226
10227         * s-regpat.ads: Fix typo.
10228
10229 2011-08-02  Vincent Celier  <celier@adacore.com>
10230
10231         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10232         not null, call it to create the in memory config project file without
10233         parsing an existing default config project file.
10234
10235 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10236
10237         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10238
10239 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10240
10241         * sem_elim.adb: an abstract subprogram does not need an eliminate
10242         pragma for its descendant to be eliminable.
10243
10244 2011-08-02  Ed Falis  <falis@adacore.com>
10245
10246         * init.c: revert to handling before previous checkin for VxWorks
10247         * s-intman-vxworks.adb: delete unnecessary declarations related to
10248         using Ada interrupt facilities for handling signals.
10249         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10250         * s-intman-vxworks.ads: Import __gnat_install_handler as
10251         Initialize_Interrupts.
10252         * s-taprop-vxworks.adb: Delete Signal_Mask.
10253         (Abort_Handler): change construction of mask to unblock exception
10254         signals.
10255
10256 2011-08-02  Jerome Guitton  <guitton@adacore.com>
10257
10258         * a-except-2005.adb (Raise_From_Signal_Handler): Call
10259         Debug_Raise_Exception before propagation starts.
10260
10261 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10262
10263         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10264         to Restriction_Check_Required.
10265         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10266         * sem_res.adb (Resolve_Call): Likewise.
10267         * sem_attr.adb (Check_Stream_Attribute): Likewise.
10268
10269 2011-08-02  Bob Duff  <duff@adacore.com>
10270
10271         * stylesw.ads: Update comment.
10272         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10273         * errout.ads: Remove obsolete comment.
10274
10275 2011-08-02  Javier Miranda  <miranda@adacore.com>
10276
10277         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10278         (Set_Is_Safe_To_Reevaluate): new procedure.
10279         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10280         assignment is allowed on safe-to-reevaluate variables.
10281         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10282         temporary created to remove side effects in expressions that use
10283         the secondary stack as safe-to-reevaluate.
10284         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10285         variables that are not true constants.
10286
10287 2011-08-02  Robert Dewar  <dewar@adacore.com>
10288
10289         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10290         sem_res.adb, sem_ch6.adb: Minor reformatting.
10291
10292 2011-08-02  Jerome Guitton  <guitton@adacore.com>
10293
10294         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10295
10296 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10297
10298         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10299         not set Overridden_Operation if subprogram is an initialization
10300         procedure.
10301
10302 2011-08-02  Yannick Moy  <moy@adacore.com>
10303
10304         * par-ch6.adb: Correct obsolete name in comments
10305         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10306         which takes two message arguments (existing function takes one), with
10307         second message used for continuation.
10308         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10309         block statements that originate from a source block statement, not
10310         generated block statements
10311         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10312         symmetry with procedure case
10313         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10314         function to issue an error in formal mode if a package specification
10315         contains more than one tagged type or type extension.
10316         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10317         parameters matching formals of tagged types are objects (or ancestor
10318         type conversions of objects), not general expressions. Issue an error
10319         on view conversions that are not involving ancestor conversion of an
10320         extended type.
10321         (Resolve_Type_Conversion): in formal mode, issue an error on the
10322         operand of an ancestor type conversion which is not an object
10323         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10324         procedure so that it works also for actuals of function calls
10325         (Is_Actual_Tagged_Parameter): new function which determines if its
10326         argument is an actual parameter of a formal of tagged type in a
10327         subprogram call
10328         (Is_SPARK_Object_Reference): new function which determines if the tree
10329         referenced by its argument represents an object in SPARK
10330
10331 2011-08-02  Robert Dewar  <dewar@adacore.com>
10332
10333         * sem_ch3.adb: Minor reformatting
10334         Minor comment addition
10335         Minor error msg text change
10336
10337 2011-08-02  Javier Miranda  <miranda@adacore.com>
10338
10339         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10340         function. Used to be more precise when we generate a variable plus one
10341         assignment to remove side effects in the evaluation of the Bound
10342         expressions.
10343         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10344         of the bound expression to force its re-analysis and thus expand the
10345         associated transient scope (if required). Code cleanup replacing the
10346         previous code that declared the constant entity by an invocation to
10347         routine Force_Evaluation which centralizes this work in the frontend.
10348
10349 2011-08-02  Robert Dewar  <dewar@adacore.com>
10350
10351         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10352         (Base_Type): Now uses improved Is_Base_Type function
10353         * einfo.ads (Base_Type): Inline this function
10354
10355 2011-08-02  Robert Dewar  <dewar@adacore.com>
10356
10357         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10358         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10359
10360 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10361
10362         * gcc-interface/Make-lang.in: Update dependencies.
10363         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10364         targets.
10365
10366 2011-08-02  Yannick Moy  <moy@adacore.com>
10367
10368         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10369         non-simple expression used in delta constraint
10370         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10371         index constraint which is not a subtype mark
10372         * par.adb: With and use Restrict
10373         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10374         mode on component type which is not a subtype mark and default
10375         expression on component
10376         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10377         of string which does not have a lower index bound equal to 1
10378         (Array_Type_Declaration): issue an error in formal mode on index or
10379         component type which is not a subtype mark, and on aliased keyword on
10380         component
10381         (Derived_Type_Declaration): issue an error in formal mode on interface,
10382         limited or abstract type
10383         (Record_Type_Declaration): issue an error in formal mode on interface
10384         (Record_Type_Definition): issue an error in formal mode on tagged types
10385         and type extensions not declared in the specification of a library unit
10386         package; on null non-tagged record; on variant part
10387
10388 2011-08-02  Vincent Celier  <celier@adacore.com>
10389
10390         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10391         not declared for qualified library project when Library_Name is not
10392         declared, but Library_Dir is.
10393
10394 2011-08-02  Robert Dewar  <dewar@adacore.com>
10395
10396         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10397         pragmas (affects aspects [Component_]Default_Value
10398         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10399         component type for the resolution
10400
10401 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10402
10403         * einfo.adb (Base_Type): Tune implementation for speed.
10404
10405 2011-08-02  Robert Dewar  <dewar@adacore.com>
10406
10407         * freeze.adb: Minor reformatting.
10408
10409 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10410
10411         * scos.ads: Update comments.
10412
10413 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10414
10415         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10416         base type, because the parent may be a subtype of a private type whose
10417         convention is established in a private part.
10418
10419 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10420
10421         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10422         statement in a block when the expansion of the return expression has
10423         created a finalization chain.
10424         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10425         with the parent node.
10426         Add N_Extended_Return_Statement to handle the case where a transient
10427         object declaration appears in the Return_Object_Declarations list of
10428         an extended return statement.
10429
10430 2011-08-02  Matthew Gingell  <gingell@adacore.com>
10431
10432         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10433         unused parameter 'name'.
10434
10435 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10436
10437         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10438         inherited operation, check whether its alias, which is the source
10439         operastion that it renames, has been marked eliminated.
10440
10441 2011-08-02  Javier Miranda  <miranda@adacore.com>
10442
10443         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10444         in-mode parameter whose type is an access type since it can be used to
10445         modify its designated object. Enforce code that handles as safe an
10446         access type that is not access-to-constant but it is the result of a
10447         previous removal of side-effects.
10448         (Remove_Side_Effects): Minor code reorganization of cases which require
10449         no action. Done to incorporate documentation on new cases uncovered
10450         working in this ticket: no action needed if this routine was invoked
10451         too early and the nodes are not yet decorated.
10452         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10453         to routine Remove_Side_Effects by calls to Force_Evaluation since they
10454         were issued with actuals that are implicitly provided by
10455         Force_Evaluation.
10456
10457 2011-08-02  Robert Dewar  <dewar@adacore.com>
10458
10459         * sem_ch3.adb, sem_res.adb: Minor reformatting.
10460
10461 2011-08-02  Yannick Moy  <moy@adacore.com>
10462
10463         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10464         to issue an error in formal mode on attribute not supported in this mode
10465         (Analyze_Attribute): issue errors on standard attributes not supported
10466         in formal mode.
10467         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10468         comment, and issue error in formal mode on modulus which is not a power
10469         of 2.
10470         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10471         range.
10472         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10473         subtype mark.
10474         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10475         operator on modular type (except 'not').
10476
10477 2011-08-02  Robert Dewar  <dewar@adacore.com>
10478
10479         * gnat_rm.texi: Minor reformatting.
10480
10481 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10482
10483         * s-osinte-linux.ads: Minor comment update and reformatting.
10484         * i-cexten.ads: Make this unit pure, as for its parent.
10485         Will allow its usage in more contexts if needed.
10486
10487 2011-08-02  Robert Dewar  <dewar@adacore.com>
10488
10489         * s-utf_32.ads: Minor comment fix.
10490
10491 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10492
10493         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10494         operation of a tagged synchronized type, handle the case where the
10495         controlling argument is overloaded.
10496
10497 2011-08-02  Yannick Moy  <moy@adacore.com>
10498
10499         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10500         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10501         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10502         SPARK mode and formal verification mode on processing SPARK restriction
10503         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10504         requiring consistency checking.
10505
10506 2011-08-02  Robert Dewar  <dewar@adacore.com>
10507
10508         * sem_res.adb: Minor reformatting.
10509
10510 2011-08-02  Robert Dewar  <dewar@adacore.com>
10511
10512         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10513         a-cforse.ads: Remove unneeded with of Ada.Containers
10514         Remove commented out pragma Inline's
10515         Move specifications of new subprograms to the actual specs
10516
10517 2011-08-02  Yannick Moy  <moy@adacore.com>
10518
10519         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10520         a-cforse.ads: Update comments.
10521
10522 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10523
10524         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10525
10526 2011-08-02  Robert Dewar  <dewar@adacore.com>
10527
10528         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10529         a-cforse.ads, a-cofove.ads: Minor reformatting.
10530
10531 2011-08-02  Claire Dross  <dross@adacore.com>
10532
10533         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10534         a-cofove.ads: Add comments.
10535
10536 2011-08-02  Yannick Moy  <moy@adacore.com>
10537
10538         * gnat_rm.texi: Document formal containers.
10539
10540 2011-08-02  Emmanuel Briot  <briot@adacore.com>
10541
10542         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10543         are empty sections.
10544
10545 2011-08-02  Robert Dewar  <dewar@adacore.com>
10546
10547         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10548         reformatting.
10549
10550 2011-08-02  Robert Dewar  <dewar@adacore.com>
10551
10552         * aspects.adb: New aspects Default_Value and Default_Component_Value
10553         New format of Aspect_Names table checks for omitted entries
10554         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10555         handling of boolean aspects for derived types.
10556         New aspects Default_Value and Default_Component_Value
10557         New format of Aspect_Names table checks for omitted entries
10558         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10559         (Has_Default_Value): New flag
10560         (Has_Default_Component_Value): New flag
10561         (Has_Default_Value): New flag
10562         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10563         table.
10564         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10565         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10566         Default_Value and Default_Component_Value
10567         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10568         New aspects Default_Value and Default_Component_Value
10569         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10570         * sprint.adb: Print N_Aspect_Specification node when called from gdb
10571
10572 2011-08-02  Vincent Celier  <celier@adacore.com>
10573
10574         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10575         inherit library kind.
10576
10577 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10578
10579         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10580         Minor reformatting.
10581
10582 2011-08-02  Robert Dewar  <dewar@adacore.com>
10583
10584         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10585
10586 2011-08-02  Yannick Moy  <moy@adacore.com>
10587
10588         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10589
10590 2011-08-02  Robert Dewar  <dewar@adacore.com>
10591
10592         * impunit.adb: Add comment.
10593
10594 2011-08-02  Yannick Moy  <moy@adacore.com>
10595
10596         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10597         qualification of aggregates in formal mode
10598         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10599         another aggregate
10600         (Resolve_Aggregate): complete the test that an aggregate is adequately
10601         qualified in formal mode
10602
10603 2011-08-02  Pascal Obry  <obry@adacore.com>
10604
10605         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10606         * mlib-prj.adb: Supress warning when compiling binder generated file.
10607         (Build_Library): Supress all warnings when compiling the binder
10608         generated file.
10609
10610 2011-08-02  Yannick Moy  <moy@adacore.com>
10611
10612         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10613         from here...
10614         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10615         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10616         Add with/use clauses to make Check_Formal_Restriction visible
10617
10618 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10619
10620         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10621         in-parameters when type of the generic formal is private in the generic
10622         spec and non-private in the body.
10623
10624 2011-08-02  Claire Dross  <dross@adacore.com>
10625
10626         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10627         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10628         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10629         * impunit.adb, Makefile.rtl: Take new files into account.
10630
10631 2011-08-02  Robert Dewar  <dewar@adacore.com>
10632
10633         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10634         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10635
10636 2011-08-02  Yannick Moy  <moy@adacore.com>
10637
10638         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10639         formal mode
10640         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10641         matching static array bounds, taking into account the special case of
10642         string literals
10643         * sem_ch3.adb: Typo in comment.
10644
10645 2011-08-02  Yannick Moy  <moy@adacore.com>
10646
10647         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10648         which issues an error in formal mode if its argument node is originally
10649         from source
10650         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10651         has a discriminant specification so that it does not include the case
10652         of derived types
10653         (Derived_Type_Declaration): move here the test that a derived type has a
10654         discriminant specification
10655         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10656         first element of a component association before accessing its choices
10657         (presence of component association is not enough)
10658         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10659         declaration is a library item before accessing the next element in a
10660         list, as library items are not member of lists
10661         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10662         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10663         Check_Formal_Restriction whenever possible.
10664
10665 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10666
10667         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10668         reference when needed.
10669
10670 2011-08-02  Bob Duff  <duff@adacore.com>
10671
10672         * gnat_ugn.texi: Fix typo.
10673
10674 2011-08-02  Vincent Celier  <celier@adacore.com>
10675
10676         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10677         archive file name. Do not use the full path name of archives for Open
10678         VMS.
10679
10680 2011-08-02  Robert Dewar  <dewar@adacore.com>
10681
10682         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10683         Analyze_Aspect_Specifications
10684         * sem_ch13.adb
10685         (Analyze_Aspect_Specifications): New handling for boolean aspects
10686         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10687         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10688         sequence for Analyze_Aspect_Specifications
10689         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10690         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10691
10692 2011-08-02  Robert Dewar  <dewar@adacore.com>
10693
10694         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10695         aspects, since these no longer exist.
10696
10697 2011-08-02  Robert Dewar  <dewar@adacore.com>
10698
10699         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10700         semicolon, do not try to see if there are aspects following it.
10701         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10702         aspect spec.
10703
10704 2011-08-02  Robert Dewar  <dewar@adacore.com>
10705
10706         * sem_ch8.adb, aspects.ads: Minor reformatting.
10707
10708 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10709
10710         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10711         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10712         extracted from...
10713         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
10714
10715 2011-08-02  Yannick Moy  <moy@adacore.com>
10716
10717         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10718         mode on subprogram declaration outside of package specification, unless
10719         it is followed by a pragma Import
10720         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10721         Access_Type_Declaration): issue error in formal mode on access type
10722         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10723         incomplete type
10724         (Analyze_Object_Declaration): issue error in formal mode on object
10725         declaration which does not respect SPARK restrictions
10726         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10727         declaration which does not respect SPARK restrictions
10728         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10729         error in formal mode on digits or delta constraint
10730         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10731         decimal fixed point type
10732         (Derived_Type_Declaration): issue error in formal mode on derived type
10733         other than type extensions of tagged record types
10734         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10735         with check on access definition
10736         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10737         mode on protected definition.
10738         (Analyze_Task_Definition): issue error in formal mode on task definition
10739
10740 2011-08-02  Robert Dewar  <dewar@adacore.com>
10741
10742         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10743
10744 2011-08-02  Javier Miranda  <miranda@adacore.com>
10745
10746         * sem_ch6.adb (Can_Override_Operator): New function.
10747         (Verify_Overriding_Indicator): Add missing code to check overriding
10748         indicator in operators. Fixes regression.
10749         (Check_Overriding_Indicator): Minor reformating after replacing the
10750         code that evaluates if the subprogram can override an operator by
10751         invocations to the above new function.
10752         * einfo.adb
10753         (Write_Field26_Name): Add missing code to ensure that, following
10754         the documentation in einfo.ads, this field is not shown as attribute
10755         "Static_Initialization" on non-dispatching functions.
10756
10757 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10758
10759         * sem_res.adb (Resolve_Call): A call to
10760         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10761         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10762         i.e., when the second parameter is of type Time_Span.
10763
10764 2011-08-02  Vincent Celier  <celier@adacore.com>
10765
10766         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10767         with an archive instead of -L<library dir> -l<library name>.
10768
10769 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10770
10771         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10772         mark the base types In_Use in addition to making the operations
10773         use_visible.
10774
10775 2011-08-02  Ed Falis  <falis@adacore.com>
10776
10777         * init.c: add and setup __gnat_signal_mask for the exception signals
10778         * s-inmaop-vxworks.adb: new file.
10779         * s-intman-vxworks.adb: remove unnecessary initializations and
10780         simplify remaining
10781         * s-intman-vxworks.ads: remove unnecessary variable
10782         * s-taprop-vxworks.adb: simplify signal initialization
10783
10784 2011-08-02  Robert Dewar  <dewar@adacore.com>
10785
10786         * sem_ch8.adb: Minor code reorganization, comment updates.
10787
10788 2011-08-02  Robert Dewar  <dewar@adacore.com>
10789
10790         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10791         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10792         here from Sem_Res.
10793         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10794         (Matching_Static_Array_Bounds): Moved here from Sem_Res
10795
10796 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10797
10798         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10799         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10800         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10801         use_type_clauses, to handle more efficiently use_type and use_all_type
10802         constructs.
10803         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10804         Ada2012 Use_All_Type clause.
10805         (Use_Class_Wide_Operations): new procedure.
10806
10807 2011-08-02  Robert Dewar  <dewar@adacore.com>
10808
10809         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10810         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10811         expression to expression function.
10812
10813 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10814
10815         * sem_ch4.adb: transform simple Ada2012 membership into equality only
10816         if types are compatible.
10817
10818 2011-08-02  Yannick Moy  <moy@adacore.com>
10819
10820         * sem_res.adb (Matching_Static_Array_Bounds): new function which
10821         returns True if its argument array types have same dimension and same
10822         static bounds at each index.
10823         (Resolve_Actuals): issue an error in formal mode on actuals passed as
10824         OUT or IN OUT paramaters which are not view conversions in SPARK.
10825         (Resolve_Arithmetic_Op): issue an error in formal mode on
10826         multiplication or division with operands of fixed point types which are
10827         not qualified or explicitly converted.
10828         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10829         Boolean or array type (except String) operands.
10830         (Resolve_Equality_Op): issue an error in formal mode on equality
10831         operators for array types other than String with non-matching static
10832         bounds.
10833         (Resolve_Logical_Op): issue an error in formal mode on logical operators
10834         for array types with non-matching static bounds. Factorize the code in
10835         Matching_Static_Array_Bounds.
10836         (Resolve_Qualified_Expression): issue an error in formal mode on
10837         qualified expressions for array types with non-matching static bounds.
10838         (Resolve_Type_Conversion): issue an error in formal mode on type
10839         conversion for array types with non-matching static bounds
10840
10841 2011-08-02  Robert Dewar  <dewar@adacore.com>
10842
10843         * par-ch10.adb: Minor code reorganization (use Nkind_In).
10844
10845 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10846
10847         * par-ch9.adb: save location of entry for proper error message.
10848
10849 2011-08-02  Javier Miranda  <miranda@adacore.com>
10850
10851         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10852         (Use_Full_View) which permits this routine to climb through the
10853         ancestors using the full-view of private parents.
10854         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10855         Use_Full_View to true in calls to Is_Ancestor.
10856         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10857         true in call to Is_Ancestor.
10858         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10859         Use_Full_View to true in call to Is_Ancestor.
10860         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10861         call to Is_Ancestor.
10862         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10863         Use_Full_View to true in calls to Is_Ancestor.
10864         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10865         Make_Select_Specific_Data_Table, Register_Primitive,
10866         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10867         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10868         to true in call to Is_Ancestor.
10869         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10870         Use_Full_View to true in calls to Is_Ancestor.
10871         * exp_cg.adb
10872         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10873         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10874
10875 2011-08-02  Robert Dewar  <dewar@adacore.com>
10876
10877         * gnat_rm.texi: Minor reformatting.
10878         * sem_prag.adb: Minor reformatting.
10879
10880 2011-08-02  Tristan Gingold  <gingold@adacore.com>
10881
10882         * vms_data.ads: Add VMS qualifier for -gnateP.
10883
10884 2011-08-02  Robert Dewar  <dewar@adacore.com>
10885
10886         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10887         * par-ch7.adb (P_Package): Proper placement of aspects for package
10888         decl/instantiation.
10889         * par-endh.adb (Check_End): Ad Is_Sloc parameter
10890         (End_Statements): Add Is_Sloc parameterr
10891         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10892         (Check_End): Ad Is_Sloc parameter
10893         (End_Statements): Add Is_Sloc parameterr
10894
10895 2011-08-02  Vincent Celier  <celier@adacore.com>
10896
10897         * ug_words: Add VMS qualifier equivalent to -gnateP:
10898         /SYMBOL_PREPROCESSING.
10899
10900 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10901
10902         * gnat-style.texi: For hexadecimal numeric literals the typical
10903         grouping of digits is 4 to represent 2 bytes.
10904         A procedure spec which is split into several lines is indented two
10905         characters.
10906
10907 2011-08-02  Yannick Moy  <moy@adacore.com>
10908
10909         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10910         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10911         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10912         properly qualified
10913         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10914         choice in array aggregate
10915         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10916         mark as ancestor
10917         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10918         positional and named aggregate for record, or others in record
10919         aggregate, or multiple choice in record aggregate
10920         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10921         array operands to logical operations AND, OR and XOR do not have the
10922         same static lower and higher bounds
10923         * sem_ch5.adb, sinfo.ads: Correct typos in comments
10924
10925 2011-08-01  Robert Dewar  <dewar@adacore.com>
10926
10927         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10928         Replaces Last_Source_Node_In_Sequence.
10929         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10930         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10931         parens and blank in string (this was inconsistently implemented).
10932         * errout.ads
10933         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10934         blank in string (this was inconsistently implemented).
10935         * gnat1drv.adb
10936         (Set_Global_Switches): Set formal mode switches appropriately
10937         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10938         * par-prag.adb
10939         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10940         call Set_Error_Msg_Lang to set "spark" as language name.
10941         * par.adb: Remove unnecessary call to set formal language for errout
10942         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10943         appropriately and call Set_Error_Msg_Lang to set "spark" as language
10944         name.
10945         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10946         calls to it, moved after resolution so that types are known
10947         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10948         result of concatenation is not of type String
10949         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10950         concatenation is not properly restricted
10951         * gnat_rm.texi: Add doc on pragma Spark_95.
10952         * gcc-interface/Makefile.in: Remove obsolete target pairs for
10953         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10954         * gcc-interface/Make-lang.in: Update dependencies.
10955
10956 2011-08-01  Javier Miranda  <miranda@adacore.com>
10957
10958         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10959         condition that detects if the overridden operation must replace an
10960         existing entity.
10961
10962 2011-08-01  Javier Miranda  <miranda@adacore.com>
10963
10964         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10965         code declarations inserted by Insert_Actions in each alternative of the
10966         N_Case_Expression node.
10967
10968 2011-08-01  Robert Dewar  <dewar@adacore.com>
10969
10970         * sem_ch6.adb: Minor code reorganization.
10971         * sem_util.adb: Minor reformatting.
10972
10973 2011-08-01  Pascal Obry  <obry@adacore.com>
10974
10975         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10976         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10977
10978 2011-08-01  Yannick Moy  <moy@adacore.com>
10979
10980         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10981         literal or operator symbol which is prefixed
10982         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10983         mode on access attributes.
10984         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10985         that concatenation operands are properly restricted in formal mode
10986         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10987         Analyze_Concatenation_Operand. Issue an error in formal mode if the
10988         result of the concatenation has a type different from String.
10989         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10990         Analyze_Quantified_Expression, Analyze_Slice,
10991         Analyze_Null): issue an error in formal mode on unsupported constructs
10992         * sem_ch5.adb
10993         (Analyze_Block_Statement): only issue error on source block statement
10994         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10995         function which returns the last node in a list of nodes for which
10996         Comes_From_Source returns True, if any
10997         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10998         Last_Source_Node_In_Sequence
10999         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11000         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11001         mode on unsupported constructs
11002         * sem_ch9.adb Do not return after issuing error in formal mode, as the
11003         rest of the actions may be needed later on since the error is marked as
11004         not serious.
11005         * sinfo.ads: Typos in comments.
11006
11007 2011-08-01  Pascal Obry  <obry@adacore.com>
11008
11009         * projects.texi: Minor editing.
11010
11011 2011-08-01  Yannick Moy  <moy@adacore.com>
11012
11013         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11014         insertion character ~~
11015         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11016         (Set_Error_Msg_Lang): new procedure which fixes the language for use
11017         with insertion character ~~
11018         (Set_Msg_Text): treat insertion character ~~
11019         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11020         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11021         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11022         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11023         errors related to the formal language restriction not serious
11024         (insertion character |).
11025         * par.adb (Par): set formal language for error messages if needed
11026         * sem_ch6.adb (Check_Missing_Return): take into account possible
11027         generated statements at the end of the function
11028         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11029         enumeration value to define a new pragma SPARK_95
11030         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11031         SPARK_Version): new type and variables to store the SPARK version
11032         (none by default).
11033         (SPARK_Mode): return True when SPARK_Version is set
11034         * par-prag.adb: Correct indentation
11035         (Prag): take Pragma_SPARK_95 into account
11036         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11037         into account.
11038
11039 2011-08-01  Robert Dewar  <dewar@adacore.com>
11040
11041         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11042         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11043         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11044
11045 2011-08-01  Pascal Obry  <obry@adacore.com>
11046
11047         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11048         Target_Name to Get_Path call.
11049         (Parse_Single_Project): Likewise.
11050         (Post_Parse_Context_Clause): Likewise.
11051         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11052         Call Initialise_Project_Path with the proper Target_Name.
11053         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11054         search path.
11055         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11056         with the proper Target_Name.
11057         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11058         Part.Parse routine.
11059         (Parse_Project_And_Apply_Config): Likewise.
11060         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11061         This is fine as this part of the code is supporting only native
11062         compilation.
11063         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11064         is fine as this part of the code is supporting only native compilation.
11065
11066 2011-08-01  Yannick Moy  <moy@adacore.com>
11067
11068         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11069         of homonym, unless the homonym is one of the cases allowed in SPARK
11070         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11071         package declaration occurring after a body.
11072
11073 2011-08-01  Robert Dewar  <dewar@adacore.com>
11074
11075         * checks.adb, exp_ch4.adb: Minor reformatting.
11076
11077 2011-08-01  Javier Miranda  <miranda@adacore.com>
11078
11079         * einfo.ads (Access_Disp_Table): Fix documentation.
11080         (Dispatch_Table_Wrappers): Fix documentation.
11081
11082 2011-08-01  Pascal Obry  <obry@adacore.com>
11083
11084         * prj-env.adb, prj-env.ads: Minor reformatting.
11085
11086 2011-08-01  Yannick Moy  <moy@adacore.com>
11087
11088         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11089         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11090         procedures out of these packages.
11091         * errout.ads, errout.adb
11092         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11093         procedures in of this package
11094         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11095         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11096         on misplaced later vs initial declarations, like in Ada 83
11097         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11098         formal mode on attribute of private type whose full type declaration
11099         is not visible
11100         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11101         package declaration inside a package specification
11102         (Analyze_Full_Type_Declaration): issue error in formal mode on
11103         controlled type or discriminant type
11104         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11105         user-defined operator means that it should come from the source
11106         (New_Overloaded_Entity): issue error in formal mode on overloaded
11107         entity.
11108         * sem_ch6.ads, sem_ch13.ads: typos in comments.
11109
11110 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11111
11112         * atree.adb: Minor reformatting.
11113         * checks.adb: Minor reformatting.
11114
11115 2011-08-01  Vincent Celier  <celier@adacore.com>
11116
11117         * s-parame-vms-ia64.ads: Fix typo in comment
11118         Minor reformatting
11119         * s-parame-vms-restrict.ads: Removed, unused.
11120
11121 2011-08-01  Javier Miranda  <miranda@adacore.com>
11122
11123         * exp_ch3.adb
11124         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11125         * sem_ch3.adb
11126         (Constrain_Index): Remove side effects in the evaluation of the bounds.
11127         * sem_ch3.ads, sem_ch3.adb
11128         (Is_Constant_Bound): New extended version of the subprogram that was
11129         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11130         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11131         * sem_aux.ads (Constant_Value): Fix typo in comment.
11132         * checks.adb (Generate_Index_Checks): New implementation which, for
11133         array objects with constant bounds, generates the runtime check
11134         referencing the bounds of the array type. For other cases this routine
11135         provides its previous behavior obtaining such values from the array
11136         object.
11137         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11138         parent type.
11139         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11140         we cannot have semantic interpretations of the new node.
11141
11142 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11143
11144         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11145         expressions.
11146
11147 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11148
11149         * sem_ch8.adb: Minor code editing.
11150         * s-vxwext.adb: Remove trailing space.
11151         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11152         consistency with other files.
11153
11154 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11155
11156         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11157
11158 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11159
11160         * par-ch10.adb: reject parameterized expressions as compilation unit.
11161         * sem_ch4.adb: handle properly conditional expression with overloaded
11162         then_clause and no else_clause.
11163
11164 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11165
11166         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11167         like done by System.Aux_DEC.
11168         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11169
11170 2011-08-01  Yannick Moy  <moy@adacore.com>
11171
11172         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11173         missing label at end of declaration (subprogram or package)
11174         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11175         of positional and named parameter association
11176         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11177         Error_Msg_SP which adds a prefix to the error message giving the name
11178         of the formal language analyzed
11179         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11180         access result type in subprogram, unconstrained array as result type,.
11181         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11182         procedure
11183         * sem_ch8.adb: Code clean up.
11184
11185 2011-08-01  Javier Miranda  <miranda@adacore.com>
11186
11187         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11188         * einfo.ads (Access_Disp_Table): Fix documentation.
11189         (Dispatch_Table_Wrappers): Fix documentation.
11190         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11191         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11192         to enforce the documentation of this attribute.
11193         (Set_Is_Interface): Cleanup the assertion.
11194         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11195         the Underlying_Type entity before reading attribute Access_Disp_Table.
11196         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11197         Locate the Underlying_Type before reading attribute Access_Disp_Table.
11198         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11199         the Underlying_Type entity before reading attribute Access_Disp_Table.
11200         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11201         Locate the Underlying_Type entity before reading attribute
11202         Access_Disp_Table.
11203
11204 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11205
11206         * s-poosiz.ads: Additional overriding indicators.
11207
11208 2011-08-01  Yannick Moy  <moy@adacore.com>
11209
11210         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11211         formal mode.
11212         (Analyze_Iteration_Scheme): issue error in formal mode when loop
11213         parameter specification does not include a subtype mark.
11214         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11215         formal mode on abstract subprogram.
11216         (Analyze_Subprogram_Specification): issue error in formal mode on
11217         user-defined operator.
11218         (Process_Formals): issue error in formal mode on access parameter and
11219         default expression.
11220         * sem_ch9.adb (Analyze_Abort_Statement,
11221         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11222         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11223         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11224         Analyze_Requeue, Analyze_Selective_Accept,
11225         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11226         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11227         issue error in formal mode on user-defined raise statement.
11228
11229 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11230
11231         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11232         declaration being hidden when overriding an implicit inherited
11233         subprogram.
11234         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11235         (-gnats), do not complain about a source file that contains only a
11236         pragma No_Body.
11237
11238 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11239
11240         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11241         variable if already set.
11242
11243 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11244
11245         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11246         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11247         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11248         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11249         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11250         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11251         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11252         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11253         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11254         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11255         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11256         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11257         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11258         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11259         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11260         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11261         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11262         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11263         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11264         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11265         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11266         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11267         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11268         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11269         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11270         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11271         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11272         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11273         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11274         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11275         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11276         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11277         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11278         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11279         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11280         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11281         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11282         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11283         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11284         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11285         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11286         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11287         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11288         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11289         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11290         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11291         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11292         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11293         s-osinte-mingw.ads: Update to GPLv3 run-time license.
11294         Use GNAT instead of GNARL.
11295
11296 2011-08-01  Bob Duff  <duff@adacore.com>
11297
11298         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11299         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11300         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11301         reformatting.
11302
11303 2011-08-01  Yannick Moy  <moy@adacore.com>
11304
11305         * debug.adb (d.D) reverve flag for the SPARK mode
11306         (d.E) reverve flag for SPARK generation mode
11307         (d.F) reverve flag for Why generation mode
11308         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11309         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
11310         functions which return True when the corresponding modes are set
11311         (Formal_Language): return "spark" or "alfa" when in formal verification
11312         mode.
11313         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11314         Error_Msg to prefix the error message with a tag giving the formal
11315         language
11316         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11317         message with a tag giving the formal language
11318         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11319         block statement
11320         (Analyze_Case_Statement): issue error in formal mode on case statement
11321         with a single "others" case alternative
11322         (Analyze_Exit_Statement): issue errors in formal mode on exit
11323         statements which do not respect SPARK restrictions
11324         (Analyze_Goto_Statement): issue error in formal mode on goto statement
11325         (Check_Unreachable_Code): always issue an error (not a warning) in
11326         formal mode on unreachable code (concerns both code after an infinite
11327         loop and after an unconditional jump, both not allowed in SPARK)
11328         * sem_ch6.adb (Analyze_Return_Statement): add call to
11329         Set_Return_Present for a procedure containing a return statement
11330         (already done for functions in Analyze_Function_Return)
11331         (Analyze_Function_Return): issue error in formal mode on extended
11332         return or if return is not last statement in function
11333         (Check_Missing_Return): issue error in formal mode if function does
11334         not end with return or if procedure contains a return
11335         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11336         function to detect if there is an inner scope of its parameter S which
11337         is a loop.
11338
11339 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11340
11341         * sem_ch6.ads: Minor reformatting.
11342
11343 2011-08-01  Javier Miranda  <miranda@adacore.com>
11344
11345         * sem_util.adb (Abstract_Interface_List): Complete condition when
11346         processing private type declarations to avoid reading unavailable
11347         attribute.
11348         (Is_Synchronized_Tagged_Type): Complete condition when processing
11349         private extension declaration nodes to avoid reading unavailable
11350         attribute.
11351
11352 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11353
11354         * sem_ch3.adb: Minor reformatting.
11355
11356 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11357
11358         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11359         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11360         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11361         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11362         for VMS, instead parametrize the common implementation with
11363         System.Parameters declarations.
11364
11365 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
11366
11367         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11368
11369 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11370
11371         * seh_init.c: Fix SEH handler installation on win64.
11372
11373 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11374
11375         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11376         double analysis of an anonymous access to subprogram, because it can
11377         lead to improper sharing of profiles and a back-end crash.
11378
11379 2011-08-01  Robert Dewar  <dewar@adacore.com>
11380
11381         * make.adb, sem_ch4.adb: Minor reformatting.
11382         * gcc-interface/Make-lang.in: Update dependencies.
11383         * sem_util.adb, exp_ch5.adb: Minor reformatting.
11384
11385 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11386
11387         * gnat_rm.texi: Fix definition of Long_Integer.
11388
11389 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11390
11391         * exp_aggr.adb: check limit size of static aggregate unconditionally,
11392         to prevent storage exhaustion.
11393         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11394         finalized is a function body, insert the cleanup code before the final
11395         return statement, to prevent spurious warnings.
11396         * s-pooglo.ads: add overriding indicator.
11397
11398 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11399
11400         * sem_ch4.adb (Operator_Check): improve error message when both a
11401         with_clause and a use_clause are needed to make operator usage legal.
11402         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11403         determine whether a compilation unit is visible within an other,
11404         either through a with_clause in the current unit, or a with_clause in
11405         its library unit or one one of its parents.
11406
11407 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11408
11409         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11410         over an arbitrary expression of an array or container type.
11411         * lib-xref.adb: clarify comment.
11412
11413 2011-08-01  Bob Duff  <duff@adacore.com>
11414
11415         * einfo.ads: Minor reformatting.
11416         * debug.adb: Minor comment improvement.
11417
11418 2011-08-01  Javier Miranda  <miranda@adacore.com>
11419
11420         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11421         consider hidden subprograms as valid candidates.
11422
11423 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11424
11425         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11426
11427 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
11428
11429         * gnat_ugn.texi: Fix typo.
11430
11431 2011-08-01  Robert Dewar  <dewar@adacore.com>
11432
11433         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11434         lib-xref.adb: Minor reformatting
11435
11436 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
11437
11438         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11439         when to generate a call to Move_Final_List.
11440         (Has_Controlled_Parts): Remove this function.
11441
11442 2011-08-01  Geert Bosch  <bosch@adacore.com>
11443
11444         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11445         "," in choice list.
11446
11447 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11448
11449         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11450         explicit raise of a predefined exception as Comes_From_Source if the
11451         original N_Raise_Statement comes from source.
11452
11453 2011-08-01  Robert Dewar  <dewar@adacore.com>
11454
11455         * sinfo.ads: Add comment.
11456         * sem_ch6.adb: Minor reformatting.
11457
11458 2011-08-01  Robert Dewar  <dewar@adacore.com>
11459
11460         * freeze.adb (Freeze_Entity): Refine check for bad component size
11461         clause to avoid rejecting confirming clause when atomic/aliased present.
11462
11463 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11464
11465         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11466         better determine whether an entity reference is a write.
11467         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11468         subcomponent.
11469         * lib-xref.adb (Output_References): Do no suppress a read reference at
11470         the same location as an immediately preceeding modify-reference, to
11471         handle properly in-out actuals.
11472
11473 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11474
11475         * env.c (__gnat_setenv) [VMS]: Refine previous change.
11476
11477 2011-08-01  Quentin Ochem  <ochem@adacore.com>
11478
11479         * i-cstrin.adb (New_String): Changed implementation, now uses only the
11480         heap to compute the result.
11481
11482 2011-08-01  Robert Dewar  <dewar@adacore.com>
11483
11484         * atree.ads: Minor reformatting.
11485
11486 2011-08-01  Emmanuel Briot  <briot@adacore.com>
11487
11488         * g-expect.adb (Get_Command_Output): Fix memory leak.
11489
11490 2011-08-01  Geert Bosch  <bosch@adacore.com>
11491
11492         * cstand.adb (P_Float_Type): New procedure to print the definition of
11493         predefined fpt types.
11494         (P_Mixed_Name): New procedure to print a name using mixed case
11495         (Print_Standard): Use P_Float_Type for printing floating point types
11496         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11497         precision IEEE float.
11498
11499 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11500
11501         * sem_ch3.adb: Minor reformatting.
11502
11503 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11504
11505         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11506         the completion of a generic function, insert the new body rather than
11507         rewriting the original.
11508
11509 2011-08-01  Yannick Moy  <moy@adacore.com>
11510
11511         * sinfo.ads, errout.ads: Typos in comments.
11512
11513 2011-08-01  Robert Dewar  <dewar@adacore.com>
11514
11515         * par-endh.adb: Minor reformatting.
11516
11517 2011-08-01  Robert Dewar  <dewar@adacore.com>
11518
11519         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11520         (Pre_Post_Aspects): New subtype.
11521         * par-ch12.adb (P_Generic): New syntax for aspects in packages
11522         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11523         * par-ch7.adb (P_Package): Remove Decl parameter
11524         (P_Package): Handle new syntax for aspects (before IS)
11525         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11526         new aspect syntax
11527         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11528         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11529         (P_Package): Remove Decl parameter
11530         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11531         aspects
11532         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11533         specs
11534         * sem_util.ads, sem_util.adb (Static_Boolean): New function
11535         * sinfo.ads: Document new syntax for aspects in packages etc.
11536         * sprint.adb: Handle new syntax of aspects before IS in package
11537
11538 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11539
11540         * atree.ads: Minor reformatting.
11541         * sem_prag.adb: Minor reformatting.
11542
11543 2011-08-01  Robert Dewar  <dewar@adacore.com>
11544
11545         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11546         case expr alternative.
11547
11548 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11549
11550         * sem_ch12.adb: Fix typo.
11551
11552 2011-08-01  Geert Bosch  <bosch@adacore.com>
11553
11554         * sem_prag.adb (Check_No_Link_Name): New procedure.
11555         (Process_Import_Or_Interface): Use Check_No_Link_Name.
11556         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11557         instead of Standard_Long_Long_Float_Size global. Preparation for
11558         eventual removal of per type constants.
11559         * exp_util.ads (Get_Stream_Size): New function returning the stream
11560         size value of subtype E.
11561         * exp_util.adb (Get_Stream_Size): Implement new function.
11562         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11563         function.
11564         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11565         * einfo.adb:
11566         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11567
11568 2011-08-01  Geert Bosch  <bosch@adacore.com>
11569
11570         * cstand.adb: Fix comments.
11571         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11572         count of arguments.
11573
11574 2011-08-01  Robert Dewar  <dewar@adacore.com>
11575
11576         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11577
11578 2011-08-01  Geert Bosch  <bosch@adacore.com>
11579
11580         * atree.ads: Fix comment.
11581
11582 2011-08-01  Robert Dewar  <dewar@adacore.com>
11583
11584         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11585         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11586         * par.adb: Add with for Namet.Sp.
11587         * par-tchk.adb: Minor reformatting.
11588
11589 2011-08-01  Vincent Celier  <celier@adacore.com>
11590
11591         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11592         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11593         of the init procedure of a SAL.
11594         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11595         New procedure.
11596
11597 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11598
11599         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11600         reformatting.
11601
11602 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11603
11604         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11605
11606 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11607
11608         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11609         conformant with its spec (return True only for types that have
11610         an overriding Initialize primitive operation that prevents them from
11611         having preelaborable initialization).
11612         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11613         initialization for controlled types in Ada 2005 or later mode.
11614
11615 2011-08-01  Robert Dewar  <dewar@adacore.com>
11616
11617         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11618         Postcondition.
11619         (Same_Aspect): New function.
11620         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11621         Type_Invariant, Precondition, Postcondition.
11622         * snames.ads-tmpl: Add Name_Type_Invariant.
11623
11624 2011-08-01  Robert Dewar  <dewar@adacore.com>
11625
11626         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11627         here.
11628         (Freeze_All_Ent): Fix error in handling inherited aspects.
11629         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11630         already analyzed, but don't skip entire processing of a declaration,
11631         that's wrong in some cases of declarations being rewritten.
11632         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11633         Don't delay for integer, string literals
11634         Treat predicates in usual manner for delay, remove special case code,
11635         not needed.
11636         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11637         (Build_Predicate_Function): Update saved expression in aspect
11638         (Build_Invariant_Procedure): Update saved expression in aspect
11639         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11640         of replacement of discriminant references if the reference is simple.
11641
11642 2011-08-01  Robert Dewar  <dewar@adacore.com>
11643
11644         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11645         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11646         Static_Predicate and Dynamic_Predicate.
11647         (Build_Predicate_Function): Add processing for Static_Predicate
11648         and Dynamic_Predicate.
11649         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11650         (From_Static_Predicate): New flag
11651         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11652
11653 2011-08-01  Robert Dewar  <dewar@adacore.com>
11654
11655         * usage.adb: Documentation cleanup for Ada version modes in usage.
11656         * expander.adb: Minor reformatting.
11657
11658 2011-08-01  Robert Dewar  <dewar@adacore.com>
11659
11660         * atree.ads: Minor comment fix.
11661         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11662         a-witeio.ads, sem_prag.adb: Minor reformatting.
11663
11664 2011-08-01  Doug Rupp  <rupp@adacore.com>
11665
11666         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11667         pointers. Use descrip.h header file for convenience. Add some
11668         comments.
11669
11670 2011-08-01  Robert Dewar  <dewar@adacore.com>
11671
11672         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11673         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11674         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11675         New procedure.
11676         (Check_Aspect_At_End_Of_Declarations): New procedure
11677         (Analye_Aspect_Specification): Minor changes for above procedures
11678         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11679         specification node as well.
11680
11681 2011-08-01  Pascal Obry  <obry@adacore.com>
11682
11683         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11684         Windows files. Use GetFilesAttributes() in this case to check for file
11685         existence instead of returning with an error code.
11686
11687 2011-08-01  Vincent Celier  <celier@adacore.com>
11688
11689         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11690         High is above Source length.
11691
11692 2011-08-01  Robert Dewar  <dewar@adacore.com>
11693
11694         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11695
11696 2011-08-01  Robert Dewar  <dewar@adacore.com>
11697
11698         * aspects.ads (Boolean_Aspects): New subtype.
11699         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11700         for derived types in cases where the parent type and derived type have
11701         aspects.
11702         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11703         with aspects when parent type also has aspects.
11704         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11705         boolean expression at this point).
11706         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11707         accordance with final decision on the Ada 2012 feature.
11708         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11709
11710 2011-08-01  Matthew Heaney  <heaney@adacore.com>
11711
11712         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11713
11714 2011-08-01  Pascal Obry  <obry@adacore.com>
11715
11716         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11717         Fix Replace_Slice when High is above current string size.
11718         (Replace_Slice): Fix DL computation when High is above current
11719         string length.
11720
11721 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
11722
11723         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11724
11725 2011-08-01  Matthew Heaney  <heaney@adacore.com>
11726
11727         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11728         of node.
11729
11730 2011-08-01  Pascal Obry  <obry@adacore.com>
11731
11732         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11733         reformatting.
11734
11735 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11736
11737         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11738         access to protected subprograms in generic bodies.
11739         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11740         protected type, indicate that the convention of the subprogram is
11741         Convention_Protected, because it may be used in subsequent declarations
11742         within the protected declaration.
11743
11744 2011-08-01  Vincent Celier  <celier@adacore.com>
11745
11746         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11747         and "final" procedures when the name of the library is "ada", to avoid
11748         duplicate symbols "adainit" and "adafinal" in executables.
11749
11750 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11751
11752         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11753         quantified expression that appears within a postcondition and uses the
11754         Ada2012 'Result attribute.
11755
11756 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11757
11758         * init.c (__gnat_error_handler): Cast reason to int.
11759         (__gnat_install_handler): Explain sa_sigaction use.
11760
11761 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11762
11763         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11764         subprogram has copy-in copy-out parameters, try to promote the mode of
11765         the return type if it is passed in registers.
11766
11767 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11768
11769         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11770         left operand as addressable.
11771
11772 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11773
11774         * gcc-interface/gigi.h (build_function_stub): Remove.
11775         (build_return_expr): Likewise.
11776         (convert_vms_descriptor): Declare.
11777         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11778         (build_function_stub): Move to...
11779         * gcc-interface/utils2.c (build_return_expr): Move to...
11780         * gcc-interface/trans.c (build_function_stub): ...here.
11781         (build_return_expr): ...here.
11782         (Subprogram_Body_to_gnu): Add local variable for language_function.
11783         Disconnect the parameter attributes cache, if any, once done with it.
11784         Call end_subprog_body only after setting the end_locus.
11785         Build the stub associated with the function, if any, at the very end.
11786         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11787         variables and streamline control flow.
11788
11789 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
11790
11791         PR ada/49819
11792         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11793         g-trasym-dwarf.adb.
11794
11795 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11796
11797         PR bootstrap/49794
11798         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11799         Assign to act.sa_sigaction.
11800         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11801         current->return_address to char * before arithmetic.
11802
11803 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11804
11805         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11806         Correct argument types.
11807         Extract code from reason.
11808         (__gnat_install_handler): Assign to act.sa_sigaction.
11809
11810 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
11811
11812         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11813         (GNAT1_OBJS): ...here.
11814
11815 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
11816
11817         PR ada/48711
11818         * g-socthi-mingw.adb (Fill): Fix formatting.
11819
11820         * gcc-interface/gigi.h: Move around comment.
11821
11822 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
11823
11824         PR ada/46350
11825         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11826
11827 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
11828
11829         PR ada/48711
11830         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11831
11832 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
11833
11834         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11835         range comparison if Pmode is SImode.
11836
11837 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
11838             Eric Botcazou  <ebotcazou@adacore.com>
11839
11840         * adadecode.c: Wrap up in extern "C" block.
11841         * adadecode.h: Likewise.
11842         * adaint.c: Likewise.  Remove 'const' keyword.
11843         * adaint.h: Likewise.
11844         * argv.c: Likewise.
11845         * atree.h: Likewise.
11846         * cio.c: Likewise.
11847         * cstreams.c: Likewise.
11848         * env.c: Likewise.
11849         * exit.c: Likewise.
11850         * fe.h: Likewise.
11851         * final.c: Likewise.
11852         * init.c: Likewise.
11853         * initialize.c: Likewise.
11854         * link.c: Likewise.
11855         * namet.h: Likewise.
11856         * nlists.h: Likewise.
11857         * raise.c: Likewise.
11858         * raise.h: Likewise.
11859         * repinfo.h: Likewise.
11860         * seh_init.c: Likewise.
11861         * targext.c: Likewise.
11862         * tracebak.c: Likewise.
11863         * uintp.h: Likewise.
11864         * urealp.h: Likewise.
11865         * xeinfo.adb: Wrap up generated C code in extern "C" block.
11866         * xsinfo.adb: Likewise.
11867         * xsnamest.adb: Likewise.
11868         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11869         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11870         * gcc-interface/misc.c: Likewise.
11871         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11872         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
11873         ada/targext.o here...
11874         (GNAT_ADA_OBJS): ...and not here.
11875         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11876         (GNATBIND_OBJS): Reorder.
11877
11878 2011-07-07  Richard Henderson  <rth@redhat.com>
11879
11880         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11881         dwarf2out_frame_init.
11882
11883 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
11884
11885         * gcc-interface/misc.c (gnat_init): Tweak previous change.
11886
11887 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11888
11889         PR target/39150
11890         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11891
11892 2011-07-06  Richard Guenther  <rguenther@suse.de>
11893
11894         * gcc-interface/misc.c (gnat_init): Merge calls to
11895         build_common_tree_nodes and build_common_tree_nodes_2.
11896         Re-initialize boolean_false_node.
11897
11898 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
11899             Olivier Hainque  <hainque@adacore.com>
11900             Nicolas Setton  <setton@adacore.com>
11901
11902         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11903         the type according to the ARTIFICIAL_P parameter.
11904         (create_type_decl): Likewise.
11905         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11906
11907 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
11908
11909         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11910         (gnatbind): Likewise.
11911
11912 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11913
11914         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11915
11916 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11917
11918         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11919         local variable throughout.  Remove useless call to Base_Type.
11920         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11921         Take it also into account for the volatileness of the field.  Set the
11922         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
11923
11924 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11925
11926         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11927         on a dereference built for a by-ref object if it has an address clause.
11928
11929 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11930
11931         * einfo.ads (Address_Taken): Document use for the second argument of
11932         Asm_Input and Asm_Output attributes.
11933         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11934         argument is an entity name, then set Address_Taken on it.
11935         <Attribute_Asm_Output>: Likewise.
11936         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11937         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11938         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11939         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11940
11941 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
11942
11943         PR middle-end/46500
11944         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11945
11946 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
11947
11948         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11949         (ada/utils.o): Update dependencies.
11950         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11951         ../../../libcpp/libcpp.a.
11952         * gcc-interface/utils.c: Include common/common-target.h.
11953         (process_attributes): Use targetm_common.have_named_sections.
11954
11955 2011-06-07  Richard Guenther  <rguenther@suse.de>
11956
11957         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11958         set_sizetype.
11959
11960 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11961
11962         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11963         TREE_THIS_NOTRAP flag.
11964
11965 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11966
11967         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11968         Fix thinko.
11969
11970 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11971
11972         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11973         constants whose full view has discriminants specially.
11974
11975 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11976
11977         * gcc-interface/utils.c: Include diagnostic.h.
11978         (gnat_write_global_declarations): Output debug information for all
11979         global type declarations before finalizing the compilation unit.
11980         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11981
11982 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
11983
11984         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11985
11986 2011-05-25  Kai Tietz  <ktietz@redhat.com>
11987
11988         * adaint.c (__gnat_to_canonical_file_list_next): Use array
11989         initialization instead of const/none-const pointer assignment.
11990
11991 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
11992
11993         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11994         $(EXTRA_GNAT1_OBJS).
11995         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11996         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11997         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11998         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11999         libcommon-target.a instead of prefix.o.
12000
12001 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
12002
12003         PR ada/49097
12004         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12005
12006 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
12007
12008         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12009         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12010         instead of version.o.
12011
12012 2011-05-18  Kai Tietz <ktietz@redhat.com>
12013
12014         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12015         boolean_false_node instead of integer_zero_node.
12016         (convert_with_check): Likewise.
12017         * gcc-interface/decl.c (choices_to_gnu): Likewise.
12018
12019 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
12020
12021         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12022         type of the parameter is an unconstrained array, convert the actual to
12023         the type of the formal in the In Out and Out cases as well.
12024
12025 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
12026
12027         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12028         call build_function_type_array or build_varargs_function_type_array
12029         instead.
12030         (create_subprog_type): Don't call build_function_type; call
12031         build_function_type_vec instead.
12032
12033 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
12034
12035         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12036         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12037         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12038
12039 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
12040
12041         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12042
12043         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12044         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12045
12046 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12047
12048         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12049
12050 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12051
12052         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12053         instead of accessing TYPE_ARG_TYPES directly.
12054         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12055
12056 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12057
12058         PR ada/48844
12059         * gcc-interface/gigi.h (get_variant_part): Declare.
12060         * gcc-interface/decl.c (get_variant_part): Make global.
12061         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12062         types have the same constant size, are record types and T1 has a
12063         variant part while T2 doesn't.
12064
12065 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12066
12067         * gcc-interface/utils.c (begin_subprog_body): Do not call
12068         get_pending_sizes.
12069         (end_subprog_body): Likewise.
12070
12071 2011-05-04  Richard Guenther  <rguenther@suse.de>
12072
12073         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12074         int_const_binop.
12075         (pos_to_constructor): Likewise.
12076
12077 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
12078             Eric Botcazou  <ebotcazou@adacore.com>
12079
12080         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12081         of build_function_type.  Adjust calls to...
12082         (build_raise_check): ...this.  Do not take a void_tree parameter.
12083         Call build_function_type_list instead of build_function_type.
12084         Fix head comment and swap couple of conditional blocks.
12085
12086 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
12087
12088         * gnatvsn.ads (Library_Version): Bump to 4.7.
12089         (Current_Year): Bump to 2011.
12090
12091 2011-04-29  Michael Matz  <matz@suse.de>
12092
12093         * gcc-interface/misc.c (gnat_handle_option): Set
12094         warn_maybe_uninitialized.
12095
12096 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
12097
12098         * gnat_ugn.texi (Complexity Metrics Control): Update link to
12099         the Watson/McCabe paper.
12100
12101 2011-04-23  Jim Meyering  <meyering@redhat.com>
12102
12103         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12104
12105 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12106
12107         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12108         onto the new type.
12109
12110 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12111
12112         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12113         parameter.
12114         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
12115         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12116         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12117         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12118         <all>: Do not set flags on the reused DECL node coming from an alias.
12119         Set DECL_IGNORED_P on the DECL node built for subprograms if they
12120         don't need debug info here...
12121         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12122         (gigi): Adjust calls to create_subprog_decl.
12123         (build_raise_check): Likewise.
12124         (establish_gnat_vms_condition_handler): Likewise.
12125         (Compilation_Unit_to_gnu): Likewise.
12126         (gnat_to_gnu): Likewise.
12127
12128 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
12129
12130         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12131         (NO_REORDER_ADAFLAGS): New variable.
12132         (EXTRA_GNATTOOLS): Always define.
12133         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12134         Clean up and adjust list of files compiled with special options.
12135         * gcc-interface/Make-lang.in: Likewise.
12136         (ada/decl.o): Cosmetical change.
12137         (ada/misc.o): Remove dependency on $(PLUGIN_H).
12138
12139 2011-04-20  Jim Meyering  <meyering@redhat.com>
12140
12141         * initialize.c (__gnat_initialize): Remove useless if-before-free.
12142
12143 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12144
12145         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12146         $(CFLAGS) on the link line.
12147
12148 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12149
12150         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12151         padded type built for the return type if it is unconstrained.
12152
12153 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
12154
12155         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12156
12157 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
12158
12159         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12160         before calling TREE_CHAIN.
12161         * gcc-interface/misc.c (gnat_init_ts): New function.
12162         (LANG_HOOKS_INIT_TS): Define.
12163
12164 2011-04-12  Martin Jambor  <mjambor@suse.cz>
12165
12166         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12167         instead of cgraph_node.
12168
12169 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12170
12171         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12172         alignment on fields of the RETURN type built for the Copy-In Copy-Out
12173         mechanism.
12174
12175 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12176
12177         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12178         of aggregate types that contain a placeholder.
12179
12180 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
12181
12182         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12183         TYPE_ARG_TYPES.
12184         (handle_type_generic_attribute): Likewise.
12185
12186 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
12187
12188         PR ada/47163
12189         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12190
12191 2011-04-04  Kai Tietz  <ktietz@redhat.com>
12192
12193         PR ada/47163
12194         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12195         to flag value.
12196
12197 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12198
12199         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12200         type case, do not strip a padding type around the array type.
12201
12202 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12203
12204         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12205         types.
12206
12207 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12208
12209         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12210         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12211         code for -feliminate-unused-debug-types.
12212         (gnat_post_options): Likewise.
12213
12214 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12215
12216         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12217         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12218         distinct copy.
12219
12220 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12221
12222         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12223         DECL_ARTIFICIAL flag on enumeration types.
12224
12225 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12226
12227         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12228         fat pointer types artificial unconditionally.
12229         <E_Array_Subtype>: Attach the base array type as a parallel type if it
12230         isn't artificial.
12231
12232 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12233
12234         * gcc-interface/gigi.h (get_dummy_type): Declare.
12235         (build_dummy_unc_pointer_types): Likewise.
12236         (finish_fat_pointer_type): Likewise.
12237         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12238         fat pointer type has been built, complete it in place.
12239         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12240         and thin pointers.  Remove useless variable.
12241         (finish_fat_pointer_type): Make global and move to...
12242         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12243         (get_dummy_type): New function.
12244         (build_dummy_unc_pointer_types): Likewise.
12245         (gnat_pushdecl): Propage the name to the anonymous variants only.
12246         (update_pointer_to): Only adjust the pointer types in the unconstrained
12247         array case.
12248
12249 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12250
12251         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12252         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12253         if this is a Taft amendment type and the full declaration is available.
12254         * gcc-interface/trans.c (process_type): Likewise.
12255         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12256         (process_freeze_entity): Likewise.
12257         * gcc-interface/utils.c (dummy_global): New static variable.
12258         (gnat_write_global_declarations): If there are types declared as used
12259         at the global level, insert them in the global hash table.
12260
12261 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12262
12263         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12264         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12265         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12266         copy.
12267         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
12268         flag of the type accordingly.
12269         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12270
12271 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12272
12273         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12274         finalizing types when updating the pointers to the designated type.
12275         <all>: Finalize the deferred types even if we didn't defer processing
12276         of incomplete types in this invocation.
12277
12278 2011-04-01  Olivier Hainque  <hainque@adacore.com>
12279             Nicolas Setton  <setton@adacore.com>
12280             Eric Botcazou  <ebotcazou@adacore.com>
12281
12282         * gcc-interface/misc.c (gnat_descriptive_type): New function.
12283         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12284
12285 2011-03-28  Kai Tietz  <ktietz@redhat.com>
12286
12287         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12288         Windows targets.
12289         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12290         * system-mingw.ads (System): Change ZCX_By_Default default to True.
12291
12292         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12293
12294 2011-03-28  Tristan Gingold  <gingold@adacore.com>
12295
12296         PR ada/44431
12297         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12298         Use ada output of gnatbind.
12299         (ada/b_gnatb.adb): Ditto.
12300         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12301         (ada.mostlyclean, ada.stage1)
12302         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12303         (ada.stagefeedback): Adjust.
12304         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12305         Use ada output of gnatbind.
12306         (b_gnatm.adb): Ditto.
12307         (b_gnatl.o, b_gnatm.o): New rules.
12308
12309 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12310
12311         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12312         for the padded type built to support a specified size or alignment.
12313
12314 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12315
12316         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12317         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12318         unconditionally to the end of the unit when the designated type is
12319         limited_with'ed.
12320         <all>: Rename local variable.  Attempt to un-defer types only and do it
12321         for limited_with'ed types as well.
12322         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
12323         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12324         consistently and remove redundant call to finalize_from_with_types.
12325
12326 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12327
12328         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12329         subprograms without a previous spec declared in the same unit.
12330         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12331         subprograms at the end of the unit instead of at the beginning.
12332         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12333         isn't public for the special handling of non-inline functions nested
12334         inside inline external functions.
12335
12336 2011-03-25  Jeff Law  <law@redhat.com>
12337
12338         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12339
12340 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
12341
12342         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12343         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12344         to compute Set_Size_Depends_On_Discriminant.
12345         (Layout_Type): Call it on array types in back-end layout mode.
12346         * sem_util.adb (Requires_Transient_Scope): Return true for array
12347         types only if the size depends on the value of discriminants.
12348         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12349         type if the RHS is a call to a function that returns an unconstrained
12350         type with default discriminant.
12351
12352 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
12353
12354         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12355         non-conversion to the nominal result type at the end.
12356
12357 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12358
12359         * gcc-interface/trans.c (create_temporary): New function taken from...
12360         (create_init_temporary): ...here.  Call it.
12361         (call_to_gnu): Create the temporary for the return value early, if any.
12362         Create it for a function with copy-in/copy-out parameters if there is
12363         no target; in other cases of copy-in/copy-out, use another temporary.
12364         Push the new binding level lazily.  Add and rename local variables.
12365
12366 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12367
12368         * gcc-interface/decl.c (validate_size): Improve comments and tweak
12369         error message.
12370         (set_rm_size): Likewise.
12371
12372 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12373
12374         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12375         for the padded type built in order to support a specified alignment.
12376         Fix incorrect formatting.
12377
12378 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12379
12380         PR bootstrap/48216
12381         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12382
12383 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12384
12385         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12386         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12387         to the end of the list.  Adjust recursive call.  Rename local variable.
12388         If REORDER is true, reorder components of the record type.
12389         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12390         components_to_record and adjust the parameter list.
12391
12392 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12393
12394         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12395         disabled, use the variable for bounds of loop iteration scheme.
12396
12397 2011-03-21  Kai Tietz  <ktietz@redhat.com>
12398
12399         PR target/12171
12400         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12401
12402 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
12403
12404         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12405         out whether the expression is read-only.  Short-circuit placeholder
12406         case and rename a couple of local variables.
12407
12408 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
12409
12410         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12411         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12412         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12413         (convert): Deal with conversions from a smaller form type specially.
12414
12415 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
12416
12417         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12418         its argument, except for the special -I- switch.
12419
12420 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
12421
12422         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12423         "Ada Issues".
12424
12425 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
12426
12427         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12428
12429 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
12430
12431         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12432         GNAT_FORMAL.
12433         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12434         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
12435         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
12436         Do not generate the check directly, instead instantiate the template
12437         check present in the descriptor.
12438         (make_descriptor_field): Move around.
12439         (build_vms_descriptor32): Build a template check in the POINTER field.
12440         (build_vms_descriptor): Remove useless suffixes.
12441         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12442
12443 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
12444
12445         PR bootstrap/47467
12446         * targext.c: Include target files if IN_RTS is defined.
12447
12448 2011-01-26  Richard Guenther  <rguenther@suse.de>
12449
12450         PR bootstrap/47467
12451         * targext.c: Include config.h.
12452         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12453         dependency.
12454
12455 2011-01-04  Pascal Obry  <obry@adacore.com>
12456             Eric Botcazou  <ebotcazou@adacore.com>
12457
12458         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12459
12460 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12461
12462         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12463         end-of-case on the end label and its associated gotos, if any.
12464
12465 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12466
12467         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12468         expressions of the parameter cache within the statement group of
12469         the CICO mechanism.
12470
12471 2011-01-04  Olivier Hainque  <hainque@adacore.com>
12472             Eric Botcazou  <ebotcazou@adacore.com>
12473
12474         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12475         (set_end_locus_from_node): New function.
12476         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12477         make and the function end_locus.
12478         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12479         for the elaboration subprogram.
12480         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12481         set the end_locus of the expression as well.
12482
12483 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12484
12485         PR ada/47131
12486         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12487         variables that are referenced in exception handlers volatile.
12488
12489
12490 \f
12491 Copyright (C) 2011 Free Software Foundation, Inc.
12492
12493 Copying and distribution of this file, with or without modification,
12494 are permitted in any medium without royalty provided the copyright
12495 notice and this notice are preserved.