OSDN Git Service

2011-08-29 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-08-29  Robert Dewar  <dewar@adacore.com>
2
3         * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
4         reformatting.
5         * gcc-interface/Make-lang.in: Update dependencies.
6
7 2011-08-29  Yannick Moy  <moy@adacore.com>
8
9         * alfa.ads (Name_Of_Heap_Variable): New constant name.
10         * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
11         table to hold dereferences.
12         (Add_ALFA_Xrefs): Take into account dereferences as special
13         reads/writes to the variable "HEAP".
14         (Enclosing_Subprogram_Or_Package): Move subprogram here.
15         (Generate_Dereference): New procedure to store a read/write dereferencew
16         in the table Drefs.
17         * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
18         the special "HEAP" var.
19         * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
20         in ALFA mode.
21         * sem_util.adb (Note_Possible_Modification): Store write dereference
22         in ALFA mode.
23
24 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
25
26         * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
27         ensures that the level of the subpool access type is not deeper than
28         that of the pool object.
29         * sem_util.adb (Object_Access_Level): Expand to handle defining
30         identifiers.
31         * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
32         subpool handle name of a rewritten allocator.
33
34 2011-08-29  Robert Dewar  <dewar@adacore.com>
35
36         * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
37
38 2011-08-29  Thomas Quinot  <quinot@adacore.com>
39
40         * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
41         values, we generate multiple triples of parameters in the TypeCode.
42         Bump Choice_Index for each such triple so that a subsequent default
43         choice is associated with the correct index in the typecode.
44
45 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
46
47         * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
48         container.
49         (First, Last): Handle properly an iterator over a null container.
50
51 2011-08-29  Bob Duff  <duff@adacore.com>
52
53         * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
54         processing if we run across a node with no Scope. This can happen if
55         we're with-ing an library-level instance, and that instance got errors
56         that caused "instantiation abandoned".
57         * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
58         an exception instead of using Assert, so it won't go into an infinite
59         loop, even when assertions are turned off.
60
61 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
62
63         * a-coorse.adb: Proper handling of empty ordered sets.
64
65 2011-08-29  Johannes Kanig  <kanig@adacore.com>
66
67         * debug.adb: Add comments.
68
69 2011-08-29  Thomas Quinot  <quinot@adacore.com>
70
71         * a-except.adb, a-except-2005.adb: Minor comment rewording and
72         reformatting.
73
74 2011-08-29  Yannick Moy  <moy@adacore.com>
75
76         * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
77         declaration for Itypes in Alfa mode.
78
79 2011-08-29  Robert Dewar  <dewar@adacore.com>
80
81         * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
82         a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
83         a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
84         reformatting.
85
86 2011-08-29  Tristan Gingold  <gingold@adacore.com>
87
88         * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
89         package spec.
90         * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
91         * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
92         while raising PE.
93
94 2011-08-29  Robert Dewar  <dewar@adacore.com>
95
96         * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
97
98 2011-08-29  Javier Miranda  <miranda@adacore.com>
99
100         * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
101         renamings of formal subprograms when the actual for a formal type is
102         class-wide.
103
104 2011-08-29  Matthew Heaney  <heaney@adacore.com>
105
106         * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
107         to Target.
108
109 2011-08-29  Matthew Heaney  <heaney@adacore.com>
110
111         * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
112         components of record type.
113         * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
114         to Target.
115
116 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
117
118         * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
119         a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
120         container packages.
121
122 2011-08-29  Robert Dewar  <dewar@adacore.com>
123
124         * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
125         reformatting.
126
127 2011-08-29  Matthew Heaney  <heaney@adacore.com>
128
129         * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
130         components of record type.
131
132 2011-08-29  Bob Duff  <duff@adacore.com>
133
134         * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
135         by the termination handler.
136
137 2011-08-29  Yannick Moy  <moy@adacore.com>
138
139         * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
140         created in Alfa mode, instead of inserting artificial declarations of
141         non-Itypes in the tree.
142         * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
143         know if an Itype has a corresponding declaration, as defined in
144         itypes.ads.
145
146 2011-08-29  Yannick Moy  <moy@adacore.com>
147
148         * gnat1drv.adb: Minor rewrite.
149
150 2011-08-29  Bob Duff  <duff@adacore.com>
151
152         * s-tasuti.adb (Make_Passive): Work around race condition in
153         Make_Independent, which can cause Wait_Count to be zero. So instead of
154         asserting that Wait_Count > 0, and then decrementing it, decrement it
155         only if Wait_Count > 0.
156         * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
157         should be nonnegative, so declare them Natural instead of Integer.
158
159 2011-08-29  Robert Dewar  <dewar@adacore.com>
160
161         * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
162         sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
163         a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
164         a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
165         exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
166
167 2011-08-29  Tristan Gingold  <gingold@adacore.com>
168
169         * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
170
171 2011-08-29  Vadim Godunko  <godunko@adacore.com>
172
173         * s-parint.ads: Minor comment clarification.
174
175 2011-08-29  Vincent Celier  <celier@adacore.com>
176
177         * prj.adb (Initialize): Make sure that new reserved words after Ada 95
178         may be used as identifiers.
179
180 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
181
182         * a-coinho.ads: Minor reformating.
183
184 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
185
186         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
187         container of a derived type.
188
189 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
190
191         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
192         a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
193
194 2011-08-29  Pascal Obry  <obry@adacore.com>
195
196         * exp_disp.adb: Minor comment fix.
197         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
198         to avoid warnings when compiling with -Wall.
199         (Make_Disp_Conditional_Select_Body): Likewise.
200         (Make_Disp_Timed_Select_Body): Likewise.
201
202 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
203
204         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
205         an entity name, generate reference for it.
206
207 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
208
209         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
210         iterator form.
211         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
212         the class-wide type.
213         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
214
215 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
216
217         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
218         subtype for an object whose type is an unconstrained union.
219
220 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
221
222         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
223         is allowed in a component definition, by AI95-406.
224
225 2011-08-29  Matthew Heaney  <heaney@adacore.com>
226
227         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
228
229 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
230
231         * a-except-2005.adb: Alphabetize all routines.
232         (Triggered_By_Abort): New routine.
233         * a-except-2005.ads (Triggered_By_Abort): New routine.
234         * a-except.adb Alphabetize all routines.
235         (Triggered_By_Abort): New routine.
236         * a-except.ads (Triggered_By_Abort): New routine.
237         * exp_ch7.adb: Update all comments involving the detection of aborts in
238         finalization code.
239         (Build_Object_Declarations): Do not generate code to detect the
240         presence of an abort at the start of finalization code, use a runtime
241         routine istead.
242         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
243         RE_Unit_Table.
244         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
245         allocate a task on a subpool.
246         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
247         The flag disables all actions related to the maintenance of
248         Finalize_Address_Table when subpools are not in use.
249         (Allocate_Any_Controlled): Signal the machinery that subpools are in
250         use.
251         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
252         performs costly task locking when subpools are not in use.
253
254 2011-08-29  Yannick Moy  <moy@adacore.com>
255
256         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
257         types and dispatching calls in Alfa mode.
258         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
259         correspondance between body and spec scopes, to reuse utility functions
260         (Traverse_Declarations_Or_Statements): Protect access to body for stub
261         by testing the presence of the library unit for the body
262         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
263         mode the expansion of accept statements is skipped
264         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
265         the unique entity corresponding to the one returned by
266         Unique_Defining_Entity applied to the enclosing declaration of the
267         argument.
268
269 2011-08-29  Bob Duff  <duff@adacore.com>
270
271         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
272         gdb when x is not a node (it can be a node list, name_id, etc). pp is
273         an alias for pn. ppp is an alias for pt.
274
275 2011-08-29  Javier Miranda  <miranda@adacore.com>
276
277         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
278         aggregate to take a consistent decision on the need to convert into
279         assignments aggregates that initialize constant objects.
280
281 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
282
283         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
284         Build_Allocate_Deallocate_Proc in order to handle allocation of
285         non-controlled objects on subpools.
286         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
287         to be end-user visible.
288         * s-finmas.adb: Add with and use clause for System.HTable.
289         Add an instantiation of Simple_HTable which provides a mapping between
290         the address of a controlled object and the corresponding
291         Finalize_Address used to clean up the object. The table is used when a
292         master is operating in heterogeneous mode.
293         (Attach): Explain why the input node is not verified on being already
294         attached.
295         (Delete_Finalize_Address): New routine.
296         (Detach): Add pragma Assert which ensures that a node is already
297         attached.
298         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
299         since nodes are no longer removed on traversal. Explain why node
300         detachment is undesirable in this case.
301         (Get_Finalize_Address): New routine.
302         (Hash): New routine.
303         (Is_Empty_List): Removed.
304         (pm): Renamed to Print_Master. Add output for discriminant
305         Is_Homogeneous.
306         Comment reformatting.
307         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
308         * s-finmas.ads: Various comments additions / improvements.
309         Type Finalization_Master has a discriminant which determines the mode of
310         operation.
311         (Delete_Finalize_Address): New routine.
312         (Get_Finalize_Address): New routine.
313         (pm): Renamed to Print_Master.
314         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
315         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
316         use clause for System.IO.
317         (Allocate_Any_Controlled): Add machinery to set TSS primitive
318         Finalize_Address depending on the mode of allocation and the mode of
319         the master.
320         (Deallocate_Any_Controlled): Remove the relation pair object -
321         Finalize_Address regardless of the master mode. Add comment explaining
322         the reason.
323         (Detach): Ensure that fields Prev and Next are null after detachment.
324         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
325         scheme to check whether the list of subpools is empty. There is no
326         longer need to store the next subpool or advance the current pointer.
327         (Is_Empty_List): New routine.
328         (Print_Pool): New routine.
329         (Print_Subpool): New routine.
330         * s-stposu.ads: Various comments additions / improvements.
331         Field Master of type Root_Subpool is now a heterogeneous collection.
332         (Print_Pool): New routine.
333         (Print_Subpool): New routine.
334
335 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
336
337         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
338         forms, using aspects of container types.
339         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
340         Has_Implicit_Dereference flags, that may be set on the partial view.
341         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
342         container type with an indexing aspect.
343         (Analyze_Quantified_Expression): Analyze construct with expansion
344         disabled, because it will be rewritten as a loop during expansion.
345         (Try_Container_Indexing): The prefix itself may be a container type
346         with an indexing aspect, as with a vector of vectors.
347         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
348         the original doamin of iteration, for name capture.
349         (Analyze_Iterator_Specification): If the domain is an expression that
350         needs finalization, create a separate declaration for it.
351         For an iterator with "of" retrieve default iterator info from aspect of
352         container type. For "in" iterator, retrieve type of Iterate function.
353         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
354         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
355         analysis, to prevent spurious errors about late attributes.
356         * sprint.adb: Handle quantified expression with either loop or iterator
357         specification.
358         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
359         iterator.
360
361 2011-08-29  Vincent Celier  <celier@adacore.com>
362
363         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
364         Binder or Linker of the main project file.
365
366 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
367
368         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
369         unit.
370
371 2011-08-29  Yannick Moy  <moy@adacore.com>
372
373         * exp_ch9.adb: Partial revert of previous change for Alfa mode
374
375 2011-08-29  Yannick Moy  <moy@adacore.com>
376
377         * exp_ch11.adb: Minor expansion of comment.
378
379 2011-08-29  Yannick Moy  <moy@adacore.com>
380
381         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
382
383 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
384
385         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
386         interpretation, set the type before resolving the operands, because
387         legality checks on an exponention operand need to know the type of the
388         context.
389
390 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
391
392         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
393         cleanups on a master if the instance is within a generic unit.
394         Complement to the corresponding fix to inline.adb for K520-030.
395
396 2011-08-29  Tristan Gingold  <gingold@adacore.com>
397
398         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
399         occurrence.
400         * exp_intr.adb: Minor comment fix.
401
402 2011-08-29  Bob Duff  <duff@adacore.com>
403
404         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
405         Delay_Required was used as an uninitialized variable.
406
407 2011-08-29  Robert Dewar  <dewar@adacore.com>
408
409         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
410         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
411         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
412
413 2011-08-29  Thomas Quinot  <quinot@adacore.com>
414
415         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
416         Remove unused variables.
417
418 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
419
420         * sem_res.adb: Remove Build_Explicit_Dereference.
421         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
422         from sem_res.adb, used in analysis of additional constructs.
423         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
424         expansion of iterators.
425         (Is_Object_Reference): Recognize variables rewritten as explicit
426         dereferences in Ada2012.
427         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
428         Reversible_Iterator names, for expansion of Ada2012 iterators.
429         * aspects.ads, aspects.adb (Find_Aspect): Utility.
430         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
431         linked list container.
432         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
433         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
434
435 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
436
437         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
438         containers.
439
440 2011-08-29  Vincent Celier  <celier@adacore.com>
441
442         * make.adb (Gnatmake): Get the maximum number of simultaneous
443         compilation processes after the Builder switches has been scanned, as
444         there may include -jnn.
445
446 2011-08-29  Matthew Heaney  <heaney@adacore.com>
447
448         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
449
450 2011-08-29  Tristan Gingold  <gingold@adacore.com>
451
452         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
453         GNAT_DRIVER_COMMAND_LINE to 255.
454
455 2011-08-29  Pascal Obry  <obry@adacore.com>
456
457         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
458         reformatting and style fix (class attribute casing).
459
460 2011-08-29  Yannick Moy  <moy@adacore.com>
461
462         * exp_ch11.adb: Yet another case where expansion should be common
463         between CodePeer and Alfa.
464
465 2011-08-29  Yannick Moy  <moy@adacore.com>
466
467         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
468
469 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
470
471         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
472         incomplete type and its completion match.
473
474 2011-08-29  Yannick Moy  <moy@adacore.com>
475
476         * exp_ch13.adb: Adjust previous change.
477
478 2011-08-29  Robert Dewar  <dewar@adacore.com>
479
480         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
481         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
482         Minor reformatting.
483
484 2011-08-29  Emmanuel Briot  <briot@adacore.com>
485
486         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
487         initialize aggregated projects.
488
489 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
490
491         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
492         depth of candidates to resolve a potentially spurious ambiguity between
493         two visible subprograms.
494
495 2011-08-29  Yannick Moy  <moy@adacore.com>
496
497         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
498         Requires/Ensures.
499         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
500         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
501         Requires/Ensures.
502
503 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
504
505         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
506         Add comment.
507
508 2011-08-29  Thomas Quinot  <quinot@adacore.com>
509
510         * sem_res.adb: Minor reformatting.
511
512 2011-08-29  Johannes Kanig  <kanig@adacore.com>
513
514         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
515         mode.
516         * gnat1drv.adb (Adjust_Global_Switches): Set
517         Use_Expressions_With_Actions to False in ALFA mode.
518         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
519         ALFA mode.
520
521 2011-08-29  Yannick Moy  <moy@adacore.com>
522
523         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
524         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
525         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
526         tagged types and dispatching calls in Alfa mode.
527
528 2011-08-29  Javier Miranda  <miranda@adacore.com>
529
530         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
531         we do not report an error on an Empty node.
532
533 2011-08-29  Geert Bosch  <bosch@adacore.com>
534
535         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
536         a-nlrear.o and a-nurear.o.
537
538 2011-08-29  Robert Dewar  <dewar@adacore.com>
539
540         * freeze.adb: Minor code reorganization.
541         Minor reformatting.
542         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
543         sem_ch6.adb: Minor reformatting
544
545 2011-08-29  Tristan Gingold  <gingold@adacore.com>
546
547         * s-except.ads, s-except.adb: Provide dummy body.
548
549 2011-08-29  Yannick Moy  <moy@adacore.com>
550
551         * sem_warn.adb (Within_Postcondition): Take into account the case of
552         an Ensures component in a Test_Case.
553
554 2011-08-29  Tristan Gingold  <gingold@adacore.com>
555
556         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
557         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
558         System_Exceptions_Debug
559         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
560         * a-except.adb: With and use System.Exceptions_Debug instead of
561         System.Exceptions.
562         * a-except-2005.adb: Likewise.
563         * s-assert.adb: Likewise.
564         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
565         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
566         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
567         s-excdeb. Update dependencies.
568         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
569         as these no longer need external libraries.
570
571 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
572
573         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
574         exponentiation operator on universal values in a context that requires
575         a fixed-point type.
576
577 2011-08-29  Tristan Gingold  <gingold@adacore.com>
578
579         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
580         before calling notify_handled_exception.
581         * a-exextr.adb: Fix comment.
582
583 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
584
585         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
586         Finalize_Address of the access type's finalization master.
587         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
588         access type's finalization master. Add a guard to prevent
589         Associated_Storage_Pool from being set on .NET/JVM.
590         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
591         attribute Finalize_Address of the access type's finalization master.
592         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
593         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
594         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
595         RE_Unit_Table.
596         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
597         use clause for System.IO
598         (Detach): Relax the assertion, to be reinstated later.
599         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
600         Relax the assertion on Finalize_Address, to be reinstated later.
601         (Is_Empty_List): New routine.
602         (pm): New debug routine.
603         (Set_Finalize_Address): New routine.
604         * s-finmas.ads (pm): New debug routine.
605         (Set_Finalize_Address): New routine.
606         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
607
608 2011-08-29  Tristan Gingold  <gingold@adacore.com>
609
610         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
611         Remove convention C.
612
613 2011-08-29  Tristan Gingold  <gingold@adacore.com>
614
615         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
616         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
617         (Finalize_TCB): Remove its finalization.
618         (Initialize): Remove assignment of GET_Exc_Stack_Addr
619         * s-soflin.adb (NT_Exc_Stack): Remove
620         (Get_Exc_Stack_Addr_NT): Likewise.
621         (Get_Exc_Stack_Addr_Soft): Likewise.
622         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
623         (Get_Exc_Stack_Addr): Likewise.
624         (Get_Exc_Stack_Addr_Soft): Likewise
625         * s-taspri-vms.ads (Exc_Stack_T): Remove.
626         (Exc_Stack_Ptr_T): Likewise.
627         (Private_Data): Remove Exc_Stack_Ptr component.
628
629 2011-08-29  Tristan Gingold  <gingold@adacore.com>
630
631         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
632
633 2011-08-29  Tristan Gingold  <gingold@adacore.com>
634
635         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
636
637 2011-08-29  Geert Bosch  <bosch@adacore.com>
638
639         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
640         L2_Norm, Swap_Column): New generic subprograms
641         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
642         L2_Norm, Swap_Column): Implement new subprograms in order to
643         eliminate dependency on BLAS and LAPACK libraries in
644         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
645         version. Forward_Eliminate/Back_Substitute can be used to put a
646         matrix in row echelon or reduced row echelon form using partial
647         pivoting.
648         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
649         Swap_Column): Instantiate from System.Generic_Array_Operations.
650         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
651         (Sqrt): Local function for simple computation of square root without
652         adding dependencies on Generic_Elementary_Functions.
653         (Swap): New subprogram to exchange floating point numbers.
654         (Inverse): Reimplement using Jordan-Gauss elimination.
655         (Jacobi): New procedure implementing Jacobi's method for computation
656         of eigensystems, based on Rutishauser's implementation.
657         (L2_Norm): Implement directly using the inner product.
658         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
659         decreasing eigenvalue as required by the Ada RM.
660         (Swap_Column): New helper procedure for Sort_Eigensystem.
661         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
662         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
663         Sort_Eigensystems.
664
665 2011-08-29  Thomas Quinot  <quinot@adacore.com>
666
667         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
668         statements line.
669
670 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
671
672         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
673         than the current node.
674         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
675         Finalization_Master. The list headers have two fields instead of three.
676         This should fix alignment issue but subpool allocations are now
677         unusable. Alphabetize subprograms.
678         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
679         the size of the header when converting the beginning of the object to
680         a FM_Node. Set the master's Finalize_Address attribute if not already
681         set.
682         (Deallocate_Any_Controlled): Use the offset rather than the size of the
683         header when converting the beginning of the object to a FM_Node.
684
685 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
686
687         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
688         reraise when compiling for CodePeer.
689
690 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
691
692         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
693         now needed by a-convec.adb. Fix warning.
694
695 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
696
697         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
698         processing of TSS routine Finalize_Address when compiling in
699         CodePeer_Mode.
700
701 2011-08-29  Thomas Quinot  <quinot@adacore.com>
702
703         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
704         sem_warn.adb: Minor reformatting.
705
706 2011-08-29  Emmanuel Briot  <briot@adacore.com>
707
708         * prj-conf.adb (Get_Config_Switches): Also collect the list of
709         languages from aggregated projects.
710
711 2011-08-29  Yannick Moy  <moy@adacore.com>
712
713         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
714         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
715         Traverse_Package_Declaration, Traverse_Subprogram_Body,
716         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
717         for stubs are traversed too when parameter is set
718         (Traverse_All_Compilation_Units): Traverse without going inside stubs
719         (Traverse_Declarations_Or_Statements): Do the special traversing for
720         stubs when required.
721         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
722         return subprogram or package body from stub.
723         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
724         stubs without prior subprogram decl.
725
726 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
727
728         * gnat_ugn.texi: Fix typo.
729
730 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
731
732         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
733         which accounts for size vs alignment issues and calculates the size of
734         the list header.
735         (Deallocate_Any_Controlled): Ditto.
736         (Nearest_Multiple_Rounded_Up): New routine.
737
738 2011-08-29  Tristan Gingold  <gingold@adacore.com>
739
740         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
741         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
742         (Set_Exception_Msg): Ditto.
743         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
744         Private_Data.
745         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
746         Use Save_Occurrence instead of Save_Occurrence_No_Private.
747         (Raise_With_Msg): Remove Cleanup_Flag.
748         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
749         Clean_Flag and Private_Data components.
750
751 2011-08-29  Yannick Moy  <moy@adacore.com>
752
753         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
754         in CodePeer mode.
755         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
756         of an explicitly declared type, so that the base types of the original
757         type and this generated type are the same, and a "type" (not a subtype
758         like previously).
759         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
760         small" in Alfa mode, like in CodePeer mode.
761         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
762         clauses in Alfa mode.
763
764 2011-08-29  Javier Miranda  <miranda@adacore.com>
765
766         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
767         function to the package spec.
768         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
769         internally generated bodies of null procedures locate the internally
770         generated spec enforcing mode conformance.
771         (Is_Interface_Conformant): Ensure that the controlling formal of the
772         primitives match.
773
774 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
775
776         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
777         reject the pragma if it appears to apply to a formal subprogram.
778
779 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
780
781         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
782         inner expression, to prevent double evaluation.
783
784 2011-08-29  Tristan Gingold  <gingold@adacore.com>
785
786         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
787         they were unused.
788         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
789         * a-except-2005.adb (Propagate_Exception): Adjust spec.
790         (Raise_Current_Excep): Adjust call.
791         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
792
793 2011-08-29  Thomas Quinot  <quinot@adacore.com>
794
795         * exp_disp.adb: Minor reformatting.
796
797 2011-08-29  Tristan Gingold  <gingold@adacore.com>
798
799         * a-exexpr.adb (Setup_Exception): Removed.
800         * a-exexpr-gcc.adb (Setup_Exception): Removed.
801         * a-except.adb (Exception_Propagation): Removed.
802         * a-except-2005.adb (Setup_Exception): Removed.
803         (Reraise): Remove call to Setup_Exception.
804         (Reraise_Occurrence): Ditto.
805         (Reraise_Occurrence_Always): Ditto.
806         (Reraise_Occurrence_No_Defer): Ditto.
807         (Transfer_Occurrence): Ditto.
808         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
809         (Set_Exception_Msg): Ditto.
810
811 2011-08-29  Robert Dewar  <dewar@adacore.com>
812
813         * a-convec.adb, exp_disp.adb: Minor reformatting.
814
815 2011-08-29  Tristan Gingold  <gingold@adacore.com>
816
817         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
818
819 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
820
821         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
822         Exception_Handlers to No_List instead of Empty_List in the case where
823         there are no handlers.
824
825 2011-08-29  Tristan Gingold  <gingold@adacore.com>
826
827         * gcc-interface/gigi.h (enum standard_datatypes): Add
828         ADT_reraise_zcx_decl
829         (reraise_zcx_decl): New macro.
830         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
831         (gigi): Set reraise_zcx_decl.
832         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
833         (gnat_to_gnu): Handle N_Raise_Statement.
834
835 2011-08-29  Robert Dewar  <dewar@adacore.com>
836
837         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
838         a-undesu.adb: Minor reformatting.
839
840 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
841
842         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
843         table, accept an unfrozen untagged component if it is an actual for a
844         formal incomplete type.
845         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
846         provide new iterator forms over vectors.
847         Introduce type Iterator in package body to implement operations of
848         Reversible_Iterator interface.
849         * a-iteint.ads: Make package pure so it is usable with new container
850         packages, that are categorized Remote_Types.
851
852 2011-08-29  Robert Dewar  <dewar@adacore.com>
853
854         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
855
856 2011-08-29  Bob Duff  <duff@adacore.com>
857
858         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
859         of <>, because this is the routine that checks for dimensionality
860         errors (for example, for a two-dimensional array, (others => <>) should
861         be (others => (others => <>)).
862
863 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
864
865         * impunit.adb: Add new run-time units.
866         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
867         s-stposu.ads, s-stposu.adb: Code clean up.
868         Handle protected class-wide or task class-wide types
869         Handle C/C++/CIL/Java types.
870         * s-spsufi.adb, s-spsufi.ads: New files.
871
872 2011-08-29  Yannick Moy  <moy@adacore.com>
873
874         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
875         library-level subprogram.
876         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
877         placement.
878         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
879         component.
880         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
881         component.
882         * gnat_rm.texi: Update doc for Test_Case pragma.
883
884 2011-08-29  Tristan Gingold  <gingold@adacore.com>
885
886         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
887         convention C.
888         (GCC_Exception_Access): New type.
889         (Unwind_DeleteException): New imported procedure
890         (Foreign_Exception): Import it.
891         (GNAT_GCC_Exception): Simply have the occurrence inside.
892         (To_GCC_Exception): New function.
893         (To_GNAT_GCC_Exception): New function.
894         (GNAT_GCC_Exception_Cleanup): New procedure..
895         (Propagate_GCC_Exception): New procedure.
896         (Reraise_GCC_Exception): New procedure.
897         (Setup_Current_Excep): New procedure.
898         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
899         (Unwind_RaiseException): Ditto.
900         (Unwind_ForcedUnwind): Ditto.
901         (Remove): Removed.
902         (Begin_Handler): Change type of parameter.
903         (End_Handler): Ditto. Now delete the exception if still present.
904         (Setup_Key): Removed.
905         (Is_Setup_And_Not_Propagated): Removed.
906         (Set_Setup_And_Not_Propagated): Ditto.
907         (Clear_Setup_And_Not_Propagated): Ditto.
908         (Save_Occurrence_And_Private): Ditto.
909         (EID_For): Add 'not null' constraint on parameter.
910         (Setup_Exception): Does nothing.
911         (Propagate_Exception): Simplified.
912         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
913         re-raise is not expanded anymore.
914         * s-except.ads (Foreign_Exception): New exception - placeholder for
915         non Ada exceptions.
916         * raise-gcc.c (__gnat_setup_current_excep): Declare
917         (CXX_EXCEPTION_CLASS): Define (not yet used)
918         (GNAT_EXCEPTION_CLASS): Define.
919         (is_handled_by): Handle foreign exceptions.
920         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
921
922 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
923
924         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
925
926 2011-08-29  Thomas Quinot  <quinot@adacore.com>
927
928         * a-synbar-posix.adb: Minor reformatting.
929
930 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
931
932         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
933         a-exetim-default.ads (Interrupt_Clocks_Supported,
934         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
935         definitions to be compliant with AI-0171. The target systems do not
936         support separate account for the execution time of interrupt handlers.
937
938 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
939
940         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
941         in the barrier to put first the easiest to evaluate (and the one which
942         will be True more often). More efficient.
943
944 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
945
946         * s-atocou-x86.adb: Fix constraint in machine code insertion.
947
948 2011-08-29  Bob Duff  <duff@adacore.com>
949
950         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
951         attributes that are now aspects, as specified by AI05-0229-1.
952         * sem_ch13.adb (Analyze_Aspect_Specifications,
953         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
954         pragmas or attribute references, as appropriate.
955
956 2011-08-29  Robert Dewar  <dewar@adacore.com>
957
958         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
959         a-synbar-posix.ads: Minor reformatting.
960
961 2011-08-29  Yannick Moy  <moy@adacore.com>
962
963         * snames.ads-tmpl: Add name Force.
964
965 2011-08-29  Pascal Obry  <obry@adacore.com>
966
967         * prj-nmsc.adb: Minor reformatting.
968
969 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
970
971         * a-exetim.ads (Interrupt_Clocks_Supported,
972         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
973         definitions to be compliant with AI-0171.
974
975 2011-08-29  Robert Dewar  <dewar@adacore.com>
976
977         * a-ngelfu.adb: Add comments.
978
979 2011-08-29  Geert Bosch  <bosch@adacore.com>
980
981         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
982         the closest machine number to Pi / 2.0.
983
984 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
985
986         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
987         package Ada.Synchronous_Barriers.
988         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
989         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
990         default implementation using protected objects and another one
991         a-synbar-posix using POSIX barriers as the underlying support.
992         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
993         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
994         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
995         Clean up dependencies.
996         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
997
998 2011-08-29  Robert Dewar  <dewar@adacore.com>
999
1000         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
1001         exp_dist.adb: Minor code reorganization.
1002         Minor reformatting.
1003
1004 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1005
1006         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
1007         primitive operation must support external streaming if it is not a
1008         controlling access result.
1009
1010 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1011
1012         * sinfo.ads, sem_ch7.adb: Minor reformatting.
1013
1014 2011-08-29  Bob Duff  <duff@adacore.com>
1015
1016         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
1017         restriction on allocators, as required by AI05-0013-1.
1018         * restrict.ads: Minor comment fix.
1019
1020 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1021
1022         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
1023         (To_Jmpbuf_Address): Ditto
1024         (builtin_longjmp): Ditto
1025
1026 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1027
1028         * sem_res.adb: Minor reformatting.
1029
1030 2011-08-29  Vincent Celier  <celier@adacore.com>
1031
1032         * make.adb (Gnatmake): Move special processing for VM targets after the
1033         call to Get_Target_Parameters.
1034
1035 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1036
1037         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
1038
1039 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1040
1041         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
1042         where an anonymous access discriminant of a limited designated type
1043         appears in a non-immutably limited discriminated type and issue an
1044         error message. Add local variable Desig_T and replace all occurrences
1045         of Designated_Type.
1046
1047 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1048
1049         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
1050         implementation is compliant to RM D.15(15/2) after the modification
1051         imposed by AI05-0094-1 (binding interpretation).
1052
1053 2011-08-29  Robert Dewar  <dewar@adacore.com>
1054
1055         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
1056         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
1057
1058 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1059
1060         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
1061         the scope name, do not report a missing label as a style violation (it
1062         will be diagnosed as an illegality).
1063         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
1064         variant records: Get_Enum_Lit_From_Pos already returns a usage
1065         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
1066         on Expr in Integer_Literal case so that it can be used by
1067         Build_To_Any_Call.
1068
1069 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1070
1071         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
1072         Adjust comment.
1073         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
1074         (Build_Abort_Block_Handler): New function to build an Abort_Signal
1075         exception handler.
1076         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
1077         Build_Abort_Block_Handler to build the exception handler. Do not
1078         undefer aborts for the Abort_Signal exception handler if back-end
1079         exception mechanism.
1080         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
1081         back_end exceptions for all others and abort_signal.
1082         * s-except.ads (ZCX_By_Default): New constant.
1083         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
1084         (Raise_Exception_Always): Ditto.
1085         (Raise_From_Signal_Handler): Ditto.
1086         (Raise_With_Location_And_Msg): Ditto.
1087         (Raise_With_Msg): Ditto.
1088         (Reraise): Ditto.
1089         (Reraise_Occurence): Ditto.
1090         (Reraise_Occurrence_Always): Ditto.
1091         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
1092         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
1093
1094 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1095
1096         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
1097
1098 2011-08-29  Robert Dewar  <dewar@adacore.com>
1099
1100         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
1101         Minor code reorganization.
1102
1103 2011-08-29  Bob Duff  <duff@adacore.com>
1104
1105         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
1106         2012, not just Ada 2005.
1107
1108 2011-08-29  Vincent Celier  <celier@adacore.com>
1109
1110         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
1111         with a project file or with gprbuid, if -gnatep= is specified, the
1112         builder may need to be invoked with -x.
1113
1114 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1115
1116         * a-exexpr-gcc.adb: Minor comment fix.
1117
1118 2011-08-29  Robert Dewar  <dewar@adacore.com>
1119
1120         * sem_ch8.adb: Minor reformatting.
1121
1122 2011-08-29  Bob Duff  <duff@adacore.com>
1123
1124         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
1125         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
1126         treating "some" as unreserved in earlier Ada versions. This is now
1127         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
1128         rather than Name_Some, since Tok_Some is now recognized as reserved.
1129         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
1130         reserved word.
1131         * scans.ads: Minor comment fixes.
1132         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
1133         for other language versions.
1134         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
1135         treating "some" as unreserved in earlier Ada versions. This is now
1136         handled in Snames.Is_Keyword_Name.
1137         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
1138         Ada 2012.
1139         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
1140         unreserved in earlier Ada versions. This is now handled in
1141         Snames.Is_Keyword_Name.
1142         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
1143         words as for other language versions.
1144         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
1145         Ada 2012, not just Ada 2005.
1146
1147 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1148
1149         * sem_ch13.adb: Additional semantic checks for aspects involved in
1150         iterators.
1151
1152 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1153
1154         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
1155         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
1156         Container parameter.
1157         (Ancestor_Find): ditto.
1158
1159 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1160
1161         * par-endh.adb: Minor reformatting.
1162
1163 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1164
1165         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
1166         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
1167         (Adjust_N_CLeanups_For): Remove.
1168         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
1169         stack is reached.
1170         (Propgate_Exception): Adjust.
1171         * raise-gcc.c: Add a few static/const.
1172         (Adjust_N_Cleanups_For): Remove declaration.
1173         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
1174
1175 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1176
1177         * sem_ch8.adb: Use type of function return when rewriting as object
1178         declaration.
1179
1180 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
1181
1182         * sem_type.adb: Minor reformatting.
1183
1184 2011-08-29  Robert Dewar  <dewar@adacore.com>
1185
1186         * makeutl.adb: Minor reformatting.
1187
1188 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1189
1190         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
1191         function call of a limited type, the expansion of the renaming is
1192         complicated by the presence of various temporaries and subtypes that
1193         capture constraints of the renamed object.
1194         Rewrite node as an object declaration, whose expansion is simpler.
1195         Given that the object is limited there is no copy involved and no
1196         performance hit.
1197
1198 2011-08-29  Robert Dewar  <dewar@adacore.com>
1199
1200         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
1201         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
1202
1203 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1204
1205         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
1206         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
1207         system-linux-hppa.ads, system-linux-s390.ads,
1208         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
1209         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
1210         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
1211         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
1212         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
1213         system-solaris-sparc.ads, system-lynxos-x86.ads,
1214         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
1215         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
1216         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
1217         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
1218         system-vxworks-x86.ads: Remove GCC_ZCX_Support
1219         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
1220         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
1221         * opt.ads: Adjust comment.
1222         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
1223         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
1224         * system.ads: Move GCC_ZCX_Support to obsolete entries.
1225
1226 2011-08-29  Emmanuel Briot  <briot@adacore.com>
1227
1228         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
1229         file name is specified on the gnatmake or gprbuild command line, and
1230         before we search for that file in the project.
1231
1232 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1233
1234         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
1235         used to determine whether a possible interpretation for an overloadable
1236         entity is declared within the current instantiation and should be
1237         included in the candidate set.
1238
1239 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
1240
1241         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
1242
1243 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1244
1245         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
1246         access subtype is access_to_subprogram, when applying checks for
1247         RM 3.10.2 (27).
1248
1249 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1250
1251         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
1252         for sibling when common parent.
1253
1254 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1255
1256         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
1257         "pragma_".
1258
1259 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1260
1261         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
1262         for the return type when in ASIS mode.
1263
1264 2011-08-29  Vincent Celier  <celier@adacore.com>
1265
1266         * make.adb (Gnatmake): Get the default search dirs, then the target
1267         parameters after getting the Builder switches, as the Builder switches
1268         may include --RTS= and that could change the default search dirs.
1269
1270 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1271
1272         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
1273         Make_Final_Call. Move the processing for class-wide types before the
1274         processing for derivations from [Limited_]Controlled.
1275         (Make_Final_Call): Move the processing for class-wide types before the
1276         processing for derivations from [Limited_]Controlled.
1277         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
1278         Add code to account for alignments larger than the list header. Add a
1279         comment illustrating the structure of the allocated object + padding +
1280         header.
1281         (Deallocate_Any_Controlled): Add code to account for alignments larger
1282         than the list header.
1283
1284 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1285
1286         * sinfo.ads, sinfo.adb: New node kind
1287         N_Formal_Incomplete_Type_Definition, related flags.
1288         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
1289         Parse formal incomplete types.
1290         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
1291         sem_ch12.
1292         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
1293         Formal incomplete types do not need completion.
1294         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
1295         Validate_Incomplete_Type_Instance): New procedures to handle formal
1296         incomplete types.
1297         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
1298         that corresponds to a formal incomplete type.
1299         * sprint.adb: Handle formal incomplete type declarations.
1300         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
1301         an insertion point.
1302
1303 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1304
1305         * a-fihema.ads, a-fihema.adb: Unit removed.
1306         * a-undesu.ads, a-undesu.adb: New unit implementing
1307         Ada.Unchecked_Deallocate_Subpool.
1308         * einfo.adb: Remove Associated_Collection from the node usage.
1309         Add Finalization_Master to the node usage.
1310         (Associated_Collection): Removed.
1311         (Finalization_Master): New routine.
1312         (Set_Associated_Collection): Removed.
1313         (Set_Finalization_Master): New routine.
1314         (Write_Field23_Name): Remove Associated_Collection from the output. Add
1315         Finalization_Master to the output.
1316         * einfo.ads: Remove attribute Associated_Collection and its uses in
1317         entities.
1318         Add new attribute Finalization_Master along with its uses in entitites.
1319         (Associated_Collection): Removed along with its pragma import.
1320         (Finalization_Master): New routine along with a pragma import.
1321         (Set_Associated_Collection): Removed along with its pragma import.
1322         (Set_Finalization_Master): New routine along with a pragma import.
1323         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
1324         Build_Finalization_Collection with Build_Finalization_Master.
1325         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
1326         before the bodies of the predefined routines. Add comment explaining
1327         this. Replace call to Build_Finalization_Collection with
1328         Build_Finalization_Master.
1329         (Freeze_Type): Replace call to Build_Finalization_Collection with
1330         Build_Finalization_Master.
1331         (Make_Finalize_Address_Body): Comment reformatting.
1332         (Make_Predefined_Primitive_Specs): Code reformatting.
1333         (Stream_Operation_OK): Update comment mentioning finalization
1334         collections. Replace RE_Finalization_Collection with
1335         RE_Finalization_Master.
1336         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
1337         Associated_Collection with Finalization_Master. Replace call to
1338         Build_Finalization_Collection with Build_Finalization_Master.
1339         (Expand_Allocator_Expression): Replace call to Associated_Collection
1340         with Finalization_Master. Replace call to Set_Associated_Collection with
1341         Set_Finalization_Master. Remove the generation of
1342         Set_Finalize_Address_Ptr.
1343         (Expand_N_Allocator): Replace call to Associated_Collection with
1344         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
1345         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
1346         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
1347         comment on usage. Replace call to Needs_BIP_Collection with
1348         Needs_BIP_Finalization_Master Remplace BIP_Collection with
1349         BIP_Finalization_Master. Update all comments which mention finalization
1350         collections. Replace Associated_Collection with
1351         Finalization_Master. Replace Build_Finalization_Collection with
1352         Build_Finalization_Master.
1353         (BIP_Formal_Suffix): Update BIP_Collection's case.
1354         (Build_Heap_Allocator): Update the related comment. Rename local
1355         variable Collect to Fin_Mas_Id and update its occurrences. Update
1356         comments which mention finalization collections. Replace
1357         Set_Associated_Collection with Set_Finalization_Master.
1358         (Expand_Call): Update the code which detects a special piece of library
1359         code for .NET/JVM.
1360         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
1361         Add_Collection_Actual_To_Build_In_Place_Call with
1362         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
1363         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
1364         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
1365         Add_Collection_Actual_To_Build_In_Place_Call with
1366         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1367         (Make_Build_In_Place_Call_In_Assignment): Replace call to
1368         Add_Collection_Actual_To_Build_In_Place_Call with
1369         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1370         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1371         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
1372         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1373         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
1374         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
1375         Replace call to Set_Associated_Collection with Set_Finalization_Master.
1376         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
1377         Replace the call to Associated_Collection with Finalization_Master.
1378         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
1379         Update the way finalization master names are generated. Update the
1380         retrieval of the correct access type which will carry the pool and
1381         master attributes.
1382         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
1383         (Make_Finalize_Address_Body): Abstract types do not need
1384         Finalize_Address. Code reformatting.
1385         (Make_Finalize_Address_Stmts): Update comment on usage.
1386         (Make_Set_Finalize_Address_Ptr_Call): Removed.
1387         (Process_Declarations): Update comments.
1388         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
1389         Build_Finalization_Master. Update associated comment.
1390         (Make_Set_Finalize_Address_Ptr_Call): Removed.
1391         * exp_ch13.adb: Update comments which mention finalization collections.
1392         (Expand_N_Free_Statement): Replace the call to Associated_Collection
1393         with Finalization_Master.
1394         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
1395         create calls to routines Allocate_Any_Controlled and
1396         Deallocate_Any_Controlled.
1397         (Find_Finalize_Address): New routine.
1398         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
1399         comparison.
1400         (Requires_Cleanup_Actions): Update the comment on freeze node
1401         inspection.
1402         * exp_util.ads: Remove comment on generated code for
1403         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
1404         is better to simply look in the body.
1405         * freeze.adb (Freeze_All): Update the comment of finalization
1406         collections. Replace the call to Associated_Collection with
1407         Finalization_Master. Replace the call to Build_Finalization_Collection
1408         with Build_Finalization_Master.
1409         * impunit.adb: Add a-undesu and s-stposu to the list of units.
1410         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
1411         a-fihema.
1412         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
1413         Ada.Finalization. Add processing for children of System.Storage_Pools.
1414         * rtsfind.ads: Remove the naming of second level children of
1415         Ada.Finalization.
1416         Remove Ada_Finalization_Heap_Management from the list of units.
1417         Remove subtype Ada_Finalization_Child.
1418         Remove the following subprogram entities:
1419         
1420            RE_Allocate
1421            RE_Deallocate
1422            RE_Finalization_Collection
1423            RE_Finalization_Collection_Ptr
1424            RE_Set_Finalize_Address_Ptr
1425         
1426         Add the naming of second level children of System.Storage_Pools.
1427         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
1428         the list of units.
1429         Add subtype System_Storage_Pools_Child.
1430         Add the following subprogram entities to System.Finalization_Masters:
1431         
1432            RE_Finalization_Master
1433            RE_Finalization_Master_Ptr
1434         
1435         Add the following subprogram entities to System.Storage_Pools.Subpools:
1436         
1437            RE_Allocate_Any_Controlled
1438            RE_Deallocate_Any_Controlled
1439            RE_Root_Storage_Pool_With_Subpools
1440            RE_Root_Subpool
1441            RE_Subpool_Handle
1442         
1443         Move the following subprogram entities from
1444         Ada.Finalization.Heap_Management to System.Finalization_Masters:
1445         
1446            RE_Add_Offset_To_Address
1447            RE_Attach
1448            RE_Base_Pool
1449            RE_Detach
1450         
1451         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
1452         Set_Associated_Collection with Set_Finalization_Master.
1453         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
1454         BIP_Finalization_Master is created.
1455         * s-finmas.adb: New unit System.Finalization_Masters.
1456         * s-finmas.ads: New unit System.Finalization_Masters.
1457         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
1458         * s-stposu.ads, s-stposu.adb: New unit implementing
1459         System.Storage_Pools.Subpools.
1460
1461 2011-08-29  Bob Duff  <duff@adacore.com>
1462
1463         * tbuild.adb: Add assertion.
1464
1465 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1466
1467         * s-pooglo.adb: Minor reformatting.
1468
1469 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1470
1471         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
1472         an indexed component of a packed array whose element type is a record
1473         with a representation clause different from that of the right-hand
1474         side, generate a temporary to minimuze the number of bit-field
1475         operations generated.
1476
1477 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1478
1479         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
1480         declarations, and thus are likely insertion points for actions.
1481
1482 2011-08-29  Bob Duff  <duff@adacore.com>
1483
1484         * einfo.ads: Minor comment fix.
1485
1486 2011-08-29  Robert Dewar  <dewar@adacore.com>
1487
1488         * frontend.adb, gnat1drv.adb: Minor reformatting.
1489
1490 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1491
1492         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
1493         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
1494         space in front of the header.
1495
1496 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1497
1498         * frontend.adb (Frontend): Exit after creating Standard package when
1499         -gnatd.H is present.
1500         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
1501         present.
1502
1503 2011-08-29  Robert Dewar  <dewar@adacore.com>
1504
1505         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
1506         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
1507         snames.ads-tmpl: Minor reformatting.
1508
1509 2011-08-29  Philippe Gil  <gil@adacore.com>
1510
1511         * prj.adb (Reset_Units_In_Table): New procedure.
1512         Reset units to avoid access to freed memory.
1513
1514 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1515
1516         * get_scos.adb: When reading a P statement SCO without a pragma name
1517         (from an older ALI file), ensure that the Pragma_Name component is set
1518         to Unknown_Pragma (not left uninitialized).
1519
1520 2011-08-29  Vincent Celier  <celier@adacore.com>
1521
1522         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
1523         modified to compute correctly the object path of a SAL project that is
1524         extending another library project.
1525         (Write_Path_File): New procedure.
1526         * makeutl.ads (Directories): New table moved from Buildgpr
1527         (Get_Directories): New procedure moved from Buildgpr
1528         (Write_Path_File): New procedure
1529         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
1530         paths before binding SALs, instead of Set_Ada_Paths.
1531         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
1532         Prj.
1533         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
1534         (Current_Source_Path_File_Of): New function
1535         (Set_Current_Object_Path_File_Of): New procedure
1536         (Current_Source_Object_File_Of): New function
1537         (Set_Current_Object_Path_File_Of): New procedure
1538         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
1539         (Current_Source_Path_File_Of): New function
1540         (Set_Current_Object_Path_File_Of): New procedure
1541         (Current_Source_Object_File_Of): New function
1542         (Set_Current_Object_Path_File_Of): New procedure
1543
1544 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1545
1546         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
1547         packed entity, use a bit-field assignment only if there is no change of
1548         representation.
1549
1550 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1551
1552         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
1553         Is_RTU instead of using Chars comparisons.
1554
1555 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1556
1557         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
1558         temporary object if the actual is constrained, and the discriminants
1559         read from the stream don't match.
1560
1561 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1562
1563         * sem_attr.adb, exp_attr.adb: Add handling of
1564         Attribute_System_Allocator_Alignment
1565         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
1566         Attribute_System_Allocator_Alignment.
1567         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
1568         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
1569         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
1570         get_target_system_allocator_alignment.
1571
1572 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1573
1574         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1575         dependencies.
1576
1577 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1578
1579         * exp_ch3.adb (In_Runtime): Fix typo.
1580
1581 2011-08-29  Bob Duff  <duff@adacore.com>
1582
1583         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
1584
1585 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1586
1587         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
1588         and a separate tag assignment is generated, ensure that the tag
1589         assignment is analyzed.
1590
1591 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1592
1593         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
1594         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
1595         of statement lists that may contain local declarations.
1596         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
1597         duplicate the triggering statements needed for the expansion of this
1598         construct, when the trigger is a dispatching call to a synchronized
1599         primitive.
1600
1601 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1602
1603         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
1604         * bindgen.adb: Add comments.
1605         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
1606         in CodePeer mode.
1607
1608 2011-08-29  Robert Dewar  <dewar@adacore.com>
1609
1610         * exp_attr.adb: Minor reformatting.
1611         Minor code reorganization and commenting.
1612         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
1613         reformatting.
1614
1615 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1616
1617         * get_scos.adb: Ignore chaining indicators not currently supported
1618         by Ada.
1619
1620 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1621
1622         * system.ads: Minor editing.
1623
1624 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1625
1626         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
1627         CodePeer mode.
1628         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
1629         Attribute_Elab_Subp_Body.
1630         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
1631         * sem_util.adb: Update comments.
1632
1633 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1634
1635         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
1636         pragma name for each SCO statement corresponding to a pragma.
1637
1638 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1639
1640         * opt.ads: Minor editing.
1641
1642 2011-08-29  Yannick Moy  <moy@adacore.com>
1643
1644         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
1645         that only made sense for CodePeer mode.
1646
1647 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1648
1649         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
1650         which is no longer used.
1651         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
1652         handling of the 64-bit division check.
1653         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
1654         division available.
1655         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
1656         longer used.
1657
1658 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1659
1660         * get_scos.adb: Minor reformatting.
1661
1662 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1663
1664         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
1665         statement list is wrapped in a block, the block is explicitly analyzed
1666         in order to properly redecorate the entities and create a servicing
1667         finalizer.
1668
1669 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1670
1671         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
1672         (Set_Zero_Cost_Handling): Remove.
1673
1674 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1675
1676         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
1677
1678 2011-08-29  Geert Bosch  <bosch@adacore.com>
1679
1680         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
1681         instruction, as the latter may produce -0.0, which is not a valid VAX
1682         F float number.
1683         (Neg_G): Likewise for VAX F float.
1684
1685 2011-08-29  Robert Dewar  <dewar@adacore.com>
1686
1687         * exp_util.adb: Minor reformatting.
1688
1689 2011-08-29  Yannick Moy  <moy@adacore.com>
1690
1691         * sem_ch3.adb: Minor comment update.
1692
1693 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1694
1695         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
1696         the operand type.
1697
1698 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1699
1700         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
1701         current statement sequence on a generic instantiation or a subprogram
1702         declaration.
1703
1704 2011-08-29  Robert Dewar  <dewar@adacore.com>
1705
1706         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
1707         Minor reformatting.
1708
1709 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1710
1711         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1712         Correct the check which involves the freeze node of a controlled or
1713         access-to-controlled type.
1714
1715 2011-08-29  Geert Bosch  <bosch@adacore.com>
1716
1717         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
1718         statements.
1719         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
1720         Asm statements.
1721
1722 2011-08-29  Yannick Moy  <moy@adacore.com>
1723
1724         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
1725         for every index type and component type that is not a subtype_mark.
1726         (Process_Subtype): Set Etype of subtype.
1727
1728 2011-08-29  Robert Dewar  <dewar@adacore.com>
1729
1730         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
1731         reorganization.  Minor reformatting.
1732
1733 2011-08-29  Steve Baird  <baird@adacore.com>
1734
1735         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
1736         for CodePeer and ALFA modes.
1737
1738 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1739
1740         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
1741         that comes from an enclosing scope if it is not the renaming of an
1742         actual, to handle properly a spurious ambiguity in an instance.
1743
1744 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
1745
1746         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
1747         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
1748         use it instead of the Esize of the first parameter.
1749         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
1750         above change.
1751         <Size>: Likewise.  Call it for composite types on the RM size.
1752
1753 2011-08-29  Yannick Moy  <moy@adacore.com>
1754
1755         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
1756         * sem_util.adb (Unique_Name): Correct behaviour for names of
1757         compilation units.
1758
1759 2011-08-29  Yannick Moy  <moy@adacore.com>
1760
1761         * sem_prag.adb (Check_Precondition_Postcondition): In formal
1762         verification mode, analyze pragma expression for correctness, for
1763         pre/post on library-level subprogram, as it is not expanded later.
1764
1765 2011-08-29  Yannick Moy  <moy@adacore.com>
1766
1767         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
1768         in formal verification.
1769
1770 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1771
1772         * sem_util.adb: Minor reformatting.
1773         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
1774         there's no pragma.
1775         * par_sco.ads, par_sco.adb: Update comments.
1776
1777 2011-08-29  Yannick Moy  <moy@adacore.com>
1778
1779         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
1780         associated getter/setter.
1781         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
1782
1783 2011-08-29  Vincent Celier  <celier@adacore.com>
1784
1785         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
1786         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
1787         with declarations for Language_Kind and Dependency_Kind for Ada.
1788         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
1789         (Process_Compiler): Take into account the new attributes Dependency_Kind
1790         and Language_Kind.
1791         (Check_Configuration): Check if language kind is unit based, not if the
1792         language name is Ada.
1793         (Process_Exceptions_Unit_Based): Ditto
1794         (Add_Language): Remove default additions of language and dependency kind
1795         * prj.ads: Minor comment change
1796         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
1797
1798 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1799
1800         * debug.adb: Update comments.
1801
1802 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
1803
1804         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
1805         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
1806         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
1807         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
1808         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
1809
1810 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1811
1812         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
1813         (GNATLIBCFLAGS_FOR_C): Replace
1814         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
1815         (gnatlib-shared-default, gnatlib-shared-dual-win32)
1816         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
1817         (gnatlib-sjlj, gnatlib-zcx): Likewise.
1818
1819 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
1820
1821         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
1822
1823         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
1824
1825         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
1826
1827 2011-08-05  Nicolas Roche  <roche@adacore.com>
1828
1829         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
1830         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
1831         canadian cross.
1832         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
1833
1834 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1835
1836         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
1837         subprogram bodies declared out-of-order.
1838
1839 2011-08-05  Yannick Moy  <moy@adacore.com>
1840
1841         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
1842         entities directly in package Standard, otherwise skip the standard
1843         prefix.
1844
1845 2011-08-05  Robert Dewar  <dewar@adacore.com>
1846
1847         * a-cbmutr.adb: Minor reformatting
1848         (Allocate_Node): refactor node allocation algorithm
1849
1850 2011-08-05  Robert Dewar  <dewar@adacore.com>
1851
1852         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
1853         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
1854         mode.
1855         (Analyze_Pragma, case Check_Policy): Ditto.
1856         * sem_prag.ads (Check_Disabled): New function
1857         * snames.ads-tmpl: Add Name_Disable.
1858
1859 2011-08-05  Robert Dewar  <dewar@adacore.com>
1860
1861         * gnat_rm.texi: Document implementation-defined policy DISABLE for
1862         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
1863
1864 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1865
1866         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
1867         that appears in a generic formal part and applies to a formal
1868         subprogram.
1869
1870 2011-08-05  Robert Dewar  <dewar@adacore.com>
1871
1872         * a-cbmutr.ads: Minor reformatting.
1873
1874 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1875
1876         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
1877         to check count, check sign of value instead.
1878         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
1879         (Copy_Subtree): allocate copy of source element
1880         (Equal_Subtree): compare elements, not access objects
1881
1882 2011-08-05  Vincent Celier  <celier@adacore.com>
1883
1884         * gnat_ugn.texi: Fix VMS alternative.
1885
1886 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1887
1888         * sem_ch11.adb: Add comment.
1889
1890 2011-08-05  Robert Dewar  <dewar@adacore.com>
1891
1892         * exp_util.adb: Minor comment fix.
1893
1894 2011-08-05  Robert Dewar  <dewar@adacore.com>
1895
1896         * scng.adb (Error_Unterminated_String): Improve flag position when
1897         comma present.
1898
1899 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1900
1901         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
1902         tree containers).
1903         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
1904         multiway tree containers.
1905
1906 2011-08-05  Robert Dewar  <dewar@adacore.com>
1907
1908         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
1909         * stylesw.adb: Implement -gnatyC to control comment spacing
1910         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
1911         -gnatyc/C).
1912         * usage.adb: Add line for -gnatyC.
1913
1914 2011-08-05  Robert Dewar  <dewar@adacore.com>
1915
1916         * gnat_ugn.texi: Document -gnatyC.
1917         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
1918         synonym for COMMENTS2).
1919
1920 2011-08-05  Robert Dewar  <dewar@adacore.com>
1921
1922         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
1923         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
1924         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
1925         a-comutr.ads, lib-xref.adb: Minor reformatting.
1926
1927 2011-08-05  Robert Dewar  <dewar@adacore.com>
1928
1929         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
1930         warning if there is an exception handler present.
1931
1932 2011-08-05  Pascal Obry  <obry@adacore.com>
1933
1934         * a-iteint.ads: Fix copyright year.
1935
1936 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1937
1938         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
1939         statement SCO for a USE clause or a representation clause.
1940
1941 2011-08-05  Yannick Moy  <moy@adacore.com>
1942
1943         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
1944         between body and spec for stub.
1945         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
1946         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
1947         pragma precondition or postcondition, for which the enclosing
1948         subprogram or package in the AST is not the desired one, return empty.
1949
1950 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1951
1952         * g-expect.adb: Minor reformatting.
1953
1954 2011-08-05  Bob Duff  <duff@adacore.com>
1955
1956         * a-fihema.adb: Comment out OS_Lib.
1957
1958 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1959
1960         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
1961         (unbounded multiway tree containers) and a-iteint.ads.
1962         * a-comutr.ads, a-comutr.adb:
1963         This is the new Ada 2012 unit for unbounded multiway tree containers
1964         * a-cimutr.ads, a-cimutr.adb
1965         This is the new Ada 2012 unit for indefinite multiway tree containers
1966         * a-iteint.ads: New file.
1967
1968 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1969
1970         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1971
1972 2011-08-05  Bob Duff  <duff@adacore.com>
1973
1974         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1975         subpools.
1976         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1977
1978 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1979
1980         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1981         general indexing aspects of Ada2012. Called when analyzing indexed
1982         components when other interpretations fail.
1983         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1984         in an expression context where overloading is meaningful. This excludes
1985         the occurrence in an aspect specification (efficiency only).
1986         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1987         related to iterators can be set by an attribute specification, but
1988         cannot be queried.
1989         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1990         Constant_Indexing and Variable_Indexing.
1991         (Check_Indexing_Functions): New procedure to perform legality checks.
1992         Additional semantic checks at end of declarations.
1993
1994 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1995
1996         * tree_io.ads: Update ASIS_Version_Number because of the change of the
1997         order of calling Tree_Write/Tree_Read routines made for aspects.
1998
1999 2011-08-05  Bob Duff  <duff@adacore.com>
2000
2001         * a-fihema.adb (Finalize): Fix race condition.
2002
2003 2011-08-05  Yannick Moy  <moy@adacore.com>
2004
2005         * sem_ch12.adb (Analyze_Package_Instantiation,
2006         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
2007         mode.
2008
2009 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2010
2011         * sem_type.adb (Specific_Type): in an instance, the type-specific
2012         operand of an equality check that involves null may have a private
2013         type. Use full view to determine legality of construct.
2014
2015 2011-08-05  Vincent Celier  <celier@adacore.com>
2016
2017         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2018         delete or close the file when the call to gnatmake was successful.
2019
2020 2011-08-05  Yannick Moy  <moy@adacore.com>
2021
2022         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
2023         Global_Discard_Names.
2024
2025 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2026
2027         * sinfo.ads: comments on use of entity field for aspect specifications.
2028
2029 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2030
2031         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
2032         node is not itself an entity but a selected component, it is a
2033         rewritten parameterless call to an en enclosing synchronized operation,
2034         and this expansion will be performed again in the instance, so there is
2035         no global information to preserve.
2036
2037 2011-08-05  Javier Miranda  <miranda@adacore.com>
2038
2039         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
2040         for renamings of predefined primitives.
2041         (In_Predef_Prims_DT): New subprogram.
2042
2043 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2044
2045         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
2046         possible interpretation of name is a reference type, add an
2047         interpretation that is the designated type of the reference
2048         discriminant of that type.
2049         * sem_res.adb (resolve): If the interpretation imposed by context is an
2050         implicit dereference, rewrite the node as the deference of the
2051         reference discriminant.
2052         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
2053         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
2054         parent type or base type.
2055         * sem_ch4.adb (Process_Indexed_Component,
2056         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
2057         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
2058         Check for implicit dereference.
2059         (List_Operand_Interps): Indicate when an implicit dereference is
2060         ambiguous.
2061         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
2062
2063 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2064
2065         * scos.ads: Update documentation of SCO table. Pragma statements can now
2066         be marked as disabled (using 'p' instead of 'P' as the statement kind).
2067         * par_sco.ads, par_sco.adb: Implement the above change.
2068         (Process_Decisions_Defer): Generate a P decision for the first parameter
2069         of a dyadic pragma Debug.
2070         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
2071         necessary.
2072         * put_scos.adb: Code simplification based on above change.
2073
2074 2011-08-05  Robert Dewar  <dewar@adacore.com>
2075
2076         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
2077         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
2078         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
2079         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
2080
2081 2011-08-05  Bob Duff  <duff@adacore.com>
2082
2083         * a-stunau.ads, g-spipat.adb: Update comments.
2084
2085 2011-08-05  Bob Duff  <duff@adacore.com>
2086
2087         * a-fihema.ads: Minor comment fix.
2088         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
2089         correct.
2090         (Attach, Detach): Remove some unnecessary code.
2091         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
2092
2093 2011-08-05  Bob Duff  <duff@adacore.com>
2094
2095         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
2096         allocation for Objects component. This simplifies the code somewhat. It
2097         is also a little more efficient in the not-so-unusual case where there
2098         are no controlled objects allocated.
2099         Make Finalization_Started flag atomic.
2100         (Finalize): Avoid unnecessary detachment of items from the list.
2101         (pcol): Minor cleanup.
2102
2103 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2104
2105         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
2106         package whose name is the same as that of the generic unit, or its
2107         ultimate prefix.
2108
2109 2011-08-05  Bob Duff  <duff@adacore.com>
2110
2111         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
2112         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
2113         Minor comment fixes.
2114
2115 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
2116
2117         * make.adb (Linking_Phase): No longer need to set source search path
2118         before calling gnatlink in CodePeer mode.
2119         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
2120         gcc in CodePeer mode, since the binder generated file no longer has a
2121         'with Main'.
2122         * switch.ads, switch.adb (Is_Language_Switch): Removed.
2123         * switch-c.adb: Update comment.
2124
2125 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2126
2127         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
2128
2129 2011-08-05  Nicolas Roche  <roche@adacore.com>
2130
2131         * gnat_ugn.texi: Fix minor syntax error issue.
2132
2133 2011-08-05  Vincent Celier  <celier@adacore.com>
2134
2135         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2136         delete or close the file when the call to gnatmake returns a non
2137         successful return code.
2138
2139 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2140
2141         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
2142         check, indicate that the copy of the original node does not come from
2143         source, to prevent an infinite recursion of the expansion.
2144
2145 2011-08-05  Johannes Kanig  <kanig@adacore.com>
2146
2147         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
2148         VC generation for subprogram bodies.
2149
2150 2011-08-05  Yannick Moy  <moy@adacore.com>
2151
2152         * einfo.ads: Typo.
2153         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
2154         the base type with the smallest allowed base type.
2155
2156 2011-08-05  Sergey Rybin  <rybin@adacore.com>
2157
2158         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
2159         aspects.
2160
2161 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2162
2163         * sem_ch12.ads: minor comment updates.
2164
2165 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2166
2167         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
2168         instantiation and a formal package the compiler generates a package
2169         renaming declaration so that the generic name within the declaration
2170         is interpreted as a renaming of the instance. At the end of a formal
2171         package declaration, this renaming must become invisible.
2172
2173 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2174
2175         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
2176         comparison and rely on concrete entities instead.
2177
2178 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2179
2180         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
2181         and discriminants, to indicate that the type has an access discriminant
2182         that supports implicit dereference.
2183         * snames.ads-tmpl: Add names of aspects and attributes related to
2184         Ada2012 iterators: constant_indexing, default_iterator,
2185         iterator_element, implicit_dereference, variable_indexing.
2186         * aspects.ads, aspects.adb: entries for iterator-related aspects.
2187         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
2188         iterator-related aspects.
2189         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
2190
2191 2011-08-05  Sergey Rybin  <rybin@adacore.com>
2192
2193         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
2194         metrics in gnatmetric to cover new kinds of coupling mentrics.
2195
2196 2011-08-05  Steve Baird  <baird@adacore.com>
2197
2198         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2199         of calling the user-defined main subprogram.
2200         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
2201         is set) Call_Main_Subprogram ahead of, as opposed to
2202         inside of, Main.
2203         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
2204         generation of a "with" of the user-defined main subprogram.
2205         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
2206         (which is now called from Gen_Main instead).
2207
2208 2011-08-05  Emmanuel Briot  <briot@adacore.com>
2209
2210         * projects.texi: Added reference to the Makefile package.
2211
2212 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2213
2214         * exp_ch7.adb: Minor comment rewording.
2215
2216 2011-08-05  Ed Falis  <falis@adacore.com>
2217
2218         * env.c: Fix comment.
2219
2220 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2221
2222         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
2223         character comparison and rely on concrete entities instead.
2224
2225 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2226
2227         * sem_ch3.adb: (Check_Private_Overriding): better error message,
2228         suggested by AI95-0068.
2229
2230 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2231
2232         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
2233         the two potential initialization calls. This accounts for any
2234         access-before-elaboration checks which may precede the initialization
2235         calls.
2236         (Next_Suitable_Statement): New routine. Returns the next real statement
2237         after the input node while skipping generated checks.
2238         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
2239         with comment on usage.
2240         Do not generate Elaborate_All when the trigger is a finalization call
2241         coming from a type init proc.
2242         (Check_Elab_Call): Propagate the initialization procedure context to
2243         subsequent calls to Check_A_Call.
2244         (Check_Internal_Call_Continue): Propagate the initialization procedure
2245         context to subsequent calls to Check_Elab_Call.
2246         (Is_Finalization_Procedure): New routine. Returns True if the input
2247         entity denotes a [Deep_]Finalize routine.
2248         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
2249         along with comment on usage.
2250
2251 2011-08-05  Vadim Godunko  <godunko@adacore.com>
2252
2253         * s-atocou.ads: Add list of supported platforms.
2254
2255 2011-08-05  Yannick Moy  <moy@adacore.com>
2256
2257         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
2258
2259         * opt.ads (Disable_ALI_File): new Boolean flag
2260         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
2261
2262 2011-08-05  Ed Falis  <falis@adacore.com>
2263
2264         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
2265         environ is properly defined.
2266
2267 2011-08-05  Vincent Celier  <celier@adacore.com>
2268
2269         * make.adb (Compilation_Phase): Exit immediately when all objects have
2270         been found up to date, to avoid multiple exit messages.
2271         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
2272         same project for languages with no compiler.
2273         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
2274         -eI.
2275 2011-08-05  Robert Dewar  <dewar@adacore.com>
2276
2277         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
2278         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
2279         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
2280         s-atocou-builtin.adb: Minor reformatting.
2281
2282 2011-08-05  Yannick Moy  <moy@adacore.com>
2283
2284         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
2285         if the node to wrap is a pragma check, this node and enclosed
2286         expression are not expanded, so do not apply any transformations here.
2287         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
2288         introducing transient scopes.
2289
2290 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
2291
2292         * adaint.c (__gnat_set_writable, __gnat_set_readable,
2293         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
2294         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
2295         routine is available, so we use the default implementation of these
2296         functions.
2297         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
2298         support for copying attributes on VxWorks 6.
2299
2300 2011-08-05  Yannick Moy  <moy@adacore.com>
2301
2302         * debug.adb: Remove use of -gnatd.D.
2303         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
2304         * opt.ads: Simplify variables for ALFA mode, to keep one only
2305         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
2306         to ALFA mode.
2307
2308 2011-08-05  Vincent Celier  <celier@adacore.com>
2309
2310         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
2311         Builder'Default_Switches.
2312
2313 2011-08-05  Vincent Celier  <celier@adacore.com>
2314
2315         * makeusg.adb: Add lines for --create-map-file switches.
2316
2317 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2318
2319         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
2320         profile is incomplete and the full view is available, replace it with
2321         the full view.
2322         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
2323         incomplete, freezing the subprogram is delayed until the full view is
2324         frozen.
2325         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
2326         fixed-point multiplication operator and the predefined operator is
2327         resolved in favor of the user-defined one.
2328
2329 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2330
2331         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
2332         CONST_CAST.
2333
2334 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2335
2336         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
2337         whether a type lacks user-defined Read or Write operations, or has a
2338         component that lacks them.
2339         * sem_attr.adb (Check_Stream_Attribute): if restriction
2340         No_Default_Stream_Attributes is active, verify that all subcomponent
2341         types of the target have user-defined stream operations, and report
2342         error otherwise.
2343         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
2344         * exp_strm.adb: Build_Elementary_Input_Call,
2345         Build_Elementary_Write_Call): remove checks for restriction
2346         No_Default_Stream_Attributes, now checked in semantics.
2347
2348 2011-08-04  Vincent Celier  <celier@adacore.com>
2349
2350         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
2351         switches on the command line, look for all valid --RTS switches in the
2352         Builder switches and for each language use the first runtime name found
2353         to invoke gprconfig.
2354         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
2355         command line and there is no auto-configuration.
2356         (Runtime_Name_Set_For): New function.
2357
2358 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2359
2360         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
2361         elaborate initialization expression for variable Abort when processing
2362         a package body or a declaration.
2363         (Create_Finalizer): Propagate the package context when creating the
2364         exception-related variables.
2365         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
2366         For_Package along with usage comment.
2367
2368 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2369
2370         * gcc-interface/Makefile.in: Clean up targets.
2371         Enable new package for atomic counters and copy-on-write implementation
2372         of unbounded strings on x86 platforms.
2373         * gcc-interface/Make-lang.in: Update dependencies.
2374
2375 2011-08-04  Robert Dewar  <dewar@adacore.com>
2376
2377         * exp_ch7.adb: Minor reformatting.
2378
2379 2011-08-04  Robert Dewar  <dewar@adacore.com>
2380
2381         * exp_strm.adb: Minor reformatting.
2382
2383 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2384
2385         * s-atocou.adb: Replace by dummy version and use on targets where atomic
2386         operations are not supported.
2387         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
2388         * s-atocou-x86.adb: New file.
2389         * Makefile.rtl: Add s-atocou.o file
2390
2391 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2392
2393         * make.adb (Compile): Move setting of CodePeer_Mode to ...
2394         (Compilation_Phase): ... here.
2395         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
2396
2397 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2398
2399         * Make-generated.in: Fix minor typo in comment.
2400
2401 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2402
2403         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
2404         the project path.
2405
2406 2011-08-04  Robert Dewar  <dewar@adacore.com>
2407
2408         * a-coinho.adb: Minor reformatting.
2409
2410 2011-08-04  Robert Dewar  <dewar@adacore.com>
2411
2412         * a-coinho.ads: Minor reformatting.
2413
2414 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2415
2416         * s-atocou.ads, s-atocou.adb: New files.
2417         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
2418         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
2419         direct use of GCC's atomic builtins and replace them by use of new
2420         atomic counter package.
2421
2422 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2423
2424         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
2425
2426 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2427
2428         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
2429         with a call to Get_External_Tag.
2430         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
2431         subprogram usage. Remove the guard against package declarations and
2432         bodies since Build_Cleanup_Statements is no longer invoked in that
2433         context.
2434         (Build_Components): Initialize Tagged_Type_Stmts when the context
2435         contains at least one library-level tagged type.
2436         (Build_Finalizer): New local variables Has_Tagged_Types and
2437         Tagged_Type_Stmts along with associated comments on usage. Update the
2438         logic to include tagged type processing.
2439         (Create_Finalizer): Insert all library-level tagged type unregistration
2440         code before the jump block circuitry.
2441         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
2442         (Expand_N_Package_Declaration): Remove the call to
2443         Build_Cleanup_Statements.
2444         (Process_Tagged_Type_Declaration): New routine. Generate a call to
2445         unregister the external tag of a tagged type.
2446         (Processing_Actions): Reimplemented to handle tagged types.
2447         (Process_Declarations): Detect the declaration of a library-level
2448         tagged type and carry out the appropriate actions.
2449         (Unregister_Tagged_Types): Removed. The machinery has been directly
2450         merged with Build_Finalizer.
2451
2452 2011-08-04  Robert Dewar  <dewar@adacore.com>
2453
2454         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
2455         gnatls.adb, exp_ch3.adb: Minor reformatting.
2456
2457 2011-08-04  Marc Sango  <sango@adacore.com>
2458
2459         * sem_attr.adb (Analyze_Attribute): Replace the message
2460         "invisible attribute of}" of the spark restriction violation in
2461         attribute reference by the simple message "invisible attribute of type".
2462         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
2463         two insertion characters: '&' and '}'.
2464
2465 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2466
2467         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
2468         * a-coinho.ads, a-coinho.adb: New file.
2469         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
2470
2471 2011-08-04  Nicolas Roche  <roche@adacore.com>
2472
2473         * alfa_test.adb: Not all ali files are containing alfa information even
2474         if compiled with -gnatd.F. So suppress warning about missing ALFA
2475         information.
2476
2477 2011-08-04  Yannick Moy  <moy@adacore.com>
2478
2479         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
2480         scope.
2481         * put_alfa.adb: Check that scope name is not empty.
2482
2483 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2484
2485         * exp_ch3.adb (Stream_Operation_Ok): new predicate
2486         Needs_Elementary_Stream_Operation, to determine whether user-defined
2487         Read and Write attributes are available for the elementary components
2488         of the given type. If only the predefined attributes are available,
2489         then when restriction No_Default_Stream_Attributes is active the
2490         predefined stream attributes for the composite type cannot be created.
2491
2492 2011-08-04  Robert Dewar  <dewar@adacore.com>
2493
2494         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
2495         Put routines in alpha order
2496
2497 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
2498
2499         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
2500         * gcc-interface/Make-lang.in: Update dependencies.
2501
2502 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2503
2504         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
2505         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
2506         gnat1why).
2507
2508 2011-08-04  Robert Dewar  <dewar@adacore.com>
2509
2510         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
2511         lib-xref-alfa.adb: Minor reformatting.
2512
2513 2011-08-04  Marc Sango  <sango@adacore.com>
2514
2515         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
2516         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
2517         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
2518         mode.
2519
2520 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2521
2522         * bindgen.adb (Gen_Adainit_C): Remove.
2523         (Gen_Adafinal_C): Ditto.
2524         (Gen_Elab_Externals_C): Ditto.
2525         (Gen_Elab_Calls_C): Ditto.
2526         (Gen_Elab_Order_C): Ditto.
2527         (Gen_Elab_Defs_C): Ditto.
2528         (Gen_Finalize_Library_C): Ditto.
2529         (Gen_Finalize_Library_Defs_C): Ditto.
2530         (Gen_Main_C): Ditto.
2531         (Gen_Output_File_C): Ditto.
2532         (Gen_Restrictions_C): Ditto.
2533         (Gen_Versions_C): Ditto.
2534         (Write_Info_Ada_C): Ditto.
2535         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
2536         (Gen_Output_File): Do not force Ada_Bind_File anymore.
2537         Always call Gen_Output_File_Ada.
2538         * gnatlink.adb (Begin_Info): Now a constant.
2539         (End_Info): Ditto.
2540         (Ada_Bind_File): Remove
2541         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
2542         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
2543         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
2544         * opt.ads (Ada_Bind_File): Remove.
2545
2546 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2547
2548         * projects.texi: Document target-specific directory in default project
2549         path for gnatmake.
2550
2551 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2552
2553         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
2554         path in all cases .
2555
2556 2011-08-04  Yannick Moy  <moy@adacore.com>
2557
2558         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
2559         opt.ads, lib-xref.ads: Code clean up.
2560
2561 2011-08-04  Yannick Moy  <moy@adacore.com>
2562
2563         * gnat_rm.texi: Update description of Test_Case
2564         * gnat_ugn.texi: Typo.
2565
2566 2011-08-04  Ed Falis  <falis@adacore.com>
2567
2568         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
2569
2570 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2571
2572         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
2573         it is of type Root_Controlled. This action eliminates fields Prev and
2574         Next from type equality.
2575
2576 2011-08-04  Yannick Moy  <moy@adacore.com>
2577
2578         * lib-xref-alfa.adb: Correct typo.
2579
2580 2011-08-04  Matthew Heaney  <heaney@adacore.com>
2581
2582         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
2583         component.
2584
2585 2011-08-04  Yannick Moy  <moy@adacore.com>
2586
2587         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
2588         (Analyze_Pragma): allow static string expression for name of Test_Case,
2589         instead of simply string literals.
2590         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
2591         expressions.
2592
2593 2011-08-04  Vincent Celier  <celier@adacore.com>
2594
2595         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
2596         case suffixes to find truncated main sources.
2597
2598 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2599
2600         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
2601         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
2602         (Compute_Current_Task): Ditto.
2603
2604 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2605
2606         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
2607
2608 2011-08-04  Yannick Moy  <moy@adacore.com>
2609
2610         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
2611         library-level constant.
2612         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
2613         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
2614         used as selector of parameter association, in ALFA mode.
2615
2616 2011-08-04  Robert Dewar  <dewar@adacore.com>
2617
2618         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
2619         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
2620         reformatting.
2621
2622 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2623
2624         * make.adb (Linking_Phase): Set source search path before calling
2625         gnatlink in CodePeer mode.
2626
2627 2011-08-04  Javier Miranda  <miranda@adacore.com>
2628
2629         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
2630         Remove code which takes care of building TSDs.
2631         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
2632         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
2633         the accessibility check in VM targets.
2634         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
2635         (Building_Static_DT): Now returns false for VM targets.
2636         (Build_VM_TSDs): Removed.
2637         (Expand_Interface_Conversion): Generate missing runtime check for
2638         conversions to interface types whose target type is unknown at compile
2639         time.
2640         (Make_VM_TSD): Add missing code to disable the generation of calls to
2641         Check_TSD if the tagged type is not defined at library level, or not
2642         has a representation clause specifying its external tag, or -gnatdQ is
2643         active.
2644         * exp_disp.ads (Build_VM_TSDs): Removed.
2645         (Make_VM_TSDs): Spec relocated from exp_disp.adb
2646         * sem_disp.adb (Check_Dispatching_Operation): No code required to
2647         register primitives in the dispatch tables in VM targets.
2648         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
2649         initialization of class-wide interface objects in VM targets.
2650         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
2651         of Make_DT).
2652
2653 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2654
2655         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
2656         when dotnet-ld cannot be found.
2657
2658 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2659
2660         * bindgen.adb: Simplify significantly generation of binder body file in
2661         CodePeer mode.
2662         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
2663         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
2664         not expanded).
2665
2666 2011-08-04  Yannick Moy  <moy@adacore.com>
2667
2668         * sem_prag.adb, sem.ads: Code cleanup.
2669
2670 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2671
2672         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
2673         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
2674         results if possible.
2675         * s-stusta.adb (Print): Adjust after changes in s-stausa.
2676         * gnat_ugn.texi: Update dynamic stack usage section.
2677
2678 2011-08-04  Steve Baird  <baird@adacore.com>
2679
2680         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
2681         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
2682         contains only a call to the user-defined main subprogram.
2683         (Gen_Main_Ada) - If CodePeer_Mode is set, then
2684         call the "wrapper" subprogram instead of directly
2685         calling the user-defined main subprogram.
2686
2687 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2688
2689         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
2690         alternatives of a case statement for controlled objects. Rename local
2691         variable A to Dead_Alt.
2692         (Expand_N_If_Statement): Check the then and else statements of an if
2693         statement for controlled objects. Check the then statements of all
2694         elsif parts of an if statement for controlled objects.
2695         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
2696         objects.
2697         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
2698         detects a loop associated with the expansion of an array object.
2699         Augment the processing of the loop statements to account for a possible
2700         wrap done by Process_Statements_For_Controlled_Objects.
2701         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
2702         statements and abortable part of an asynchronous select for controlled
2703         objects.
2704         (Expand_N_Conditional_Entry_Call): Check the else statements of a
2705         conditional entry call for controlled objects.
2706         (Expand_N_Selective_Accept): Check the alternatives of a selective
2707         accept for controlled objects.
2708         (Expand_N_Timed_Entry_Call): Check the entry call and delay
2709         alternatives of a timed entry call for controlled objects.
2710         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
2711         exception handler for controlled objects.
2712         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2713         Add formal parameter Nested_Constructs along with its associated
2714         comment.
2715         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
2716         Requires_Cleanup_Actions.
2717         (Process_Statements_For_Controlled_Objects): New routine.
2718         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
2719         routine. Inspect a node which contains a non-handled sequence of
2720         statements for controlled objects. If such an object is found, the
2721         statements are wrapped in a block.
2722
2723 2011-08-04  Bob Duff  <duff@adacore.com>
2724
2725         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
2726         need to compare with Class_Wide_Type (T2), in order to get at the
2727         original class-wide type node.
2728         * sem_type.ads (Covers): Improve the comment.
2729         * einfo.ads (Class_Wide_Type): Improve the comment.
2730         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
2731         the type of the Deref.
2732
2733 2011-08-04  Yannick Moy  <moy@adacore.com>
2734
2735         * gnat_rm.texi: Document that Test_Case pragma can only appear on
2736         separate declarations.
2737         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
2738         check identifier of pragma argument.
2739         (Chain_TC): check that no other test case associated to the same entity
2740         share the same name.
2741         (Check_Test_Case): disallow test case inside subprogram body
2742         (Analyze_Pragma): correct call to check identifier and not argument
2743         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
2744         function gets name from test case pragma.
2745
2746 2011-08-04  Yannick Moy  <moy@adacore.com>
2747
2748         * gnat_rm.texi: Document new pragma and aspect.
2749         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
2750         (No_Duplicates_Allowed): new constant array defining whether duplicates
2751         aspects of each kind can appear on the same declaration.
2752         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
2753         field, which points to a node holding the previous Spec_PPC_List.
2754         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
2755         through the indirection with Contract.
2756         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
2757         * par-prag.adb (Prag): do nothing on Test_Case pragma
2758         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
2759         be called directly.
2760         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
2761         component Ensures of Test_Case.
2762         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
2763         (Analyze_Generic_Subprogram_Declaration,
2764         Analyze_Subprogram_Instantiation,
2765         Analyze_Abstract_Subprogram_Declaration,
2766         Analyze_Subprogram_Body_Helper,
2767         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
2768         insert contract in subprogram node at point of definition
2769         * sem_ch13.adb
2770         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
2771         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
2772         corresponding pragma
2773         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
2774         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
2775         similar to the analysis of pre/post
2776         (Derive_Subprogram): insert contract in subprogram node at point of
2777         derivation.
2778         * sem_prag.adb, sem_prag.ads
2779         (Check_Arg_Is_String_Literal, Check_Identifier):
2780         new checking procedures to be called in treatment of pragmas
2781         (Check_Test_Case): new procedure to check that a Test_Case aspect or
2782         pragma is well-formed. This does not check currently that 'Result is
2783         used only in the Ensures component of a Test_Case.
2784         (Analyze_Pragma): add case for Test_Case
2785         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
2786         components of a Test_Case.
2787         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
2788         expressions in the 3rd (and 4th if present) arguments of a Test_Case
2789         pragma, treated as spec expressions.
2790         (Sig_Flags): add value -1 for Test_Case.
2791         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
2792         Get_Requires_From_Test_Case_Pragma): getters for both expression
2793         components of a Test_Case.
2794         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
2795         indirection between an entry or [generic] subprogram entity and its
2796         pre/post + test-cases.
2797         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
2798         get/set for fields of an N_Contract node.
2799         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
2800         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
2801         names and pragma for Test_Case.
2802         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
2803
2804 2011-08-04  Vincent Celier  <celier@adacore.com>
2805
2806         * gnat_ugn.texi: Improve documentation of gnatmake switch
2807         --source-info-file=.
2808
2809 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2810
2811         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
2812         type). Initialize Atyp to the appropriate type which is later checked
2813         for completion. Rewrite the assertion associated with private type
2814         completion.
2815
2816 2011-08-04  Ed Falis  <falis@adacore.com>
2817
2818         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
2819         initialize the number of CPUs.
2820
2821 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2822
2823         * sem_type.adb (Disambiguate): New subsidiary routine
2824         In_Same_Declaration_List, to implement AI05-0020: a user-defined
2825         equality on an anonymous access type whose designated type is private
2826         does not lead to an ambiguity with the universal access equality
2827         operator in the body or child units of the defining package. The same
2828         is true for a multiplication operator on a private type completed with
2829         a fixed-point-type.
2830
2831 2011-08-04  Javier Miranda  <miranda@adacore.com>
2832
2833         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
2834         (Normalize_Scalars_Config): Removed.
2835         * opt.adb
2836         (Register_Opt_Config_Switches): Remove registering config values of
2837         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
2838         (Restore_Opt_Config_Switches): Remove code which restores the values of
2839         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2840         Init_Or_Norm_Scalars.
2841         (Save_Opt_Config_Switches): Remove code which saves values of
2842         Init_Or_Norm_Scalars and Normalize_Scalars.
2843         (Set_Opt_Config_Switches): Remove code which restores config values of
2844         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2845         Init_Or_Norm_Scalars.
2846
2847 2011-08-04  Yannick Moy  <moy@adacore.com>
2848
2849         * frontend.adb (Frontend): remove previous patch to avoid full
2850         qualification in ALFA mode.
2851         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
2852         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
2853         unique name for an entity, which could be used to identify the entity
2854         across compilation units.
2855
2856 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2857
2858         * prj-env.adb
2859         (Initialize_Default_Project_Path): Add target specific directory
2860         ($prefix/$target/lib/gnat) in front of project path in all cases
2861         (making gnatmake's behaviour consistent with gprbuild).
2862         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
2863         Pass target name from Sdefault to project subsystem.
2864         * gnatls.adb: Show new target specific default project directory.
2865
2866 2011-08-04  Johannes Kanig  <kanig@adacore.com>
2867
2868         * cstand.adb: Add Information to Identifier in Standard
2869         (Identifer_For): Set Entity to the corresponding entity
2870
2871 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2872
2873         * gnat_ugn.texi: Update doc on gnatcheck.
2874
2875 2011-08-04  Yannick Moy  <moy@adacore.com>
2876
2877         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
2878         xrefs in a scope.
2879
2880 2011-08-04  Yannick Moy  <moy@adacore.com>
2881
2882         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
2883         performing expansion.
2884         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
2885         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
2886         it is not called in ALFA mode.
2887
2888 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2889
2890         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
2891         after all, so removed.
2892
2893 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2894
2895         * vms_data.ads: Add missing VMS qualifiers.
2896
2897 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2898
2899         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
2900         the list of files on the command line after processing it through
2901         Complete_Mains.
2902
2903 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2904
2905         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
2906         processing for .NET/JVM. These targets can now benefit from
2907         Raise_From_Controlled_Operation and they share the same processing with
2908         standard targets.
2909         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
2910         These targets need transient scopes in order to properly finalize short
2911         lived controlled objects.
2912         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
2913          NET/JVM. These targets can now benefit from
2914         Raise_From_Controlled_Operation and they share the same processing with
2915         standard targets.
2916
2917 2011-08-04  Geert Bosch  <bosch@adacore.com>
2918
2919         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
2920
2921 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2922
2923         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
2924         Expand_Record_Aggregate, to determine whether aggregate must be
2925         expanded into assignments. This is the case if the ancestor part is
2926         private, regarless of the setting of the flag Has_Private_Ancestor.
2927
2928 2011-08-04  Ed Falis  <falis@adacore.com>
2929
2930         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
2931
2932 2011-08-04  Bob Duff  <duff@adacore.com>
2933
2934         * sinfo.ads: Fix comment.
2935
2936 2011-08-04  Steve Baird  <baird@adacore.com>
2937
2938         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
2939         choose a package name in much the same way as is
2940         done for JGNAT when VM_Target /= No_VM, except that
2941         a slightly more distinctive prefix string is used.
2942
2943 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2944
2945         * makeutl.adb (Complete_Mains): no longer accept unit names on the
2946         gnatmake command line.
2947         This behavior was never documented (and was supported only because of
2948         an early bug in the code). This case might lead to ambiguous cases
2949         (between unit names and truncated base names without suffixes).
2950
2951 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2952
2953         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
2954         Remove the external tag of a tagged type from the internal hash table.
2955         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
2956         expanded usage of the routine. Strenghten the check for Is_Master. Add
2957         processing for tagged types.
2958         (Build_Finalizer): Create all the necessary lists used in finalizer
2959         creation when the processed context is a package that may contain
2960         tagged types.
2961         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
2962         Requires_Cleanup_Actions.
2963         (Expand_N_Package_Body): Package bodies may need clean up code
2964         depending on whether they contain tagged types.
2965         (Expand_N_Package_Declaration): Package declarations may need clean up
2966         code depending on whether they contain tagged types.
2967         (Unregister_Tagged_Types): New routine. Search through a list of
2968         declarations or statements, looking for non-abstract Ada tagged types.
2969         For each such type, generate code to unregister the external tag.
2970         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2971         Requires_Cleanup_Actions.
2972         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2973         through a list of declarations or statements looking for non-abstract
2974         Ada tagged types or controlled objects.
2975         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2976         Requires_Cleanup_Actions.
2977         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2978         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2979         RE_Unit_Table.
2980
2981 2011-08-04  Vincent Celier  <celier@adacore.com>
2982
2983         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2984         has Ada sources, not project Project, because if the root project
2985         Project has no sources of its own, all projects will be deemed without
2986         sources.
2987
2988 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2989
2990         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2991         of the No_Param_Proc acc-to-subp type used for initialization of
2992         __gnat_finalize_library_objects so that it's declared at library level
2993         rather than nested inside of the adainit routine.
2994
2995 2011-08-04  Javier Miranda  <miranda@adacore.com>
2996
2997         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2998         if the tagged type has a representation clause which specifies its
2999         external tag.
3000
3001 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3002
3003         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
3004         Remove previous procedure with that name.
3005         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
3006         when appropriate.
3007         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
3008         subtype mark, the ancestor cannot have unknown discriminants.
3009         (Resolve_Record_Aggregate): if the type has invisible components
3010         because of a private ancestor, the aggregate is illegal.
3011
3012 2011-08-04  Vincent Celier  <celier@adacore.com>
3013
3014         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
3015         account switches -gnat2005, -gnat12 and -gnat2012.
3016
3017 2011-08-04  Bob Duff  <duff@adacore.com>
3018
3019         * s-tasdeb.ads: Minor comment fix.
3020
3021 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3022
3023         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
3024         CodePeer mode.
3025         * switch.ads, switch.adb (Is_Language_Switch): New function.
3026
3027 2011-08-04  Vincent Celier  <celier@adacore.com>
3028
3029         * switch-c.adb: Minor comment addition.
3030
3031 2011-08-04  Vincent Celier  <celier@adacore.com>
3032
3033         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
3034         ending with '=' is followed by a space (missing file name).
3035
3036 2011-08-04  Pascal Obry  <obry@adacore.com>
3037
3038         * g-regist.ads: Fix size of HKEY on x86_64-windows.
3039
3040 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3041
3042         * sem_ch12.adb (Analyze_Associations): New routine
3043         Check_Overloaded_Formal_Subprogram to reject a formal package when
3044         there is a named association or a box initialisation for an overloaded
3045         formal subprogram of the corresponding generic.
3046
3047 2011-08-04  Yannick Moy  <moy@adacore.com>
3048
3049         * alfa.ads (ALFA_Xref_Record): add component for type of entity
3050         * get_alfa.adb, put_alfa.adb: Read and write new component of
3051         cross-reference.
3052         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
3053
3054 2011-08-04  Pascal Obry  <obry@adacore.com>
3055
3056         * urealp.adb: Minor reformatting.
3057
3058 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3059
3060         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
3061         Handle the case when Cleanup_Protected_Object returns Empty.
3062
3063 2011-08-04  Yannick Moy  <moy@adacore.com>
3064
3065         * frontend.adb (Frontend): only qualify names in non-ALFA mode
3066
3067 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3068
3069         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
3070         call, ignore functions.
3071
3072 2011-08-04  Geert Bosch  <bosch@adacore.com>
3073
3074         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
3075         point.
3076
3077 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3078
3079         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
3080         as an index for Builder'Switches. This conforms to the documentation.
3081         * make.adb (Insert_Project_Sources): avoid duplicate code
3082
3083 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3084
3085         * makeutl.adb (Complete_Mains): if the user has passed a relative file
3086         name on the command line (for instance "../dummy"), never assume it can
3087         be a unit name.
3088
3089 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3090
3091         * bindgen.adb: Remove code the reference or create the
3092         Break_Start/__gnat_break_start procedure.
3093         * s-stalib.adb (Break_Start): Removed.
3094
3095 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3096
3097         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
3098         shared with gprbuild.
3099
3100 2011-08-04  Yannick Moy  <moy@adacore.com>
3101
3102         * par-ch4.adb (P_Primary): preferentially issue an error message about
3103         a missing parenthesis arount a conditional or case expression in Ada
3104         2012 mode, if we detect that the alignment is not correct for a
3105         statement.
3106
3107 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3108
3109         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
3110         tag-to-class-wide conversion as needing finalization actions.
3111         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
3112         a tag-to-class-wide conversion as needing finalization actions.
3113         (Is_Finalizable_Transient): The result of a tag-to-class-wide
3114         conversion does not need finalization actions.
3115         (Is_Tag_To_CW_Conversion): New routine.
3116         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
3117         whether an object is the result of a tag-to-class-wide conversion.
3118
3119 2011-08-04  Yannick Moy  <moy@adacore.com>
3120
3121         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
3122         the left-hand-side and right-hand-side of a conjunct are inserted when
3123         translating a pre- or postcondition
3124         * sem_ch6.adb: Correct typo in comment
3125
3126 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3127
3128         * gnat_rm.texi: Ravenscar does not prohibit dependence on
3129         Unchecked_Conversion and Unchecked_Deallocation.
3130
3131 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3132
3133         * make.adb: Minor reformatting.
3134
3135 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3136
3137         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
3138         sources in the project and its imported projects, but not in the whole
3139         tree.
3140
3141 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3142
3143         * make.adb: Remove debug trace.
3144
3145 2011-08-04  Vincent Celier  <celier@adacore.com>
3146
3147         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
3148         path in canonical form, to be able to compare path names on platforms
3149         such as Windows or Darwin.
3150
3151 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3152
3153         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
3154         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
3155         * scos.ads: Update documentation accordingly.
3156         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
3157         pragmas.
3158
3159 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3160
3161         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
3162         attribute only if prefix type is scalar.
3163
3164 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3165
3166         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
3167         in gnatmake for specifying mains on the command line that do not belong
3168         to the main project. These mains must currently all belong to the same
3169         project, though.
3170         (Ultimate_Extension_Of): removed, since duplicated
3171         Ultimate_Extending_Project.
3172
3173 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3174
3175         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
3176         instead.
3177         (CodePeer_Mode_String): New.
3178         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
3179         CodePeer mode.
3180         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
3181         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
3182         mode, since no useful elaboration subprogram is needed by CodePeer.
3183         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
3184         In this mode, compile binder file with -gnatC and do stop after this
3185         step.
3186
3187 2011-08-04  Vincent Celier  <celier@adacore.com>
3188
3189         * exp_ch7.adb: Minor comment fix.
3190
3191 2011-08-04  Robert Dewar  <dewar@adacore.com>
3192
3193         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
3194         exp_ch4.adb, makeutl.adb: Minor reformatting.
3195
3196 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3197
3198         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
3199         Create several new subprograms to move code out of Make. This makes the
3200         code more readable, removes code duplication, and is a preparation work
3201         for adding support for aggregate projects.
3202
3203 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3204
3205         * s-po32gl.ads, s-po32gl.adb: New files.
3206         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
3207         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
3208         (Build_Finalization_Collection): Use it.
3209         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
3210         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
3211         literals.
3212         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
3213         * gcc-interface/Make-lang.in: Update dependencies.
3214
3215 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3216
3217         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
3218         the command line.
3219
3220 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3221
3222         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
3223         command line is not a file name, also check whether it could be a unit
3224         name.
3225
3226 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3227
3228         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
3229         the header of the finalization routine.
3230         If the unit has no finalizer but is a body whose spec has one, then
3231         generate the decrement of the elaboration entity only.
3232         If the unit has a finalizer and is a spec, then do not generate the
3233         decrement of the elaboration entity.
3234         (Gen_Finalize_Library_C): Likewise.
3235
3236 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3237
3238         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
3239         (Bounds_Size_Expression): Removed.
3240         (Double_Alignment_Of): New subsidiary routine.
3241         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
3242         for a hole in the dope vector of unconstrained arrays due to different
3243         index and element alignments.
3244
3245 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3246
3247         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
3248         raise program_error because body has not been seen yet.
3249
3250 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3251
3252         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
3253         an unresolved name.
3254
3255 2011-08-04  Vincent Celier  <celier@adacore.com>
3256
3257         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
3258
3259 2011-08-04  Yannick Moy  <moy@adacore.com>
3260
3261         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
3262         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
3263
3264 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3265
3266         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
3267         instantiation in RCI.
3268
3269 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3270
3271         * make.adb: Share more code with gprbuild
3272
3273 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3274
3275         * projects.texi: Added documentation for the IDE'Gnat project file
3276         attribute.
3277
3278 2011-08-04  Nicolas Roche  <roche@adacore.com>
3279
3280         * gnat_rm.texi: Minor editing.
3281
3282 2011-08-04  Javier Miranda  <miranda@adacore.com>
3283
3284         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
3285         and the library case for VM targets.
3286         (Gen_Adainit_Ada): Likewise.
3287
3288 2011-08-04  Robert Dewar  <dewar@adacore.com>
3289
3290         * g-altive.ads: Minor comment updates.
3291         * prj-nmsc.adb: Minor reformatting.
3292
3293 2011-08-04  Javier Miranda  <miranda@adacore.com>
3294
3295         * opt.ads
3296         (Normalize_Scalars_Config): Value of the configuration switch set by
3297         pragma Normalize_Scalars when it appears in the gnat.adc file.
3298         (Normalize_Scalars): New field for record Config_Switches_Type. Used
3299         to save and restore settings of this pragma.
3300         * opt.adb
3301         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
3302         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
3303
3304 2011-08-04  Vincent Celier  <celier@adacore.com>
3305
3306         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
3307
3308 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3309
3310         * makeutl.adb: Minor reformatting.
3311
3312 2011-08-04  Olivier Hainque  <hainque@adacore.com>
3313
3314         * g-altive.ads: Update comments to reflect that only the soft
3315         binding is available today.
3316
3317 2011-08-04  Robert Dewar  <dewar@adacore.com>
3318
3319         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
3320         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
3321         * gcc-interface/Make-lang.in: Update dependencies.
3322
3323 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3324
3325         * prj-env.adb: Remove local debug traces.
3326
3327 2011-08-04  Yannick Moy  <moy@adacore.com>
3328
3329         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
3330         was used instead of Hi_OK, which could cause a read of an uninitialized
3331         value later on. Detected while working on the new warning.
3332         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
3333         to local variable.
3334         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
3335         in more cases, in order to detect more unreferenced values.
3336         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
3337         object for expression, if any.
3338
3339 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3340
3341         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
3342         the operand types instead of the Esize.
3343
3344 2011-08-04  Steve Baird  <baird@adacore.com>
3345
3346         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
3347         enable CodePeer_Mode.
3348         * bindusg.adb (Display): Add help message describing -P binder switch.
3349         * gnat_ugn.texi: Document -P binder switch.
3350         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
3351         user-defined main program directly.
3352         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
3353         user-defined main program in the context clause of the package body.
3354
3355 2011-08-04  Yannick Moy  <moy@adacore.com>
3356
3357         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
3358         duplicate of Defining_Entity
3359         (Get_Unique_Entity_For_Decl): rename function into
3360         Unique_Defining_Entity
3361         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
3362         (Formal_Proof_On): remove synthesized flag
3363         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3364         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
3365         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
3366         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
3367         Annotate (Formal_Proof)
3368
3369 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3370
3371         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
3372         source files with non-standard naming schemes, in imported projects
3373
3374 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3375
3376         * makeutl.adb (Complete_Mains): when a multi-unit source file is
3377         specified on the gprbuild command line, we need to compile all units
3378         within that file, not just the first one we find
3379         Fix error message for mains that are not found.
3380
3381 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3382
3383         * sem_ch6.adb: Update comment.
3384         * sem_ch12.adb: Minor reformatting.
3385
3386 2011-08-04  Bob Duff  <duff@adacore.com>
3387
3388         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
3389         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
3390         race condition whose symptom is to fail to lock Parent. That, in turn,
3391         causes Parent.Awake_Count to be accessed without locking Parent, which
3392         causes another race condition whose symptom is that Parent.Awake_Count
3393         can be off by 1 (either too high or too low). The solution is to lock
3394         Parent unconditionally, and then lock Acceptor, before reading
3395         Acceptor.Terminate_Alternative.
3396
3397 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3398
3399         * debug.adb: Update comment.
3400
3401 2011-08-04  Robert Dewar  <dewar@adacore.com>
3402
3403         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
3404         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
3405         exp_ch6.adb: Minor reformatting.
3406
3407 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3408
3409         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
3410         checks for -gnateE.
3411
3412 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3413
3414         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
3415
3416 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3417
3418         * sinfo.ads: Minor reformatting.
3419
3420 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3421
3422         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
3423         even if there is no location.
3424
3425 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3426
3427         * sem_res.adb, sem_ch4.adb: move check for restriction
3428         No_Task_Hierarchy to resolve_allocator.
3429
3430 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3431
3432         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
3433         This flag of N_Pragma nodes is not used, remove it as well as all of
3434         the associated circuitry.
3435
3436 2011-08-04  Javier Miranda  <miranda@adacore.com>
3437
3438         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
3439         runtime check on duplicated externa tags
3440         * debug.adb Document switch -gnatdQ.
3441
3442 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3443
3444         * a-fihema.ads: Minor typo fix.
3445
3446 2011-08-04  Yannick Moy  <moy@adacore.com>
3447
3448         * sem_ch10.adb: Minor comment update.
3449
3450 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3451
3452         * einfo.adb: Update the node field usage to reflect the renaming of
3453         Return_Flag to Return_ Flag_Or_Transient_Decl.
3454         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
3455         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
3456         (Write_Field15_Name): Change Return_Flag to
3457         Return_Flag_Or_Transient_Decl.
3458         * einfo.ads: Rename node field Return_Flag to
3459         Return_Flag_Or_Transient_Decl. Update the associated comment and all
3460         occurrences in entities.
3461         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
3462         associated Inline pragma.
3463         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
3464         associated Inline pragma.
3465         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
3466         routine.
3467         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
3468         Return_Flag and Set_Return_Flag.
3469         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
3470         objects generated for controlled transients declared inside an
3471         Exception_With_Actions. Update the calls to Return_Flag.
3472         (Process_Object_Declaration): Add code to add a null guard for hook
3473         objects generated for controlled transients declared inside an
3474         Exception_With_Actions. Update related comment.
3475         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
3476         objects generated for controlled transients declared inside an
3477         Exception_With_Actions. Update the calls to Return_Flag.
3478         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
3479
3480 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3481
3482         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
3483         positional aggregate.
3484
3485 2011-08-04  Vincent Celier  <celier@adacore.com>
3486
3487         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
3488         SLOC only for pragmas.
3489
3490 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3491
3492         * projects.texi: Minor typo fix.
3493
3494 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3495
3496         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
3497         on case-sensitive file systems.
3498
3499 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3500
3501         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
3502         nested in a disabled pragma.
3503         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
3504         enclosing pragma, if any, for X decisions.
3505
3506 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3507
3508         * sem_prag.adb: Minor reformatting.
3509
3510 2011-08-04  Vincent Celier  <celier@adacore.com>
3511
3512         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
3513         allowed in no run time mode.
3514
3515 2011-08-04  Vincent Celier  <celier@adacore.com>
3516
3517         * make.adb (Check): When -gnatc is used, check for the source file
3518         inside the ALI file with a canonical case file name.
3519
3520 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3521
3522         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
3523         overriding the separator.
3524
3525 2011-08-04  Robert Dewar  <dewar@adacore.com>
3526
3527         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
3528         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
3529
3530 2011-08-04  Robert Dewar  <dewar@adacore.com>
3531
3532         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
3533
3534 2011-08-04  Yannick Moy  <moy@adacore.com>
3535
3536         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
3537         'Result only appears in postcondition of function.
3538
3539 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3540
3541         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
3542         external tag, include the value of the external tag in the exception
3543         message.
3544
3545 2011-08-04  Yannick Moy  <moy@adacore.com>
3546
3547         * sem_attr.adb (Result): modify error message for misplaced 'Result
3548
3549 2011-08-04  Sergey Rybin  <rybin@adacore.com>
3550
3551         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
3552         clear that the second argument must be an identifier.
3553
3554 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3555
3556         * exp_ch9.adb (Build_Barrier_Function): When compiling with
3557         -fpreserve-control-flow, insert an IF statement on the barrier
3558         condition to ensure that a conditional branch instruction is generated.
3559
3560 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3561
3562         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
3563         (Processing_Flags.Ignore_Missing_With): new flag.
3564
3565 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3566
3567         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
3568         Source_List_File on case-insensitive systems where the file is actually
3569         on a case-sensitive file system (NFS,...).
3570
3571 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3572
3573         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
3574         function return contains a controlled [extension] aggregate and the
3575         return statement is not part of a handled sequence of statements, wrap
3576         the return in a block. This ensures that all controlled temporaries
3577         generated during aggregate resolution will be picked up by the
3578         finalization machinery.
3579
3580 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3581
3582         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
3583         components, freeze type before resolution, to ensure that default
3584         initializations are present for all components.
3585         * sem_res.adb (Resolve_Actuals): the designated object of an
3586         accces-to-constant type is a legal actual in a call to an
3587         initialization procedure.
3588
3589 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3590
3591         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
3592         N_Unchecked_Type_Conversion to the possible containers of a renamed
3593         transient variable.
3594
3595 2011-08-04  Yannick Moy  <moy@adacore.com>
3596
3597         * par-ch13.adb (Aspect_Specifications_Present): recognize
3598         "with Identifier'Class =>" as an aspect, so that a meaningful warning
3599         is issued in Strict mode.
3600         * par.adb: Fix typos in comments.
3601
3602 2011-08-04  Yannick Moy  <moy@adacore.com>
3603
3604         * sem_attr.adb (Result): modify error message to take into account Post
3605         aspect when compiling Ada 2012 (or newer) code.
3606
3607 2011-08-04  Nicolas Roche  <roche@adacore.com>
3608
3609         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
3610         remove need for GCC exceptions.
3611
3612 2011-08-04  Vincent Celier  <celier@adacore.com>
3613
3614         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
3615         project, not the source file name.
3616         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
3617         excluded, continue looking. This excluded source will only be returned
3618         if there is no other source with the same base name that is not locally
3619         removed.
3620
3621 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3622
3623         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
3624         private and one of the operands is a real literal, use a qualified
3625         expression rather than a conversion which is not meaningful to the
3626         back-end.
3627
3628 2011-08-04  Yannick Moy  <moy@adacore.com>
3629
3630         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
3631         corresponding aspect X'Class are allowed, proceed with analysis of the
3632         aspect instead of skipping it.
3633
3634 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3635
3636         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
3637         This will allow to have an Ada implementation for the subprogram.
3638
3639 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3640
3641         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
3642         completion and aspects are present, apply them to the entity for the
3643         type which is currently the partial view, but which is the one that
3644         will be frozen.
3645         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
3646         applies to a partial view, indicate that the full view has predicates
3647         and delayed aspects.
3648         (Replace_Type_Reference): Handle properly predicates that apply to the
3649         full view of a private completion.
3650
3651 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3652
3653         * layout.adb (Layout_Type): For composite types, do not set Esize.
3654         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
3655         set Esize.
3656         (Size_Known): Look at the RM size of components instead of the Esize.
3657         (Freeze_Record_Type): Look at the RM size instead of the Esize to
3658         issue warning and activate Implicit_Packing.
3659         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
3660         if the Esize is not known.
3661         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
3662         for elementary types only.
3663         (Analyze_Record_Representation_Clause): Look at the RM size instead
3664         of the Esize to issue errors.
3665         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
3666         is not known.
3667         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
3668         obsolete block.
3669         Look at the RM size instead of the Esize for types if the latter is
3670         not known.
3671         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
3672
3673 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3674
3675         * sem_type.adb: proper handling of equality not involving anonymous
3676         access types.
3677
3678 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3679
3680         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
3681         Vis_Decls. When creating a library-level finalizer for a package spec,
3682         both the declaration and body of the finalizer are inserted either in
3683         the visible or private declarations of the package spec.
3684
3685 2011-08-04  Javier Miranda  <miranda@adacore.com>
3686
3687         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
3688         use of the full-view of a type when invoking Is_Ancestor.
3689         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
3690         the full-view of private parents is requested, then use also the
3691         full-view of the parent of the first derivation.
3692
3693 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3694
3695         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
3696         instead of the locally imported procedure.
3697         * s-taprop-mingw.adb (Enter_Task): Ditto.
3698         * s-valrea.adb (Scan_Real): Ditto.
3699         * s-imgrea.adb (Set_Image_Real): Ditto.
3700         * s-flocon.ads: Make the package pure.
3701
3702 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3703
3704         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
3705         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
3706         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
3707         New subprogram, moved here from...
3708         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
3709         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
3710         rewriting of the last argument into a procedure call statement here...
3711         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
3712         instead.
3713
3714 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3715
3716         * par_sco.adb: Minor reformatting.
3717
3718 2011-08-04  Robert Dewar  <dewar@adacore.com>
3719
3720         * erroutc.adb: Minor reformatting.
3721
3722 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3723
3724         * par_sco.adb: Comment update.
3725
3726 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3727
3728         * s-flocon.ads: New file.
3729         * g-flocon.ads: Now a renaming of s-flocon.
3730         * Makefile.rtl: Add s-flocon.o
3731
3732 2011-08-04  Javier Miranda  <miranda@adacore.com>
3733
3734         * exp_strm.adb (Build_Array_Input_Function): if the array type is
3735         constrained, do not attempt to build a subtype of it.
3736
3737 2011-08-04  Yannick Moy  <moy@adacore.com>
3738
3739         * errout.ads Change comments: remove 'R'M as an example where quotes
3740         are needed; add ALFA as another case where quotes are not needed
3741         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
3742         case where quotes are not needed.
3743         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3744         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
3745         Remove all occurrences of 'A'L'F'A
3746
3747 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3748
3749         * sem_ch13.adb: check legality of invariant pragma.
3750
3751 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3752
3753         * bindgen.adb: Add comments.
3754
3755 2011-08-04  Yannick Moy  <moy@adacore.com>
3756
3757         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
3758         synthesized flag.
3759         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
3760         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
3761
3762 2011-08-04  Robert Dewar  <dewar@adacore.com>
3763
3764         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
3765         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
3766         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
3767
3768 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3769
3770         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
3771
3772 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3773
3774         PR ada/47880
3775         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
3776         allocated object.
3777
3778 2011-08-04  Robert Dewar  <dewar@adacore.com>
3779
3780         * einfo.ads, exp_ch4.adb: Minor reformatting.
3781
3782 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3783
3784         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
3785
3786 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3787
3788         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
3789         type in all cases to compute list of primitive operations, because full
3790         view may be an itype that is not attached to the list of declarations.
3791
3792 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3793
3794         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
3795         library has already been finalized.
3796         (Gen_Adafinal_C): Likewise.
3797         (Gen_Adainit_Ada): Generate an early return if the library has
3798         already been elaborated.
3799         (Gen_Adainit_C): Likewise.
3800         (Gen_Output_File_Ada): Generate an elaboration flag.
3801         (Gen_Output_File_C): Likewise.
3802
3803 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3804
3805         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
3806         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
3807         built in the first place.
3808         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
3809         for CodePeer because Finalize_Address was not built to begin with.
3810         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
3811
3812 2011-08-04  Pascal Obry  <obry@adacore.com>
3813
3814         * adaint.c (__gnat_tmp_name): Use current process id to create temp
3815         filenames, this ensures unicity of filenames across processes.
3816
3817 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3818
3819         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
3820         Raise_Controlled to Raise_From_Controlled_Operation. Update the
3821         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
3822         Add False as the actual to From_Abort in the generated call to
3823         Raise_From_Controlled_Operation.
3824
3825 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3826
3827         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
3828         so that the ali file name can be retrieved from outside of this package.
3829         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
3830         doing nothing in the general case, but used to update the object file
3831         timestamp if directly generated by the backend.
3832         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
3833         to a later time than the ali file one.
3834
3835 2011-08-04  Yannick Moy  <moy@adacore.com>
3836
3837         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
3838         entities whose body contains an Annotate pragma which forces formal
3839         proof on this body.
3840         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3841         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
3842         Mark_Non_ALFA_Subprogram to pass in a message and node.
3843         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
3844         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
3845         surrounding subprogram.
3846         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
3847         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
3848         as not in ALFA is annotated with Formal_Proof being On, then an error
3849         is issued based on the additional parameters for message and node.
3850         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
3851         * gcc-interface/Make-lang.in: Update dependencies.
3852
3853 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3854
3855         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
3856         Finalize_Address when CodePeer is enabled.
3857
3858 2011-08-04  Pascal Obry  <obry@adacore.com>
3859
3860         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
3861         the latter returns a pointer to a static buffer which is deallocated
3862         at the end of the routine.
3863
3864 2011-08-04  Yannick Moy  <moy@adacore.com>
3865
3866         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
3867         after index creation; mark unconstrained base array type generated as
3868         being in/not in ALFA as well
3869         (Make_Index): mark subtype created as in/not in ALFA
3870         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
3871         over a loop as in/not in ALFA, depending on its type and form of loop
3872         iteration.
3873
3874 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3875
3876         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
3877         directly to False on .NET and JVM.
3878
3879 2011-08-04  Yannick Moy  <moy@adacore.com>
3880
3881         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
3882         constraint that subtype must come from source code to be in ALFA, so
3883         that anonymous subtypes can be in ALFA too.
3884
3885 2011-08-04  Yannick Moy  <moy@adacore.com>
3886
3887         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
3888         reference for ALFA mode.
3889         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
3890         procedure public so as to use it from formal verification back-end.
3891
3892 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3893
3894         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
3895         invalid checks of the Parameter, making Remove_Switch not working
3896         correctly.
3897
3898 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3899
3900         * targparm.ads: Update header: no run-time exception is needed on this
3901         file.
3902
3903 2011-08-04  Vincent Celier  <celier@adacore.com>
3904
3905         * a-fihema.adb: Use System.IO instead of GNAT.IO
3906
3907 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3908
3909         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
3910         are forbidden in Compiler_Unit mode.
3911
3912 2011-08-04  Robert Dewar  <dewar@adacore.com>
3913
3914         * sem_util.adb: Minor reformatting.
3915
3916 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3917
3918         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
3919         library-level finalizers.
3920         (Gen_Finalize_Library_C): Update the import string for library-level
3921         finalizers.
3922         (Gen_Finalize_Library_Defs_C): Update the definition name of a
3923         library-level finalizer.
3924         * exp_ch7.adb: Remove with and use clauses for Stringt.
3925         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
3926         Spec_Decl. Add local variable Body_Id. The names of library-level
3927         finalizers are now manually fully qualified and are no longer external.
3928         A single name is now capable of servicing .NET, JVM and non-VM targets.
3929         Pragma Export is no longer required to provide visibility for the name.
3930         (Create_Finalizer_String): Removed.
3931         (New_Finalizer_Name): New routine which mimics New_..._Name.
3932
3933 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3934
3935         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
3936         elaboration counter to Standard_Short_Integer.
3937         * sem_util.adb (Build_Elaboration_Entity): Likewise.
3938         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
3939         (Gen_Elab_Externals_C): Likewise.
3940
3941 2011-08-04  Ed Falis  <falis@adacore.com>
3942
3943         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
3944         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
3945         system-vxworks-mips.ads, system-vxworks-x86.ads
3946         (Always_Compatible_Rep): set to False for all VxWorks targets.
3947
3948 2011-08-04  Robert Dewar  <dewar@adacore.com>
3949
3950         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
3951         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
3952         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
3953         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
3954         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
3955         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
3956         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
3957         Minor reformatting and code reorganization.
3958
3959 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3960
3961         * projects.texi: Added doc for aggregate projects.
3962
3963 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3964
3965         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3966         Add support for overriding the Project_Path in aggregate projects.
3967
3968 2011-08-04  Robert Dewar  <dewar@adacore.com>
3969
3970         * a-cofove.ads: Minor reformatting.
3971
3972 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3973
3974         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3975         on the generated code.
3976         (Build_Finalize_Statements): Update the comment on the generated code.
3977         (Build_Initialize_Statements): Update the comment on the generated code.
3978         (Build_Object_Declarations): Add local variable Result. The object
3979         declarations are now built in sequence.
3980         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3981         RE_Unit_Table.
3982
3983 2011-08-04  Robert Dewar  <dewar@adacore.com>
3984
3985         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3986
3987 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3988
3989         * einfo.ads (Elaboration_Entity): Document new definition and use.
3990         (Elaboration_Entity_Required): Adjust to above change.
3991         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3992         * exp_ch12.adb: And with and use for Snames.
3993         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3994         * exp_util.adb (Set_Elaboration_Flag): Likewise.
3995         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3996         <Check_Unit_Name>: Deal with N_Expanded_Name.
3997         <Attribute_Elaborated>: Extend to all unit names.
3998         * sem_elab.adb: And with and use for Uintp.
3999         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
4000         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
4001         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
4002         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
4003         from Gen_Adainit_Ada.
4004         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
4005         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
4006         case, do not call System.Standard_Library.Adafinal; instead call
4007         finalize_library if needed.
4008         (Gen_Adafinal_C): Likewise.
4009         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
4010         non-main program case.
4011         (Gen_Adainit_C): Generate a couple of external declarations here.
4012         In the main program case, set SSL.Finalize_Library_Objects.
4013         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
4014         (Gen_Elab_Calls_C): Likewise.
4015         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
4016         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
4017         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
4018         objects here.
4019         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
4020         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
4021         Gen_Adafinal_Ada.
4022         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
4023         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
4024         of external declarations.  Call Gen_Finalize_Library_C.
4025
4026 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4027
4028         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
4029         Compute_Compilation_Phases): new subprogram.
4030         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
4031         The number of mains as well as the various compilation phases that
4032         need to be run are now project tree specific, since various
4033         aggregated trees might have different requirements. In particular,
4034         they do not all require bind or link phases.
4035
4036 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4037
4038         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
4039         (Project_Tree_Appdata): New type.
4040         It is now possible to associate application-specific data to a project
4041         tree. In particular, this is used in the gprbuild builder to avoid a
4042         number of global tables and htables, especially now that there can be
4043         several project trees loaded at once because of aggregate projects.
4044         (Debug_Name): new procedure.
4045         * projects.texi: Clarify syntax of "**" for Source_Dirs
4046
4047 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4048
4049         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
4050         the "roots" for a main.
4051         (Fill_From_Project): add support for aggregate projects. Main units
4052         in aggregated projects are now automatically added in the list of
4053         files to build (although this fails later on in gprbuild, because
4054         these files are not using the root proejct tree, so this needs
4055         further cleanup)
4056         * gcc-interface/Make-lang.in: Update dependencies.
4057
4058 2011-08-03  Yannick Moy  <moy@adacore.com>
4059
4060         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
4061         conditional expression in ALFA.
4062         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
4063         expressions as not in ALFA.
4064
4065 2011-08-03  Robert Dewar  <dewar@adacore.com>
4066
4067         * a-cofove.adb: Minor reformatting.
4068
4069 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4070
4071         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
4072         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
4073         gprbuild sources.
4074         These packages are more logically placed in the Queue package, since
4075         they manipulate the queue. It is also likely that they can be adapted
4076         for gnatmake, thus sharing more code.
4077         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
4078         that we could move the above.
4079
4080 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4081
4082         * errutil.adb (Finalize): clean up the list of error messages on exit.
4083         Calling this subprogram multiple times will no longer show duplicate
4084         error messages on stderr.
4085
4086 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4087
4088         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
4089         Getopt_Switches when we have already define a command line
4090         configuration.
4091
4092 2011-08-03  Yannick Moy  <moy@adacore.com>
4093
4094         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
4095         in ALFA. Instead, they are considered as assertions to prove.
4096         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
4097         nodes as not in ALFA. Instead, include conditional expressions in ALFA
4098         if they have no ELSE part, or if they occur in pre- and postconditions,
4099         where the Condition cannot have side-effects in ALFA
4100         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
4101         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
4102         Instead, include type conversion between scalar types in ALFA.
4103         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
4104         if-and-only-if its type is in ALFA.
4105
4106 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4107
4108         * scos.adb, get_scos.adb, put_scos.adb
4109         New code letter for decisions: G (entry guard)
4110         * par_sco.adb
4111         (Traverse_Subprogram_Body): Rename to...
4112         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
4113         (Traverse_Protected_Body): New subprogram
4114         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
4115         protected bodies and entry bodies.
4116
4117 2011-08-03  Yannick Moy  <moy@adacore.com>
4118
4119         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
4120         entities with get/set subprograms, which is set on procedure entities
4121         generated by the compiler for a postcondition.
4122         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
4123         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
4124         entity for a declaration
4125         (Get_Unique_Entity_For_Decl): new function returning an entity which
4126         represents a declaration, so that matching spec and body have the same
4127         entity.
4128
4129 2011-08-03  Robert Dewar  <dewar@adacore.com>
4130
4131         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
4132         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
4133
4134 2011-08-03  Yannick Moy  <moy@adacore.com>
4135
4136         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
4137         library-level because retriction No_Implicit_Dynamic_Code in the
4138         front-end prevents its definition as a local subprogram
4139         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
4140         for reuse in other contexts
4141         (Traverse_Declarations_Or_Statements,
4142         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4143         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
4144         procedures take a callback parameter to be called on all declarations
4145         * lib-xref.ads
4146         (Traverse_All_Compilation_Units): new generic function to traverse a
4147         compilation unit and call a callback parameter on all declarations
4148
4149 2011-08-03  Javier Miranda  <miranda@adacore.com>
4150
4151         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
4152         in Java since they are always enclosed in a namespace that
4153         differentiates them, and overloaded entities are supported by the VM.
4154
4155 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4156
4157         * checks.adb (Determine_Range): If a computed bound of an operation is
4158         outside the range of the base type of the expression, and overflow
4159         checks are enabled, the result is unknown and cannot be used for any
4160         subsequent constant folding.
4161         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
4162         unknown, so is the result of the comparison.
4163
4164 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4165
4166         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
4167         From_Abort. When finalization was triggered by an abort, propagate
4168         Standard'Abort_Signal rather than Program_Error.
4169         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
4170         From_Abort.
4171         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
4172         From_Abort. When finalization was triggered by an abort, propagate
4173         Standard'Abort_Signal rather than Program_Error.
4174         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
4175         From_Abort.
4176         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
4177         Abort_Id. Update the calls to Build_Object_Declarations and
4178         Build_Raise_Statement to include Abort_Id.
4179         (Build_Adjust_Statements): New local variable Abort_Id. Update the
4180         calls to Build_Object_Declarations and Build_Raise_Statement to include
4181         Abort_Id.
4182         (Build_Finalize_Statements): New local variable Abort_Id. Update the
4183         calls to Build_Object_Declarations and Build_Raise_Statement to include
4184         Abort_Id.
4185         (Build_Components): Create an entity for Abort_Id when exceptions are
4186         allowed on the target.
4187         (Build_Finalizer): New local variable Abort_Id.
4188         (Build_Initialize_Statements): New local variable Abort_Id. Update the
4189         calls to Build_Object_Declarations and Build_Raise_Statement to include
4190         Abort_Id.
4191         (Build_Object_Declarations): Add new formal Abort_Id. Create the
4192         declaration of flag Abort_Id to preserve the original abort status
4193         before finalization code is executed.
4194         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
4195         runtime routine Raise_From_Controlled_Operation.
4196         (Create_Finalizer): Update the call to Build_Raise_Statement to include
4197         Abort_Id. Update the call to Build_Object_Declarations to include
4198         Abort_Id. Update the layout of the finalizer body.
4199         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
4200         (Process_Transient_Objects): New local variable Abort_Id. Remove the
4201         clunky code to create all flags and objects related to
4202         exception propagation and replace it with a call to
4203         Build_Object_Declarations. Update the call to Build_Raise_Statement to
4204         include Abort_Id.
4205         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
4206         Add new formal Abort_Id and associated comment on its use.
4207         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
4208         on its use.
4209         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
4210         Remove the clunky code to create all flags and objects related to
4211         exception propagation and replace it with a call to
4212         Build_Object_Declarations. Update the call to Build_Raise_Statement.
4213
4214 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4215
4216         * s-tassta.adb: Fix minor typos.
4217
4218 2011-08-03  Robert Dewar  <dewar@adacore.com>
4219
4220         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
4221         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
4222
4223 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4224
4225         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
4226         to packages. This ensures that the finalizer body will not end up
4227         inside the freeze node.
4228         (Process_Declarations): Add code to detect whether a freeze node has a
4229         nested finalization collection.
4230
4231 2011-08-03  Pascal Obry  <obry@adacore.com>
4232
4233         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
4234         (Current_Session): Return a not null access to Session_Type.
4235         (Default_Session): Likewise.
4236
4237 2011-08-03  Robert Dewar  <dewar@adacore.com>
4238
4239         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
4240         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
4241
4242 2011-08-03  Pascal Obry  <obry@adacore.com>
4243
4244         * g-awk.ads: Minor comment fix.
4245
4246 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4247
4248         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4249         the tree structure related to discriminant constraints.
4250         Original_Discriminant cannot be used any more for computing the
4251         defining name for the reference to a discriminant.
4252
4253 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4254
4255         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
4256         function is not visibly tagged, this is not a dispatching call and
4257         therfore is not Tag_Indeterminate, even if the function is marked as
4258         dispatching on result.
4259
4260 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4261
4262         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
4263         (Expand_N_Free_Statement): Add a guard to protect against run-times
4264         which do not support controlled types.
4265         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
4266         against run-times which do not support controlled types.
4267         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
4268         against run-times which do not support controlled types.
4269         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
4270         against run-times which do not support controlled types.
4271         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
4272         protect against run-times which do not support controlled types.
4273
4274 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4275
4276         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
4277         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
4278
4279 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4280
4281         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
4282         modified in the source, to prevent spurious warnings when compiling
4283         with -gnatg.
4284
4285 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4286
4287         * a-except-2005.adb: Minor reformatting.
4288
4289 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4290
4291         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
4292         is a renaming declaration in the private part of a package, do not emit
4293         a warning that the with_clause could be moved because the renaming may
4294         be used in the body or in a child unit.
4295
4296 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4297
4298         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4299         Propagate the Comes_From_Source attribute from the original return
4300         object to the renaming.
4301
4302 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4303
4304         * exp_ch7.adb (Build_Raise_Statement): Do not call
4305         Raise_From_Controlled_Operation when this routine is not present in
4306         the run-time library.
4307         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
4308         libraries (Ravenscar), tasks are non-terminating, and protected objects
4309         and tasks can only appear at library level, so we do not want
4310         finalization of protected objects nor tasks.
4311         * exp_intr.adb: Minor clarification in comment.
4312         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
4313         Gen_Output_File_C): Remove references to finalization of library-level
4314         objects when using restricted run-time libraries.
4315
4316 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4317
4318         * sem_ch3.adb (Build_Discriminant_Constraints): Set
4319         Original_Discriminant only if the parent type is a generic formal.
4320
4321 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4322
4323         * exp_ch13.adb: Add with and use clause for Targparm;
4324         (Expand_N_Free_Statement): Prevent the generation of a custom
4325         Deallocate on .NET/JVM targets since this requires pools and address
4326         arithmetic.
4327         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
4328         .NET/JVM targets, attach the newly allocated object to the access
4329         type's finalization collection. Do not generate a call to
4330         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
4331         exist in the runtime.
4332         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
4333         create a custom Allocate for object that do not require initialization.
4334         Attach a newly allocated object to the access type's finalization
4335         collection on .NET/JVM.
4336         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
4337         assignment of controlled types on .NET/JVM. The two hidden pointers
4338         Prev and Next and stored and later restored after the assignment takes
4339         place.
4340         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
4341         kludge for .NET/JVM to recognize a particular piece of code coming from
4342         Heap_Management and change the call to Finalize into Deep_Finalize.
4343         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
4344         finalization collections on .NET/JVM only for types derived from
4345         Controlled. Separate the association of storage pools with a collection
4346         and only allow it on non-.NET/JVM targets.
4347         (Make_Attach_Call): New routine.
4348         (Make_Detach_Call): New routine.
4349         (Process_Object_Declarations): Suppress the generation of
4350         build-in-place return object clean up code on .NET/JVM since it uses
4351         pools.
4352         * exp_ch7.ads (Make_Attach_Call): New routine.
4353         (Make_Detach_Call): New routine.
4354         * exp_intr.adb Add with and use clause for Targparm.
4355         (Expand_Unc_Deallocation): Detach a controlled object from a collection
4356         on .NET/JVM targets.
4357         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
4358         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
4359         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
4360         names used in finalization.
4361
4362 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4363
4364         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
4365         (Attach, Detach): Lock the current task when chaining an object onto a
4366         collection.
4367
4368 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4369
4370         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
4371         Rewritten to create the message strings when the exception is not
4372         raised by an abort during finalization.
4373         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
4374         Raise_From_Controlled_Operation and update its associated comment.
4375         * a-fihema.ads, a-fihema.adb: New GNAT unit.
4376         Ada.Finalization.Heap_Management provides key functionality
4377         associated with controlled objects on the heap, their creation,
4378         finalization and reclamation. Type Finalization_Collection is
4379         effectively a wrapper which sits ontop of a storage pool and performs
4380         all necessary bookkeeping for all the objects it contains. Each
4381         access-to-controlled or access-to-class-wide type receives a collection
4382         as part of its expansion. The compiler generates buffer code and
4383         invokes Allocate / Deallocate to create and destroy allocated
4384         controlled objects.
4385         * a-finali.adb ("="): Removed.
4386         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
4387         fields Prev and Next.
4388         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
4389         A library unit with at least one controlled object on the library level
4390         has a special finalizer which is invoked by the binder. To signal this,
4391         ali files carry field PF.
4392         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
4393         associated comment on field usage.
4394         * a-tags.adb (Get_RC_Offset): Removed.
4395         (Needs_Finalization): New routine.
4396         * a-tags.ads: Update the structure of the GNAT dispatch tables.
4397         Dispatch tables now carry field Needs_Finalization which provides
4398         runtime indication whether a type is controlled or has controlled
4399         components or both. Remove field RC_Offset.
4400         (Get_RC_Offset): Removed along with its associated pragma Export.
4401         Since tagged types with controlled components no longer carry hidden
4402         field _controller, the special mechanism to retrieve its location is no
4403         longer needed.
4404         (Needs_Finalization): New routine.
4405         * atree.ads, atree.adb (Elist24): New routine.
4406         (Set_Elist24): New routine.
4407         * atree.h: Add a define clause for Elist24.
4408         * bindgen.adb New library-level variable Lib_Final_Built.
4409         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
4410         presence of a VM target, the routine generates calls to the proper
4411         library finalization routine.
4412         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
4413         targets. Set the correct library finalization routine depending on
4414         whether the library has controlled objects or this is a VM compilation.
4415         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
4416         to library-level finalizers of compiled units in reverse order of
4417         elaboration. It also produces exception management code and reraises a
4418         potential exception after all units have been finalized.
4419         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
4420         library-level finalizers of compiled units in reverse order of
4421         elaboration.
4422         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
4423         definitions of all library-level finalizers available to the compilation
4424         (Gen_Main_Ada): Directly call Adafinal which now contails all target
4425         dependent code.
4426         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
4427         System.Standard_Library.Adafinal directly. If the library needs
4428         finalization actions, create the sequence of finalization calls.
4429         (Gen_Output_File_Ada): Alphabetize local variables and constants.
4430         Generate a with clause for System.Soft_Links when compiling for a VM.
4431         Remove the code which imports System.Standard_Library.Adafinal as
4432         Do_Finalize. Generate the library finalization routine.
4433         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
4434         If the library needs finalization actions, create all the definitions
4435         of library- level finalizers.
4436         (Has_Finalizer): New routine. Determines whether at least one compiled
4437         unit has a library-level finalizer.
4438         Add type Qualification_Mode.
4439         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
4440         * einfo.adb: New usage of field 15 as Return_Flag.
4441         Remove Finalization_Chain_Entity from the usages of field 19.
4442         Remove Associated_Final_Chain from the usages of field 23.
4443         New usage of field 23 as Associated_Collection.
4444         New usage of field 24 as Finalizer.
4445         New usage of flag 252 as Is_Processed_Transient.
4446         (Associated_Final_Chain): Removed.
4447         (Associated_Collection): New routine.
4448         (Finalization_Chain_Entity): Removed.
4449         (Finalizer): New routine.
4450         (Is_Finalizer): New routine.
4451         (Is_Processed_Transient): New routine.
4452         (Return_Flag): New routine.
4453         (Set_Associated_Final_Chain): Removed.
4454         (Set_Associated_Collection): New routine.
4455         (Set_Finalization_Chain_Entity): Removed.
4456         (Set_Finalizer): New routine.
4457         (Set_Is_Processed_Transient): New routine.
4458         (Set_Return_Flag): New routine.
4459         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
4460         displayed flags.
4461         (Write_Field8_Name): Alphabetize the output.
4462         (Write_Field11_Name): Alphabetize the output.
4463         (Write_Field12_Name): Alphabetize the output.
4464         (Write_Field13_Name): Alphabetize the output.
4465         (Write_Field14_Name): Alphabetize the output.
4466         (Write_Field15_Name): Alphabetize the output.
4467         (Write_Field16_Name): Alphabetize the output.
4468         (Write_Field17_Name): Alphabetize the output.
4469         (Write_Field18_Name): Alphabetize the output.
4470         (Write_Field19_Name): Alphabetize the output. Remove the output of
4471         Finalization_Chain_Entity.
4472         (Write_Field20_Name): Alphabetize the output.
4473         (Write_Field21_Name): Alphabetize the output.
4474         (Write_Field22_Name): Alphabetize the output.
4475         (Write_Field23_Name): Alphabetize the output. Remove the output of
4476         Associated_Final_Chain. Add output for Associated_Collection.
4477         (Write_Field24_Name): Alphabetize the output.
4478         (Write_Field25_Name): Add output for Finalizer.
4479         (Write_Field26_Name): Alphabetize the output.
4480         (Write_Field27_Name): Alphabetize the output.
4481         (Write_Field28_Name): Alphabetize the output.
4482         * einfo.ads: Add new field description for Associated_Collection and
4483         its uses in nodes.
4484         Remove Associated_Final_Chain and its uses in nodes.
4485         Remove Finalization_Chain_Entity and its uses in nodes.
4486         Add new field description for Finalizer and its uses in nodes.
4487         Add new synthesized attribute Is_Finalizer.
4488         Add new flag description for Is_Processed_Transient and its uses in
4489         nodes.
4490         Add new field description for Return_Flag and its uses in nodes.
4491         (Associated_Final_Chain): Removed along with its pragma Inline.
4492         (Associated_Collection): New routine and pragma Inline.
4493         (Finalization_Chain_Entity): Removed along with its pragma Inline.
4494         (Finalizer): New routine and pragma Inline.
4495         (Is_Finalizer): New routine and pragma Inline.
4496         (Is_Processed_Transient): New routine and pragma Inline.
4497         (Return_Flag): New routine and pragma Inline.
4498         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
4499         (Set_Associated_Collection): New routine and pragma Inline.
4500         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
4501         (Set_Finalizer): New routine and pragma Inline.
4502         (Set_Is_Processed_Transient): New routine and pragma Inline.
4503         (Set_Return_Flag): New routine and pragma Inline.
4504         * exp_aggr.adb: Alphabetize subprograms.
4505         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
4506         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
4507         associated comments. Remove local variables External_Final_List and
4508         Attach.
4509         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
4510         Ancestor. Remove the retrieval of finalization lists. Update the call to
4511         Make_Adjust_Call.
4512         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
4513         lists. Update the call to Late_Expansion.
4514         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
4515         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
4516         (Gen_Assign): Remove the retrieval of the finalization list used to
4517         build the assignment. Update the calls to Make_Init_Call and
4518         Make_Adjust_Call.
4519         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
4520         Remove the mechanism to determine attachment levels and finalization
4521         list retrieval. Remove the processing for coextensions.
4522         (Init_Controller): Removed. Controllers no longer exist.
4523         (Late_Expansion): Remove formals Flist and Obj along with their
4524         associated comments. Update the calls to Build_Record_Aggr_Code and
4525         Build_Array_Aggr_Code.
4526         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
4527         (Expand_N_Freeze_Entity): Add special processing for finalizers which
4528         appear in entry bodies, protected subprograms and task bodies.
4529         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
4530         * exp_ch3.adb (Add_Final_Chain): Removed.
4531         (Build_Array_Init_Proc): Alphabetize local variables.
4532         (Build_Assignment): Alphabetize local variables. Update the call to
4533         Maked_Adjust_Call.
4534         (Build_Class_Wide_Master): Rename local variables to better reflect
4535         their role.
4536         (Build_Discriminant_Assignments): Code reformatting.
4537         (Build_Init_Call_Thru): Code reformatting.
4538         (Build_Init_Procedure): Code reformatting. Generate a special version
4539         of Deep_Finalize which is capable of finalizing all initialized
4540         components and ignore the rest.
4541         (Build_Init_Statements): Rename local variables to better reflect their
4542         role.
4543         Reimplement the mechanism to include the creation and update of an index
4544         variable called a "counter". It is used as a bookmark for tracing
4545         initialized and non-initialized components.
4546         (Build_Initialization_Call): Remove local variable Controller_Typ.
4547         Alphabetize all local variables. Remove the initialization of the
4548         record controller and update the call to Make_Init_Call.
4549         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
4550         New local variable Counter.
4551         (Constrain_Array): Alphabetize.
4552         (Expand_Freeze_Array_Type): Create a collection instead of a
4553         finalization list.
4554         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
4555         Finalize_Address which is used in conjunction with allocated controlled
4556         objects.
4557         (Expand_N_Object_Declaration): Remove the creation of a finalization
4558         list for anonymous access types. Update the calls to Make_Init_Call and
4559         Make_Adjust_Call.
4560         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
4561         retrieval of finalization lists. Remove the expansion of the record
4562         controller. Create TSS primitive Finalize_Address used in conjunction
4563         with controlled objects on the heap. Create finalization collections
4564         for access-to-controlled record components.
4565         (Expand_Record_Controller): Removed.
4566         (Freeze_Type): Remove the freezing of record controllers. Freezing of
4567         class-wide types now requires additional processing. Create
4568         finalization collections for access-to-controlled types.
4569         (Increment_Counter): New routine.
4570         (Make_Counter): New routine.
4571         (Make_Eq_If): Remove the mention of Name_uController.
4572         (Make_Predefined_Primitive_Specs): There is no longer need to skip
4573         types coming from System.Finalization_Root.
4574         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
4575         (Predefined_Primitive_Bodies): There is no longer need to skip types
4576         coming from System.Finalization_Root.
4577         (Stream_Operation_OK): Do not generate stream routines for
4578         type Ada.Finalization.Heap_Management.Finalization_Collection.
4579         * exp_ch3.ads: Alphabetize subprograms.
4580         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
4581         Add with and use clause for Lib.
4582         (Complete_Coextension_Finalization): Removed.
4583         (Complete_Controlled_Allocation): New routine. Create a finalization
4584         collection for anonymous access-to-controlled types. Create a custom
4585         Allocate which interfaces with the back end and the machinery in
4586         Heap_Management.
4587         (Expand_Allocator_Expression): Add necessary calls to
4588         Complete_Controlled_Allocation. Remove the retrieval of finalization
4589         lists. Update the calls to Make_Adjust_Call. Generate a call to
4590         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4591         the associated collection.
4592         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
4593         Code clean up. Remove the retrieval of finalization lists and
4594         attachment levels.
4595         Update the call to Make_Init_Call. Generate a call to
4596         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4597         the associated collection.
4598         (Get_Allocator_Final_List): Removed. Finalization lists are not
4599         available.
4600         (Suitable_Element): Remove the mention of Name_uController.
4601         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
4602         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
4603         the left hand side, carry out the assignment and adjust the left hand
4604         side.
4605         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
4606         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
4607         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
4608         BIP_Collection and BIPcollection.
4609         (Build_Heap_Allocator): New routine used to allocate the return object
4610         of a build-in-place function onto a collection.
4611         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
4612         (Expand_Call): Do not replace direct calls to Deep routines with their
4613         aliases.
4614         (Expand_N_Extended_Return_Statement): Give all variables shorter names
4615         and update their occurrences. Add a special return flag to monitor the
4616         [ab]normal execution of the function. The flag is set right before the
4617         return statement.
4618         Rewrite the mechanism used to allocate a build-in-place return object
4619         on the heap or on a storage pool.
4620         (Is_Direct_Deep_Call): New routine.
4621         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
4622         build-in-place function call instead of a final list. Build a call to
4623         Set_Finalize_Address_Ptr to decorate the associated collection.
4624         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
4625         order to name the build-in-place function call's result for later
4626         finalization. Add a collection to a build-in-place function call
4627         instead of a final list.
4628         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
4629         build-in-place function call instead of a final list. Remove the code
4630         which moves one final list and transforms it into the actual in a
4631         nested build-in-place call.
4632         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
4633         build-in-place function call instead of a final list.
4634         (Move_Final_List): Removed.
4635         (Needs_BIP_Collection): New routine.
4636         (Needs_BIP_Final_List): Removed.
4637         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
4638         enumeration type BIP_Formal_Kind.
4639         Update the related comment.
4640         (Needs_BIP_Collection): New routine.
4641         (Needs_BIP_Final_List): Removed.
4642         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
4643         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
4644         majority of subprograms in this unit. Add Name_Finalize_Address to
4645         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
4646         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
4647         statements for an array type.
4648         (Build_Adjust_Statements): Create the adjust statements for a record
4649         type.
4650         (Build_Cleanup_Statements): New routine. A procedure which given any
4651         construct containing asynchronous calls, references to _master, or is a
4652         task body, a task allocation or a protected body produces the necessary
4653         runtime calls to clean up these constructs.
4654         (Build_Exception_Handler): New routine.
4655         (Build_Final_List): Removed.
4656         (Build_Finalization_Collection): New routine. A core procedure which
4657         creates a collection to service heap allocated controlled objects
4658         associated with an access-to-controlled type.
4659         (Build_Finalize_Statements): Create the finalization statements for a
4660         record types.
4661         (Build_Finalizer): New routine. A core procedure which given any
4662         construct with declarations and/or statements detects all objects which
4663         need any type of clean up (controlled objects, protected objects) and
4664         generates all necessary code to clean up the said objects in the proper
4665         order.
4666         (Build_Finalizer_Call): New routine.
4667         (Build_Initialize_Statements): Create the initialization statements for
4668         an array type. The generated routine contains code to finalize partially
4669         initialized arrays.
4670         (Build_Object_Declarations): New routine.
4671         (Build_Raise_Statement): New routine.
4672         (Clean_Simple_Protected_Objects): Removed.
4673         (Controller_Component): Removed.
4674         (Enclosing_Function): New routine.
4675         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
4676         either declarations or statements or both.
4677         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
4678         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
4679         package.
4680         (Find_Final_List): Removed.
4681         (Global_Flist_Ref): Removed.
4682         (In_Finalization_Root): Removed.
4683         (Insert_Actions_In_Scope_Around): Determine the range of the transient
4684         scope in terms of tree nodes. Process all transient variables within
4685         that range.
4686         (Make_Adjust_Call): Rewritten. There is no longer an attach call
4687         generated after the adjust.
4688         (Make_Attach_Call): Removed.
4689         (Make_Call): New routine.
4690         (Make_Clean): Removed.
4691         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
4692         build routines.
4693         (Make_Deep_Proc): Rewritten to generate the new profile signature used
4694         in Deep routines.
4695         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
4696         build routines.
4697         (Make_Final_Call): Modified to simply create a call to either
4698         Deep_Finalize or Finalize.
4699         (Make_Finalize_Address_Body): New routine.
4700         (Make_Finalize_Address_Stmts): New routine. A function which produces
4701         TSS primitive Finalize_Address used in conjunction with heap allocated
4702         controlled objects.
4703         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
4704         (Make_Init_Call): Rewritten. There is no longer an attach call
4705         generated after initialization.
4706         (Make_Local_Deep_Finalize): New routine.
4707         (Make_Set_Finalize_Address_Ptr_Call): New routine.
4708         (Make_Transient_Block): Remove the finalization list retrieval and
4709         manipulation.
4710         (Needs_Finalization): Moved to Exp_Util.
4711         (Parent_Field_Type): New routine.
4712         (Preprocess_Components): New routine.
4713         (Process_Transient_Objects): New routine.
4714         (Wrap_HSS_In_Block): New routine.
4715         (Wrap_Transient_Declaration): Remove finalization list management and
4716         controller insertion.
4717         (Wrap_Transient_Expression): Code reformatting.
4718         (Wrap_Transient_Statement): Code reformatting.
4719         * exp_ch7.ads (Build_Final_List): Removed.
4720         (Build_Finalization_Collection): New routine.
4721         (Build_Raise_Statement): New routine.
4722         (Controller_Component): Removed.
4723         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
4724         (Find_Final_List): Removed.
4725         (In_Finalization_Root): Removed.
4726         (Is_Simple_Protected_Type): Update related comment.
4727         (Make_Adjust_Call): New parameter profile and associated comments.
4728         (Make_Attach_Call): Removed.
4729         (Make_Final_Call): New parameter profile and associated comments.
4730         (Make_Finalize_Address_Body): New routine.
4731         (Make_Init_Call): New parameter profile and associated comments.
4732         (Make_Local_Deep_Finalize): New routine.
4733         (Make_Set_Finalize_Address_Ptr_Call): New routine.
4734         (Needs_Finalization): Moved to Exp_Util.
4735         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
4736         (Expand_N_Protected_Body): Remove the handling of finalization lists.
4737         (Find_Protection_Type): Moved to Exp_Util.
4738         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
4739         (Make_DT): Update sequence of dispatch table initialization. Remove the
4740         initialization of field RC_Offset. Add initialization of field Needs_
4741         Finalization.
4742         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
4743         Reimplement how an object is first finalized, then deallocated.
4744         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4745         Code reformatting.
4746         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
4747         Register TSS_Finalize_Address with type TSS_Names.
4748         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
4749         procedure provides the interface between an allocation / deallocation
4750         and the support machinery in Ada.Finalization.Heap_Management.
4751         (Find_Init_Call): Code reformatting.
4752         (Find_Init_Call_In_List): Code reformatting.
4753         (Find_Protection_Type): Moved from Exp_Ch9.
4754         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
4755         (Has_Controlled_Coextensions): Removed.
4756         (Has_Controlled_Objects): New routine.
4757         (In_Library_Level_Package_Body): New routine.
4758         (Insert_Action_After): New routine.
4759         (Is_Finalizable_Transient): New routine. This predicate determines
4760         whether an object declaration is one of the many variants of controlled
4761         transients.
4762         (Is_Null_Access_BIP_Func_Call): New routine.
4763         (Is_Non_BIP_Func_Call): New routine.
4764         (Is_Related_To_Func_Return): New routine.
4765         (Needs_Finalization): Moved from Exp_Ch7.
4766         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
4767         (Find_Protection_Type): Moved from Exp_Ch9.
4768         (Has_Controlled_Coextensions): Removed.
4769         (Has_Controlled_Objects): New routine.
4770         (In_Library_Level_Package_Body): New routine.
4771         (Insert_Action_After): New routine.
4772         (Is_Finalizable_Transient): New routine.
4773         (Is_Null_Access_BIP_Func_Call): New routine.
4774         (Is_Non_BIP_Func_Call): New routine.
4775         (Is_Related_To_Func_Return): New routine.
4776         (Needs_Finalization): Moved from Exp_ch7.
4777         * expander.adb (Expand): Add a case for N_Free_Statement.
4778         * freeze.adb (Freeze_All): Replace the generation of a finalization
4779         list with a collection for access-to-controlled types.
4780         (Freeze_Entity): Code reformatting.
4781         (Freeze_Record_Type): Remove the freezing of a record controller
4782         component.
4783         (Freeze_Subprogram): Code reformatting.
4784         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
4785         finalization list.
4786         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
4787         has a library-level finalizer.
4788         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
4789         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
4790         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
4791         files. Add a-fihema to the list of object files.
4792         * par-ch4.adb:
4793         Alphabetize the associations in type Is_Parameterless_Attribute.
4794         * rtsfind.ads: Ada.Finalization_List.Controller and
4795         System.Finalization_Implementation are no longer a GNAT unit.
4796         Update the range of type Ada_Finalization_Child. Remove the following
4797         recoverable entities:
4798
4799            RE_Attach_To_Final_List
4800            RE_Deep_Tag_Attach
4801            RE_Finalize_List
4802            RE_Finalize_One
4803            RE_Finalizable_Ptr_Ptr
4804            RE_Global_Final_List
4805            RE_Limited_Record_Controller
4806            RE_List_Controller
4807            RE_Move_Final_List
4808            RE_Record_Controller
4809            RE_Simple_List_Controller
4810
4811         Add the following recoverable entities:
4812
4813            RE_Add_Offset_To_Address
4814            RE_Allocate
4815            RE_Base_Pool
4816            RE_Deallocate
4817            RE_Exception_Identity
4818            RE_Finalization_Collection
4819            RE_Finalization_Collection_Ptr
4820            RE_Needs_Finalization
4821            RE_Save_Library_Occurrence
4822            RE_Set_Finalize_Address_Ptr
4823            RE_Set_Storage_Pool_Ptr
4824            RE_Storage_Count
4825         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
4826         Name_uController.
4827         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
4828         (First_Stored_Discriminant): Remove the mention of Name_uController.
4829         * sem_aux.ads: Comment reformatting.
4830         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
4831         to redecorate an already existing class-wide type.
4832         (Decorate_Tagged_Type): New parameter profile and associated comment.
4833         Create a "shadow class-wide type" for a shadow entity.
4834         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
4835         of the final chain along with the associated comment.
4836         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
4837         Full_Desig and set it to the full view of the designated type.
4838         Initialize the finalization collection to empty.
4839         (Build_Derived_Record_Type): Alphabetize local variables. Code
4840         reformatting.
4841         (Collect_Fixed_Components): Remove the mention of Name_uController.
4842         (Create_Constrained_Components): Remove the mention of Name_uController.
4843         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
4844         class-wide type of a shadow entity.
4845         (Process_Full_View): Update the machinery which marks type
4846         Limited_Controlled's entity as limited.
4847         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
4848         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
4849         list, instead make a collection build-in-place formal.
4850         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
4851         a designated type in order to establish a match between the renaming
4852         and the renamed entity.
4853         (Find_Selected_Component): Add guard to prevent spurious exceptions
4854         from being raised on .NET/JVM.
4855         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
4856         to the list of primitive that need special processing. Update arrays
4857         C_Names and D_Names.
4858         (Replace_Types): Handle class-wide types.
4859         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
4860         different parameter profile, look at the first formal.
4861         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
4862         use clauses for Exp_Util.
4863         * sem_res.adb: Remove with and use clauses for Elists.
4864         (Propagate_Coextensions): Removed.
4865         (Resolve_Allocator): Do not propagate the list of coextensions from one
4866         allocator to another.
4867         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
4868         Deaccessed_T to Desig_Typ.
4869         (Enter_Name): Remove the mention of Name_uController.
4870         (Gather_Components): Remove the mention of Name_uController.
4871         (Incomplete_Or_Private_View): New routine.
4872         (Is_Coextension_Root): Removed.
4873         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
4874         * sem_util.ads (Incomplete_Or_Private_View): New routine.
4875         (Is_Coextension_Root): Removed.
4876         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
4877         Controlled types are now derived from a null tagged record. Remove
4878         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
4879         * sinfo.adb (Coextensions): Removed.
4880         (Set_Coextensions): Removed.
4881         * sinfo.ads: Remove Coextensions from the explanation of node fields
4882         and its uses in nodes.
4883         Update the field usage of N_Allocator.
4884         (Coextensions): Removed along with its pragma Inline.
4885         (Set_Coextensions): Removed along with its pragma Inline.
4886         * snames.ads-tmpl: Remove names
4887
4888           Name_uClean
4889           Name_uController
4890           Name_uFinal_List
4891           Name_uLocal_Final_List
4892           Name_Finalization_Root
4893           Name_Next
4894           Name_Prev
4895
4896         Add names
4897
4898           Name_uFinalizer
4899           Name_Finalize_Address
4900         * s-pooglo.adb (Allocate): Add overriding indicator.
4901         (Deallocate): Add overriding indicator.
4902         (Storage_Size): Add overriding indicator.
4903         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
4904         than Finalize_Global_List.
4905         (Null_Finalize_Global_List): Removed.
4906         (Save_Library_Occurrence): New routine.
4907         * s-soflin.ads: Remove variable Finalize_Global_List along with its
4908         initialization. Add variable Finalize_Library_Objects along with its
4909         pragma Export. Add variables Library_Exception and
4910         Library_Exception_Set along with their pragma Export.
4911         (Null_Finalize_Global_List): Removed.
4912         (Save_Library_Occurrence): New routine.
4913         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
4914         rather than Finalize_Global_List.
4915         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
4916         of the constructed node.
4917
4918 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4919
4920         * link.c: Include "auto-host.h" before system headers.
4921
4922 2011-08-03  Vincent Celier  <celier@adacore.com>
4923
4924         * make.adb (Gnatmake): Add to table Library_Projs only library projects
4925         that are not extended. Do not check if a library project that is
4926         extended should be regenerated. Do not add to table Library_Paths the
4927         libraries that are in extended projects. Link only with libraries that
4928         are in libray projects that are not extended.
4929         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
4930         for a library project that is extended.
4931
4932 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4933
4934         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
4935         conforming subprogram renamings that appear to be completions if they
4936         are not fully conformant.
4937         Such renamings are homographs but not completions.
4938         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
4939         names in a subprogram renaming that appears in an instance.
4940
4941 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4942
4943         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
4944         not immutably limited, build actual subtype from expression to provide
4945         proper bounds to caller.
4946
4947 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4948
4949         * sem_ch8.adb: Minor comment correction.
4950
4951 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4952
4953         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
4954         returning a limited array, use an extended return statement.
4955
4956 2011-08-03  Vincent Celier  <celier@adacore.com>
4957
4958         * make.adb (Initialize): If --subdirs= is used, but no project file is
4959         specified, attempt to create the specify subdir if it does not already
4960         exist and use it as the object directory as if -D had been specified.
4961
4962 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4963
4964         * s-tpopsp-vms.adb: New file.
4965         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4966         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4967
4968 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4969
4970         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4971         package.
4972
4973 2011-08-03  Yannick Moy  <moy@adacore.com>
4974
4975         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4976         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4977         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4978         detect that an array has static bounds.
4979
4980 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4981
4982         * exp_dist.adb: Minor reformatting.
4983
4984 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4985
4986         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4987         (ATCB_Key): Removed, not always used.
4988
4989 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4990
4991         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4992         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4993         most remaining global variables.
4994
4995 2011-08-03  Robert Dewar  <dewar@adacore.com>
4996
4997         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4998         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4999         reformatting.
5000
5001 2011-08-03  Javier Miranda  <miranda@adacore.com>
5002
5003         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
5004         that must be passed by copy in VM targets.
5005
5006 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5007
5008         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
5009         duplicates a similar htable now in the project tree.
5010
5011 2011-08-03  Claire Dross  <dross@adacore.com>
5012
5013         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
5014         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
5015         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
5016         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
5017         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
5018         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
5019         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
5020         update.
5021
5022 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5023
5024         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
5025         (ATCB_Key): Removed, not always used.
5026         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
5027         s-taprop-posix.adb.
5028         * s-tpopsp-tls.adb: New file.
5029         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
5030         x86/x64/ia64/powerpc/sparc Linux.
5031
5032 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5033
5034         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
5035         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
5036
5037 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5038
5039         * rtsfind.ads, exp_dist.adb, exp_dist.ads
5040         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
5041         Fix type selection for mapping integer types to PolyORB types.
5042
5043 2011-08-03  Bob Duff  <duff@adacore.com>
5044
5045         * sem_ch7.adb: Minor comment clarification.
5046
5047 2011-08-03  Bob Duff  <duff@adacore.com>
5048
5049         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
5050         an error analyzing a choice, skip further processing. Further
5051         processing could cause a crash or cascade errors.
5052
5053 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5054
5055         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
5056         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
5057         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
5058         prj-env.ads (Shared_Project_Tree_Data): new type
5059         An aggregate project and its aggregated trees need to share the common
5060         data structures used for lists of strings, packages,... This makes the
5061         code simpler since otherwise we have to pass the root tree (also used
5062         for the configuration file data) in addition to the current project
5063         tree. This also avoids ambiguities as to which tree should be used.
5064         And finally this saves a bit of memory.
5065         (For_Every_Project_Imported): new parameter Tree.
5066         Since aggregated projects are using a different tree, we need to let
5067         the caller know which tree to use to manipulate the returned project.
5068
5069 2011-08-03  Robert Dewar  <dewar@adacore.com>
5070
5071         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
5072         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
5073         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
5074         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
5075
5076 2011-08-03  Javier Miranda  <miranda@adacore.com>
5077
5078         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
5079         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
5080
5081 2011-08-03  Bob Duff  <duff@adacore.com>
5082
5083         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
5084         the Base_Type.
5085
5086 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
5087
5088         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
5089         g-sehash.ads: Fix typo. Update header.
5090
5091 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5092
5093         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
5094         expansion.
5095
5096 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5097
5098         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
5099         prefixes of private types along with records, since the selector may be
5100         a discriminant.
5101         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
5102         private types along with records, since the selector may be a
5103         discriminant.
5104
5105 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5106
5107         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
5108
5109 2011-08-03  Javier Miranda  <miranda@adacore.com>
5110
5111         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
5112         Tagged_Type_Expansion.
5113
5114 2011-08-03  Yannick Moy  <moy@adacore.com>
5115
5116         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
5117         violation when the argument of concatenation is the name of a
5118         constant.
5119
5120 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5121
5122         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
5123         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
5124         (Process_Declarative_Items): new parameter Child_Env.
5125
5126 2011-08-03  Yannick Moy  <moy@adacore.com>
5127
5128         * alfa.ads: Update format of ALFA section in ALI file in order to
5129         add a mapping from bodies to specs when both are present.
5130         (ALFA_Scope_Record): Add components for spec file/scope.
5131         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
5132         present.
5133         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
5134         collected, fill in the spec information when relevant.
5135         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
5136         present.
5137
5138 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5139
5140         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
5141         code unit to decide whether to add internally generated subprograms.
5142
5143 2011-08-03  Javier Miranda  <miranda@adacore.com>
5144
5145         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
5146         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
5147         be handled by copy in VM targets.
5148
5149 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5150
5151         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
5152         code with Makeutl.Get_Switches.
5153         * prj-tree.adb: Update comment.
5154
5155 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5156
5157         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
5158         subprogram with a limited formal that does not support external
5159         streaming.
5160
5161 2011-08-03  Yannick Moy  <moy@adacore.com>
5162
5163         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
5164         continuation line
5165         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
5166         not from current unit in two phases, because it is not possible to
5167         change the table while iterating over its content.
5168         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
5169
5170 2011-08-03  Sergey Rybin  <rybin@adacore.com>
5171
5172         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
5173         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
5174
5175 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5176
5177         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
5178         and the component type is composite, this is ambiguous for predefined
5179         concatenation, but if the node is not overloaded and the entity is a use
5180         -defined function its profile can be used to resolve that aggregate.
5181
5182 2011-08-03  Robert Dewar  <dewar@adacore.com>
5183
5184         * exp_ch4.adb: Minor code cleanup.
5185
5186 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5187
5188         * exp_dist.adb: Do not generate distribution stubs if serious errors
5189         have been diagnosed.
5190
5191 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5192
5193         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
5194         the first formal of a primitive operation, go to the base type to
5195         handle properly an access to a derived type with constrained
5196         discriminants.
5197         * sem_type.adb (Disambiguate): an immediately visible operator hides a
5198         user-defined function that is only use-visible.
5199
5200 2011-08-03  Robert Dewar  <dewar@adacore.com>
5201
5202         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
5203         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
5204         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
5205         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
5206         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
5207         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
5208         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
5209         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
5210
5211 2011-08-03  Robert Dewar  <dewar@adacore.com>
5212
5213         * repinfo.adb (List_Mechanism): Add handling of
5214         Convention_Ada_Pass_By_XXX.
5215         * sem_mech.adb (Set_Mechanism): Ditto.
5216         * sem_prag.adb (Process_Convention): Add entries for
5217         Convention_Ada_Pass_By_XXX.
5218         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
5219
5220 2011-08-03  Pascal Obry  <obry@adacore.com>
5221
5222         * makeutl.adb: Minor reformatting.
5223
5224 2011-08-03  Vincent Celier  <celier@adacore.com>
5225
5226         * fname-uf.adb
5227         (Get_File_Name) If the file cannot be found when there are no config
5228         pragmas file and May_Fail is True, return No_File instead of the file
5229         name, to be consistent.
5230
5231 2011-08-03  Pascal Obry  <obry@adacore.com>
5232
5233         * adaint.c (__gnat_is_executable_file_attr): Avoid access
5234         to null pointer.
5235
5236 2011-08-03  Javier Miranda  <miranda@adacore.com>
5237
5238         * sem_ch13.adb
5239         (Same_Representation): In VM targets the representation of arrays with
5240         aliased components differs from arrays with non-aliased components.
5241
5242 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5243
5244         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
5245         not systematically lower case attribute indexes that contain no "."
5246         Fix definition of several Naming attributes, which take
5247         a unit name as index and therefore should be case insensitive.
5248         Minor refactoring (reduce length of variable names).
5249
5250 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5251
5252         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
5253
5254 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5255
5256         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
5257         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
5258         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
5259         prj-tree.ads (Prj.Tree.Environment): new type.
5260
5261 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5262
5263         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
5264         prj-tree.adb, prj-tree.ads (Environment): new type.
5265
5266 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5267
5268         * prj-tree.ads: Remove unused variable.
5269
5270 2011-08-03  Yannick Moy  <moy@adacore.com>
5271
5272         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
5273         issuing messages related to SPARK restriction violation.
5274
5275 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5276
5277         * sem_ch6.adb: guard against error nodes in return statements.
5278
5279 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5280
5281         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
5282         a warning can only appear on a configuration file, so emit warning
5283         without further checks.
5284
5285 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5286
5287         * s-interr.ads: add overriding keyword.
5288
5289 2011-08-03  Geert Bosch  <bosch@adacore.com>
5290
5291         * exp_attr.adb: Fix minor typo.
5292
5293 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5294
5295         * par-ch4.adb: improve error recovery.
5296
5297 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5298
5299         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
5300         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
5301         to Errout_Handling.
5302
5303 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5304
5305         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
5306         "external" as an attribute name in aggregate projects.
5307
5308 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
5309
5310         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
5311         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
5312         from 0, so we need to adjust.
5313
5314 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5315
5316         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
5317         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
5318
5319 2011-08-03  Yannick Moy  <moy@adacore.com>
5320
5321         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
5322         restriction on overloaded entity if the entity is not an operator.
5323
5324 2011-08-03  Yannick Moy  <moy@adacore.com>
5325
5326         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
5327         restrict.ads: Rename remaining Check_Formal_Restriction* into
5328         Check_SPARK_Restriction*.
5329
5330 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5331
5332         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
5333         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
5334         qualifier.
5335         (Project_Empty): removed
5336         (Empty_Project): new parameter Qualifier
5337         This is used to have fields specific to aggregate projects, cleaner
5338         New field to store the list of aggregated projects.
5339         (Check_Aggregate_Project): removed
5340         (Process_Aggregated_Projects, Free): new subprograms.
5341
5342 2011-08-03  Olivier Hainque  <hainque@adacore.com>
5343
5344         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
5345
5346 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5347
5348         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
5349         explicit dereference of an unconstrained type, create a constrained
5350         subtype for it, as is done for function calls that return an
5351         unconstrained type.
5352
5353 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5354
5355         * g-pehage.adb (Finalize): Avoid possible double-free.
5356
5357 2011-08-03  Steve Baird  <baird@adacore.com>
5358
5359         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
5360         Elab_Spec/Body attrs in CodePeer_Mode.
5361
5362 2011-08-03  Javier Miranda  <miranda@adacore.com>
5363
5364         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
5365         low bound is not known at compile time but they have no others choice.
5366         Done because in this case the bounds can be obtained directly from the
5367         aggregate.
5368
5369 2011-08-03  Ed Falis  <falis@adacore.com>
5370
5371         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
5372         on VxWorks SMP. Remove unusable constant ANY_CPU.
5373
5374 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5375
5376         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
5377         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
5378         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
5379         Prj.Env.Initialize_Empty): new subprograms
5380         (Get_Env, Find_Project): remove parameter Target_Name.
5381
5382 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5383
5384         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
5385         as a condition for the delayed call to Derived_Subprograms done for the
5386         case of the rewriting of a derived type that constrains the
5387         discriminants of its parent type.
5388         Avoids redundant subprogram derivations for private subtype derivations.
5389
5390 2011-08-03  Javier Miranda  <miranda@adacore.com>
5391
5392         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
5393         Build_Record_Aggr_Code.
5394         (Build_Record_Aggr_Code): Add missing support to initialize hidden
5395         discriminants in extension aggregates.
5396
5397 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5398
5399         * prj-pp.adb (Print): also output project qualifiers, since in
5400         particular "aggregate" is mandatory in an aggregate project.
5401
5402 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5403
5404         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
5405         (Debug_Output): new function.
5406
5407 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5408
5409         * gnat_ugn.texi: Document -Wstack-usage.
5410         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
5411
5412 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5413
5414         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
5415         have keyword LIMITED.
5416
5417 2011-08-03  Yannick Moy  <moy@adacore.com>
5418
5419         * alfa.adb, alfa.ads, alfa_test.adb: New files.
5420         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
5421         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
5422         section (does not happen in compiler, only if code directly calls
5423         Scan_ALI).
5424         * get_alfa.adb, get_alfa.ads: New files.
5425         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
5426         needed.
5427         * lib-xref-alfa.adb: New file.
5428         * lib-xref.adb, lib-xref.ads
5429         (Xref_Entry): redefine information needed in cross-references for ALFA.
5430         Push ALFA treatments in separated local package.
5431         (Enclosing_Subpragram_Or_Package): treat specially subprogram
5432         identifiers. Return entity of package body instead of spec. Return
5433         Empty for a scope with no location.
5434         (Generate_Reference): adapt to new components for ALFA information.
5435         Remove the need for D references on definitions.
5436         (Is_Local_Reference): moved to ALFA local package
5437         (Output_References): extract subfunction as Extract_Source_Name
5438         (Output_Local_References): remove procedure, replaced by filtering of
5439         cross-references in package ALFA and printing in Put_ALFA.
5440         (Write_Entity_Name): remove procedure
5441         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
5442         print exact name of entity as it appears in source file
5443         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
5444         * put_alfa.adb, put_alfa.ads: New files.
5445         * xref_lib.adb (Search_Xref): protect read of cross-references against
5446         reading other sections of the ALI file, in gnatxref
5447         (Search): protect read of cross-references against reading other
5448         sections of the ALI file, in gnatfind.
5449         * gcc-interface/Make-lang.in: Update dependencies.
5450
5451 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5452
5453         * sem_ch3.adb: Minor reformatting.
5454
5455 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
5456
5457         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
5458         raising an exception.
5459
5460 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5461
5462         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
5463         type, always use 1 as the lower bound or string, even if lower bound of
5464         context is not static, to handle properly null strings in a non-static
5465         context.
5466
5467 2011-08-03  Bob Duff  <duff@adacore.com>
5468
5469         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
5470         always legal on the right-hand side of an assignment statement; there
5471         is always an applicable index constraint in this case. Therefore, the
5472         check for Pkind = N_Assignment_Statement is now unconditional -- it
5473         doesn't depend on whether Is_Constrained (Typ).
5474
5475 2011-08-03  Robert Dewar  <dewar@adacore.com>
5476
5477         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
5478
5479 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5480
5481         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
5482         for an itype created within a generic unit.
5483
5484 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5485
5486         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
5487         suppresses all inlining.
5488
5489 2011-08-03  Robert Dewar  <dewar@adacore.com>
5490
5491         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
5492         exp_aggr.adb: Minor reformatting.
5493
5494 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5495
5496         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
5497         tagged assignment when discriminant checks are suppressed. This is
5498         useless and extremely costly in terms of static stack usage.
5499
5500 2011-08-03  Bob Duff  <duff@adacore.com>
5501
5502         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
5503         of generics, because this leads to the wrong entity in the wrong scope,
5504         causing (e.g.) pragma Export_Procedure to get an error if the entity is
5505         an instance.
5506         (Process_Interface_Name): Follow Alias for instances of generics, to
5507         correct for the above change.
5508
5509 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5510
5511         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
5512         is an integer literal it is always safe to replace the reference. In
5513         addition, if the reference appears in the generated code for an object
5514         declaration it is necessary to copy because otherwise the reference
5515         might be to the uninitilized value of the discriminant of the object
5516         itself.
5517
5518 2011-08-03  Pascal Obry  <obry@adacore.com>
5519
5520         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
5521         ACL used, in this case we want to check for ending .exe, not .exe
5522         anywhere in the path.
5523
5524 2011-08-03  Sergey Rybin  <rybin@adacore.com>
5525
5526         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5527         the tree structure (semantic decoration of references to record
5528         discriminants).
5529
5530 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5531
5532         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
5533         choices of a named array aggregate, bail out when any choices are
5534         marked as Errors_Posted.
5535
5536 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5537
5538         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
5539         in which entity is frozen, to handle properly loop variables in
5540         iterators.
5541
5542 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5543
5544         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
5545         subtype is not static, compute the upper bound using attributes, to
5546         handle properly index types that are not integer types.
5547
5548 2011-08-03  Bob Duff  <duff@adacore.com>
5549
5550         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
5551         Update copyright notice.
5552
5553 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5554
5555         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
5556         Original_Discriminant if within an instance.
5557         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
5558
5559 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5560
5561         * einfo.ads: Minor reformatting.
5562
5563 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5564
5565         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
5566         composite type with an unfrozen subcomponent, in the profile of a
5567         primitive operation.
5568
5569 2011-08-03  Robert Dewar  <dewar@adacore.com>
5570
5571         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5572
5573 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5574
5575         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
5576         unconstrained type with discriminants is initialized with an aggregate,
5577         use the constrained subtype of the aggregate as the type of the object,
5578         because it is immutable, and this allows the back-end to generate no
5579         code for the object declaration.
5580
5581 2011-08-03  Robert Dewar  <dewar@adacore.com>
5582
5583         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
5584         comparison operand is variable, and turns out to be zero or negative.
5585
5586 2011-08-03  Javier Miranda  <miranda@adacore.com>
5587
5588         * exp_intr.adb
5589         (Expand_Dispatching_Constructor_Call): Disable expansion of
5590         code required for native targets. Done to avoid generating
5591         references to unavailable runtime entities in VM targets.
5592         * exp_ch3.adb
5593         (Expand_N_Object_Declaration): Add missing support to handle
5594         the explicit initialization of class-wide interface objects.
5595         Fix documentation.
5596
5597 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5598
5599         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
5600
5601 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5602
5603         * a-cbdlli.adb (Splice): move source items from first to last
5604
5605 2011-08-03  Yannick Moy  <moy@adacore.com>
5606
5607         * sem_util.ads: comment added.
5608
5609 2011-08-03  Javier Miranda  <miranda@adacore.com>
5610
5611         * exp_aggr.adb
5612         (Expand_Record_Aggregate): In VM targets disable the expansion into
5613         assignments of aggregates whose type is not known at compile time.
5614
5615 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5616
5617         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
5618         protected entries and task entries, to build the proper renaming
5619         declaration for entry formals, used in debugging.
5620         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
5621         parameters in the same way.
5622
5623 2011-08-02  Robert Dewar  <dewar@adacore.com>
5624
5625         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
5626         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
5627         code reorganization.
5628
5629 2011-08-02  Robert Dewar  <dewar@adacore.com>
5630
5631         * debug.adb: Debug flag d.P to suppress length comparison optimization
5632         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
5633         comparison of Length by comparing First/Last instead.
5634
5635 2011-08-02  Matthew Heaney  <heaney@adacore.com>
5636
5637         * a-cobove.ads: Code clean up.
5638
5639 2011-08-02  Vincent Celier  <celier@adacore.com>
5640
5641         * adaint.c (file_names_case_sensitive_cache): New static int.
5642         (__gnat_get_file_names_case_sensitive): Cache the return value in
5643         file_names_case_sensitive_cache at the first invocation, to avoid
5644         multiple calls to getenv.
5645
5646 2011-08-02  Bob Duff  <duff@adacore.com>
5647
5648         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
5649
5650 2011-08-02  Yannick Moy  <moy@adacore.com>
5651
5652         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
5653         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
5654         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
5655         indicate that we are in a precondition or postcondition. This is used in
5656         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
5657         decide whether to flag the spec or body of the current subprogram as
5658         not in ALFA.
5659
5660 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
5661
5662         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
5663         list.
5664         * a-extiin.ads: New file.
5665
5666 2011-08-02  Bob Duff  <duff@adacore.com>
5667
5668         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
5669         now raises Name_Error instead of Use_Error in certain cases. The other
5670         parts of this AI were already implemented properly.
5671
5672 2011-08-02  Vincent Celier  <celier@adacore.com>
5673
5674         * link.c: Only import "auto-host.h" when building the gnattools.
5675
5676 2011-08-02  Yannick Moy  <moy@adacore.com>
5677
5678         * sem_util.adb: Inter-unit inlining does not work for a subprogram
5679         which calls a local subprogram, so extract subprogram
5680         from Mark_Non_ALFA_Subprogram_Body.
5681
5682 2011-08-02  Javier Miranda  <miranda@adacore.com>
5683
5684         * exp_ch9.adb
5685         (Extract_Dispatching_Call): If the type of the dispatching object is an
5686         access type then return an explicit dereference in the Object out-mode
5687         parameter.
5688
5689 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5690
5691         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
5692         compatibility checks for all indexes of an array subtype, not just the
5693         first. Reset Has_Dynamic_Range_Check on the subtype before each
5694         potential check to ensure that Insert_Range_Checks will not elide any
5695         of the dynamic checks.
5696
5697 2011-08-02  Yannick Moy  <moy@adacore.com>
5698
5699         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
5700         SPARK restriction at parsing time.
5701         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
5702         directive only if the SPARK restriction is set for this unit.
5703
5704 2011-08-02  Yannick Moy  <moy@adacore.com>
5705
5706         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
5707         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
5708         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
5709         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
5710         Mark_Non_ALFA_Subprogram_Body.
5711         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
5712         inlined.
5713
5714 2011-08-02  Yannick Moy  <moy@adacore.com>
5715
5716         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
5717         might be costly.
5718
5719 2011-08-02  Robert Dewar  <dewar@adacore.com>
5720
5721         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
5722         exp_ch3.adb: Minor reformatting.
5723
5724 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5725
5726         * adaint.c (__gnat_locate_exec_on_path): only returns executable
5727         files, not any regular file.
5728         (__gnat_locate_file_with_predicate): new subprogram.
5729
5730 2011-08-02  Yannick Moy  <moy@adacore.com>
5731
5732         * sinfo.adb, sinfo.ads: Restrict the use of flags
5733         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
5734         nodes, plus N_Subtype_Declaration for the 2nd one.
5735
5736 2011-08-02  Sergey Rybin  <rybin@adacore.com>
5737
5738         * gnat_rm.texi: Ramification of pragma Eliminate documentation
5739          - fix bugs in the description of Source_Trace;
5740          - get rid of UNIT_NAME;
5741
5742 2011-08-02  Javier Miranda  <miranda@adacore.com>
5743
5744         * exp_ch9.adb
5745         (Build_Dispatching_Requeue): Adding support for VM targets
5746         since we cannot directly reference the Tag entity.
5747         * exp_sel.adb (Build_K): Adding support for VM targets.
5748         (Build_S_Assignment): Adding support for VM targets.
5749         * exp_disp.adb
5750         (Default_Prim_Op_Position): In VM targets do not restrict availability
5751         of predefined interface primitives to compiling in Ada 2005 mode.
5752         (Is_Predefined_Interface_Primitive): In VM targets this service is not
5753         restricted to compiling in Ada 2005 mode.
5754         (Make_VM_TSD): Generate code that declares and initializes the OSD
5755         record. Needed to support dispatching calls through synchronized
5756         interfaces.
5757         * exp_ch3.adb
5758         (Make_Predefined_Primitive_Specs): Enable generation of predefined
5759         primitives associated with synchronized interfaces.
5760         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5761         primitives associated with synchronized interfaces.
5762
5763 2011-08-02  Yannick Moy  <moy@adacore.com>
5764
5765         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5766         statements hidden in SPARK if preceded by the HIDE directive
5767         (Parse_Exception_Handlers): mark each exception handler in a sequence of
5768         exception handlers as hidden in SPARK if preceded by the HIDE directive
5769         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5770         if starting with the HIDE directive
5771         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5772         starting with the HIDE directive; mark the declarations in a private
5773         part as hidden in SPARK if the private part starts with the HIDE
5774         directive
5775         * restrict.adb, restrict.ads
5776         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5777         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5778         argument node belongs to a part which is hidden in SPARK
5779         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5780         parts in SPARK; protect the possibly costly call to
5781         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5782         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5783         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5784         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5785         Tok_SPARK_Hide.
5786         (Scan): recognize special comment starting with '#' and followed by
5787         SPARK keyword "hide" as a HIDE directive.
5788
5789 2011-08-02  Yannick Moy  <moy@adacore.com>
5790
5791         * types.ads, erroutc.ads: Minor reformatting.
5792
5793 2011-08-02  Vincent Celier  <celier@adacore.com>
5794
5795         * link.c: Add response file support for cross platforms.
5796
5797 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5798
5799         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5800         in an association, set parent field of copy before partial analysis.
5801         * sem_res.adb (Resolve_Slice): create reference to itype only when
5802         expansion is enabled.
5803
5804 2011-08-02  Yannick Moy  <moy@adacore.com>
5805
5806         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5807         for new flag denoting which subprogram bodies are in ALFA
5808         * restrict.adb, sem_ch7.adb: Update comment
5809         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5810         sem_ch9.adb, sem_res.adb: Add calls to
5811         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5812         * sem_ch6.adb (Analyze_Function_Return): add calls to
5813         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5814         middle of the body, and extended return.
5815         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5816         False when missing return.
5817         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5818         to True for subprograms whose spec is in ALFA. Remove later on the flag
5819         on the entity used for a subprogram body when there exists a separate
5820         declaration.
5821         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5822         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5823         False, otherwise do nothing.
5824
5825 2011-08-02  Robert Dewar  <dewar@adacore.com>
5826
5827         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5828
5829 2011-08-02  Yannick Moy  <moy@adacore.com>
5830
5831         * sem_ch4.ads: minor formatting.
5832
5833 2011-08-02  Yannick Moy  <moy@adacore.com>
5834
5835         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5836         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5837         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5838         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5839         opt.ads: cleanup of SPARK mode
5840
5841 2011-08-02  Yannick Moy  <moy@adacore.com>
5842
5843         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5844         types.
5845         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5846         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5847         * sem_ch3.adb
5848         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5849         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5850         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5851         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5852         types.
5853         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5854         non-static range.
5855         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5856         functions whose return type is not in ALFA.
5857         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5858         specifications.
5859         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5860         parameter's type is not in ALFA.
5861         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5862         types are in ALFA.
5863
5864 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5865
5866         * sem_ch6 (Analyze_Expression_Function): treat the function as
5867         Inline_Always, and introduce a subprogram declaration for it when it is
5868         not a completion.
5869         * inline.adb (Add_Inlined_Body): recognize bodies that come from
5870         expression functions, so that the back-end can determine whether they
5871         can in fact be inlined.
5872         * sem_util.adb (Is_Expression_Function): predicate to determine whether
5873         a function body comes from an expression function.
5874
5875 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5876
5877         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5878         null exclusions to test Can_Never_Be_Null on the anonymous access types
5879         of the formals rather than testing the formals themselves. Exclude this
5880         check in cases where the Old_Formal is marked as a controlling formal,
5881         to avoid issuing spurious errors for bodies completing dispatching
5882         operations (due to the flag not getting set on controlling access
5883         formals in body specs).
5884         (Find_Corresponding_Spec): When checking full and subtype conformance of
5885         subprogram bodies in instances, pass Designated and E in that order, for
5886         consistency with the expected order of the formals (New_Id followed by
5887         Old_Id).
5888
5889 2011-08-02  Robert Dewar  <dewar@adacore.com>
5890
5891         * sem_ch8.adb: Minor reformatting.
5892
5893 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5894
5895         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5896         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5897         primitive operations of class-wide actuals.
5898
5899 2011-08-02  Javier Miranda  <miranda@adacore.com>
5900
5901         * exp_atag.ads, exp_atag.adb
5902         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5903         since its value is implicitly passed in argument Typ.
5904         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5905         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5906         Build_Common_Dispatching_Select_Statements.
5907
5908 2011-08-02  Robert Dewar  <dewar@adacore.com>
5909
5910         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5911         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5912         Minor reformatting.
5913
5914 2011-08-02  Robert Dewar  <dewar@adacore.com>
5915
5916         * sem_res.adb: Minor reformatting.
5917         * sem_prag.adb: Minor reformatting.
5918
5919 2011-08-02  Javier Miranda  <miranda@adacore.com>
5920
5921         * exp_atag.adb, exp_atags.ads
5922         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5923         by the tagged type Entity. Required to use this routine in the VM
5924         targets since we do not have available the Tag entity in the VM
5925         platforms.
5926         * exp_ch6.adb
5927         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5928         Ada.Tags has not been previously loaded.
5929         * exp_ch7.adb
5930         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5931         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5932         * sem_aux.adb
5933         (Enclosing_Dynamic_Scope): Add missing support to handle the full
5934         view of enclosing scopes. Required to handle enclosing scopes that
5935         are synchronized types whose full view is a task type.
5936         * exp_disp.adb
5937         (Build_VM_TSDs): Minor code improvement to avoid generating and
5938         analyzing lists with empty nodes.
5939         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5940         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5941         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5942         (Make_Disp_Timed_Select_Body): Add support for VM targets.
5943         (Make_Select_Specific_Data_Table): Add support for VM targets.
5944         (Make_VM_TSD): Generate code to initialize the SSD structure of
5945         the TSD.
5946
5947 2011-08-02  Yannick Moy  <moy@adacore.com>
5948
5949         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5950         cross-references section in ALI.
5951         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5952         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5953         Sub).
5954         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5955         subprogram or package entity of a node
5956         (Is_Local_Reference_Type): new function returns True for references
5957         selected in local cross-references.
5958         (Lt): function extracted from Lt in Output_References
5959         (Write_Entity_Name): function extracted from Output_References
5960         (Generate_Definition): generate reference with type 'D' for definition
5961         of objects (object declaration and parameter specification), with
5962         appropriate locations and units, for use in local cross-references.
5963         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5964         references of type 'I' for initialization in object definition.
5965         (Output_References): move part of function Lt and procedure
5966         Write_Entity_Name outside of the body. Ignore references of types 'D'
5967         and 'I' introduced for local cross-references.
5968         (Output_Local_References): new procedure to output the local
5969         cross-references sections.
5970         (Lref_Entity_Status): new array defining whether an entity is a local
5971         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5972         with 'I' type when initialization expression is present.
5973         * get_scos.adb, get_scos.ads: Correct comments and typos
5974
5975 2011-08-02  Javier Miranda  <miranda@adacore.com>
5976
5977         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5978         the JVM target.
5979         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5980         the JVM target.
5981         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5982         TSD support.
5983
5984 2011-08-02  Vincent Celier  <celier@adacore.com>
5985
5986         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5987         (No_Space_Img): New function
5988         (Find_Excluded_Sources): When reading from a file, record the file name
5989         and the line number for each excluded source.
5990         (Mark_Excluded_Sources): When reporting an error, if the excluded
5991         sources were read from a file, include file name and line number in
5992         the error message.
5993
5994 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5995
5996         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5997
5998 2011-08-02  Robert Dewar  <dewar@adacore.com>
5999
6000         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
6001
6002 2011-08-02  Javier Miranda  <miranda@adacore.com>
6003
6004         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
6005         generation of TSDs to the DOTNET compiler.
6006         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
6007         generation of TSDs to the DOTNET compiler.
6008
6009 2011-08-02  Javier Miranda  <miranda@adacore.com>
6010
6011         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
6012         record of all the tagged types declared inside library level package
6013         declarations, library level package bodies or library level subprograms.
6014         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
6015         associated with a given tagged type.
6016         (Build_VM_TSDs): New subprogram.
6017         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
6018         compilation units that are subprograms.
6019         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
6020         compilation units that are package bodies.
6021         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
6022         units that are a package declaration or a package instantiation.
6023         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
6024         reorganization to improve the error generated by the frontend when the
6025         function Ada.Tags.Secondary_Tag is not available.
6026         * rtsfind.ads (RE_Register_TSD): New runtime entity.
6027         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
6028
6029 2011-08-02  Javier Miranda  <miranda@adacore.com>
6030
6031         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
6032
6033 2011-08-02  Robert Dewar  <dewar@adacore.com>
6034
6035         * s-imenne.ads: Minor reformatting.
6036
6037 2011-08-02  Robert Dewar  <dewar@adacore.com>
6038
6039         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
6040         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
6041         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
6042
6043 2011-08-02  Robert Dewar  <dewar@adacore.com>
6044
6045         * einfo.ads (Materialize_Entity): Document this is only for renamings
6046         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
6047         required debug information in the case where we transform the object
6048         declaration into a renaming declaration.
6049         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
6050         object
6051         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
6052         Materialize_Entity.
6053
6054 2011-08-02  Robert Dewar  <dewar@adacore.com>
6055
6056         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
6057         Suppress_Init_Procs.
6058         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
6059         Suppress_Initialization/Initialization_Suppressed.
6060         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
6061         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
6062         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
6063         * sem_prag.adb: New processing for pragma Suppress_Initialization.
6064
6065 2011-08-02  Robert Dewar  <dewar@adacore.com>
6066
6067         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
6068         Minor reformatting.
6069
6070 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6071
6072         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
6073         only have inheritable classwide pre/postconditions.
6074
6075 2011-08-02  Javier Miranda  <miranda@adacore.com>
6076
6077         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
6078         * rtsfind.ads (RE_Check_TSD): New runtime entity.
6079         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
6080         checks if the external tag of a type is the same as the external tag
6081         of some other declaration.
6082
6083 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6084
6085         * s-taskin.ads: Minor reformatting.
6086
6087 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6088
6089         * g-comlin.adb (Display_Help): swap the order in which it prints the
6090         short help and the general usage.
6091
6092 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6093
6094         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
6095         the aspect declarations and attach them to the generic copy for
6096         subsequent analysis.
6097         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
6098         declarations of the generic tree to the new subprogram declarations.
6099         * sem_attr.adb (Check_Precondition_Postcondition): recognize
6100         conditions that apply to a subprogram instance.
6101
6102 2011-08-02  Robert Dewar  <dewar@adacore.com>
6103
6104         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
6105
6106 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6107
6108         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
6109         private type with a tagged full view is not derived in the immediate
6110         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
6111
6112 2011-08-02  Robert Dewar  <dewar@adacore.com>
6113
6114         * exp_ch4.adb: Minor reformatting.
6115
6116 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6117
6118         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
6119         Ada2012 iterator, the loop will be rewritten during expansion into a
6120         while loop with a cursor and an element declaration. Do not analyze the
6121         body in this case, because if the container is for indefinite types the
6122         actual subtype of the elements will only be determined when the cursor
6123         declaration is analyzed.
6124
6125 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6126
6127         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
6128         size/alignment related attributes in CodePeer_Mode.
6129
6130 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6131
6132         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
6133         Prepend_Element, since this can result in the operation getting the
6134         wrong slot in the full type's dispatch table if the full type has
6135         inherited operations. The incomplete type's operation will get added
6136         to the proper position in the full type's primitives
6137         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
6138         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
6139         dispatching operations, since there are cases where nonprimitive
6140         subprograms can get added to the list of incomplete dependents (such
6141         as subprograms in nested packages).
6142         * sem_ch6.adb (Process_Formals): First, remove test for being in a
6143         private part when determining whether to add a primitive with a
6144         parameter of a tagged incomplete type to the Private_Dependents list.
6145         Such primitives can also occur in the visible part, and should not have
6146         been excluded from being private dependents.
6147         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
6148         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
6149         list of a Taft-amendment incomplete type is a primitive before issuing
6150         an error that the full type must appear in the same unit. There are
6151         cases where nonprimitives can be in the list (such as subprograms in
6152         nested packages).
6153         * sem_disp.adb (Derives_From): Use correct condition for checking that
6154         a formal's type is derived from the type of the corresponding formal in
6155         the parent subprogram (the condition was completely wrong). Add
6156         checking that was missing for controlling result types being derived
6157         from the result type of the parent operation.
6158
6159 2011-08-02  Yannick Moy  <moy@adacore.com>
6160
6161         * errout.adb (First_Node): minor renaming
6162         * restrict.adb (Check_Formal_Restriction): put restriction warning on
6163         first node.
6164
6165 2011-08-02  Yannick Moy  <moy@adacore.com>
6166
6167         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
6168         before accessing operands.
6169         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
6170         decide whether an initialization expression respects SPARK rules, as
6171         the plain node is the expanded one. This allows for more valid warnings
6172         to be issued.
6173         * gnat_rm.texi: Minor update.
6174
6175 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6176
6177         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
6178         previous change.
6179
6180 2011-08-02  Robert Dewar  <dewar@adacore.com>
6181
6182         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
6183
6184 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6185
6186         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
6187         loop statements and the element renaming declaration with a block when
6188         the element type is controlled.
6189
6190 2011-08-02  Yannick Moy  <moy@adacore.com>
6191
6192         * sinfo.ads: Minor formatting.
6193
6194 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6195
6196         * sem_aggr.adb (Add_Association): if the association has a box and no
6197         expression, use the Sloc of the aggregate itself for the new
6198         association.
6199         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
6200         the Original_Node.
6201
6202 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6203
6204         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
6205         When a container is provided via a function call, generate a renaming
6206         of the function result. This avoids the creation of a transient scope
6207         and the premature finalization of the container.
6208         * exp_ch7.adb (Is_Container_Cursor): Removed.
6209         (Wrap_Transient_Declaration): Remove the supression of the finalization
6210         of the list controller when the declaration denotes a container cursor,
6211         it is not needed.
6212
6213 2011-08-02  Yannick Moy  <moy@adacore.com>
6214
6215         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
6216         node is from source, instead of the original node being from source.
6217         * sem_aggr.adb
6218         (Resolve_Array_Aggregate): refine the check for a static expression, to
6219         recognize also static ranges
6220         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
6221         Array_Type_Declaration): postpone the test for the type being a subtype
6222         mark after the type has been resolved, so that component-selection and
6223         expanded-name are discriminated.
6224         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
6225         to distinguish the case of an iteration scheme, so that an error is
6226         issed on a non-static range in SPARK except in an iteration scheme.
6227         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
6228         In_Iter_Schm = True.
6229         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
6230         user-defined operators so that they are allowed in renaming
6231         * sem_ch8.adb
6232         (Find_Selected_Component): refine the check for prefixing of operators
6233         so that they are allowed in renaming. Move the checks for restrictions
6234         on selector name after analysis discriminated between
6235         component-selection and expanded-name.
6236         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
6237         concatenation argument of string type if it is static.
6238         * sem_util.adb, sem_util.ads
6239         (Check_Later_Vs_Basic_Declarations): add a new function
6240         Is_Later_Declarative_Item to decice which declarations are allowed as
6241         later items, in the two different modes Ada 83 and SPARK. In the SPARK
6242         mode, add that renamings are considered as later items.
6243         (Enclosing_Package): new function to return the enclosing package
6244         (Enter_Name): correct the rule for homonyms in SPARK
6245         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
6246         from source (result of expansion) to avoid issuing wrong warnings.
6247
6248 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6249
6250         * errout.adb: On anything but an expression First_Node returns its
6251         argument.
6252
6253 2011-08-02  Pascal Obry  <obry@adacore.com>
6254
6255         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6256
6257 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6258
6259         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6260         Set the associated loop as the related expression of internally
6261         generated cursors.
6262         * exp_ch7.adb (Is_Container_Cursor): New routine.
6263         (Wrap_Transient_Declaration): Supress the finalization of the list
6264         controller when the declaration denotes a container cursor.
6265
6266 2011-08-02  Yannick Moy  <moy@adacore.com>
6267
6268         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6269         command line now.
6270         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6271         expression is a simple expression. This check cannot be performed in
6272         the semantics, so just drop it.
6273         (P_Index_Or_Discriminant_Constraint): move check that the index or
6274         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6275         semantics. Other cases were previously checked in the semantics.
6276         * par-ch4.adb (P_Name): move checks that a selector name is not
6277         character literal or an operator symbol to Find_Selected_Component in
6278         the semantics
6279         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6280         declarations are not placed after later declarations in a separate
6281         procedure in Sem_Util (possibly not the best choice?), to be used both
6282         during parsing, for Ada 83 mode, and during semantic analysis, for
6283         SPARK mode.
6284         * par-endh.adb (Check_End): move check that end label is not missing
6285         to Process_End_Label in the semantics
6286         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6287         the special case for SPARK restriction
6288         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6289         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6290         parameter Force to issue the error message even on internal node (used
6291         for generated end label). Call Check_Restriction to check when an error
6292         must be issued. In SPARK mode, issue an error message even if the
6293         restriction is not set.
6294         (Check_Restriction): new procedure with an additional out parameter to
6295         inform the caller that a message has been issued
6296         * sem_aggr.adb: Minor modification of message
6297         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6298         instead of issuing an error message directly
6299         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6300         declarations are not placed after later declarations, by calling
6301         Check_Later_Vs_Basic_Declarations
6302         (Analyze_Subtype_Declaration): move here the check that an index or
6303         discriminant constraint must be a subtype mark. Change the check that
6304         a subtype of String must start at one so that it works on subtype marks.
6305         * sem_ch4.adb (Analyze_Call): move here the check that a named
6306         association cannot follow a positional one in a call
6307         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6308         instead of issuing an error message directly
6309         * sem_ch8.adb (Find_Selected_Component): move here the check that a
6310         selector name is not a character literal or an operator symbol. Move
6311         here the check that the prefix of an expanded name cannot be a
6312         subprogram or a loop statement.
6313         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6314         procedure called from parsing and semantics to check that basic
6315         declarations are not placed after later declarations
6316         (Process_End_Label): move here the check that end label is not missing
6317
6318 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6319
6320         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
6321         representation clause in codepeer mode, since it confuses CodePeer and
6322         does not bring useful info.
6323
6324 2011-08-02  Ed Falis  <falis@adacore.com>
6325
6326         * init.c: initialize fp hw on MILS.
6327
6328 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6329
6330         * errout.adb (First_Node): for bodies, return the node itself (small
6331         optimization). For other nodes, do not check source_unit if the node
6332         comes from Standard.
6333
6334 2011-08-02  Robert Dewar  <dewar@adacore.com>
6335
6336         * exp_ch3.adb: Minor comment additions.
6337         * sem_ch13.adb: Minor reformatting.
6338
6339 2011-08-02  Pascal Obry  <obry@adacore.com>
6340
6341         * make.adb, makeutl.adb: Removes some superfluous directory separator.
6342
6343 2011-08-02  Robert Dewar  <dewar@adacore.com>
6344
6345         * sem_attr.adb: Minor reformatting.
6346
6347 2011-08-02  Robert Dewar  <dewar@adacore.com>
6348
6349         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
6350         (Has_Default_Component_Value): Removed
6351         * einfo.ads Comment updates
6352         (Has_Default_Aspect): Replaces Has_Default_Value
6353         (Has_Default_Component_Value): Removed
6354         * exp_ch13.adb
6355         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
6356         * exp_ch3.adb
6357         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
6358         (Get_Simple_Init_Val): Handle Default_Value aspect
6359         (Needs_Simple_Initialization): Handle Default_Value aspect
6360         * exp_ch3.ads: Needs_Simple_Initialization
6361         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
6362         * par-prag.adb (Pragma_Default[_Component]Value) Removed
6363         * sem_ch13.adb
6364         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
6365         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
6366         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
6367
6368 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6369
6370         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
6371         package containing iteration primitives.
6372         exp_ch5.adb (Expand_Iterator_Loop): ditto.
6373
6374 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6375
6376         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
6377         "of", pre-analyze expression in case it is a function call with
6378         finalization actions that must be placed ahead of the loop.
6379         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
6380         on an Ada2012 iterator, insert them ahead of the rewritten loop.
6381
6382 2011-08-02  Geert Bosch  <bosch@adacore.com>
6383
6384         * cstand.adb (Create_Float_Types): Only consider C's long double for
6385         Long_Long_Float, in addition to double.
6386
6387 2011-08-02  Robert Dewar  <dewar@adacore.com>
6388
6389         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
6390         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
6391         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
6392         Minor reformatting.
6393
6394 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6395
6396         * sem_attr.adb: handle properly 'Result when it is a prefix of an
6397         indexed component.
6398
6399 2011-08-02  Javier Miranda  <miranda@adacore.com>
6400
6401         * einfo.ads, einfo.adb
6402         (Original_Access_Type): Move this attribute to Node26 since there was
6403         an undocumented use of Node21 in E_Access_Subprogram_Type entities
6404         which causes conflicts and breaks the generation of the .NET compiler.
6405         (Interface_Name): Add missing documentation on JGNAT only uses of
6406         this attribute.
6407
6408 2011-08-02  Geert Bosch  <bosch@adacore.com>
6409
6410         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
6411         (Find_Back_End_Float_Type): Likewise
6412         (Create_Back_End_Float_Types): Likewise
6413         (Create_Float_Types): Likewise
6414         (Register_Float_Type): Likewise
6415         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6416         Nlist and split out type selection in new local Find_Base_Type function.
6417         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6418         Nlist
6419         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6420
6421 2011-08-02  Robert Dewar  <dewar@adacore.com>
6422
6423         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6424         alpha order).
6425         * opt.ads: Minor comment change.
6426         * sem_ch12.adb: Minor code reorganization.
6427
6428 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6429
6430         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6431         subtype's list of rep items to the list on the full subtype in the case
6432         where the lists are the same.
6433
6434 2011-08-02  Geert Bosch  <bosch@adacore.com>
6435
6436         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6437         using the one from System.Strings, which also deallocates all strings.
6438
6439 2011-08-02  Geert Bosch  <bosch@adacore.com>
6440
6441         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6442         function.
6443         * gcc-interface/Make-lang.in: Update dependencies.
6444
6445 2011-08-02  Olivier Hainque  <hainque@adacore.com>
6446
6447         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6448         end_locus.
6449
6450 2011-08-02  Javier Miranda  <miranda@adacore.com>
6451
6452         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6453         associated with anonymous access to subprograms.
6454
6455 2011-08-02  Geert Bosch  <bosch@adacore.com>
6456
6457         * opt.ads
6458         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6459         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6460         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6461         (Add_Symbol_Definition): Move to switch-c.adb
6462         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6463         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6464         (Add_Symbol_Definition): Move to switch-c.adb.
6465         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6466         * sem_warn.adb
6467         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6468         Move to warnsw.adb.
6469         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6470         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6471         Move to warnsw.adb.
6472         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6473         (Add_Symbol_Definition): Moved from Prepcomp.
6474         * switch-c.ads: Update copyright notice. Use String_List instead of
6475         Argument_List, removing dependency on System.OS_Lib.
6476
6477 2011-08-02  Yannick Moy  <moy@adacore.com>
6478
6479         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6480         mode on initialization expression which does not respect SPARK
6481         restrictions.
6482         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6483         if the tree referenced by its argument represents an initialization
6484         expression in SPARK, suitable for initializing an object in an object
6485         declaration.
6486
6487 2011-08-02  Javier Miranda  <miranda@adacore.com>
6488
6489         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6490         internally generated access to subprogram with its associated protected
6491         subprogram type.
6492         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6493
6494 2011-08-02  Geert Bosch  <bosch@adacore.com>
6495
6496         * cstand.adb (Register_Float_Type): Print information about type to
6497         register, if the Debug_Flag_Dot_B is set.
6498         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6499         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6500         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6501         with a requested precision of more than Max_Digits digits and no more
6502         than Max_Base_Digits digits, if a range specification is present and the
6503         Predefined_Float_Types list has a suitable type to derive from.
6504         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6505         case of type completion with pragma Import
6506         * sem_prag.adb
6507         (Process_Import_Predefined_Type): Processing to complete a type
6508         with pragma Import. Currently supports floating point types only.
6509         (Set_Convention_From_Pragma): Do nothing without underlying type.
6510         (Process_Convention): Guard against absence of underlying type,
6511         which may happen when importing incomplete types.
6512         (Process_Import_Or_Interface): Handle case of importing predefined
6513         types. Tweak error message.
6514
6515 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6516
6517         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6518         functions to previous change.  Reorganize code slightly.
6519
6520 2011-08-02  Geert Bosch  <bosch@adacore.com>
6521
6522         * back_end.ads (Register_Type_Proc): New call back procedure type for
6523         allowing the back end to provide information about available types.
6524         (Register_Back_End_Types): New procedure to register back end types.
6525         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6526         available types.
6527         * cstand.adb (Back_End_Float_Types): New list for floating point types
6528         supported by the back end.
6529         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6530         (Copy_Float_Type): New procedure to make new copies of predefined types.
6531         (Register_Float_Type): New call back procedure to populate the BEFT list
6532         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6533         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6534         (Create_Float_Types): New procedure to create entities for floating
6535         point types predefined in Standard, and put these and any remaining
6536         BEFTs on the Predefined_Float_Types list.
6537         * stand.ads (Predefined_Float_Types): New list for predefined floating
6538         point types that do not have declarations in package Standard.
6539
6540 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6541
6542         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
6543         entity node for the unit containing the parameter.
6544         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6545         (Add_Inlined_Subprogram): Likewise.
6546         * gcc-interface/Make-lang.in: Update dependencies.
6547
6548 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6549
6550         * s-stusta.adb (Print): Make sure Pos is always initialized to a
6551         suitable value.
6552
6553 2011-08-02  Geert Bosch  <bosch@adacore.com>
6554
6555         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6556
6557 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6558
6559         * sem_type.adb (Covers): Move trivial case to the top and reuse the
6560         computed value of Base_Type.
6561
6562 2011-08-02  Yannick Moy  <moy@adacore.com>
6563
6564         * restrict.adb (Check_Restriction): issue an error for any use of
6565         class-wide, even if the No_Dispatch restriction is not set.
6566         * sem_aggr.adb: Correct typos in comments and messages in formal mode
6567         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6568         when completing a private extension, the type named in the private part
6569         is not the same as that named in the visible part.
6570         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6571         of an inherited primitive operations of a tagged type or type extension
6572         that returns the tagged type.
6573         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6574         function which returns True for an implicit operation inherited by the
6575         derived type declaration for the argument type.
6576         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6577         order.
6578
6579 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6580
6581         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6582         Process_Bounds, to perform analysis with expansion of a range or an
6583         expression that is the iteration scheme for a loop.
6584         (Analyze_Iterator_Specification): If domain of iteration is given by a
6585         function call with a controlled result, as is the case if call returns
6586         a predefined container, ensure that finalization actions are properly
6587         generated.
6588         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6589
6590 2011-08-02  Javier Miranda  <miranda@adacore.com>
6591
6592         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6593         * gcc-interface/Make-lang.in: Update dependencies.
6594
6595 2011-08-02  Javier Miranda  <miranda@adacore.com>
6596
6597         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6598         determine if the analysis is performed using N or Original_Node (N).
6599         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6600         functionality of routine Is_Variable avoids code duplication.
6601         * checks.adb (Determine_Range): Handle temporaries generated by
6602         Remove_Side_Effects.
6603
6604 2011-08-02  Javier Miranda  <miranda@adacore.com>
6605
6606         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6607         expansion of the condition. Required since the previous analysis was
6608         done with expansion disabled (see Resolve_Quantified_Expression) and
6609         hence checks were not inserted and record comparisons have not been
6610         expanded.
6611
6612 2011-08-02  Ed Falis  <falis@adacore.com>
6613
6614         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6615         Update header.
6616
6617 2011-08-02  Bob Duff  <duff@adacore.com>
6618
6619         * opt.ads: Minor comment fix.
6620
6621 2011-08-02  Bob Duff  <duff@adacore.com>
6622
6623         * sem_ch12.adb (Analyze_Package_Instantiation,
6624         Analyze_Subprogram_Instantiation): Turn off style checking while
6625         analyzing an instance. Whatever style checks that apply to the generic
6626         unit should apply, so it makes no sense to apply them in an instance.
6627         This was causing trouble when compiling an instance of a runtime
6628         unit that violates the -gnatyO switch.
6629         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6630         one of the two case statements, causing spurious errors.
6631
6632 2011-08-02  Robert Dewar  <dewar@adacore.com>
6633
6634         * uname.adb: Minor reformatting.
6635         * gnatcmd.adb: Minor reformatting.
6636         * exp_attr.adb: Minor reformatting.
6637
6638 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6639
6640         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6641         No_Dispatching_Calls, do not look for the Assign primitive, because
6642         predefined primitives are not created in this case.
6643
6644 2011-08-02  Bob Duff  <duff@adacore.com>
6645
6646         * stylesw.ads: Minor comment fixes.
6647
6648 2011-08-02  Robert Dewar  <dewar@adacore.com>
6649
6650         * freeze.adb (Add_To_Result): New procedure.
6651
6652 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6653
6654         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6655         time, if the specific run-time routines for handling streams of strings
6656         are not available, use the default mechanism.
6657
6658 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6659
6660         * s-regpat.ads: Fix typo.
6661
6662 2011-08-02  Vincent Celier  <celier@adacore.com>
6663
6664         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6665         not null, call it to create the in memory config project file without
6666         parsing an existing default config project file.
6667
6668 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6669
6670         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6671
6672 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6673
6674         * sem_elim.adb: an abstract subprogram does not need an eliminate
6675         pragma for its descendant to be eliminable.
6676
6677 2011-08-02  Ed Falis  <falis@adacore.com>
6678
6679         * init.c: revert to handling before previous checkin for VxWorks
6680         * s-intman-vxworks.adb: delete unnecessary declarations related to
6681         using Ada interrupt facilities for handling signals.
6682         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6683         * s-intman-vxworks.ads: Import __gnat_install_handler as
6684         Initialize_Interrupts.
6685         * s-taprop-vxworks.adb: Delete Signal_Mask.
6686         (Abort_Handler): change construction of mask to unblock exception
6687         signals.
6688
6689 2011-08-02  Jerome Guitton  <guitton@adacore.com>
6690
6691         * a-except-2005.adb (Raise_From_Signal_Handler): Call
6692         Debug_Raise_Exception before propagation starts.
6693
6694 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6695
6696         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6697         to Restriction_Check_Required.
6698         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6699         * sem_res.adb (Resolve_Call): Likewise.
6700         * sem_attr.adb (Check_Stream_Attribute): Likewise.
6701
6702 2011-08-02  Bob Duff  <duff@adacore.com>
6703
6704         * stylesw.ads: Update comment.
6705         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6706         * errout.ads: Remove obsolete comment.
6707
6708 2011-08-02  Javier Miranda  <miranda@adacore.com>
6709
6710         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6711         (Set_Is_Safe_To_Reevaluate): new procedure.
6712         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6713         assignment is allowed on safe-to-reevaluate variables.
6714         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6715         temporary created to remove side effects in expressions that use
6716         the secondary stack as safe-to-reevaluate.
6717         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6718         variables that are not true constants.
6719
6720 2011-08-02  Robert Dewar  <dewar@adacore.com>
6721
6722         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6723         sem_res.adb, sem_ch6.adb: Minor reformatting.
6724
6725 2011-08-02  Jerome Guitton  <guitton@adacore.com>
6726
6727         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6728
6729 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6730
6731         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6732         not set Overridden_Operation if subprogram is an initialization
6733         procedure.
6734
6735 2011-08-02  Yannick Moy  <moy@adacore.com>
6736
6737         * par-ch6.adb: Correct obsolete name in comments
6738         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6739         which takes two message arguments (existing function takes one), with
6740         second message used for continuation.
6741         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6742         block statements that originate from a source block statement, not
6743         generated block statements
6744         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6745         symmetry with procedure case
6746         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6747         function to issue an error in formal mode if a package specification
6748         contains more than one tagged type or type extension.
6749         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6750         parameters matching formals of tagged types are objects (or ancestor
6751         type conversions of objects), not general expressions. Issue an error
6752         on view conversions that are not involving ancestor conversion of an
6753         extended type.
6754         (Resolve_Type_Conversion): in formal mode, issue an error on the
6755         operand of an ancestor type conversion which is not an object
6756         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6757         procedure so that it works also for actuals of function calls
6758         (Is_Actual_Tagged_Parameter): new function which determines if its
6759         argument is an actual parameter of a formal of tagged type in a
6760         subprogram call
6761         (Is_SPARK_Object_Reference): new function which determines if the tree
6762         referenced by its argument represents an object in SPARK
6763
6764 2011-08-02  Robert Dewar  <dewar@adacore.com>
6765
6766         * sem_ch3.adb: Minor reformatting
6767         Minor comment addition
6768         Minor error msg text change
6769
6770 2011-08-02  Javier Miranda  <miranda@adacore.com>
6771
6772         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6773         function. Used to be more precise when we generate a variable plus one
6774         assignment to remove side effects in the evaluation of the Bound
6775         expressions.
6776         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6777         of the bound expression to force its re-analysis and thus expand the
6778         associated transient scope (if required). Code cleanup replacing the
6779         previous code that declared the constant entity by an invocation to
6780         routine Force_Evaluation which centralizes this work in the frontend.
6781
6782 2011-08-02  Robert Dewar  <dewar@adacore.com>
6783
6784         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6785         (Base_Type): Now uses improved Is_Base_Type function
6786         * einfo.ads (Base_Type): Inline this function
6787
6788 2011-08-02  Robert Dewar  <dewar@adacore.com>
6789
6790         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6791         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6792
6793 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6794
6795         * gcc-interface/Make-lang.in: Update dependencies.
6796         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6797         targets.
6798
6799 2011-08-02  Yannick Moy  <moy@adacore.com>
6800
6801         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6802         non-simple expression used in delta constraint
6803         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6804         index constraint which is not a subtype mark
6805         * par.adb: With and use Restrict
6806         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6807         mode on component type which is not a subtype mark and default
6808         expression on component
6809         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6810         of string which does not have a lower index bound equal to 1
6811         (Array_Type_Declaration): issue an error in formal mode on index or
6812         component type which is not a subtype mark, and on aliased keyword on
6813         component
6814         (Derived_Type_Declaration): issue an error in formal mode on interface,
6815         limited or abstract type
6816         (Record_Type_Declaration): issue an error in formal mode on interface
6817         (Record_Type_Definition): issue an error in formal mode on tagged types
6818         and type extensions not declared in the specification of a library unit
6819         package; on null non-tagged record; on variant part
6820
6821 2011-08-02  Vincent Celier  <celier@adacore.com>
6822
6823         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6824         not declared for qualified library project when Library_Name is not
6825         declared, but Library_Dir is.
6826
6827 2011-08-02  Robert Dewar  <dewar@adacore.com>
6828
6829         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6830         pragmas (affects aspects [Component_]Default_Value
6831         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6832         component type for the resolution
6833
6834 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6835
6836         * einfo.adb (Base_Type): Tune implementation for speed.
6837
6838 2011-08-02  Robert Dewar  <dewar@adacore.com>
6839
6840         * freeze.adb: Minor reformatting.
6841
6842 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6843
6844         * scos.ads: Update comments.
6845
6846 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6847
6848         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6849         base type, because the parent may be a subtype of a private type whose
6850         convention is established in a private part.
6851
6852 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6853
6854         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6855         statement in a block when the expansion of the return expression has
6856         created a finalization chain.
6857         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6858         with the parent node.
6859         Add N_Extended_Return_Statement to handle the case where a transient
6860         object declaration appears in the Return_Object_Declarations list of
6861         an extended return statement.
6862
6863 2011-08-02  Matthew Gingell  <gingell@adacore.com>
6864
6865         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6866         unused parameter 'name'.
6867
6868 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6869
6870         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6871         inherited operation, check whether its alias, which is the source
6872         operastion that it renames, has been marked eliminated.
6873
6874 2011-08-02  Javier Miranda  <miranda@adacore.com>
6875
6876         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6877         in-mode parameter whose type is an access type since it can be used to
6878         modify its designated object. Enforce code that handles as safe an
6879         access type that is not access-to-constant but it is the result of a
6880         previous removal of side-effects.
6881         (Remove_Side_Effects): Minor code reorganization of cases which require
6882         no action. Done to incorporate documentation on new cases uncovered
6883         working in this ticket: no action needed if this routine was invoked
6884         too early and the nodes are not yet decorated.
6885         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6886         to routine Remove_Side_Effects by calls to Force_Evaluation since they
6887         were issued with actuals that are implicitly provided by
6888         Force_Evaluation.
6889
6890 2011-08-02  Robert Dewar  <dewar@adacore.com>
6891
6892         * sem_ch3.adb, sem_res.adb: Minor reformatting.
6893
6894 2011-08-02  Yannick Moy  <moy@adacore.com>
6895
6896         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6897         to issue an error in formal mode on attribute not supported in this mode
6898         (Analyze_Attribute): issue errors on standard attributes not supported
6899         in formal mode.
6900         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6901         comment, and issue error in formal mode on modulus which is not a power
6902         of 2.
6903         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6904         range.
6905         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6906         subtype mark.
6907         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6908         operator on modular type (except 'not').
6909
6910 2011-08-02  Robert Dewar  <dewar@adacore.com>
6911
6912         * gnat_rm.texi: Minor reformatting.
6913
6914 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6915
6916         * s-osinte-linux.ads: Minor comment update and reformatting.
6917         * i-cexten.ads: Make this unit pure, as for its parent.
6918         Will allow its usage in more contexts if needed.
6919
6920 2011-08-02  Robert Dewar  <dewar@adacore.com>
6921
6922         * s-utf_32.ads: Minor comment fix.
6923
6924 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6925
6926         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6927         operation of a tagged synchronized type, handle the case where the
6928         controlling argument is overloaded.
6929
6930 2011-08-02  Yannick Moy  <moy@adacore.com>
6931
6932         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6933         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6934         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6935         SPARK mode and formal verification mode on processing SPARK restriction
6936         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6937         requiring consistency checking.
6938
6939 2011-08-02  Robert Dewar  <dewar@adacore.com>
6940
6941         * sem_res.adb: Minor reformatting.
6942
6943 2011-08-02  Robert Dewar  <dewar@adacore.com>
6944
6945         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6946         a-cforse.ads: Remove unneeded with of Ada.Containers
6947         Remove commented out pragma Inline's
6948         Move specifications of new subprograms to the actual specs
6949
6950 2011-08-02  Yannick Moy  <moy@adacore.com>
6951
6952         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6953         a-cforse.ads: Update comments.
6954
6955 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6956
6957         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6958
6959 2011-08-02  Robert Dewar  <dewar@adacore.com>
6960
6961         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6962         a-cforse.ads, a-cofove.ads: Minor reformatting.
6963
6964 2011-08-02  Claire Dross  <dross@adacore.com>
6965
6966         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6967         a-cofove.ads: Add comments.
6968
6969 2011-08-02  Yannick Moy  <moy@adacore.com>
6970
6971         * gnat_rm.texi: Document formal containers.
6972
6973 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6974
6975         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6976         are empty sections.
6977
6978 2011-08-02  Robert Dewar  <dewar@adacore.com>
6979
6980         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6981         reformatting.
6982
6983 2011-08-02  Robert Dewar  <dewar@adacore.com>
6984
6985         * aspects.adb: New aspects Default_Value and Default_Component_Value
6986         New format of Aspect_Names table checks for omitted entries
6987         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6988         handling of boolean aspects for derived types.
6989         New aspects Default_Value and Default_Component_Value
6990         New format of Aspect_Names table checks for omitted entries
6991         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6992         (Has_Default_Value): New flag
6993         (Has_Default_Component_Value): New flag
6994         (Has_Default_Value): New flag
6995         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6996         table.
6997         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6998         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6999         Default_Value and Default_Component_Value
7000         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
7001         New aspects Default_Value and Default_Component_Value
7002         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
7003         * sprint.adb: Print N_Aspect_Specification node when called from gdb
7004
7005 2011-08-02  Vincent Celier  <celier@adacore.com>
7006
7007         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
7008         inherit library kind.
7009
7010 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7011
7012         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
7013         Minor reformatting.
7014
7015 2011-08-02  Robert Dewar  <dewar@adacore.com>
7016
7017         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
7018
7019 2011-08-02  Yannick Moy  <moy@adacore.com>
7020
7021         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
7022
7023 2011-08-02  Robert Dewar  <dewar@adacore.com>
7024
7025         * impunit.adb: Add comment.
7026
7027 2011-08-02  Yannick Moy  <moy@adacore.com>
7028
7029         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
7030         qualification of aggregates in formal mode
7031         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
7032         another aggregate
7033         (Resolve_Aggregate): complete the test that an aggregate is adequately
7034         qualified in formal mode
7035
7036 2011-08-02  Pascal Obry  <obry@adacore.com>
7037
7038         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
7039         * mlib-prj.adb: Supress warning when compiling binder generated file.
7040         (Build_Library): Supress all warnings when compiling the binder
7041         generated file.
7042
7043 2011-08-02  Yannick Moy  <moy@adacore.com>
7044
7045         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
7046         from here...
7047         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
7048         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
7049         Add with/use clauses to make Check_Formal_Restriction visible
7050
7051 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7052
7053         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
7054         in-parameters when type of the generic formal is private in the generic
7055         spec and non-private in the body.
7056
7057 2011-08-02  Claire Dross  <dross@adacore.com>
7058
7059         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
7060         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
7061         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
7062         * impunit.adb, Makefile.rtl: Take new files into account.
7063
7064 2011-08-02  Robert Dewar  <dewar@adacore.com>
7065
7066         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
7067         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7068
7069 2011-08-02  Yannick Moy  <moy@adacore.com>
7070
7071         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
7072         formal mode
7073         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
7074         matching static array bounds, taking into account the special case of
7075         string literals
7076         * sem_ch3.adb: Typo in comment.
7077
7078 2011-08-02  Yannick Moy  <moy@adacore.com>
7079
7080         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
7081         which issues an error in formal mode if its argument node is originally
7082         from source
7083         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
7084         has a discriminant specification so that it does not include the case
7085         of derived types
7086         (Derived_Type_Declaration): move here the test that a derived type has a
7087         discriminant specification
7088         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
7089         first element of a component association before accessing its choices
7090         (presence of component association is not enough)
7091         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
7092         declaration is a library item before accessing the next element in a
7093         list, as library items are not member of lists
7094         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
7095         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
7096         Check_Formal_Restriction whenever possible.
7097
7098 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7099
7100         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
7101         reference when needed.
7102
7103 2011-08-02  Bob Duff  <duff@adacore.com>
7104
7105         * gnat_ugn.texi: Fix typo.
7106
7107 2011-08-02  Vincent Celier  <celier@adacore.com>
7108
7109         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
7110         archive file name. Do not use the full path name of archives for Open
7111         VMS.
7112
7113 2011-08-02  Robert Dewar  <dewar@adacore.com>
7114
7115         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
7116         Analyze_Aspect_Specifications
7117         * sem_ch13.adb
7118         (Analyze_Aspect_Specifications): New handling for boolean aspects
7119         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
7120         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
7121         sequence for Analyze_Aspect_Specifications
7122         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
7123         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
7124
7125 2011-08-02  Robert Dewar  <dewar@adacore.com>
7126
7127         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
7128         aspects, since these no longer exist.
7129
7130 2011-08-02  Robert Dewar  <dewar@adacore.com>
7131
7132         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
7133         semicolon, do not try to see if there are aspects following it.
7134         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
7135         aspect spec.
7136
7137 2011-08-02  Robert Dewar  <dewar@adacore.com>
7138
7139         * sem_ch8.adb, aspects.ads: Minor reformatting.
7140
7141 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7142
7143         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
7144         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
7145         extracted from...
7146         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
7147
7148 2011-08-02  Yannick Moy  <moy@adacore.com>
7149
7150         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
7151         mode on subprogram declaration outside of package specification, unless
7152         it is followed by a pragma Import
7153         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
7154         Access_Type_Declaration): issue error in formal mode on access type
7155         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
7156         incomplete type
7157         (Analyze_Object_Declaration): issue error in formal mode on object
7158         declaration which does not respect SPARK restrictions
7159         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
7160         declaration which does not respect SPARK restrictions
7161         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
7162         error in formal mode on digits or delta constraint
7163         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
7164         decimal fixed point type
7165         (Derived_Type_Declaration): issue error in formal mode on derived type
7166         other than type extensions of tagged record types
7167         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
7168         with check on access definition
7169         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
7170         mode on protected definition.
7171         (Analyze_Task_Definition): issue error in formal mode on task definition
7172
7173 2011-08-02  Robert Dewar  <dewar@adacore.com>
7174
7175         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
7176
7177 2011-08-02  Javier Miranda  <miranda@adacore.com>
7178
7179         * sem_ch6.adb (Can_Override_Operator): New function.
7180         (Verify_Overriding_Indicator): Add missing code to check overriding
7181         indicator in operators. Fixes regression.
7182         (Check_Overriding_Indicator): Minor reformating after replacing the
7183         code that evaluates if the subprogram can override an operator by
7184         invocations to the above new function.
7185         * einfo.adb
7186         (Write_Field26_Name): Add missing code to ensure that, following
7187         the documentation in einfo.ads, this field is not shown as attribute
7188         "Static_Initialization" on non-dispatching functions.
7189
7190 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
7191
7192         * sem_res.adb (Resolve_Call): A call to
7193         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
7194         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
7195         i.e., when the second parameter is of type Time_Span.
7196
7197 2011-08-02  Vincent Celier  <celier@adacore.com>
7198
7199         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
7200         with an archive instead of -L<library dir> -l<library name>.
7201
7202 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7203
7204         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
7205         mark the base types In_Use in addition to making the operations
7206         use_visible.
7207
7208 2011-08-02  Ed Falis  <falis@adacore.com>
7209
7210         * init.c: add and setup __gnat_signal_mask for the exception signals
7211         * s-inmaop-vxworks.adb: new file.
7212         * s-intman-vxworks.adb: remove unnecessary initializations and
7213         simplify remaining
7214         * s-intman-vxworks.ads: remove unnecessary variable
7215         * s-taprop-vxworks.adb: simplify signal initialization
7216
7217 2011-08-02  Robert Dewar  <dewar@adacore.com>
7218
7219         * sem_ch8.adb: Minor code reorganization, comment updates.
7220
7221 2011-08-02  Robert Dewar  <dewar@adacore.com>
7222
7223         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
7224         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
7225         here from Sem_Res.
7226         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
7227         (Matching_Static_Array_Bounds): Moved here from Sem_Res
7228
7229 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7230
7231         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
7232         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
7233         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
7234         use_type_clauses, to handle more efficiently use_type and use_all_type
7235         constructs.
7236         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
7237         Ada2012 Use_All_Type clause.
7238         (Use_Class_Wide_Operations): new procedure.
7239
7240 2011-08-02  Robert Dewar  <dewar@adacore.com>
7241
7242         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
7243         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
7244         expression to expression function.
7245
7246 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7247
7248         * sem_ch4.adb: transform simple Ada2012 membership into equality only
7249         if types are compatible.
7250
7251 2011-08-02  Yannick Moy  <moy@adacore.com>
7252
7253         * sem_res.adb (Matching_Static_Array_Bounds): new function which
7254         returns True if its argument array types have same dimension and same
7255         static bounds at each index.
7256         (Resolve_Actuals): issue an error in formal mode on actuals passed as
7257         OUT or IN OUT paramaters which are not view conversions in SPARK.
7258         (Resolve_Arithmetic_Op): issue an error in formal mode on
7259         multiplication or division with operands of fixed point types which are
7260         not qualified or explicitly converted.
7261         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7262         Boolean or array type (except String) operands.
7263         (Resolve_Equality_Op): issue an error in formal mode on equality
7264         operators for array types other than String with non-matching static
7265         bounds.
7266         (Resolve_Logical_Op): issue an error in formal mode on logical operators
7267         for array types with non-matching static bounds. Factorize the code in
7268         Matching_Static_Array_Bounds.
7269         (Resolve_Qualified_Expression): issue an error in formal mode on
7270         qualified expressions for array types with non-matching static bounds.
7271         (Resolve_Type_Conversion): issue an error in formal mode on type
7272         conversion for array types with non-matching static bounds
7273
7274 2011-08-02  Robert Dewar  <dewar@adacore.com>
7275
7276         * par-ch10.adb: Minor code reorganization (use Nkind_In).
7277
7278 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7279
7280         * par-ch9.adb: save location of entry for proper error message.
7281
7282 2011-08-02  Javier Miranda  <miranda@adacore.com>
7283
7284         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7285         (Use_Full_View) which permits this routine to climb through the
7286         ancestors using the full-view of private parents.
7287         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7288         Use_Full_View to true in calls to Is_Ancestor.
7289         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7290         true in call to Is_Ancestor.
7291         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7292         Use_Full_View to true in call to Is_Ancestor.
7293         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7294         call to Is_Ancestor.
7295         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7296         Use_Full_View to true in calls to Is_Ancestor.
7297         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7298         Make_Select_Specific_Data_Table, Register_Primitive,
7299         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7300         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7301         to true in call to Is_Ancestor.
7302         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7303         Use_Full_View to true in calls to Is_Ancestor.
7304         * exp_cg.adb
7305         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7306         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7307
7308 2011-08-02  Robert Dewar  <dewar@adacore.com>
7309
7310         * gnat_rm.texi: Minor reformatting.
7311         * sem_prag.adb: Minor reformatting.
7312
7313 2011-08-02  Tristan Gingold  <gingold@adacore.com>
7314
7315         * vms_data.ads: Add VMS qualifier for -gnateP.
7316
7317 2011-08-02  Robert Dewar  <dewar@adacore.com>
7318
7319         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7320         * par-ch7.adb (P_Package): Proper placement of aspects for package
7321         decl/instantiation.
7322         * par-endh.adb (Check_End): Ad Is_Sloc parameter
7323         (End_Statements): Add Is_Sloc parameterr
7324         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
7325         (Check_End): Ad Is_Sloc parameter
7326         (End_Statements): Add Is_Sloc parameterr
7327
7328 2011-08-02  Vincent Celier  <celier@adacore.com>
7329
7330         * ug_words: Add VMS qualifier equivalent to -gnateP:
7331         /SYMBOL_PREPROCESSING.
7332
7333 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
7334
7335         * gnat-style.texi: For hexadecimal numeric literals the typical
7336         grouping of digits is 4 to represent 2 bytes.
7337         A procedure spec which is split into several lines is indented two
7338         characters.
7339
7340 2011-08-02  Yannick Moy  <moy@adacore.com>
7341
7342         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
7343         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
7344         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
7345         properly qualified
7346         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
7347         choice in array aggregate
7348         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
7349         mark as ancestor
7350         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
7351         positional and named aggregate for record, or others in record
7352         aggregate, or multiple choice in record aggregate
7353         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
7354         array operands to logical operations AND, OR and XOR do not have the
7355         same static lower and higher bounds
7356         * sem_ch5.adb, sinfo.ads: Correct typos in comments
7357
7358 2011-08-01  Robert Dewar  <dewar@adacore.com>
7359
7360         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
7361         Replaces Last_Source_Node_In_Sequence.
7362         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
7363         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
7364         parens and blank in string (this was inconsistently implemented).
7365         * errout.ads
7366         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
7367         blank in string (this was inconsistently implemented).
7368         * gnat1drv.adb
7369         (Set_Global_Switches): Set formal mode switches appropriately
7370         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
7371         * par-prag.adb
7372         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
7373         call Set_Error_Msg_Lang to set "spark" as language name.
7374         * par.adb: Remove unnecessary call to set formal language for errout
7375         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
7376         appropriately and call Set_Error_Msg_Lang to set "spark" as language
7377         name.
7378         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
7379         calls to it, moved after resolution so that types are known
7380         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
7381         result of concatenation is not of type String
7382         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
7383         concatenation is not properly restricted
7384         * gnat_rm.texi: Add doc on pragma Spark_95.
7385         * gcc-interface/Makefile.in: Remove obsolete target pairs for
7386         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
7387         * gcc-interface/Make-lang.in: Update dependencies.
7388
7389 2011-08-01  Javier Miranda  <miranda@adacore.com>
7390
7391         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
7392         condition that detects if the overridden operation must replace an
7393         existing entity.
7394
7395 2011-08-01  Javier Miranda  <miranda@adacore.com>
7396
7397         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
7398         code declarations inserted by Insert_Actions in each alternative of the
7399         N_Case_Expression node.
7400
7401 2011-08-01  Robert Dewar  <dewar@adacore.com>
7402
7403         * sem_ch6.adb: Minor code reorganization.
7404         * sem_util.adb: Minor reformatting.
7405
7406 2011-08-01  Pascal Obry  <obry@adacore.com>
7407
7408         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
7409         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
7410
7411 2011-08-01  Yannick Moy  <moy@adacore.com>
7412
7413         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7414         literal or operator symbol which is prefixed
7415         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7416         mode on access attributes.
7417         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7418         that concatenation operands are properly restricted in formal mode
7419         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7420         Analyze_Concatenation_Operand. Issue an error in formal mode if the
7421         result of the concatenation has a type different from String.
7422         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7423         Analyze_Quantified_Expression, Analyze_Slice,
7424         Analyze_Null): issue an error in formal mode on unsupported constructs
7425         * sem_ch5.adb
7426         (Analyze_Block_Statement): only issue error on source block statement
7427         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7428         function which returns the last node in a list of nodes for which
7429         Comes_From_Source returns True, if any
7430         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7431         Last_Source_Node_In_Sequence
7432         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7433         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7434         mode on unsupported constructs
7435         * sem_ch9.adb Do not return after issuing error in formal mode, as the
7436         rest of the actions may be needed later on since the error is marked as
7437         not serious.
7438         * sinfo.ads: Typos in comments.
7439
7440 2011-08-01  Pascal Obry  <obry@adacore.com>
7441
7442         * projects.texi: Minor editing.
7443
7444 2011-08-01  Yannick Moy  <moy@adacore.com>
7445
7446         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7447         insertion character ~~
7448         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7449         (Set_Error_Msg_Lang): new procedure which fixes the language for use
7450         with insertion character ~~
7451         (Set_Msg_Text): treat insertion character ~~
7452         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7453         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7454         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7455         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7456         errors related to the formal language restriction not serious
7457         (insertion character |).
7458         * par.adb (Par): set formal language for error messages if needed
7459         * sem_ch6.adb (Check_Missing_Return): take into account possible
7460         generated statements at the end of the function
7461         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7462         enumeration value to define a new pragma SPARK_95
7463         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7464         SPARK_Version): new type and variables to store the SPARK version
7465         (none by default).
7466         (SPARK_Mode): return True when SPARK_Version is set
7467         * par-prag.adb: Correct indentation
7468         (Prag): take Pragma_SPARK_95 into account
7469         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7470         into account.
7471
7472 2011-08-01  Robert Dewar  <dewar@adacore.com>
7473
7474         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7475         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7476         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7477
7478 2011-08-01  Pascal Obry  <obry@adacore.com>
7479
7480         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7481         Target_Name to Get_Path call.
7482         (Parse_Single_Project): Likewise.
7483         (Post_Parse_Context_Clause): Likewise.
7484         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7485         Call Initialise_Project_Path with the proper Target_Name.
7486         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7487         search path.
7488         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7489         with the proper Target_Name.
7490         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7491         Part.Parse routine.
7492         (Parse_Project_And_Apply_Config): Likewise.
7493         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7494         This is fine as this part of the code is supporting only native
7495         compilation.
7496         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7497         is fine as this part of the code is supporting only native compilation.
7498
7499 2011-08-01  Yannick Moy  <moy@adacore.com>
7500
7501         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7502         of homonym, unless the homonym is one of the cases allowed in SPARK
7503         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7504         package declaration occurring after a body.
7505
7506 2011-08-01  Robert Dewar  <dewar@adacore.com>
7507
7508         * checks.adb, exp_ch4.adb: Minor reformatting.
7509
7510 2011-08-01  Javier Miranda  <miranda@adacore.com>
7511
7512         * einfo.ads (Access_Disp_Table): Fix documentation.
7513         (Dispatch_Table_Wrappers): Fix documentation.
7514
7515 2011-08-01  Pascal Obry  <obry@adacore.com>
7516
7517         * prj-env.adb, prj-env.ads: Minor reformatting.
7518
7519 2011-08-01  Yannick Moy  <moy@adacore.com>
7520
7521         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7522         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7523         procedures out of these packages.
7524         * errout.ads, errout.adb
7525         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7526         procedures in of this package
7527         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7528         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7529         on misplaced later vs initial declarations, like in Ada 83
7530         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7531         formal mode on attribute of private type whose full type declaration
7532         is not visible
7533         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7534         package declaration inside a package specification
7535         (Analyze_Full_Type_Declaration): issue error in formal mode on
7536         controlled type or discriminant type
7537         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7538         user-defined operator means that it should come from the source
7539         (New_Overloaded_Entity): issue error in formal mode on overloaded
7540         entity.
7541         * sem_ch6.ads, sem_ch13.ads: typos in comments.
7542
7543 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7544
7545         * atree.adb: Minor reformatting.
7546         * checks.adb: Minor reformatting.
7547
7548 2011-08-01  Vincent Celier  <celier@adacore.com>
7549
7550         * s-parame-vms-ia64.ads: Fix typo in comment
7551         Minor reformatting
7552         * s-parame-vms-restrict.ads: Removed, unused.
7553
7554 2011-08-01  Javier Miranda  <miranda@adacore.com>
7555
7556         * exp_ch3.adb
7557         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7558         * sem_ch3.adb
7559         (Constrain_Index): Remove side effects in the evaluation of the bounds.
7560         * sem_ch3.ads, sem_ch3.adb
7561         (Is_Constant_Bound): New extended version of the subprogram that was
7562         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7563         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7564         * sem_aux.ads (Constant_Value): Fix typo in comment.
7565         * checks.adb (Generate_Index_Checks): New implementation which, for
7566         array objects with constant bounds, generates the runtime check
7567         referencing the bounds of the array type. For other cases this routine
7568         provides its previous behavior obtaining such values from the array
7569         object.
7570         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7571         parent type.
7572         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7573         we cannot have semantic interpretations of the new node.
7574
7575 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7576
7577         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7578         expressions.
7579
7580 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7581
7582         * sem_ch8.adb: Minor code editing.
7583         * s-vxwext.adb: Remove trailing space.
7584         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7585         consistency with other files.
7586
7587 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7588
7589         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7590
7591 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7592
7593         * par-ch10.adb: reject parameterized expressions as compilation unit.
7594         * sem_ch4.adb: handle properly conditional expression with overloaded
7595         then_clause and no else_clause.
7596
7597 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7598
7599         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7600         like done by System.Aux_DEC.
7601         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7602
7603 2011-08-01  Yannick Moy  <moy@adacore.com>
7604
7605         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7606         missing label at end of declaration (subprogram or package)
7607         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7608         of positional and named parameter association
7609         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7610         Error_Msg_SP which adds a prefix to the error message giving the name
7611         of the formal language analyzed
7612         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7613         access result type in subprogram, unconstrained array as result type,.
7614         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7615         procedure
7616         * sem_ch8.adb: Code clean up.
7617
7618 2011-08-01  Javier Miranda  <miranda@adacore.com>
7619
7620         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7621         * einfo.ads (Access_Disp_Table): Fix documentation.
7622         (Dispatch_Table_Wrappers): Fix documentation.
7623         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7624         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7625         to enforce the documentation of this attribute.
7626         (Set_Is_Interface): Cleanup the assertion.
7627         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7628         the Underlying_Type entity before reading attribute Access_Disp_Table.
7629         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7630         Locate the Underlying_Type before reading attribute Access_Disp_Table.
7631         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7632         the Underlying_Type entity before reading attribute Access_Disp_Table.
7633         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7634         Locate the Underlying_Type entity before reading attribute
7635         Access_Disp_Table.
7636
7637 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7638
7639         * s-poosiz.ads: Additional overriding indicators.
7640
7641 2011-08-01  Yannick Moy  <moy@adacore.com>
7642
7643         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7644         formal mode.
7645         (Analyze_Iteration_Scheme): issue error in formal mode when loop
7646         parameter specification does not include a subtype mark.
7647         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7648         formal mode on abstract subprogram.
7649         (Analyze_Subprogram_Specification): issue error in formal mode on
7650         user-defined operator.
7651         (Process_Formals): issue error in formal mode on access parameter and
7652         default expression.
7653         * sem_ch9.adb (Analyze_Abort_Statement,
7654         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7655         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7656         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7657         Analyze_Requeue, Analyze_Selective_Accept,
7658         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7659         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7660         issue error in formal mode on user-defined raise statement.
7661
7662 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7663
7664         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7665         declaration being hidden when overriding an implicit inherited
7666         subprogram.
7667         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7668         (-gnats), do not complain about a source file that contains only a
7669         pragma No_Body.
7670
7671 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7672
7673         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7674         variable if already set.
7675
7676 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7677
7678         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7679         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7680         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7681         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7682         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7683         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7684         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7685         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7686         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7687         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7688         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7689         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7690         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7691         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7692         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7693         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7694         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7695         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7696         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7697         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7698         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7699         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7700         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7701         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7702         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7703         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7704         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7705         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7706         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7707         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7708         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7709         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7710         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7711         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7712         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7713         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7714         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7715         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7716         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7717         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7718         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7719         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7720         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7721         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7722         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7723         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7724         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7725         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7726         s-osinte-mingw.ads: Update to GPLv3 run-time license.
7727         Use GNAT instead of GNARL.
7728
7729 2011-08-01  Bob Duff  <duff@adacore.com>
7730
7731         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7732         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7733         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7734         reformatting.
7735
7736 2011-08-01  Yannick Moy  <moy@adacore.com>
7737
7738         * debug.adb (d.D) reverve flag for the SPARK mode
7739         (d.E) reverve flag for SPARK generation mode
7740         (d.F) reverve flag for Why generation mode
7741         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7742         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
7743         functions which return True when the corresponding modes are set
7744         (Formal_Language): return "spark" or "alfa" when in formal verification
7745         mode.
7746         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7747         Error_Msg to prefix the error message with a tag giving the formal
7748         language
7749         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7750         message with a tag giving the formal language
7751         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7752         block statement
7753         (Analyze_Case_Statement): issue error in formal mode on case statement
7754         with a single "others" case alternative
7755         (Analyze_Exit_Statement): issue errors in formal mode on exit
7756         statements which do not respect SPARK restrictions
7757         (Analyze_Goto_Statement): issue error in formal mode on goto statement
7758         (Check_Unreachable_Code): always issue an error (not a warning) in
7759         formal mode on unreachable code (concerns both code after an infinite
7760         loop and after an unconditional jump, both not allowed in SPARK)
7761         * sem_ch6.adb (Analyze_Return_Statement): add call to
7762         Set_Return_Present for a procedure containing a return statement
7763         (already done for functions in Analyze_Function_Return)
7764         (Analyze_Function_Return): issue error in formal mode on extended
7765         return or if return is not last statement in function
7766         (Check_Missing_Return): issue error in formal mode if function does
7767         not end with return or if procedure contains a return
7768         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7769         function to detect if there is an inner scope of its parameter S which
7770         is a loop.
7771
7772 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7773
7774         * sem_ch6.ads: Minor reformatting.
7775
7776 2011-08-01  Javier Miranda  <miranda@adacore.com>
7777
7778         * sem_util.adb (Abstract_Interface_List): Complete condition when
7779         processing private type declarations to avoid reading unavailable
7780         attribute.
7781         (Is_Synchronized_Tagged_Type): Complete condition when processing
7782         private extension declaration nodes to avoid reading unavailable
7783         attribute.
7784
7785 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7786
7787         * sem_ch3.adb: Minor reformatting.
7788
7789 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7790
7791         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7792         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7793         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7794         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7795         for VMS, instead parametrize the common implementation with
7796         System.Parameters declarations.
7797
7798 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
7799
7800         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7801
7802 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7803
7804         * seh_init.c: Fix SEH handler installation on win64.
7805
7806 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7807
7808         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7809         double analysis of an anonymous access to subprogram, because it can
7810         lead to improper sharing of profiles and a back-end crash.
7811
7812 2011-08-01  Robert Dewar  <dewar@adacore.com>
7813
7814         * make.adb, sem_ch4.adb: Minor reformatting.
7815         * gcc-interface/Make-lang.in: Update dependencies.
7816         * sem_util.adb, exp_ch5.adb: Minor reformatting.
7817
7818 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7819
7820         * gnat_rm.texi: Fix definition of Long_Integer.
7821
7822 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7823
7824         * exp_aggr.adb: check limit size of static aggregate unconditionally,
7825         to prevent storage exhaustion.
7826         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7827         finalized is a function body, insert the cleanup code before the final
7828         return statement, to prevent spurious warnings.
7829         * s-pooglo.ads: add overriding indicator.
7830
7831 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7832
7833         * sem_ch4.adb (Operator_Check): improve error message when both a
7834         with_clause and a use_clause are needed to make operator usage legal.
7835         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7836         determine whether a compilation unit is visible within an other,
7837         either through a with_clause in the current unit, or a with_clause in
7838         its library unit or one one of its parents.
7839
7840 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7841
7842         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7843         over an arbitrary expression of an array or container type.
7844         * lib-xref.adb: clarify comment.
7845
7846 2011-08-01  Bob Duff  <duff@adacore.com>
7847
7848         * einfo.ads: Minor reformatting.
7849         * debug.adb: Minor comment improvement.
7850
7851 2011-08-01  Javier Miranda  <miranda@adacore.com>
7852
7853         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7854         consider hidden subprograms as valid candidates.
7855
7856 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7857
7858         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7859
7860 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
7861
7862         * gnat_ugn.texi: Fix typo.
7863
7864 2011-08-01  Robert Dewar  <dewar@adacore.com>
7865
7866         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7867         lib-xref.adb: Minor reformatting
7868
7869 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7870
7871         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7872         when to generate a call to Move_Final_List.
7873         (Has_Controlled_Parts): Remove this function.
7874
7875 2011-08-01  Geert Bosch  <bosch@adacore.com>
7876
7877         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7878         "," in choice list.
7879
7880 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7881
7882         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7883         explicit raise of a predefined exception as Comes_From_Source if the
7884         original N_Raise_Statement comes from source.
7885
7886 2011-08-01  Robert Dewar  <dewar@adacore.com>
7887
7888         * sinfo.ads: Add comment.
7889         * sem_ch6.adb: Minor reformatting.
7890
7891 2011-08-01  Robert Dewar  <dewar@adacore.com>
7892
7893         * freeze.adb (Freeze_Entity): Refine check for bad component size
7894         clause to avoid rejecting confirming clause when atomic/aliased present.
7895
7896 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7897
7898         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7899         better determine whether an entity reference is a write.
7900         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7901         subcomponent.
7902         * lib-xref.adb (Output_References): Do no suppress a read reference at
7903         the same location as an immediately preceeding modify-reference, to
7904         handle properly in-out actuals.
7905
7906 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7907
7908         * env.c (__gnat_setenv) [VMS]: Refine previous change.
7909
7910 2011-08-01  Quentin Ochem  <ochem@adacore.com>
7911
7912         * i-cstrin.adb (New_String): Changed implementation, now uses only the
7913         heap to compute the result.
7914
7915 2011-08-01  Robert Dewar  <dewar@adacore.com>
7916
7917         * atree.ads: Minor reformatting.
7918
7919 2011-08-01  Emmanuel Briot  <briot@adacore.com>
7920
7921         * g-expect.adb (Get_Command_Output): Fix memory leak.
7922
7923 2011-08-01  Geert Bosch  <bosch@adacore.com>
7924
7925         * cstand.adb (P_Float_Type): New procedure to print the definition of
7926         predefined fpt types.
7927         (P_Mixed_Name): New procedure to print a name using mixed case
7928         (Print_Standard): Use P_Float_Type for printing floating point types
7929         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7930         precision IEEE float.
7931
7932 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7933
7934         * sem_ch3.adb: Minor reformatting.
7935
7936 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7937
7938         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7939         the completion of a generic function, insert the new body rather than
7940         rewriting the original.
7941
7942 2011-08-01  Yannick Moy  <moy@adacore.com>
7943
7944         * sinfo.ads, errout.ads: Typos in comments.
7945
7946 2011-08-01  Robert Dewar  <dewar@adacore.com>
7947
7948         * par-endh.adb: Minor reformatting.
7949
7950 2011-08-01  Robert Dewar  <dewar@adacore.com>
7951
7952         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7953         (Pre_Post_Aspects): New subtype.
7954         * par-ch12.adb (P_Generic): New syntax for aspects in packages
7955         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7956         * par-ch7.adb (P_Package): Remove Decl parameter
7957         (P_Package): Handle new syntax for aspects (before IS)
7958         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7959         new aspect syntax
7960         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7961         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7962         (P_Package): Remove Decl parameter
7963         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7964         aspects
7965         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7966         specs
7967         * sem_util.ads, sem_util.adb (Static_Boolean): New function
7968         * sinfo.ads: Document new syntax for aspects in packages etc.
7969         * sprint.adb: Handle new syntax of aspects before IS in package
7970
7971 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7972
7973         * atree.ads: Minor reformatting.
7974         * sem_prag.adb: Minor reformatting.
7975
7976 2011-08-01  Robert Dewar  <dewar@adacore.com>
7977
7978         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7979         case expr alternative.
7980
7981 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7982
7983         * sem_ch12.adb: Fix typo.
7984
7985 2011-08-01  Geert Bosch  <bosch@adacore.com>
7986
7987         * sem_prag.adb (Check_No_Link_Name): New procedure.
7988         (Process_Import_Or_Interface): Use Check_No_Link_Name.
7989         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7990         instead of Standard_Long_Long_Float_Size global. Preparation for
7991         eventual removal of per type constants.
7992         * exp_util.ads (Get_Stream_Size): New function returning the stream
7993         size value of subtype E.
7994         * exp_util.adb (Get_Stream_Size): Implement new function.
7995         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7996         function.
7997         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7998         * einfo.adb:
7999         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
8000
8001 2011-08-01  Geert Bosch  <bosch@adacore.com>
8002
8003         * cstand.adb: Fix comments.
8004         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
8005         count of arguments.
8006
8007 2011-08-01  Robert Dewar  <dewar@adacore.com>
8008
8009         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
8010
8011 2011-08-01  Geert Bosch  <bosch@adacore.com>
8012
8013         * atree.ads: Fix comment.
8014
8015 2011-08-01  Robert Dewar  <dewar@adacore.com>
8016
8017         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
8018         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
8019         * par.adb: Add with for Namet.Sp.
8020         * par-tchk.adb: Minor reformatting.
8021
8022 2011-08-01  Vincent Celier  <celier@adacore.com>
8023
8024         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
8025         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
8026         of the init procedure of a SAL.
8027         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
8028         New procedure.
8029
8030 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8031
8032         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
8033         reformatting.
8034
8035 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8036
8037         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
8038
8039 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8040
8041         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
8042         conformant with its spec (return True only for types that have
8043         an overriding Initialize primitive operation that prevents them from
8044         having preelaborable initialization).
8045         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
8046         initialization for controlled types in Ada 2005 or later mode.
8047
8048 2011-08-01  Robert Dewar  <dewar@adacore.com>
8049
8050         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
8051         Postcondition.
8052         (Same_Aspect): New function.
8053         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
8054         Type_Invariant, Precondition, Postcondition.
8055         * snames.ads-tmpl: Add Name_Type_Invariant.
8056
8057 2011-08-01  Robert Dewar  <dewar@adacore.com>
8058
8059         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
8060         here.
8061         (Freeze_All_Ent): Fix error in handling inherited aspects.
8062         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
8063         already analyzed, but don't skip entire processing of a declaration,
8064         that's wrong in some cases of declarations being rewritten.
8065         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
8066         Don't delay for integer, string literals
8067         Treat predicates in usual manner for delay, remove special case code,
8068         not needed.
8069         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
8070         (Build_Predicate_Function): Update saved expression in aspect
8071         (Build_Invariant_Procedure): Update saved expression in aspect
8072         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
8073         of replacement of discriminant references if the reference is simple.
8074
8075 2011-08-01  Robert Dewar  <dewar@adacore.com>
8076
8077         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
8078         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
8079         Static_Predicate and Dynamic_Predicate.
8080         (Build_Predicate_Function): Add processing for Static_Predicate
8081         and Dynamic_Predicate.
8082         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
8083         (From_Static_Predicate): New flag
8084         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
8085
8086 2011-08-01  Robert Dewar  <dewar@adacore.com>
8087
8088         * usage.adb: Documentation cleanup for Ada version modes in usage.
8089         * expander.adb: Minor reformatting.
8090
8091 2011-08-01  Robert Dewar  <dewar@adacore.com>
8092
8093         * atree.ads: Minor comment fix.
8094         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
8095         a-witeio.ads, sem_prag.adb: Minor reformatting.
8096
8097 2011-08-01  Doug Rupp  <rupp@adacore.com>
8098
8099         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
8100         pointers. Use descrip.h header file for convenience. Add some
8101         comments.
8102
8103 2011-08-01  Robert Dewar  <dewar@adacore.com>
8104
8105         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
8106         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
8107         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
8108         New procedure.
8109         (Check_Aspect_At_End_Of_Declarations): New procedure
8110         (Analye_Aspect_Specification): Minor changes for above procedures
8111         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
8112         specification node as well.
8113
8114 2011-08-01  Pascal Obry  <obry@adacore.com>
8115
8116         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
8117         Windows files. Use GetFilesAttributes() in this case to check for file
8118         existence instead of returning with an error code.
8119
8120 2011-08-01  Vincent Celier  <celier@adacore.com>
8121
8122         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
8123         High is above Source length.
8124
8125 2011-08-01  Robert Dewar  <dewar@adacore.com>
8126
8127         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
8128
8129 2011-08-01  Robert Dewar  <dewar@adacore.com>
8130
8131         * aspects.ads (Boolean_Aspects): New subtype.
8132         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
8133         for derived types in cases where the parent type and derived type have
8134         aspects.
8135         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
8136         with aspects when parent type also has aspects.
8137         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
8138         boolean expression at this point).
8139         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
8140         accordance with final decision on the Ada 2012 feature.
8141         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
8142
8143 2011-08-01  Matthew Heaney  <heaney@adacore.com>
8144
8145         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
8146
8147 2011-08-01  Pascal Obry  <obry@adacore.com>
8148
8149         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
8150         Fix Replace_Slice when High is above current string size.
8151         (Replace_Slice): Fix DL computation when High is above current
8152         string length.
8153
8154 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
8155
8156         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
8157
8158 2011-08-01  Matthew Heaney  <heaney@adacore.com>
8159
8160         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
8161         of node.
8162
8163 2011-08-01  Pascal Obry  <obry@adacore.com>
8164
8165         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
8166         reformatting.
8167
8168 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8169
8170         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
8171         access to protected subprograms in generic bodies.
8172         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
8173         protected type, indicate that the convention of the subprogram is
8174         Convention_Protected, because it may be used in subsequent declarations
8175         within the protected declaration.
8176
8177 2011-08-01  Vincent Celier  <celier@adacore.com>
8178
8179         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
8180         and "final" procedures when the name of the library is "ada", to avoid
8181         duplicate symbols "adainit" and "adafinal" in executables.
8182
8183 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8184
8185         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
8186         quantified expression that appears within a postcondition and uses the
8187         Ada2012 'Result attribute.
8188
8189 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8190
8191         * init.c (__gnat_error_handler): Cast reason to int.
8192         (__gnat_install_handler): Explain sa_sigaction use.
8193
8194 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8195
8196         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
8197         subprogram has copy-in copy-out parameters, try to promote the mode of
8198         the return type if it is passed in registers.
8199
8200 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8201
8202         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
8203         left operand as addressable.
8204
8205 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8206
8207         * gcc-interface/gigi.h (build_function_stub): Remove.
8208         (build_return_expr): Likewise.
8209         (convert_vms_descriptor): Declare.
8210         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
8211         (build_function_stub): Move to...
8212         * gcc-interface/utils2.c (build_return_expr): Move to...
8213         * gcc-interface/trans.c (build_function_stub): ...here.
8214         (build_return_expr): ...here.
8215         (Subprogram_Body_to_gnu): Add local variable for language_function.
8216         Disconnect the parameter attributes cache, if any, once done with it.
8217         Call end_subprog_body only after setting the end_locus.
8218         Build the stub associated with the function, if any, at the very end.
8219         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
8220         variables and streamline control flow.
8221
8222 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
8223
8224         PR ada/49819
8225         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
8226         g-trasym-dwarf.adb.
8227
8228 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8229
8230         PR bootstrap/49794
8231         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
8232         Assign to act.sa_sigaction.
8233         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
8234         current->return_address to char * before arithmetic.
8235
8236 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8237
8238         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
8239         Correct argument types.
8240         Extract code from reason.
8241         (__gnat_install_handler): Assign to act.sa_sigaction.
8242
8243 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
8244
8245         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
8246         (GNAT1_OBJS): ...here.
8247
8248 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
8249
8250         PR ada/48711
8251         * g-socthi-mingw.adb (Fill): Fix formatting.
8252
8253         * gcc-interface/gigi.h: Move around comment.
8254
8255 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
8256
8257         PR ada/46350
8258         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8259
8260 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
8261
8262         PR ada/48711
8263         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8264
8265 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
8266
8267         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8268         range comparison if Pmode is SImode.
8269
8270 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
8271             Eric Botcazou  <ebotcazou@adacore.com>
8272
8273         * adadecode.c: Wrap up in extern "C" block.
8274         * adadecode.h: Likewise.
8275         * adaint.c: Likewise.  Remove 'const' keyword.
8276         * adaint.h: Likewise.
8277         * argv.c: Likewise.
8278         * atree.h: Likewise.
8279         * cio.c: Likewise.
8280         * cstreams.c: Likewise.
8281         * env.c: Likewise.
8282         * exit.c: Likewise.
8283         * fe.h: Likewise.
8284         * final.c: Likewise.
8285         * init.c: Likewise.
8286         * initialize.c: Likewise.
8287         * link.c: Likewise.
8288         * namet.h: Likewise.
8289         * nlists.h: Likewise.
8290         * raise.c: Likewise.
8291         * raise.h: Likewise.
8292         * repinfo.h: Likewise.
8293         * seh_init.c: Likewise.
8294         * targext.c: Likewise.
8295         * tracebak.c: Likewise.
8296         * uintp.h: Likewise.
8297         * urealp.h: Likewise.
8298         * xeinfo.adb: Wrap up generated C code in extern "C" block.
8299         * xsinfo.adb: Likewise.
8300         * xsnamest.adb: Likewise.
8301         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8302         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8303         * gcc-interface/misc.c: Likewise.
8304         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8305         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
8306         ada/targext.o here...
8307         (GNAT_ADA_OBJS): ...and not here.
8308         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8309         (GNATBIND_OBJS): Reorder.
8310
8311 2011-07-07  Richard Henderson  <rth@redhat.com>
8312
8313         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8314         dwarf2out_frame_init.
8315
8316 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
8317
8318         * gcc-interface/misc.c (gnat_init): Tweak previous change.
8319
8320 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8321
8322         PR target/39150
8323         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
8324
8325 2011-07-06  Richard Guenther  <rguenther@suse.de>
8326
8327         * gcc-interface/misc.c (gnat_init): Merge calls to
8328         build_common_tree_nodes and build_common_tree_nodes_2.
8329         Re-initialize boolean_false_node.
8330
8331 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
8332             Olivier Hainque  <hainque@adacore.com>
8333             Nicolas Setton  <setton@adacore.com>
8334
8335         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
8336         the type according to the ARTIFICIAL_P parameter.
8337         (create_type_decl): Likewise.
8338         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
8339
8340 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
8341
8342         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
8343         (gnatbind): Likewise.
8344
8345 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8346
8347         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
8348
8349 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8350
8351         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
8352         local variable throughout.  Remove useless call to Base_Type.
8353         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
8354         Take it also into account for the volatileness of the field.  Set the
8355         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
8356
8357 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8358
8359         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
8360         on a dereference built for a by-ref object if it has an address clause.
8361
8362 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8363
8364         * einfo.ads (Address_Taken): Document use for the second argument of
8365         Asm_Input and Asm_Output attributes.
8366         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
8367         argument is an entity name, then set Address_Taken on it.
8368         <Attribute_Asm_Output>: Likewise.
8369         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
8370         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
8371         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
8372         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
8373
8374 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
8375
8376         PR middle-end/46500
8377         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
8378
8379 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
8380
8381         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
8382         (ada/utils.o): Update dependencies.
8383         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
8384         ../../../libcpp/libcpp.a.
8385         * gcc-interface/utils.c: Include common/common-target.h.
8386         (process_attributes): Use targetm_common.have_named_sections.
8387
8388 2011-06-07  Richard Guenther  <rguenther@suse.de>
8389
8390         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
8391         set_sizetype.
8392
8393 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8394
8395         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
8396         TREE_THIS_NOTRAP flag.
8397
8398 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8399
8400         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
8401         Fix thinko.
8402
8403 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8404
8405         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
8406         constants whose full view has discriminants specially.
8407
8408 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8409
8410         * gcc-interface/utils.c: Include diagnostic.h.
8411         (gnat_write_global_declarations): Output debug information for all
8412         global type declarations before finalizing the compilation unit.
8413         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8414
8415 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
8416
8417         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8418
8419 2011-05-25  Kai Tietz  <ktietz@redhat.com>
8420
8421         * adaint.c (__gnat_to_canonical_file_list_next): Use array
8422         initialization instead of const/none-const pointer assignment.
8423
8424 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
8425
8426         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8427         $(EXTRA_GNAT1_OBJS).
8428         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8429         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8430         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8431         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8432         libcommon-target.a instead of prefix.o.
8433
8434 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
8435
8436         PR ada/49097
8437         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8438
8439 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
8440
8441         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8442         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8443         instead of version.o.
8444
8445 2011-05-18  Kai Tietz <ktietz@redhat.com>
8446
8447         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8448         boolean_false_node instead of integer_zero_node.
8449         (convert_with_check): Likewise.
8450         * gcc-interface/decl.c (choices_to_gnu): Likewise.
8451
8452 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
8453
8454         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8455         type of the parameter is an unconstrained array, convert the actual to
8456         the type of the formal in the In Out and Out cases as well.
8457
8458 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
8459
8460         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8461         call build_function_type_array or build_varargs_function_type_array
8462         instead.
8463         (create_subprog_type): Don't call build_function_type; call
8464         build_function_type_vec instead.
8465
8466 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
8467
8468         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8469         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8470         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8471
8472 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
8473
8474         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8475
8476         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8477         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8478
8479 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
8480
8481         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8482
8483 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
8484
8485         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8486         instead of accessing TYPE_ARG_TYPES directly.
8487         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8488
8489 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8490
8491         PR ada/48844
8492         * gcc-interface/gigi.h (get_variant_part): Declare.
8493         * gcc-interface/decl.c (get_variant_part): Make global.
8494         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8495         types have the same constant size, are record types and T1 has a
8496         variant part while T2 doesn't.
8497
8498 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8499
8500         * gcc-interface/utils.c (begin_subprog_body): Do not call
8501         get_pending_sizes.
8502         (end_subprog_body): Likewise.
8503
8504 2011-05-04  Richard Guenther  <rguenther@suse.de>
8505
8506         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8507         int_const_binop.
8508         (pos_to_constructor): Likewise.
8509
8510 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
8511             Eric Botcazou  <ebotcazou@adacore.com>
8512
8513         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8514         of build_function_type.  Adjust calls to...
8515         (build_raise_check): ...this.  Do not take a void_tree parameter.
8516         Call build_function_type_list instead of build_function_type.
8517         Fix head comment and swap couple of conditional blocks.
8518
8519 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
8520
8521         * gnatvsn.ads (Library_Version): Bump to 4.7.
8522         (Current_Year): Bump to 2011.
8523
8524 2011-04-29  Michael Matz  <matz@suse.de>
8525
8526         * gcc-interface/misc.c (gnat_handle_option): Set
8527         warn_maybe_uninitialized.
8528
8529 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
8530
8531         * gnat_ugn.texi (Complexity Metrics Control): Update link to
8532         the Watson/McCabe paper.
8533
8534 2011-04-23  Jim Meyering  <meyering@redhat.com>
8535
8536         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8537
8538 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8539
8540         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8541         onto the new type.
8542
8543 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8544
8545         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8546         parameter.
8547         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
8548         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8549         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8550         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8551         <all>: Do not set flags on the reused DECL node coming from an alias.
8552         Set DECL_IGNORED_P on the DECL node built for subprograms if they
8553         don't need debug info here...
8554         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8555         (gigi): Adjust calls to create_subprog_decl.
8556         (build_raise_check): Likewise.
8557         (establish_gnat_vms_condition_handler): Likewise.
8558         (Compilation_Unit_to_gnu): Likewise.
8559         (gnat_to_gnu): Likewise.
8560
8561 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
8562
8563         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8564         (NO_REORDER_ADAFLAGS): New variable.
8565         (EXTRA_GNATTOOLS): Always define.
8566         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8567         Clean up and adjust list of files compiled with special options.
8568         * gcc-interface/Make-lang.in: Likewise.
8569         (ada/decl.o): Cosmetical change.
8570         (ada/misc.o): Remove dependency on $(PLUGIN_H).
8571
8572 2011-04-20  Jim Meyering  <meyering@redhat.com>
8573
8574         * initialize.c (__gnat_initialize): Remove useless if-before-free.
8575
8576 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8577
8578         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8579         $(CFLAGS) on the link line.
8580
8581 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8582
8583         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8584         padded type built for the return type if it is unconstrained.
8585
8586 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
8587
8588         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8589
8590 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
8591
8592         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8593         before calling TREE_CHAIN.
8594         * gcc-interface/misc.c (gnat_init_ts): New function.
8595         (LANG_HOOKS_INIT_TS): Define.
8596
8597 2011-04-12  Martin Jambor  <mjambor@suse.cz>
8598
8599         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8600         instead of cgraph_node.
8601
8602 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8603
8604         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8605         alignment on fields of the RETURN type built for the Copy-In Copy-Out
8606         mechanism.
8607
8608 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8609
8610         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8611         of aggregate types that contain a placeholder.
8612
8613 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
8614
8615         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8616         TYPE_ARG_TYPES.
8617         (handle_type_generic_attribute): Likewise.
8618
8619 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
8620
8621         PR ada/47163
8622         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8623
8624 2011-04-04  Kai Tietz  <ktietz@redhat.com>
8625
8626         PR ada/47163
8627         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8628         to flag value.
8629
8630 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8631
8632         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8633         type case, do not strip a padding type around the array type.
8634
8635 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8636
8637         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8638         types.
8639
8640 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8641
8642         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8643         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8644         code for -feliminate-unused-debug-types.
8645         (gnat_post_options): Likewise.
8646
8647 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8648
8649         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8650         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8651         distinct copy.
8652
8653 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8654
8655         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8656         DECL_ARTIFICIAL flag on enumeration types.
8657
8658 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8659
8660         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8661         fat pointer types artificial unconditionally.
8662         <E_Array_Subtype>: Attach the base array type as a parallel type if it
8663         isn't artificial.
8664
8665 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8666
8667         * gcc-interface/gigi.h (get_dummy_type): Declare.
8668         (build_dummy_unc_pointer_types): Likewise.
8669         (finish_fat_pointer_type): Likewise.
8670         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8671         fat pointer type has been built, complete it in place.
8672         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8673         and thin pointers.  Remove useless variable.
8674         (finish_fat_pointer_type): Make global and move to...
8675         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8676         (get_dummy_type): New function.
8677         (build_dummy_unc_pointer_types): Likewise.
8678         (gnat_pushdecl): Propage the name to the anonymous variants only.
8679         (update_pointer_to): Only adjust the pointer types in the unconstrained
8680         array case.
8681
8682 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8683
8684         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8685         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8686         if this is a Taft amendment type and the full declaration is available.
8687         * gcc-interface/trans.c (process_type): Likewise.
8688         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8689         (process_freeze_entity): Likewise.
8690         * gcc-interface/utils.c (dummy_global): New static variable.
8691         (gnat_write_global_declarations): If there are types declared as used
8692         at the global level, insert them in the global hash table.
8693
8694 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8695
8696         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8697         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8698         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8699         copy.
8700         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
8701         flag of the type accordingly.
8702         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8703
8704 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8705
8706         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8707         finalizing types when updating the pointers to the designated type.
8708         <all>: Finalize the deferred types even if we didn't defer processing
8709         of incomplete types in this invocation.
8710
8711 2011-04-01  Olivier Hainque  <hainque@adacore.com>
8712             Nicolas Setton  <setton@adacore.com>
8713             Eric Botcazou  <ebotcazou@adacore.com>
8714
8715         * gcc-interface/misc.c (gnat_descriptive_type): New function.
8716         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8717
8718 2011-03-28  Kai Tietz  <ktietz@redhat.com>
8719
8720         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8721         Windows targets.
8722         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8723         * system-mingw.ads (System): Change ZCX_By_Default default to True.
8724
8725         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8726
8727 2011-03-28  Tristan Gingold  <gingold@adacore.com>
8728
8729         PR ada/44431
8730         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8731         Use ada output of gnatbind.
8732         (ada/b_gnatb.adb): Ditto.
8733         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8734         (ada.mostlyclean, ada.stage1)
8735         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8736         (ada.stagefeedback): Adjust.
8737         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8738         Use ada output of gnatbind.
8739         (b_gnatm.adb): Ditto.
8740         (b_gnatl.o, b_gnatm.o): New rules.
8741
8742 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8743
8744         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8745         for the padded type built to support a specified size or alignment.
8746
8747 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8748
8749         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8750         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8751         unconditionally to the end of the unit when the designated type is
8752         limited_with'ed.
8753         <all>: Rename local variable.  Attempt to un-defer types only and do it
8754         for limited_with'ed types as well.
8755         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
8756         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8757         consistently and remove redundant call to finalize_from_with_types.
8758
8759 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8760
8761         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8762         subprograms without a previous spec declared in the same unit.
8763         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8764         subprograms at the end of the unit instead of at the beginning.
8765         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8766         isn't public for the special handling of non-inline functions nested
8767         inside inline external functions.
8768
8769 2011-03-25  Jeff Law  <law@redhat.com>
8770
8771         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8772
8773 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
8774
8775         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8776         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8777         to compute Set_Size_Depends_On_Discriminant.
8778         (Layout_Type): Call it on array types in back-end layout mode.
8779         * sem_util.adb (Requires_Transient_Scope): Return true for array
8780         types only if the size depends on the value of discriminants.
8781         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8782         type if the RHS is a call to a function that returns an unconstrained
8783         type with default discriminant.
8784
8785 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
8786
8787         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8788         non-conversion to the nominal result type at the end.
8789
8790 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8791
8792         * gcc-interface/trans.c (create_temporary): New function taken from...
8793         (create_init_temporary): ...here.  Call it.
8794         (call_to_gnu): Create the temporary for the return value early, if any.
8795         Create it for a function with copy-in/copy-out parameters if there is
8796         no target; in other cases of copy-in/copy-out, use another temporary.
8797         Push the new binding level lazily.  Add and rename local variables.
8798
8799 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8800
8801         * gcc-interface/decl.c (validate_size): Improve comments and tweak
8802         error message.
8803         (set_rm_size): Likewise.
8804
8805 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8806
8807         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8808         for the padded type built in order to support a specified alignment.
8809         Fix incorrect formatting.
8810
8811 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8812
8813         PR bootstrap/48216
8814         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8815
8816 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8817
8818         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8819         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8820         to the end of the list.  Adjust recursive call.  Rename local variable.
8821         If REORDER is true, reorder components of the record type.
8822         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8823         components_to_record and adjust the parameter list.
8824
8825 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8826
8827         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8828         disabled, use the variable for bounds of loop iteration scheme.
8829
8830 2011-03-21  Kai Tietz  <ktietz@redhat.com>
8831
8832         PR target/12171
8833         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8834
8835 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8836
8837         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8838         out whether the expression is read-only.  Short-circuit placeholder
8839         case and rename a couple of local variables.
8840
8841 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8842
8843         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8844         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8845         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8846         (convert): Deal with conversions from a smaller form type specially.
8847
8848 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
8849
8850         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8851         its argument, except for the special -I- switch.
8852
8853 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
8854
8855         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8856         "Ada Issues".
8857
8858 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
8859
8860         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8861
8862 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
8863
8864         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8865         GNAT_FORMAL.
8866         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8867         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
8868         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
8869         Do not generate the check directly, instead instantiate the template
8870         check present in the descriptor.
8871         (make_descriptor_field): Move around.
8872         (build_vms_descriptor32): Build a template check in the POINTER field.
8873         (build_vms_descriptor): Remove useless suffixes.
8874         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8875
8876 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
8877
8878         PR bootstrap/47467
8879         * targext.c: Include target files if IN_RTS is defined.
8880
8881 2011-01-26  Richard Guenther  <rguenther@suse.de>
8882
8883         PR bootstrap/47467
8884         * targext.c: Include config.h.
8885         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8886         dependency.
8887
8888 2011-01-04  Pascal Obry  <obry@adacore.com>
8889             Eric Botcazou  <ebotcazou@adacore.com>
8890
8891         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8892
8893 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8894
8895         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8896         end-of-case on the end label and its associated gotos, if any.
8897
8898 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8899
8900         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8901         expressions of the parameter cache within the statement group of
8902         the CICO mechanism.
8903
8904 2011-01-04  Olivier Hainque  <hainque@adacore.com>
8905             Eric Botcazou  <ebotcazou@adacore.com>
8906
8907         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8908         (set_end_locus_from_node): New function.
8909         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8910         make and the function end_locus.
8911         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8912         for the elaboration subprogram.
8913         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8914         set the end_locus of the expression as well.
8915
8916 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8917
8918         PR ada/47131
8919         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8920         variables that are referenced in exception handlers volatile.
8921
8922
8923 \f
8924 Copyright (C) 2011 Free Software Foundation, Inc.
8925
8926 Copying and distribution of this file, with or without modification,
8927 are permitted in any medium without royalty provided the copyright
8928 notice and this notice are preserved.
8929
8930         * gnat_rm.texi: Ramification of pragma Eliminate documentation
8931          - fix bugs in the description of Source_Trace;
8932          - get rid of UNIT_NAME;
8933
8934 2011-08-02  Javier Miranda  <miranda@adacore.com>
8935
8936         * exp_ch9.adb
8937         (Build_Dispatching_Requeue): Adding support for VM targets
8938         since we cannot directly reference the Tag entity.
8939         * exp_sel.adb (Build_K): Adding support for VM targets.
8940         (Build_S_Assignment): Adding support for VM targets.
8941         * exp_disp.adb
8942         (Default_Prim_Op_Position): In VM targets do not restrict availability
8943         of predefined interface primitives to compiling in Ada 2005 mode.
8944         (Is_Predefined_Interface_Primitive): In VM targets this service is not
8945         restricted to compiling in Ada 2005 mode.
8946         (Make_VM_TSD): Generate code that declares and initializes the OSD
8947         record. Needed to support dispatching calls through synchronized
8948         interfaces.
8949         * exp_ch3.adb
8950         (Make_Predefined_Primitive_Specs): Enable generation of predefined
8951         primitives associated with synchronized interfaces.
8952         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8953         primitives associated with synchronized interfaces.
8954
8955 2011-08-02  Yannick Moy  <moy@adacore.com>
8956
8957         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8958         statements hidden in SPARK if preceded by the HIDE directive
8959         (Parse_Exception_Handlers): mark each exception handler in a sequence of
8960         exception handlers as hidden in SPARK if preceded by the HIDE directive
8961         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8962         if starting with the HIDE directive
8963         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8964         starting with the HIDE directive; mark the declarations in a private
8965         part as hidden in SPARK if the private part starts with the HIDE
8966         directive
8967         * restrict.adb, restrict.ads
8968         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8969         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8970         argument node belongs to a part which is hidden in SPARK
8971         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8972         parts in SPARK; protect the possibly costly call to
8973         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8974         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8975         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8976         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8977         Tok_SPARK_Hide.
8978         (Scan): recognize special comment starting with '#' and followed by
8979         SPARK keyword "hide" as a HIDE directive.
8980
8981 2011-08-02  Yannick Moy  <moy@adacore.com>
8982
8983         * types.ads, erroutc.ads: Minor reformatting.
8984
8985 2011-08-02  Vincent Celier  <celier@adacore.com>
8986
8987         * link.c: Add response file support for cross platforms.
8988
8989 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8990
8991         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8992         in an association, set parent field of copy before partial analysis.
8993         * sem_res.adb (Resolve_Slice): create reference to itype only when
8994         expansion is enabled.
8995
8996 2011-08-02  Yannick Moy  <moy@adacore.com>
8997
8998         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8999         for new flag denoting which subprogram bodies are in ALFA
9000         * restrict.adb, sem_ch7.adb: Update comment
9001         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9002         sem_ch9.adb, sem_res.adb: Add calls to
9003         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9004         * sem_ch6.adb (Analyze_Function_Return): add calls to
9005         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9006         middle of the body, and extended return.
9007         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9008         False when missing return.
9009         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9010         to True for subprograms whose spec is in ALFA. Remove later on the flag
9011         on the entity used for a subprogram body when there exists a separate
9012         declaration.
9013         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9014         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9015         False, otherwise do nothing.
9016
9017 2011-08-02  Robert Dewar  <dewar@adacore.com>
9018
9019         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9020
9021 2011-08-02  Yannick Moy  <moy@adacore.com>
9022
9023         * sem_ch4.ads: minor formatting.
9024
9025 2011-08-02  Yannick Moy  <moy@adacore.com>
9026
9027         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9028         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9029         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9030         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9031         opt.ads: cleanup of SPARK mode
9032
9033 2011-08-02  Yannick Moy  <moy@adacore.com>
9034
9035         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9036         types.
9037         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9038         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9039         * sem_ch3.adb
9040         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9041         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9042         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9043         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9044         types.
9045         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9046         non-static range.
9047         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9048         functions whose return type is not in ALFA.
9049         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9050         specifications.
9051         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9052         parameter's type is not in ALFA.
9053         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9054         types are in ALFA.
9055
9056 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9057
9058         * sem_ch6 (Analyze_Expression_Function): treat the function as
9059         Inline_Always, and introduce a subprogram declaration for it when it is
9060         not a completion.
9061         * inline.adb (Add_Inlined_Body): recognize bodies that come from
9062         expression functions, so that the back-end can determine whether they
9063         can in fact be inlined.
9064         * sem_util.adb (Is_Expression_Function): predicate to determine whether
9065         a function body comes from an expression function.
9066
9067 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9068
9069         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9070         null exclusions to test Can_Never_Be_Null on the anonymous access types
9071         of the formals rather than testing the formals themselves. Exclude this
9072         check in cases where the Old_Formal is marked as a controlling formal,
9073         to avoid issuing spurious errors for bodies completing dispatching
9074         operations (due to the flag not getting set on controlling access
9075         formals in body specs).
9076         (Find_Corresponding_Spec): When checking full and subtype conformance of
9077         subprogram bodies in instances, pass Designated and E in that order, for
9078         consistency with the expected order of the formals (New_Id followed by
9079         Old_Id).
9080
9081 2011-08-02  Robert Dewar  <dewar@adacore.com>
9082
9083         * sem_ch8.adb: Minor reformatting.
9084
9085 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9086
9087         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9088         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9089         primitive operations of class-wide actuals.
9090
9091 2011-08-02  Javier Miranda  <miranda@adacore.com>
9092
9093         * exp_atag.ads, exp_atag.adb
9094         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9095         since its value is implicitly passed in argument Typ.
9096         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9097         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9098         Build_Common_Dispatching_Select_Statements.
9099
9100 2011-08-02  Robert Dewar  <dewar@adacore.com>
9101
9102         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9103         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9104         Minor reformatting.
9105
9106 2011-08-02  Robert Dewar  <dewar@adacore.com>
9107
9108         * sem_res.adb: Minor reformatting.
9109         * sem_prag.adb: Minor reformatting.
9110
9111 2011-08-02  Javier Miranda  <miranda@adacore.com>
9112
9113         * exp_atag.adb, exp_atags.ads
9114         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9115         by the tagged type Entity. Required to use this routine in the VM
9116         targets since we do not have available the Tag entity in the VM
9117         platforms.
9118         * exp_ch6.adb
9119         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9120         Ada.Tags has not been previously loaded.
9121         * exp_ch7.adb
9122         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9123         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9124         * sem_aux.adb
9125         (Enclosing_Dynamic_Scope): Add missing support to handle the full
9126         view of enclosing scopes. Required to handle enclosing scopes that
9127         are synchronized types whose full view is a task type.
9128         * exp_disp.adb
9129         (Build_VM_TSDs): Minor code improvement to avoid generating and
9130         analyzing lists with empty nodes.
9131         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9132         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9133         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9134         (Make_Disp_Timed_Select_Body): Add support for VM targets.
9135         (Make_Select_Specific_Data_Table): Add support for VM targets.
9136         (Make_VM_TSD): Generate code to initialize the SSD structure of
9137         the TSD.
9138
9139 2011-08-02  Yannick Moy  <moy@adacore.com>
9140
9141         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9142         cross-references section in ALI.
9143         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9144         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9145         Sub).
9146         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9147         subprogram or package entity of a node
9148         (Is_Local_Reference_Type): new function returns True for references
9149         selected in local cross-references.
9150         (Lt): function extracted from Lt in Output_References
9151         (Write_Entity_Name): function extracted from Output_References
9152         (Generate_Definition): generate reference with type 'D' for definition
9153         of objects (object declaration and parameter specification), with
9154         appropriate locations and units, for use in local cross-references.
9155         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9156         references of type 'I' for initialization in object definition.
9157         (Output_References): move part of function Lt and procedure
9158         Write_Entity_Name outside of the body. Ignore references of types 'D'
9159         and 'I' introduced for local cross-references.
9160         (Output_Local_References): new procedure to output the local
9161         cross-references sections.
9162         (Lref_Entity_Status): new array defining whether an entity is a local
9163         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9164         with 'I' type when initialization expression is present.
9165         * get_scos.adb, get_scos.ads: Correct comments and typos
9166
9167 2011-08-02  Javier Miranda  <miranda@adacore.com>
9168
9169         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9170         the JVM target.
9171         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9172         the JVM target.
9173         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9174         TSD support.
9175
9176 2011-08-02  Vincent Celier  <celier@adacore.com>
9177
9178         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9179         (No_Space_Img): New function
9180         (Find_Excluded_Sources): When reading from a file, record the file name
9181         and the line number for each excluded source.
9182         (Mark_Excluded_Sources): When reporting an error, if the excluded
9183         sources were read from a file, include file name and line number in
9184         the error message.
9185
9186 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9187
9188         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9189
9190 2011-08-02  Robert Dewar  <dewar@adacore.com>
9191
9192         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9193
9194 2011-08-02  Javier Miranda  <miranda@adacore.com>
9195
9196         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9197         generation of TSDs to the DOTNET compiler.
9198         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9199         generation of TSDs to the DOTNET compiler.
9200
9201 2011-08-02  Javier Miranda  <miranda@adacore.com>
9202
9203         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9204         record of all the tagged types declared inside library level package
9205         declarations, library level package bodies or library level subprograms.
9206         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9207         associated with a given tagged type.
9208         (Build_VM_TSDs): New subprogram.
9209         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9210         compilation units that are subprograms.
9211         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9212         compilation units that are package bodies.
9213         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9214         units that are a package declaration or a package instantiation.
9215         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9216         reorganization to improve the error generated by the frontend when the
9217         function Ada.Tags.Secondary_Tag is not available.
9218         * rtsfind.ads (RE_Register_TSD): New runtime entity.
9219         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9220
9221 2011-08-02  Javier Miranda  <miranda@adacore.com>
9222
9223         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9224
9225 2011-08-02  Robert Dewar  <dewar@adacore.com>
9226
9227         * s-imenne.ads: Minor reformatting.
9228
9229 2011-08-02  Robert Dewar  <dewar@adacore.com>
9230
9231         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9232         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9233         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9234
9235 2011-08-02  Robert Dewar  <dewar@adacore.com>
9236
9237         * einfo.ads (Materialize_Entity): Document this is only for renamings
9238         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9239         required debug information in the case where we transform the object
9240         declaration into a renaming declaration.
9241         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9242         object
9243         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9244         Materialize_Entity.
9245
9246 2011-08-02  Robert Dewar  <dewar@adacore.com>
9247
9248         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9249         Suppress_Init_Procs.
9250         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9251         Suppress_Initialization/Initialization_Suppressed.
9252         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9253         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9254         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9255         * sem_prag.adb: New processing for pragma Suppress_Initialization.
9256
9257 2011-08-02  Robert Dewar  <dewar@adacore.com>
9258
9259         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9260         Minor reformatting.
9261
9262 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9263
9264         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9265         only have inheritable classwide pre/postconditions.
9266
9267 2011-08-02  Javier Miranda  <miranda@adacore.com>
9268
9269         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9270         * rtsfind.ads (RE_Check_TSD): New runtime entity.
9271         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9272         checks if the external tag of a type is the same as the external tag
9273         of some other declaration.
9274
9275 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9276
9277         * s-taskin.ads: Minor reformatting.
9278
9279 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9280
9281         * g-comlin.adb (Display_Help): swap the order in which it prints the
9282         short help and the general usage.
9283
9284 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9285
9286         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9287         the aspect declarations and attach them to the generic copy for
9288         subsequent analysis.
9289         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9290         declarations of the generic tree to the new subprogram declarations.
9291         * sem_attr.adb (Check_Precondition_Postcondition): recognize
9292         conditions that apply to a subprogram instance.
9293
9294 2011-08-02  Robert Dewar  <dewar@adacore.com>
9295
9296         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9297
9298 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9299
9300         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9301         private type with a tagged full view is not derived in the immediate
9302         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9303
9304 2011-08-02  Robert Dewar  <dewar@adacore.com>
9305
9306         * exp_ch4.adb: Minor reformatting.
9307
9308 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9309
9310         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
9311         Ada2012 iterator, the loop will be rewritten during expansion into a
9312         while loop with a cursor and an element declaration. Do not analyze the
9313         body in this case, because if the container is for indefinite types the
9314         actual subtype of the elements will only be determined when the cursor
9315         declaration is analyzed.
9316
9317 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9318
9319         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9320         size/alignment related attributes in CodePeer_Mode.
9321
9322 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9323
9324         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9325         Prepend_Element, since this can result in the operation getting the
9326         wrong slot in the full type's dispatch table if the full type has
9327         inherited operations. The incomplete type's operation will get added
9328         to the proper position in the full type's primitives
9329         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9330         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9331         dispatching operations, since there are cases where nonprimitive
9332         subprograms can get added to the list of incomplete dependents (such
9333         as subprograms in nested packages).
9334         * sem_ch6.adb (Process_Formals): First, remove test for being in a
9335         private part when determining whether to add a primitive with a
9336         parameter of a tagged incomplete type to the Private_Dependents list.
9337         Such primitives can also occur in the visible part, and should not have
9338         been excluded from being private dependents.
9339         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9340         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9341         list of a Taft-amendment incomplete type is a primitive before issuing
9342         an error that the full type must appear in the same unit. There are
9343         cases where nonprimitives can be in the list (such as subprograms in
9344         nested packages).
9345         * sem_disp.adb (Derives_From): Use correct condition for checking that
9346         a formal's type is derived from the type of the corresponding formal in
9347         the parent subprogram (the condition was completely wrong). Add
9348         checking that was missing for controlling result types being derived
9349         from the result type of the parent operation.
9350
9351 2011-08-02  Yannick Moy  <moy@adacore.com>
9352
9353         * errout.adb (First_Node): minor renaming
9354         * restrict.adb (Check_Formal_Restriction): put restriction warning on
9355         first node.
9356
9357 2011-08-02  Yannick Moy  <moy@adacore.com>
9358
9359         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9360         before accessing operands.
9361         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9362         decide whether an initialization expression respects SPARK rules, as
9363         the plain node is the expanded one. This allows for more valid warnings
9364         to be issued.
9365         * gnat_rm.texi: Minor update.
9366
9367 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9368
9369         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9370         previous change.
9371
9372 2011-08-02  Robert Dewar  <dewar@adacore.com>
9373
9374         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9375
9376 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9377
9378         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9379         loop statements and the element renaming declaration with a block when
9380         the element type is controlled.
9381
9382 2011-08-02  Yannick Moy  <moy@adacore.com>
9383
9384         * sinfo.ads: Minor formatting.
9385
9386 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9387
9388         * sem_aggr.adb (Add_Association): if the association has a box and no
9389         expression, use the Sloc of the aggregate itself for the new
9390         association.
9391         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9392         the Original_Node.
9393
9394 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9395
9396         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9397         When a container is provided via a function call, generate a renaming
9398         of the function result. This avoids the creation of a transient scope
9399         and the premature finalization of the container.
9400         * exp_ch7.adb (Is_Container_Cursor): Removed.
9401         (Wrap_Transient_Declaration): Remove the supression of the finalization
9402         of the list controller when the declaration denotes a container cursor,
9403         it is not needed.
9404
9405 2011-08-02  Yannick Moy  <moy@adacore.com>
9406
9407         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9408         node is from source, instead of the original node being from source.
9409         * sem_aggr.adb
9410         (Resolve_Array_Aggregate): refine the check for a static expression, to
9411         recognize also static ranges
9412         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9413         Array_Type_Declaration): postpone the test for the type being a subtype
9414         mark after the type has been resolved, so that component-selection and
9415         expanded-name are discriminated.
9416         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9417         to distinguish the case of an iteration scheme, so that an error is
9418         issed on a non-static range in SPARK except in an iteration scheme.
9419         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9420         In_Iter_Schm = True.
9421         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9422         user-defined operators so that they are allowed in renaming
9423         * sem_ch8.adb
9424         (Find_Selected_Component): refine the check for prefixing of operators
9425         so that they are allowed in renaming. Move the checks for restrictions
9426         on selector name after analysis discriminated between
9427         component-selection and expanded-name.
9428         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9429         concatenation argument of string type if it is static.
9430         * sem_util.adb, sem_util.ads
9431         (Check_Later_Vs_Basic_Declarations): add a new function
9432         Is_Later_Declarative_Item to decice which declarations are allowed as
9433         later items, in the two different modes Ada 83 and SPARK. In the SPARK
9434         mode, add that renamings are considered as later items.
9435         (Enclosing_Package): new function to return the enclosing package
9436         (Enter_Name): correct the rule for homonyms in SPARK
9437         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9438         from source (result of expansion) to avoid issuing wrong warnings.
9439
9440 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9441
9442         * errout.adb: On anything but an expression First_Node returns its
9443         argument.
9444
9445 2011-08-02  Pascal Obry  <obry@adacore.com>
9446
9447         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9448
9449 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9450
9451         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9452         Set the associated loop as the related expression of internally
9453         generated cursors.
9454         * exp_ch7.adb (Is_Container_Cursor): New routine.
9455         (Wrap_Transient_Declaration): Supress the finalization of the list
9456         controller when the declaration denotes a container cursor.
9457
9458 2011-08-02  Yannick Moy  <moy@adacore.com>
9459
9460         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9461         command line now.
9462         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9463         expression is a simple expression. This check cannot be performed in
9464         the semantics, so just drop it.
9465         (P_Index_Or_Discriminant_Constraint): move check that the index or
9466         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9467         semantics. Other cases were previously checked in the semantics.
9468         * par-ch4.adb (P_Name): move checks that a selector name is not
9469         character literal or an operator symbol to Find_Selected_Component in
9470         the semantics
9471         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9472         declarations are not placed after later declarations in a separate
9473         procedure in Sem_Util (possibly not the best choice?), to be used both
9474         during parsing, for Ada 83 mode, and during semantic analysis, for
9475         SPARK mode.
9476         * par-endh.adb (Check_End): move check that end label is not missing
9477         to Process_End_Label in the semantics
9478         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9479         the special case for SPARK restriction
9480         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9481         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9482         parameter Force to issue the error message even on internal node (used
9483         for generated end label). Call Check_Restriction to check when an error
9484         must be issued. In SPARK mode, issue an error message even if the
9485         restriction is not set.
9486         (Check_Restriction): new procedure with an additional out parameter to
9487         inform the caller that a message has been issued
9488         * sem_aggr.adb: Minor modification of message
9489         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9490         instead of issuing an error message directly
9491         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9492         declarations are not placed after later declarations, by calling
9493         Check_Later_Vs_Basic_Declarations
9494         (Analyze_Subtype_Declaration): move here the check that an index or
9495         discriminant constraint must be a subtype mark. Change the check that
9496         a subtype of String must start at one so that it works on subtype marks.
9497         * sem_ch4.adb (Analyze_Call): move here the check that a named
9498         association cannot follow a positional one in a call
9499         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9500         instead of issuing an error message directly
9501         * sem_ch8.adb (Find_Selected_Component): move here the check that a
9502         selector name is not a character literal or an operator symbol. Move
9503         here the check that the prefix of an expanded name cannot be a
9504         subprogram or a loop statement.
9505         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9506         procedure called from parsing and semantics to check that basic
9507         declarations are not placed after later declarations
9508         (Process_End_Label): move here the check that end label is not missing
9509
9510 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9511
9512         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9513         representation clause in codepeer mode, since it confuses CodePeer and
9514         does not bring useful info.
9515
9516 2011-08-02  Ed Falis  <falis@adacore.com>
9517
9518         * init.c: initialize fp hw on MILS.
9519
9520 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9521
9522         * errout.adb (First_Node): for bodies, return the node itself (small
9523         optimization). For other nodes, do not check source_unit if the node
9524         comes from Standard.
9525
9526 2011-08-02  Robert Dewar  <dewar@adacore.com>
9527
9528         * exp_ch3.adb: Minor comment additions.
9529         * sem_ch13.adb: Minor reformatting.
9530
9531 2011-08-02  Pascal Obry  <obry@adacore.com>
9532
9533         * make.adb, makeutl.adb: Removes some superfluous directory separator.
9534
9535 2011-08-02  Robert Dewar  <dewar@adacore.com>
9536
9537         * sem_attr.adb: Minor reformatting.
9538
9539 2011-08-02  Robert Dewar  <dewar@adacore.com>
9540
9541         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9542         (Has_Default_Component_Value): Removed
9543         * einfo.ads Comment updates
9544         (Has_Default_Aspect): Replaces Has_Default_Value
9545         (Has_Default_Component_Value): Removed
9546         * exp_ch13.adb
9547         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9548         * exp_ch3.adb
9549         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9550         (Get_Simple_Init_Val): Handle Default_Value aspect
9551         (Needs_Simple_Initialization): Handle Default_Value aspect
9552         * exp_ch3.ads: Needs_Simple_Initialization
9553         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9554         * par-prag.adb (Pragma_Default[_Component]Value) Removed
9555         * sem_ch13.adb
9556         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9557         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9558         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9559
9560 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9561
9562         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9563         package containing iteration primitives.
9564         exp_ch5.adb (Expand_Iterator_Loop): ditto.
9565
9566 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9567
9568         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9569         "of", pre-analyze expression in case it is a function call with
9570         finalization actions that must be placed ahead of the loop.
9571         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9572         on an Ada2012 iterator, insert them ahead of the rewritten loop.
9573
9574 2011-08-02  Geert Bosch  <bosch@adacore.com>
9575
9576         * cstand.adb (Create_Float_Types): Only consider C's long double for
9577         Long_Long_Float, in addition to double.
9578
9579 2011-08-02  Robert Dewar  <dewar@adacore.com>
9580
9581         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9582         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9583         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9584         Minor reformatting.
9585
9586 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9587
9588         * sem_attr.adb: handle properly 'Result when it is a prefix of an
9589         indexed component.
9590
9591 2011-08-02  Javier Miranda  <miranda@adacore.com>
9592
9593         * einfo.ads, einfo.adb
9594         (Original_Access_Type): Move this attribute to Node26 since there was
9595         an undocumented use of Node21 in E_Access_Subprogram_Type entities
9596         which causes conflicts and breaks the generation of the .NET compiler.
9597         (Interface_Name): Add missing documentation on JGNAT only uses of
9598         this attribute.
9599
9600 2011-08-02  Geert Bosch  <bosch@adacore.com>
9601
9602         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9603         (Find_Back_End_Float_Type): Likewise
9604         (Create_Back_End_Float_Types): Likewise
9605         (Create_Float_Types): Likewise
9606         (Register_Float_Type): Likewise
9607         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9608         Nlist and split out type selection in new local Find_Base_Type function.
9609         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9610         Nlist
9611         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9612
9613 2011-08-02  Robert Dewar  <dewar@adacore.com>
9614
9615         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9616         alpha order).
9617         * opt.ads: Minor comment change.
9618         * sem_ch12.adb: Minor code reorganization.
9619
9620 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9621
9622         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9623         subtype's list of rep items to the list on the full subtype in the case
9624         where the lists are the same.
9625
9626 2011-08-02  Geert Bosch  <bosch@adacore.com>
9627
9628         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9629         using the one from System.Strings, which also deallocates all strings.
9630
9631 2011-08-02  Geert Bosch  <bosch@adacore.com>
9632
9633         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9634         function.
9635         * gcc-interface/Make-lang.in: Update dependencies.
9636
9637 2011-08-02  Olivier Hainque  <hainque@adacore.com>
9638
9639         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9640         end_locus.
9641
9642 2011-08-02  Javier Miranda  <miranda@adacore.com>
9643
9644         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9645         associated with anonymous access to subprograms.
9646
9647 2011-08-02  Geert Bosch  <bosch@adacore.com>
9648
9649         * opt.ads
9650         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9651         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9652         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9653         (Add_Symbol_Definition): Move to switch-c.adb
9654         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9655         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9656         (Add_Symbol_Definition): Move to switch-c.adb.
9657         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9658         * sem_warn.adb
9659         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9660         Move to warnsw.adb.
9661         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9662         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9663         Move to warnsw.adb.
9664         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
9665         (Add_Symbol_Definition): Moved from Prepcomp.
9666         * switch-c.ads: Update copyright notice. Use String_List instead of
9667         Argument_List, removing dependency on System.OS_Lib.
9668
9669 2011-08-02  Yannick Moy  <moy@adacore.com>
9670
9671         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9672         mode on initialization expression which does not respect SPARK
9673         restrictions.
9674         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9675         if the tree referenced by its argument represents an initialization
9676         expression in SPARK, suitable for initializing an object in an object
9677         declaration.
9678
9679 2011-08-02  Javier Miranda  <miranda@adacore.com>
9680
9681         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9682         internally generated access to subprogram with its associated protected
9683         subprogram type.
9684         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9685
9686 2011-08-02  Geert Bosch  <bosch@adacore.com>
9687
9688         * cstand.adb (Register_Float_Type): Print information about type to
9689         register, if the Debug_Flag_Dot_B is set.
9690         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9691         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9692         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9693         with a requested precision of more than Max_Digits digits and no more
9694         than Max_Base_Digits digits, if a range specification is present and the
9695         Predefined_Float_Types list has a suitable type to derive from.
9696         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9697         case of type completion with pragma Import
9698         * sem_prag.adb
9699         (Process_Import_Predefined_Type): Processing to complete a type
9700         with pragma Import. Currently supports floating point types only.
9701         (Set_Convention_From_Pragma): Do nothing without underlying type.
9702         (Process_Convention): Guard against absence of underlying type,
9703         which may happen when importing incomplete types.
9704         (Process_Import_Or_Interface): Handle case of importing predefined
9705         types. Tweak error message.
9706
9707 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9708
9709         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9710         functions to previous change.  Reorganize code slightly.
9711
9712 2011-08-02  Geert Bosch  <bosch@adacore.com>
9713
9714         * back_end.ads (Register_Type_Proc): New call back procedure type for
9715         allowing the back end to provide information about available types.
9716         (Register_Back_End_Types): New procedure to register back end types.
9717         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9718         available types.
9719         * cstand.adb (Back_End_Float_Types): New list for floating point types
9720         supported by the back end.
9721         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9722         (Copy_Float_Type): New procedure to make new copies of predefined types.
9723         (Register_Float_Type): New call back procedure to populate the BEFT list
9724         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9725         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9726         (Create_Float_Types): New procedure to create entities for floating
9727         point types predefined in Standard, and put these and any remaining
9728         BEFTs on the Predefined_Float_Types list.
9729         * stand.ads (Predefined_Float_Types): New list for predefined floating
9730         point types that do not have declarations in package Standard.
9731
9732 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9733
9734         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
9735         entity node for the unit containing the parameter.
9736         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
9737         (Add_Inlined_Subprogram): Likewise.
9738         * gcc-interface/Make-lang.in: Update dependencies.
9739
9740 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9741
9742         * s-stusta.adb (Print): Make sure Pos is always initialized to a
9743         suitable value.
9744
9745 2011-08-02  Geert Bosch  <bosch@adacore.com>
9746
9747         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
9748
9749 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9750
9751         * sem_type.adb (Covers): Move trivial case to the top and reuse the
9752         computed value of Base_Type.
9753
9754 2011-08-02  Yannick Moy  <moy@adacore.com>
9755
9756         * restrict.adb (Check_Restriction): issue an error for any use of
9757         class-wide, even if the No_Dispatch restriction is not set.
9758         * sem_aggr.adb: Correct typos in comments and messages in formal mode
9759         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
9760         when completing a private extension, the type named in the private part
9761         is not the same as that named in the visible part.
9762         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
9763         of an inherited primitive operations of a tagged type or type extension
9764         that returns the tagged type.
9765         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
9766         function which returns True for an implicit operation inherited by the
9767         derived type declaration for the argument type.
9768         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
9769         order.
9770
9771 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9772
9773         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
9774         Process_Bounds, to perform analysis with expansion of a range or an
9775         expression that is the iteration scheme for a loop.
9776         (Analyze_Iterator_Specification): If domain of iteration is given by a
9777         function call with a controlled result, as is the case if call returns
9778         a predefined container, ensure that finalization actions are properly
9779         generated.
9780         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
9781
9782 2011-08-02  Javier Miranda  <miranda@adacore.com>
9783
9784         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9785         * gcc-interface/Make-lang.in: Update dependencies.
9786
9787 2011-08-02  Javier Miranda  <miranda@adacore.com>
9788
9789         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9790         determine if the analysis is performed using N or Original_Node (N).
9791         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9792         functionality of routine Is_Variable avoids code duplication.
9793         * checks.adb (Determine_Range): Handle temporaries generated by
9794         Remove_Side_Effects.
9795
9796 2011-08-02  Javier Miranda  <miranda@adacore.com>
9797
9798         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9799         expansion of the condition. Required since the previous analysis was
9800         done with expansion disabled (see Resolve_Quantified_Expression) and
9801         hence checks were not inserted and record comparisons have not been
9802         expanded.
9803
9804 2011-08-02  Ed Falis  <falis@adacore.com>
9805
9806         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9807         Update header.
9808
9809 2011-08-02  Bob Duff  <duff@adacore.com>
9810
9811         * opt.ads: Minor comment fix.
9812
9813 2011-08-02  Bob Duff  <duff@adacore.com>
9814
9815         * sem_ch12.adb (Analyze_Package_Instantiation,
9816         Analyze_Subprogram_Instantiation): Turn off style checking while
9817         analyzing an instance. Whatever style checks that apply to the generic
9818         unit should apply, so it makes no sense to apply them in an instance.
9819         This was causing trouble when compiling an instance of a runtime
9820         unit that violates the -gnatyO switch.
9821         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9822         one of the two case statements, causing spurious errors.
9823
9824 2011-08-02  Robert Dewar  <dewar@adacore.com>
9825
9826         * uname.adb: Minor reformatting.
9827         * gnatcmd.adb: Minor reformatting.
9828         * exp_attr.adb: Minor reformatting.
9829
9830 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9831
9832         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9833         No_Dispatching_Calls, do not look for the Assign primitive, because
9834         predefined primitives are not created in this case.
9835
9836 2011-08-02  Bob Duff  <duff@adacore.com>
9837
9838         * stylesw.ads: Minor comment fixes.
9839
9840 2011-08-02  Robert Dewar  <dewar@adacore.com>
9841
9842         * freeze.adb (Add_To_Result): New procedure.
9843
9844 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9845
9846         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9847         time, if the specific run-time routines for handling streams of strings
9848         are not available, use the default mechanism.
9849
9850 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9851
9852         * s-regpat.ads: Fix typo.
9853
9854 2011-08-02  Vincent Celier  <celier@adacore.com>
9855
9856         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9857         not null, call it to create the in memory config project file without
9858         parsing an existing default config project file.
9859
9860 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9861
9862         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9863
9864 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9865
9866         * sem_elim.adb: an abstract subprogram does not need an eliminate
9867         pragma for its descendant to be eliminable.
9868
9869 2011-08-02  Ed Falis  <falis@adacore.com>
9870
9871         * init.c: revert to handling before previous checkin for VxWorks
9872         * s-intman-vxworks.adb: delete unnecessary declarations related to
9873         using Ada interrupt facilities for handling signals.
9874         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9875         * s-intman-vxworks.ads: Import __gnat_install_handler as
9876         Initialize_Interrupts.
9877         * s-taprop-vxworks.adb: Delete Signal_Mask.
9878         (Abort_Handler): change construction of mask to unblock exception
9879         signals.
9880
9881 2011-08-02  Jerome Guitton  <guitton@adacore.com>
9882
9883         * a-except-2005.adb (Raise_From_Signal_Handler): Call
9884         Debug_Raise_Exception before propagation starts.
9885
9886 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9887
9888         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9889         to Restriction_Check_Required.
9890         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9891         * sem_res.adb (Resolve_Call): Likewise.
9892         * sem_attr.adb (Check_Stream_Attribute): Likewise.
9893
9894 2011-08-02  Bob Duff  <duff@adacore.com>
9895
9896         * stylesw.ads: Update comment.
9897         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9898         * errout.ads: Remove obsolete comment.
9899
9900 2011-08-02  Javier Miranda  <miranda@adacore.com>
9901
9902         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9903         (Set_Is_Safe_To_Reevaluate): new procedure.
9904         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9905         assignment is allowed on safe-to-reevaluate variables.
9906         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9907         temporary created to remove side effects in expressions that use
9908         the secondary stack as safe-to-reevaluate.
9909         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9910         variables that are not true constants.
9911
9912 2011-08-02  Robert Dewar  <dewar@adacore.com>
9913
9914         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9915         sem_res.adb, sem_ch6.adb: Minor reformatting.
9916
9917 2011-08-02  Jerome Guitton  <guitton@adacore.com>
9918
9919         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9920
9921 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9922
9923         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9924         not set Overridden_Operation if subprogram is an initialization
9925         procedure.
9926
9927 2011-08-02  Yannick Moy  <moy@adacore.com>
9928
9929         * par-ch6.adb: Correct obsolete name in comments
9930         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9931         which takes two message arguments (existing function takes one), with
9932         second message used for continuation.
9933         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9934         block statements that originate from a source block statement, not
9935         generated block statements
9936         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9937         symmetry with procedure case
9938         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9939         function to issue an error in formal mode if a package specification
9940         contains more than one tagged type or type extension.
9941         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9942         parameters matching formals of tagged types are objects (or ancestor
9943         type conversions of objects), not general expressions. Issue an error
9944         on view conversions that are not involving ancestor conversion of an
9945         extended type.
9946         (Resolve_Type_Conversion): in formal mode, issue an error on the
9947         operand of an ancestor type conversion which is not an object
9948         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9949         procedure so that it works also for actuals of function calls
9950         (Is_Actual_Tagged_Parameter): new function which determines if its
9951         argument is an actual parameter of a formal of tagged type in a
9952         subprogram call
9953         (Is_SPARK_Object_Reference): new function which determines if the tree
9954         referenced by its argument represents an object in SPARK
9955
9956 2011-08-02  Robert Dewar  <dewar@adacore.com>
9957
9958         * sem_ch3.adb: Minor reformatting
9959         Minor comment addition
9960         Minor error msg text change
9961
9962 2011-08-02  Javier Miranda  <miranda@adacore.com>
9963
9964         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9965         function. Used to be more precise when we generate a variable plus one
9966         assignment to remove side effects in the evaluation of the Bound
9967         expressions.
9968         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9969         of the bound expression to force its re-analysis and thus expand the
9970         associated transient scope (if required). Code cleanup replacing the
9971         previous code that declared the constant entity by an invocation to
9972         routine Force_Evaluation which centralizes this work in the frontend.
9973
9974 2011-08-02  Robert Dewar  <dewar@adacore.com>
9975
9976         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9977         (Base_Type): Now uses improved Is_Base_Type function
9978         * einfo.ads (Base_Type): Inline this function
9979
9980 2011-08-02  Robert Dewar  <dewar@adacore.com>
9981
9982         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9983         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9984
9985 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9986
9987         * gcc-interface/Make-lang.in: Update dependencies.
9988         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9989         targets.
9990
9991 2011-08-02  Yannick Moy  <moy@adacore.com>
9992
9993         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9994         non-simple expression used in delta constraint
9995         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9996         index constraint which is not a subtype mark
9997         * par.adb: With and use Restrict
9998         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9999         mode on component type which is not a subtype mark and default
10000         expression on component
10001         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10002         of string which does not have a lower index bound equal to 1
10003         (Array_Type_Declaration): issue an error in formal mode on index or
10004         component type which is not a subtype mark, and on aliased keyword on
10005         component
10006         (Derived_Type_Declaration): issue an error in formal mode on interface,
10007         limited or abstract type
10008         (Record_Type_Declaration): issue an error in formal mode on interface
10009         (Record_Type_Definition): issue an error in formal mode on tagged types
10010         and type extensions not declared in the specification of a library unit
10011         package; on null non-tagged record; on variant part
10012
10013 2011-08-02  Vincent Celier  <celier@adacore.com>
10014
10015         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10016         not declared for qualified library project when Library_Name is not
10017         declared, but Library_Dir is.
10018
10019 2011-08-02  Robert Dewar  <dewar@adacore.com>
10020
10021         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10022         pragmas (affects aspects [Component_]Default_Value
10023         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10024         component type for the resolution
10025
10026 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10027
10028         * einfo.adb (Base_Type): Tune implementation for speed.
10029
10030 2011-08-02  Robert Dewar  <dewar@adacore.com>
10031
10032         * freeze.adb: Minor reformatting.
10033
10034 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10035
10036         * scos.ads: Update comments.
10037
10038 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10039
10040         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10041         base type, because the parent may be a subtype of a private type whose
10042         convention is established in a private part.
10043
10044 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10045
10046         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10047         statement in a block when the expansion of the return expression has
10048         created a finalization chain.
10049         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10050         with the parent node.
10051         Add N_Extended_Return_Statement to handle the case where a transient
10052         object declaration appears in the Return_Object_Declarations list of
10053         an extended return statement.
10054
10055 2011-08-02  Matthew Gingell  <gingell@adacore.com>
10056
10057         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10058         unused parameter 'name'.
10059
10060 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10061
10062         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10063         inherited operation, check whether its alias, which is the source
10064         operastion that it renames, has been marked eliminated.
10065
10066 2011-08-02  Javier Miranda  <miranda@adacore.com>
10067
10068         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10069         in-mode parameter whose type is an access type since it can be used to
10070         modify its designated object. Enforce code that handles as safe an
10071         access type that is not access-to-constant but it is the result of a
10072         previous removal of side-effects.
10073         (Remove_Side_Effects): Minor code reorganization of cases which require
10074         no action. Done to incorporate documentation on new cases uncovered
10075         working in this ticket: no action needed if this routine was invoked
10076         too early and the nodes are not yet decorated.
10077         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10078         to routine Remove_Side_Effects by calls to Force_Evaluation since they
10079         were issued with actuals that are implicitly provided by
10080         Force_Evaluation.
10081
10082 2011-08-02  Robert Dewar  <dewar@adacore.com>
10083
10084         * sem_ch3.adb, sem_res.adb: Minor reformatting.
10085
10086 2011-08-02  Yannick Moy  <moy@adacore.com>
10087
10088         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10089         to issue an error in formal mode on attribute not supported in this mode
10090         (Analyze_Attribute): issue errors on standard attributes not supported
10091         in formal mode.
10092         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10093         comment, and issue error in formal mode on modulus which is not a power
10094         of 2.
10095         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10096         range.
10097         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10098         subtype mark.
10099         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10100         operator on modular type (except 'not').
10101
10102 2011-08-02  Robert Dewar  <dewar@adacore.com>
10103
10104         * gnat_rm.texi: Minor reformatting.
10105
10106 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10107
10108         * s-osinte-linux.ads: Minor comment update and reformatting.
10109         * i-cexten.ads: Make this unit pure, as for its parent.
10110         Will allow its usage in more contexts if needed.
10111
10112 2011-08-02  Robert Dewar  <dewar@adacore.com>
10113
10114         * s-utf_32.ads: Minor comment fix.
10115
10116 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10117
10118         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10119         operation of a tagged synchronized type, handle the case where the
10120         controlling argument is overloaded.
10121
10122 2011-08-02  Yannick Moy  <moy@adacore.com>
10123
10124         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10125         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10126         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10127         SPARK mode and formal verification mode on processing SPARK restriction
10128         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10129         requiring consistency checking.
10130
10131 2011-08-02  Robert Dewar  <dewar@adacore.com>
10132
10133         * sem_res.adb: Minor reformatting.
10134
10135 2011-08-02  Robert Dewar  <dewar@adacore.com>
10136
10137         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10138         a-cforse.ads: Remove unneeded with of Ada.Containers
10139         Remove commented out pragma Inline's
10140         Move specifications of new subprograms to the actual specs
10141
10142 2011-08-02  Yannick Moy  <moy@adacore.com>
10143
10144         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10145         a-cforse.ads: Update comments.
10146
10147 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10148
10149         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10150
10151 2011-08-02  Robert Dewar  <dewar@adacore.com>
10152
10153         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10154         a-cforse.ads, a-cofove.ads: Minor reformatting.
10155
10156 2011-08-02  Claire Dross  <dross@adacore.com>
10157
10158         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10159         a-cofove.ads: Add comments.
10160
10161 2011-08-02  Yannick Moy  <moy@adacore.com>
10162
10163         * gnat_rm.texi: Document formal containers.
10164
10165 2011-08-02  Emmanuel Briot  <briot@adacore.com>
10166
10167         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10168         are empty sections.
10169
10170 2011-08-02  Robert Dewar  <dewar@adacore.com>
10171
10172         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10173         reformatting.
10174
10175 2011-08-02  Robert Dewar  <dewar@adacore.com>
10176
10177         * aspects.adb: New aspects Default_Value and Default_Component_Value
10178         New format of Aspect_Names table checks for omitted entries
10179         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10180         handling of boolean aspects for derived types.
10181         New aspects Default_Value and Default_Component_Value
10182         New format of Aspect_Names table checks for omitted entries
10183         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10184         (Has_Default_Value): New flag
10185         (Has_Default_Component_Value): New flag
10186         (Has_Default_Value): New flag
10187         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10188         table.
10189         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10190         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10191         Default_Value and Default_Component_Value
10192         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10193         New aspects Default_Value and Default_Component_Value
10194         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10195         * sprint.adb: Print N_Aspect_Specification node when called from gdb
10196
10197 2011-08-02  Vincent Celier  <celier@adacore.com>
10198
10199         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10200         inherit library kind.
10201
10202 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10203
10204         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10205         Minor reformatting.
10206
10207 2011-08-02  Robert Dewar  <dewar@adacore.com>
10208
10209         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10210
10211 2011-08-02  Yannick Moy  <moy@adacore.com>
10212
10213         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10214
10215 2011-08-02  Robert Dewar  <dewar@adacore.com>
10216
10217         * impunit.adb: Add comment.
10218
10219 2011-08-02  Yannick Moy  <moy@adacore.com>
10220
10221         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10222         qualification of aggregates in formal mode
10223         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10224         another aggregate
10225         (Resolve_Aggregate): complete the test that an aggregate is adequately
10226         qualified in formal mode
10227
10228 2011-08-02  Pascal Obry  <obry@adacore.com>
10229
10230         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10231         * mlib-prj.adb: Supress warning when compiling binder generated file.
10232         (Build_Library): Supress all warnings when compiling the binder
10233         generated file.
10234
10235 2011-08-02  Yannick Moy  <moy@adacore.com>
10236
10237         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10238         from here...
10239         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10240         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10241         Add with/use clauses to make Check_Formal_Restriction visible
10242
10243 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10244
10245         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10246         in-parameters when type of the generic formal is private in the generic
10247         spec and non-private in the body.
10248
10249 2011-08-02  Claire Dross  <dross@adacore.com>
10250
10251         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10252         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10253         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10254         * impunit.adb, Makefile.rtl: Take new files into account.
10255
10256 2011-08-02  Robert Dewar  <dewar@adacore.com>
10257
10258         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10259         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10260
10261 2011-08-02  Yannick Moy  <moy@adacore.com>
10262
10263         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10264         formal mode
10265         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10266         matching static array bounds, taking into account the special case of
10267         string literals
10268         * sem_ch3.adb: Typo in comment.
10269
10270 2011-08-02  Yannick Moy  <moy@adacore.com>
10271
10272         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10273         which issues an error in formal mode if its argument node is originally
10274         from source
10275         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10276         has a discriminant specification so that it does not include the case
10277         of derived types
10278         (Derived_Type_Declaration): move here the test that a derived type has a
10279         discriminant specification
10280         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10281         first element of a component association before accessing its choices
10282         (presence of component association is not enough)
10283         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10284         declaration is a library item before accessing the next element in a
10285         list, as library items are not member of lists
10286         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10287         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10288         Check_Formal_Restriction whenever possible.
10289
10290 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10291
10292         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10293         reference when needed.
10294
10295 2011-08-02  Bob Duff  <duff@adacore.com>
10296
10297         * gnat_ugn.texi: Fix typo.
10298
10299 2011-08-02  Vincent Celier  <celier@adacore.com>
10300
10301         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10302         archive file name. Do not use the full path name of archives for Open
10303         VMS.
10304
10305 2011-08-02  Robert Dewar  <dewar@adacore.com>
10306
10307         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10308         Analyze_Aspect_Specifications
10309         * sem_ch13.adb
10310         (Analyze_Aspect_Specifications): New handling for boolean aspects
10311         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10312         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10313         sequence for Analyze_Aspect_Specifications
10314         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10315         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10316
10317 2011-08-02  Robert Dewar  <dewar@adacore.com>
10318
10319         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10320         aspects, since these no longer exist.
10321
10322 2011-08-02  Robert Dewar  <dewar@adacore.com>
10323
10324         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10325         semicolon, do not try to see if there are aspects following it.
10326         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10327         aspect spec.
10328
10329 2011-08-02  Robert Dewar  <dewar@adacore.com>
10330
10331         * sem_ch8.adb, aspects.ads: Minor reformatting.
10332
10333 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10334
10335         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10336         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10337         extracted from...
10338         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
10339
10340 2011-08-02  Yannick Moy  <moy@adacore.com>
10341
10342         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10343         mode on subprogram declaration outside of package specification, unless
10344         it is followed by a pragma Import
10345         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10346         Access_Type_Declaration): issue error in formal mode on access type
10347         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10348         incomplete type
10349         (Analyze_Object_Declaration): issue error in formal mode on object
10350         declaration which does not respect SPARK restrictions
10351         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10352         declaration which does not respect SPARK restrictions
10353         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10354         error in formal mode on digits or delta constraint
10355         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10356         decimal fixed point type
10357         (Derived_Type_Declaration): issue error in formal mode on derived type
10358         other than type extensions of tagged record types
10359         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10360         with check on access definition
10361         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10362         mode on protected definition.
10363         (Analyze_Task_Definition): issue error in formal mode on task definition
10364
10365 2011-08-02  Robert Dewar  <dewar@adacore.com>
10366
10367         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10368
10369 2011-08-02  Javier Miranda  <miranda@adacore.com>
10370
10371         * sem_ch6.adb (Can_Override_Operator): New function.
10372         (Verify_Overriding_Indicator): Add missing code to check overriding
10373         indicator in operators. Fixes regression.
10374         (Check_Overriding_Indicator): Minor reformating after replacing the
10375         code that evaluates if the subprogram can override an operator by
10376         invocations to the above new function.
10377         * einfo.adb
10378         (Write_Field26_Name): Add missing code to ensure that, following
10379         the documentation in einfo.ads, this field is not shown as attribute
10380         "Static_Initialization" on non-dispatching functions.
10381
10382 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10383
10384         * sem_res.adb (Resolve_Call): A call to
10385         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10386         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10387         i.e., when the second parameter is of type Time_Span.
10388
10389 2011-08-02  Vincent Celier  <celier@adacore.com>
10390
10391         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10392         with an archive instead of -L<library dir> -l<library name>.
10393
10394 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10395
10396         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10397         mark the base types In_Use in addition to making the operations
10398         use_visible.
10399
10400 2011-08-02  Ed Falis  <falis@adacore.com>
10401
10402         * init.c: add and setup __gnat_signal_mask for the exception signals
10403         * s-inmaop-vxworks.adb: new file.
10404         * s-intman-vxworks.adb: remove unnecessary initializations and
10405         simplify remaining
10406         * s-intman-vxworks.ads: remove unnecessary variable
10407         * s-taprop-vxworks.adb: simplify signal initialization
10408
10409 2011-08-02  Robert Dewar  <dewar@adacore.com>
10410
10411         * sem_ch8.adb: Minor code reorganization, comment updates.
10412
10413 2011-08-02  Robert Dewar  <dewar@adacore.com>
10414
10415         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10416         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10417         here from Sem_Res.
10418         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10419         (Matching_Static_Array_Bounds): Moved here from Sem_Res
10420
10421 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10422
10423         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10424         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10425         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10426         use_type_clauses, to handle more efficiently use_type and use_all_type
10427         constructs.
10428         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10429         Ada2012 Use_All_Type clause.
10430         (Use_Class_Wide_Operations): new procedure.
10431
10432 2011-08-02  Robert Dewar  <dewar@adacore.com>
10433
10434         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10435         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10436         expression to expression function.
10437
10438 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10439
10440         * sem_ch4.adb: transform simple Ada2012 membership into equality only
10441         if types are compatible.
10442
10443 2011-08-02  Yannick Moy  <moy@adacore.com>
10444
10445         * sem_res.adb (Matching_Static_Array_Bounds): new function which
10446         returns True if its argument array types have same dimension and same
10447         static bounds at each index.
10448         (Resolve_Actuals): issue an error in formal mode on actuals passed as
10449         OUT or IN OUT paramaters which are not view conversions in SPARK.
10450         (Resolve_Arithmetic_Op): issue an error in formal mode on
10451         multiplication or division with operands of fixed point types which are
10452         not qualified or explicitly converted.
10453         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10454         Boolean or array type (except String) operands.
10455         (Resolve_Equality_Op): issue an error in formal mode on equality
10456         operators for array types other than String with non-matching static
10457         bounds.
10458         (Resolve_Logical_Op): issue an error in formal mode on logical operators
10459         for array types with non-matching static bounds. Factorize the code in
10460         Matching_Static_Array_Bounds.
10461         (Resolve_Qualified_Expression): issue an error in formal mode on
10462         qualified expressions for array types with non-matching static bounds.
10463         (Resolve_Type_Conversion): issue an error in formal mode on type
10464         conversion for array types with non-matching static bounds
10465
10466 2011-08-02  Robert Dewar  <dewar@adacore.com>
10467
10468         * par-ch10.adb: Minor code reorganization (use Nkind_In).
10469
10470 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10471
10472         * par-ch9.adb: save location of entry for proper error message.
10473
10474 2011-08-02  Javier Miranda  <miranda@adacore.com>
10475
10476         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10477         (Use_Full_View) which permits this routine to climb through the
10478         ancestors using the full-view of private parents.
10479         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10480         Use_Full_View to true in calls to Is_Ancestor.
10481         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10482         true in call to Is_Ancestor.
10483         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10484         Use_Full_View to true in call to Is_Ancestor.
10485         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10486         call to Is_Ancestor.
10487         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10488         Use_Full_View to true in calls to Is_Ancestor.
10489         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10490         Make_Select_Specific_Data_Table, Register_Primitive,
10491         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10492         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10493         to true in call to Is_Ancestor.
10494         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10495         Use_Full_View to true in calls to Is_Ancestor.
10496         * exp_cg.adb
10497         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10498         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10499
10500 2011-08-02  Robert Dewar  <dewar@adacore.com>
10501
10502         * gnat_rm.texi: Minor reformatting.
10503         * sem_prag.adb: Minor reformatting.
10504
10505 2011-08-02  Tristan Gingold  <gingold@adacore.com>
10506
10507         * vms_data.ads: Add VMS qualifier for -gnateP.
10508
10509 2011-08-02  Robert Dewar  <dewar@adacore.com>
10510
10511         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10512         * par-ch7.adb (P_Package): Proper placement of aspects for package
10513         decl/instantiation.
10514         * par-endh.adb (Check_End): Ad Is_Sloc parameter
10515         (End_Statements): Add Is_Sloc parameterr
10516         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10517         (Check_End): Ad Is_Sloc parameter
10518         (End_Statements): Add Is_Sloc parameterr
10519
10520 2011-08-02  Vincent Celier  <celier@adacore.com>
10521
10522         * ug_words: Add VMS qualifier equivalent to -gnateP:
10523         /SYMBOL_PREPROCESSING.
10524
10525 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10526
10527         * gnat-style.texi: For hexadecimal numeric literals the typical
10528         grouping of digits is 4 to represent 2 bytes.
10529         A procedure spec which is split into several lines is indented two
10530         characters.
10531
10532 2011-08-02  Yannick Moy  <moy@adacore.com>
10533
10534         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10535         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10536         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10537         properly qualified
10538         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10539         choice in array aggregate
10540         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10541         mark as ancestor
10542         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10543         positional and named aggregate for record, or others in record
10544         aggregate, or multiple choice in record aggregate
10545         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10546         array operands to logical operations AND, OR and XOR do not have the
10547         same static lower and higher bounds
10548         * sem_ch5.adb, sinfo.ads: Correct typos in comments
10549
10550 2011-08-01  Robert Dewar  <dewar@adacore.com>
10551
10552         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10553         Replaces Last_Source_Node_In_Sequence.
10554         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10555         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10556         parens and blank in string (this was inconsistently implemented).
10557         * errout.ads
10558         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10559         blank in string (this was inconsistently implemented).
10560         * gnat1drv.adb
10561         (Set_Global_Switches): Set formal mode switches appropriately
10562         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10563         * par-prag.adb
10564         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10565         call Set_Error_Msg_Lang to set "spark" as language name.
10566         * par.adb: Remove unnecessary call to set formal language for errout
10567         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10568         appropriately and call Set_Error_Msg_Lang to set "spark" as language
10569         name.
10570         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10571         calls to it, moved after resolution so that types are known
10572         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10573         result of concatenation is not of type String
10574         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10575         concatenation is not properly restricted
10576         * gnat_rm.texi: Add doc on pragma Spark_95.
10577         * gcc-interface/Makefile.in: Remove obsolete target pairs for
10578         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10579         * gcc-interface/Make-lang.in: Update dependencies.
10580
10581 2011-08-01  Javier Miranda  <miranda@adacore.com>
10582
10583         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10584         condition that detects if the overridden operation must replace an
10585         existing entity.
10586
10587 2011-08-01  Javier Miranda  <miranda@adacore.com>
10588
10589         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10590         code declarations inserted by Insert_Actions in each alternative of the
10591         N_Case_Expression node.
10592
10593 2011-08-01  Robert Dewar  <dewar@adacore.com>
10594
10595         * sem_ch6.adb: Minor code reorganization.
10596         * sem_util.adb: Minor reformatting.
10597
10598 2011-08-01  Pascal Obry  <obry@adacore.com>
10599
10600         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10601         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10602
10603 2011-08-01  Yannick Moy  <moy@adacore.com>
10604
10605         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10606         literal or operator symbol which is prefixed
10607         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10608         mode on access attributes.
10609         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10610         that concatenation operands are properly restricted in formal mode
10611         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10612         Analyze_Concatenation_Operand. Issue an error in formal mode if the
10613         result of the concatenation has a type different from String.
10614         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10615         Analyze_Quantified_Expression, Analyze_Slice,
10616         Analyze_Null): issue an error in formal mode on unsupported constructs
10617         * sem_ch5.adb
10618         (Analyze_Block_Statement): only issue error on source block statement
10619         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10620         function which returns the last node in a list of nodes for which
10621         Comes_From_Source returns True, if any
10622         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10623         Last_Source_Node_In_Sequence
10624         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10625         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10626         mode on unsupported constructs
10627         * sem_ch9.adb Do not return after issuing error in formal mode, as the
10628         rest of the actions may be needed later on since the error is marked as
10629         not serious.
10630         * sinfo.ads: Typos in comments.
10631
10632 2011-08-01  Pascal Obry  <obry@adacore.com>
10633
10634         * projects.texi: Minor editing.
10635
10636 2011-08-01  Yannick Moy  <moy@adacore.com>
10637
10638         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10639         insertion character ~~
10640         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10641         (Set_Error_Msg_Lang): new procedure which fixes the language for use
10642         with insertion character ~~
10643         (Set_Msg_Text): treat insertion character ~~
10644         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10645         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10646         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10647         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10648         errors related to the formal language restriction not serious
10649         (insertion character |).
10650         * par.adb (Par): set formal language for error messages if needed
10651         * sem_ch6.adb (Check_Missing_Return): take into account possible
10652         generated statements at the end of the function
10653         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10654         enumeration value to define a new pragma SPARK_95
10655         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10656         SPARK_Version): new type and variables to store the SPARK version
10657         (none by default).
10658         (SPARK_Mode): return True when SPARK_Version is set
10659         * par-prag.adb: Correct indentation
10660         (Prag): take Pragma_SPARK_95 into account
10661         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
10662         into account.
10663
10664 2011-08-01  Robert Dewar  <dewar@adacore.com>
10665
10666         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
10667         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
10668         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10669
10670 2011-08-01  Pascal Obry  <obry@adacore.com>
10671
10672         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10673         Target_Name to Get_Path call.
10674         (Parse_Single_Project): Likewise.
10675         (Post_Parse_Context_Clause): Likewise.
10676         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10677         Call Initialise_Project_Path with the proper Target_Name.
10678         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10679         search path.
10680         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10681         with the proper Target_Name.
10682         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10683         Part.Parse routine.
10684         (Parse_Project_And_Apply_Config): Likewise.
10685         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10686         This is fine as this part of the code is supporting only native
10687         compilation.
10688         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10689         is fine as this part of the code is supporting only native compilation.
10690
10691 2011-08-01  Yannick Moy  <moy@adacore.com>
10692
10693         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10694         of homonym, unless the homonym is one of the cases allowed in SPARK
10695         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10696         package declaration occurring after a body.
10697
10698 2011-08-01  Robert Dewar  <dewar@adacore.com>
10699
10700         * checks.adb, exp_ch4.adb: Minor reformatting.
10701
10702 2011-08-01  Javier Miranda  <miranda@adacore.com>
10703
10704         * einfo.ads (Access_Disp_Table): Fix documentation.
10705         (Dispatch_Table_Wrappers): Fix documentation.
10706
10707 2011-08-01  Pascal Obry  <obry@adacore.com>
10708
10709         * prj-env.adb, prj-env.ads: Minor reformatting.
10710
10711 2011-08-01  Yannick Moy  <moy@adacore.com>
10712
10713         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10714         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10715         procedures out of these packages.
10716         * errout.ads, errout.adb
10717         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10718         procedures in of this package
10719         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10720         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10721         on misplaced later vs initial declarations, like in Ada 83
10722         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10723         formal mode on attribute of private type whose full type declaration
10724         is not visible
10725         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10726         package declaration inside a package specification
10727         (Analyze_Full_Type_Declaration): issue error in formal mode on
10728         controlled type or discriminant type
10729         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10730         user-defined operator means that it should come from the source
10731         (New_Overloaded_Entity): issue error in formal mode on overloaded
10732         entity.
10733         * sem_ch6.ads, sem_ch13.ads: typos in comments.
10734
10735 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10736
10737         * atree.adb: Minor reformatting.
10738         * checks.adb: Minor reformatting.
10739
10740 2011-08-01  Vincent Celier  <celier@adacore.com>
10741
10742         * s-parame-vms-ia64.ads: Fix typo in comment
10743         Minor reformatting
10744         * s-parame-vms-restrict.ads: Removed, unused.
10745
10746 2011-08-01  Javier Miranda  <miranda@adacore.com>
10747
10748         * exp_ch3.adb
10749         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
10750         * sem_ch3.adb
10751         (Constrain_Index): Remove side effects in the evaluation of the bounds.
10752         * sem_ch3.ads, sem_ch3.adb
10753         (Is_Constant_Bound): New extended version of the subprogram that was
10754         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
10755         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
10756         * sem_aux.ads (Constant_Value): Fix typo in comment.
10757         * checks.adb (Generate_Index_Checks): New implementation which, for
10758         array objects with constant bounds, generates the runtime check
10759         referencing the bounds of the array type. For other cases this routine
10760         provides its previous behavior obtaining such values from the array
10761         object.
10762         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
10763         parent type.
10764         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
10765         we cannot have semantic interpretations of the new node.
10766
10767 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10768
10769         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
10770         expressions.
10771
10772 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10773
10774         * sem_ch8.adb: Minor code editing.
10775         * s-vxwext.adb: Remove trailing space.
10776         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
10777         consistency with other files.
10778
10779 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10780
10781         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
10782
10783 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10784
10785         * par-ch10.adb: reject parameterized expressions as compilation unit.
10786         * sem_ch4.adb: handle properly conditional expression with overloaded
10787         then_clause and no else_clause.
10788
10789 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10790
10791         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10792         like done by System.Aux_DEC.
10793         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10794
10795 2011-08-01  Yannick Moy  <moy@adacore.com>
10796
10797         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10798         missing label at end of declaration (subprogram or package)
10799         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10800         of positional and named parameter association
10801         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10802         Error_Msg_SP which adds a prefix to the error message giving the name
10803         of the formal language analyzed
10804         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10805         access result type in subprogram, unconstrained array as result type,.
10806         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10807         procedure
10808         * sem_ch8.adb: Code clean up.
10809
10810 2011-08-01  Javier Miranda  <miranda@adacore.com>
10811
10812         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10813         * einfo.ads (Access_Disp_Table): Fix documentation.
10814         (Dispatch_Table_Wrappers): Fix documentation.
10815         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10816         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10817         to enforce the documentation of this attribute.
10818         (Set_Is_Interface): Cleanup the assertion.
10819         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10820         the Underlying_Type entity before reading attribute Access_Disp_Table.
10821         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10822         Locate the Underlying_Type before reading attribute Access_Disp_Table.
10823         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10824         the Underlying_Type entity before reading attribute Access_Disp_Table.
10825         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10826         Locate the Underlying_Type entity before reading attribute
10827         Access_Disp_Table.
10828
10829 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10830
10831         * s-poosiz.ads: Additional overriding indicators.
10832
10833 2011-08-01  Yannick Moy  <moy@adacore.com>
10834
10835         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10836         formal mode.
10837         (Analyze_Iteration_Scheme): issue error in formal mode when loop
10838         parameter specification does not include a subtype mark.
10839         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10840         formal mode on abstract subprogram.
10841         (Analyze_Subprogram_Specification): issue error in formal mode on
10842         user-defined operator.
10843         (Process_Formals): issue error in formal mode on access parameter and
10844         default expression.
10845         * sem_ch9.adb (Analyze_Abort_Statement,
10846         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10847         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10848         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10849         Analyze_Requeue, Analyze_Selective_Accept,
10850         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10851         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10852         issue error in formal mode on user-defined raise statement.
10853
10854 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10855
10856         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10857         declaration being hidden when overriding an implicit inherited
10858         subprogram.
10859         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10860         (-gnats), do not complain about a source file that contains only a
10861         pragma No_Body.
10862
10863 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10864
10865         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10866         variable if already set.
10867
10868 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10869
10870         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10871         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10872         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10873         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10874         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10875         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10876         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10877         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10878         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10879         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10880         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10881         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10882         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10883         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10884         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10885         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10886         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10887         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10888         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10889         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10890         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10891         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10892         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10893         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10894         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10895         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10896         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10897         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10898         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10899         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10900         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10901         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10902         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10903         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10904         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10905         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10906         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10907         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10908         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10909         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10910         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10911         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10912         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10913         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10914         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10915         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10916         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10917         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10918         s-osinte-mingw.ads: Update to GPLv3 run-time license.
10919         Use GNAT instead of GNARL.
10920
10921 2011-08-01  Bob Duff  <duff@adacore.com>
10922
10923         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10924         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10925         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10926         reformatting.
10927
10928 2011-08-01  Yannick Moy  <moy@adacore.com>
10929
10930         * debug.adb (d.D) reverve flag for the SPARK mode
10931         (d.E) reverve flag for SPARK generation mode
10932         (d.F) reverve flag for Why generation mode
10933         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10934         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
10935         functions which return True when the corresponding modes are set
10936         (Formal_Language): return "spark" or "alfa" when in formal verification
10937         mode.
10938         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10939         Error_Msg to prefix the error message with a tag giving the formal
10940         language
10941         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10942         message with a tag giving the formal language
10943         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10944         block statement
10945         (Analyze_Case_Statement): issue error in formal mode on case statement
10946         with a single "others" case alternative
10947         (Analyze_Exit_Statement): issue errors in formal mode on exit
10948         statements which do not respect SPARK restrictions
10949         (Analyze_Goto_Statement): issue error in formal mode on goto statement
10950         (Check_Unreachable_Code): always issue an error (not a warning) in
10951         formal mode on unreachable code (concerns both code after an infinite
10952         loop and after an unconditional jump, both not allowed in SPARK)
10953         * sem_ch6.adb (Analyze_Return_Statement): add call to
10954         Set_Return_Present for a procedure containing a return statement
10955         (already done for functions in Analyze_Function_Return)
10956         (Analyze_Function_Return): issue error in formal mode on extended
10957         return or if return is not last statement in function
10958         (Check_Missing_Return): issue error in formal mode if function does
10959         not end with return or if procedure contains a return
10960         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10961         function to detect if there is an inner scope of its parameter S which
10962         is a loop.
10963
10964 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10965
10966         * sem_ch6.ads: Minor reformatting.
10967
10968 2011-08-01  Javier Miranda  <miranda@adacore.com>
10969
10970         * sem_util.adb (Abstract_Interface_List): Complete condition when
10971         processing private type declarations to avoid reading unavailable
10972         attribute.
10973         (Is_Synchronized_Tagged_Type): Complete condition when processing
10974         private extension declaration nodes to avoid reading unavailable
10975         attribute.
10976
10977 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10978
10979         * sem_ch3.adb: Minor reformatting.
10980
10981 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10982
10983         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10984         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10985         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10986         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10987         for VMS, instead parametrize the common implementation with
10988         System.Parameters declarations.
10989
10990 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
10991
10992         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10993
10994 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10995
10996         * seh_init.c: Fix SEH handler installation on win64.
10997
10998 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10999
11000         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11001         double analysis of an anonymous access to subprogram, because it can
11002         lead to improper sharing of profiles and a back-end crash.
11003
11004 2011-08-01  Robert Dewar  <dewar@adacore.com>
11005
11006         * make.adb, sem_ch4.adb: Minor reformatting.
11007         * gcc-interface/Make-lang.in: Update dependencies.
11008         * sem_util.adb, exp_ch5.adb: Minor reformatting.
11009
11010 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11011
11012         * gnat_rm.texi: Fix definition of Long_Integer.
11013
11014 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11015
11016         * exp_aggr.adb: check limit size of static aggregate unconditionally,
11017         to prevent storage exhaustion.
11018         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11019         finalized is a function body, insert the cleanup code before the final
11020         return statement, to prevent spurious warnings.
11021         * s-pooglo.ads: add overriding indicator.
11022
11023 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11024
11025         * sem_ch4.adb (Operator_Check): improve error message when both a
11026         with_clause and a use_clause are needed to make operator usage legal.
11027         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11028         determine whether a compilation unit is visible within an other,
11029         either through a with_clause in the current unit, or a with_clause in
11030         its library unit or one one of its parents.
11031
11032 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11033
11034         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11035         over an arbitrary expression of an array or container type.
11036         * lib-xref.adb: clarify comment.
11037
11038 2011-08-01  Bob Duff  <duff@adacore.com>
11039
11040         * einfo.ads: Minor reformatting.
11041         * debug.adb: Minor comment improvement.
11042
11043 2011-08-01  Javier Miranda  <miranda@adacore.com>
11044
11045         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11046         consider hidden subprograms as valid candidates.
11047
11048 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11049
11050         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11051
11052 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
11053
11054         * gnat_ugn.texi: Fix typo.
11055
11056 2011-08-01  Robert Dewar  <dewar@adacore.com>
11057
11058         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11059         lib-xref.adb: Minor reformatting
11060
11061 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
11062
11063         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11064         when to generate a call to Move_Final_List.
11065         (Has_Controlled_Parts): Remove this function.
11066
11067 2011-08-01  Geert Bosch  <bosch@adacore.com>
11068
11069         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11070         "," in choice list.
11071
11072 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11073
11074         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11075         explicit raise of a predefined exception as Comes_From_Source if the
11076         original N_Raise_Statement comes from source.
11077
11078 2011-08-01  Robert Dewar  <dewar@adacore.com>
11079
11080         * sinfo.ads: Add comment.
11081         * sem_ch6.adb: Minor reformatting.
11082
11083 2011-08-01  Robert Dewar  <dewar@adacore.com>
11084
11085         * freeze.adb (Freeze_Entity): Refine check for bad component size
11086         clause to avoid rejecting confirming clause when atomic/aliased present.
11087
11088 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11089
11090         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11091         better determine whether an entity reference is a write.
11092         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11093         subcomponent.
11094         * lib-xref.adb (Output_References): Do no suppress a read reference at
11095         the same location as an immediately preceeding modify-reference, to
11096         handle properly in-out actuals.
11097
11098 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11099
11100         * env.c (__gnat_setenv) [VMS]: Refine previous change.
11101
11102 2011-08-01  Quentin Ochem  <ochem@adacore.com>
11103
11104         * i-cstrin.adb (New_String): Changed implementation, now uses only the
11105         heap to compute the result.
11106
11107 2011-08-01  Robert Dewar  <dewar@adacore.com>
11108
11109         * atree.ads: Minor reformatting.
11110
11111 2011-08-01  Emmanuel Briot  <briot@adacore.com>
11112
11113         * g-expect.adb (Get_Command_Output): Fix memory leak.
11114
11115 2011-08-01  Geert Bosch  <bosch@adacore.com>
11116
11117         * cstand.adb (P_Float_Type): New procedure to print the definition of
11118         predefined fpt types.
11119         (P_Mixed_Name): New procedure to print a name using mixed case
11120         (Print_Standard): Use P_Float_Type for printing floating point types
11121         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11122         precision IEEE float.
11123
11124 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11125
11126         * sem_ch3.adb: Minor reformatting.
11127
11128 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11129
11130         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11131         the completion of a generic function, insert the new body rather than
11132         rewriting the original.
11133
11134 2011-08-01  Yannick Moy  <moy@adacore.com>
11135
11136         * sinfo.ads, errout.ads: Typos in comments.
11137
11138 2011-08-01  Robert Dewar  <dewar@adacore.com>
11139
11140         * par-endh.adb: Minor reformatting.
11141
11142 2011-08-01  Robert Dewar  <dewar@adacore.com>
11143
11144         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11145         (Pre_Post_Aspects): New subtype.
11146         * par-ch12.adb (P_Generic): New syntax for aspects in packages
11147         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11148         * par-ch7.adb (P_Package): Remove Decl parameter
11149         (P_Package): Handle new syntax for aspects (before IS)
11150         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11151         new aspect syntax
11152         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11153         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11154         (P_Package): Remove Decl parameter
11155         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11156         aspects
11157         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11158         specs
11159         * sem_util.ads, sem_util.adb (Static_Boolean): New function
11160         * sinfo.ads: Document new syntax for aspects in packages etc.
11161         * sprint.adb: Handle new syntax of aspects before IS in package
11162
11163 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11164
11165         * atree.ads: Minor reformatting.
11166         * sem_prag.adb: Minor reformatting.
11167
11168 2011-08-01  Robert Dewar  <dewar@adacore.com>
11169
11170         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11171         case expr alternative.
11172
11173 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11174
11175         * sem_ch12.adb: Fix typo.
11176
11177 2011-08-01  Geert Bosch  <bosch@adacore.com>
11178
11179         * sem_prag.adb (Check_No_Link_Name): New procedure.
11180         (Process_Import_Or_Interface): Use Check_No_Link_Name.
11181         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11182         instead of Standard_Long_Long_Float_Size global. Preparation for
11183         eventual removal of per type constants.
11184         * exp_util.ads (Get_Stream_Size): New function returning the stream
11185         size value of subtype E.
11186         * exp_util.adb (Get_Stream_Size): Implement new function.
11187         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11188         function.
11189         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11190         * einfo.adb:
11191         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11192
11193 2011-08-01  Geert Bosch  <bosch@adacore.com>
11194
11195         * cstand.adb: Fix comments.
11196         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11197         count of arguments.
11198
11199 2011-08-01  Robert Dewar  <dewar@adacore.com>
11200
11201         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11202
11203 2011-08-01  Geert Bosch  <bosch@adacore.com>
11204
11205         * atree.ads: Fix comment.
11206
11207 2011-08-01  Robert Dewar  <dewar@adacore.com>
11208
11209         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11210         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11211         * par.adb: Add with for Namet.Sp.
11212         * par-tchk.adb: Minor reformatting.
11213
11214 2011-08-01  Vincent Celier  <celier@adacore.com>
11215
11216         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11217         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11218         of the init procedure of a SAL.
11219         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11220         New procedure.
11221
11222 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11223
11224         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11225         reformatting.
11226
11227 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11228
11229         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11230
11231 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11232
11233         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11234         conformant with its spec (return True only for types that have
11235         an overriding Initialize primitive operation that prevents them from
11236         having preelaborable initialization).
11237         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11238         initialization for controlled types in Ada 2005 or later mode.
11239
11240 2011-08-01  Robert Dewar  <dewar@adacore.com>
11241
11242         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11243         Postcondition.
11244         (Same_Aspect): New function.
11245         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11246         Type_Invariant, Precondition, Postcondition.
11247         * snames.ads-tmpl: Add Name_Type_Invariant.
11248
11249 2011-08-01  Robert Dewar  <dewar@adacore.com>
11250
11251         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11252         here.
11253         (Freeze_All_Ent): Fix error in handling inherited aspects.
11254         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11255         already analyzed, but don't skip entire processing of a declaration,
11256         that's wrong in some cases of declarations being rewritten.
11257         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11258         Don't delay for integer, string literals
11259         Treat predicates in usual manner for delay, remove special case code,
11260         not needed.
11261         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11262         (Build_Predicate_Function): Update saved expression in aspect
11263         (Build_Invariant_Procedure): Update saved expression in aspect
11264         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11265         of replacement of discriminant references if the reference is simple.
11266
11267 2011-08-01  Robert Dewar  <dewar@adacore.com>
11268
11269         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11270         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11271         Static_Predicate and Dynamic_Predicate.
11272         (Build_Predicate_Function): Add processing for Static_Predicate
11273         and Dynamic_Predicate.
11274         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11275         (From_Static_Predicate): New flag
11276         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11277
11278 2011-08-01  Robert Dewar  <dewar@adacore.com>
11279
11280         * usage.adb: Documentation cleanup for Ada version modes in usage.
11281         * expander.adb: Minor reformatting.
11282
11283 2011-08-01  Robert Dewar  <dewar@adacore.com>
11284
11285         * atree.ads: Minor comment fix.
11286         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11287         a-witeio.ads, sem_prag.adb: Minor reformatting.
11288
11289 2011-08-01  Doug Rupp  <rupp@adacore.com>
11290
11291         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11292         pointers. Use descrip.h header file for convenience. Add some
11293         comments.
11294
11295 2011-08-01  Robert Dewar  <dewar@adacore.com>
11296
11297         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11298         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11299         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11300         New procedure.
11301         (Check_Aspect_At_End_Of_Declarations): New procedure
11302         (Analye_Aspect_Specification): Minor changes for above procedures
11303         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11304         specification node as well.
11305
11306 2011-08-01  Pascal Obry  <obry@adacore.com>
11307
11308         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11309         Windows files. Use GetFilesAttributes() in this case to check for file
11310         existence instead of returning with an error code.
11311
11312 2011-08-01  Vincent Celier  <celier@adacore.com>
11313
11314         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11315         High is above Source length.
11316
11317 2011-08-01  Robert Dewar  <dewar@adacore.com>
11318
11319         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11320
11321 2011-08-01  Robert Dewar  <dewar@adacore.com>
11322
11323         * aspects.ads (Boolean_Aspects): New subtype.
11324         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11325         for derived types in cases where the parent type and derived type have
11326         aspects.
11327         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11328         with aspects when parent type also has aspects.
11329         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11330         boolean expression at this point).
11331         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11332         accordance with final decision on the Ada 2012 feature.
11333         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11334
11335 2011-08-01  Matthew Heaney  <heaney@adacore.com>
11336
11337         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11338
11339 2011-08-01  Pascal Obry  <obry@adacore.com>
11340
11341         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11342         Fix Replace_Slice when High is above current string size.
11343         (Replace_Slice): Fix DL computation when High is above current
11344         string length.
11345
11346 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
11347
11348         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11349
11350 2011-08-01  Matthew Heaney  <heaney@adacore.com>
11351
11352         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11353         of node.
11354
11355 2011-08-01  Pascal Obry  <obry@adacore.com>
11356
11357         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11358         reformatting.
11359
11360 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11361
11362         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11363         access to protected subprograms in generic bodies.
11364         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11365         protected type, indicate that the convention of the subprogram is
11366         Convention_Protected, because it may be used in subsequent declarations
11367         within the protected declaration.
11368
11369 2011-08-01  Vincent Celier  <celier@adacore.com>
11370
11371         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11372         and "final" procedures when the name of the library is "ada", to avoid
11373         duplicate symbols "adainit" and "adafinal" in executables.
11374
11375 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11376
11377         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11378         quantified expression that appears within a postcondition and uses the
11379         Ada2012 'Result attribute.
11380
11381 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11382
11383         * init.c (__gnat_error_handler): Cast reason to int.
11384         (__gnat_install_handler): Explain sa_sigaction use.
11385
11386 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11387
11388         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11389         subprogram has copy-in copy-out parameters, try to promote the mode of
11390         the return type if it is passed in registers.
11391
11392 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11393
11394         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11395         left operand as addressable.
11396
11397 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11398
11399         * gcc-interface/gigi.h (build_function_stub): Remove.
11400         (build_return_expr): Likewise.
11401         (convert_vms_descriptor): Declare.
11402         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11403         (build_function_stub): Move to...
11404         * gcc-interface/utils2.c (build_return_expr): Move to...
11405         * gcc-interface/trans.c (build_function_stub): ...here.
11406         (build_return_expr): ...here.
11407         (Subprogram_Body_to_gnu): Add local variable for language_function.
11408         Disconnect the parameter attributes cache, if any, once done with it.
11409         Call end_subprog_body only after setting the end_locus.
11410         Build the stub associated with the function, if any, at the very end.
11411         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11412         variables and streamline control flow.
11413
11414 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
11415
11416         PR ada/49819
11417         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11418         g-trasym-dwarf.adb.
11419
11420 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11421
11422         PR bootstrap/49794
11423         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11424         Assign to act.sa_sigaction.
11425         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11426         current->return_address to char * before arithmetic.
11427
11428 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11429
11430         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11431         Correct argument types.
11432         Extract code from reason.
11433         (__gnat_install_handler): Assign to act.sa_sigaction.
11434
11435 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
11436
11437         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11438         (GNAT1_OBJS): ...here.
11439
11440 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
11441
11442         PR ada/48711
11443         * g-socthi-mingw.adb (Fill): Fix formatting.
11444
11445         * gcc-interface/gigi.h: Move around comment.
11446
11447 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
11448
11449         PR ada/46350
11450         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11451
11452 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
11453
11454         PR ada/48711
11455         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11456
11457 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
11458
11459         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11460         range comparison if Pmode is SImode.
11461
11462 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
11463             Eric Botcazou  <ebotcazou@adacore.com>
11464
11465         * adadecode.c: Wrap up in extern "C" block.
11466         * adadecode.h: Likewise.
11467         * adaint.c: Likewise.  Remove 'const' keyword.
11468         * adaint.h: Likewise.
11469         * argv.c: Likewise.
11470         * atree.h: Likewise.
11471         * cio.c: Likewise.
11472         * cstreams.c: Likewise.
11473         * env.c: Likewise.
11474         * exit.c: Likewise.
11475         * fe.h: Likewise.
11476         * final.c: Likewise.
11477         * init.c: Likewise.
11478         * initialize.c: Likewise.
11479         * link.c: Likewise.
11480         * namet.h: Likewise.
11481         * nlists.h: Likewise.
11482         * raise.c: Likewise.
11483         * raise.h: Likewise.
11484         * repinfo.h: Likewise.
11485         * seh_init.c: Likewise.
11486         * targext.c: Likewise.
11487         * tracebak.c: Likewise.
11488         * uintp.h: Likewise.
11489         * urealp.h: Likewise.
11490         * xeinfo.adb: Wrap up generated C code in extern "C" block.
11491         * xsinfo.adb: Likewise.
11492         * xsnamest.adb: Likewise.
11493         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11494         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11495         * gcc-interface/misc.c: Likewise.
11496         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11497         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
11498         ada/targext.o here...
11499         (GNAT_ADA_OBJS): ...and not here.
11500         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11501         (GNATBIND_OBJS): Reorder.
11502
11503 2011-07-07  Richard Henderson  <rth@redhat.com>
11504
11505         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11506         dwarf2out_frame_init.
11507
11508 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
11509
11510         * gcc-interface/misc.c (gnat_init): Tweak previous change.
11511
11512 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11513
11514         PR target/39150
11515         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11516
11517 2011-07-06  Richard Guenther  <rguenther@suse.de>
11518
11519         * gcc-interface/misc.c (gnat_init): Merge calls to
11520         build_common_tree_nodes and build_common_tree_nodes_2.
11521         Re-initialize boolean_false_node.
11522
11523 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
11524             Olivier Hainque  <hainque@adacore.com>
11525             Nicolas Setton  <setton@adacore.com>
11526
11527         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11528         the type according to the ARTIFICIAL_P parameter.
11529         (create_type_decl): Likewise.
11530         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11531
11532 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
11533
11534         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11535         (gnatbind): Likewise.
11536
11537 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11538
11539         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11540
11541 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11542
11543         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11544         local variable throughout.  Remove useless call to Base_Type.
11545         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11546         Take it also into account for the volatileness of the field.  Set the
11547         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
11548
11549 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11550
11551         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11552         on a dereference built for a by-ref object if it has an address clause.
11553
11554 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11555
11556         * einfo.ads (Address_Taken): Document use for the second argument of
11557         Asm_Input and Asm_Output attributes.
11558         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11559         argument is an entity name, then set Address_Taken on it.
11560         <Attribute_Asm_Output>: Likewise.
11561         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11562         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11563         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11564         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11565
11566 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
11567
11568         PR middle-end/46500
11569         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11570
11571 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
11572
11573         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11574         (ada/utils.o): Update dependencies.
11575         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11576         ../../../libcpp/libcpp.a.
11577         * gcc-interface/utils.c: Include common/common-target.h.
11578         (process_attributes): Use targetm_common.have_named_sections.
11579
11580 2011-06-07  Richard Guenther  <rguenther@suse.de>
11581
11582         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11583         set_sizetype.
11584
11585 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11586
11587         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11588         TREE_THIS_NOTRAP flag.
11589
11590 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11591
11592         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11593         Fix thinko.
11594
11595 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11596
11597         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11598         constants whose full view has discriminants specially.
11599
11600 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11601
11602         * gcc-interface/utils.c: Include diagnostic.h.
11603         (gnat_write_global_declarations): Output debug information for all
11604         global type declarations before finalizing the compilation unit.
11605         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11606
11607 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
11608
11609         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11610
11611 2011-05-25  Kai Tietz  <ktietz@redhat.com>
11612
11613         * adaint.c (__gnat_to_canonical_file_list_next): Use array
11614         initialization instead of const/none-const pointer assignment.
11615
11616 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
11617
11618         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11619         $(EXTRA_GNAT1_OBJS).
11620         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11621         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11622         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11623         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11624         libcommon-target.a instead of prefix.o.
11625
11626 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
11627
11628         PR ada/49097
11629         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11630
11631 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
11632
11633         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11634         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11635         instead of version.o.
11636
11637 2011-05-18  Kai Tietz <ktietz@redhat.com>
11638
11639         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11640         boolean_false_node instead of integer_zero_node.
11641         (convert_with_check): Likewise.
11642         * gcc-interface/decl.c (choices_to_gnu): Likewise.
11643
11644 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
11645
11646         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11647         type of the parameter is an unconstrained array, convert the actual to
11648         the type of the formal in the In Out and Out cases as well.
11649
11650 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
11651
11652         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11653         call build_function_type_array or build_varargs_function_type_array
11654         instead.
11655         (create_subprog_type): Don't call build_function_type; call
11656         build_function_type_vec instead.
11657
11658 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
11659
11660         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11661         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11662         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
11663
11664 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
11665
11666         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
11667
11668         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11669         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11670
11671 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
11672
11673         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11674
11675 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
11676
11677         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11678         instead of accessing TYPE_ARG_TYPES directly.
11679         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11680
11681 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
11682
11683         PR ada/48844
11684         * gcc-interface/gigi.h (get_variant_part): Declare.
11685         * gcc-interface/decl.c (get_variant_part): Make global.
11686         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11687         types have the same constant size, are record types and T1 has a
11688         variant part while T2 doesn't.
11689
11690 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
11691
11692         * gcc-interface/utils.c (begin_subprog_body): Do not call
11693         get_pending_sizes.
11694         (end_subprog_body): Likewise.
11695
11696 2011-05-04  Richard Guenther  <rguenther@suse.de>
11697
11698         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11699         int_const_binop.
11700         (pos_to_constructor): Likewise.
11701
11702 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
11703             Eric Botcazou  <ebotcazou@adacore.com>
11704
11705         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11706         of build_function_type.  Adjust calls to...
11707         (build_raise_check): ...this.  Do not take a void_tree parameter.
11708         Call build_function_type_list instead of build_function_type.
11709         Fix head comment and swap couple of conditional blocks.
11710
11711 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
11712
11713         * gnatvsn.ads (Library_Version): Bump to 4.7.
11714         (Current_Year): Bump to 2011.
11715
11716 2011-04-29  Michael Matz  <matz@suse.de>
11717
11718         * gcc-interface/misc.c (gnat_handle_option): Set
11719         warn_maybe_uninitialized.
11720
11721 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
11722
11723         * gnat_ugn.texi (Complexity Metrics Control): Update link to
11724         the Watson/McCabe paper.
11725
11726 2011-04-23  Jim Meyering  <meyering@redhat.com>
11727
11728         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11729
11730 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
11731
11732         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11733         onto the new type.
11734
11735 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
11736
11737         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
11738         parameter.
11739         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
11740         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
11741         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
11742         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
11743         <all>: Do not set flags on the reused DECL node coming from an alias.
11744         Set DECL_IGNORED_P on the DECL node built for subprograms if they
11745         don't need debug info here...
11746         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
11747         (gigi): Adjust calls to create_subprog_decl.
11748         (build_raise_check): Likewise.
11749         (establish_gnat_vms_condition_handler): Likewise.
11750         (Compilation_Unit_to_gnu): Likewise.
11751         (gnat_to_gnu): Likewise.
11752
11753 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
11754
11755         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
11756         (NO_REORDER_ADAFLAGS): New variable.
11757         (EXTRA_GNATTOOLS): Always define.
11758         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
11759         Clean up and adjust list of files compiled with special options.
11760         * gcc-interface/Make-lang.in: Likewise.
11761         (ada/decl.o): Cosmetical change.
11762         (ada/misc.o): Remove dependency on $(PLUGIN_H).
11763
11764 2011-04-20  Jim Meyering  <meyering@redhat.com>
11765
11766         * initialize.c (__gnat_initialize): Remove useless if-before-free.
11767
11768 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
11769
11770         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
11771         $(CFLAGS) on the link line.
11772
11773 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
11774
11775         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
11776         padded type built for the return type if it is unconstrained.
11777
11778 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
11779
11780         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
11781
11782 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
11783
11784         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11785         before calling TREE_CHAIN.
11786         * gcc-interface/misc.c (gnat_init_ts): New function.
11787         (LANG_HOOKS_INIT_TS): Define.
11788
11789 2011-04-12  Martin Jambor  <mjambor@suse.cz>
11790
11791         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11792         instead of cgraph_node.
11793
11794 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
11795
11796         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11797         alignment on fields of the RETURN type built for the Copy-In Copy-Out
11798         mechanism.
11799
11800 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
11801
11802         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11803         of aggregate types that contain a placeholder.
11804
11805 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
11806
11807         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11808         TYPE_ARG_TYPES.
11809         (handle_type_generic_attribute): Likewise.
11810
11811 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
11812
11813         PR ada/47163
11814         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11815
11816 2011-04-04  Kai Tietz  <ktietz@redhat.com>
11817
11818         PR ada/47163
11819         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11820         to flag value.
11821
11822 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11823
11824         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11825         type case, do not strip a padding type around the array type.
11826
11827 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11828
11829         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11830         types.
11831
11832 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11833
11834         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11835         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11836         code for -feliminate-unused-debug-types.
11837         (gnat_post_options): Likewise.
11838
11839 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11840
11841         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11842         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11843         distinct copy.
11844
11845 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11846
11847         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11848         DECL_ARTIFICIAL flag on enumeration types.
11849
11850 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11851
11852         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11853         fat pointer types artificial unconditionally.
11854         <E_Array_Subtype>: Attach the base array type as a parallel type if it
11855         isn't artificial.
11856
11857 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11858
11859         * gcc-interface/gigi.h (get_dummy_type): Declare.
11860         (build_dummy_unc_pointer_types): Likewise.
11861         (finish_fat_pointer_type): Likewise.
11862         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11863         fat pointer type has been built, complete it in place.
11864         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11865         and thin pointers.  Remove useless variable.
11866         (finish_fat_pointer_type): Make global and move to...
11867         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11868         (get_dummy_type): New function.
11869         (build_dummy_unc_pointer_types): Likewise.
11870         (gnat_pushdecl): Propage the name to the anonymous variants only.
11871         (update_pointer_to): Only adjust the pointer types in the unconstrained
11872         array case.
11873
11874 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11875
11876         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11877         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11878         if this is a Taft amendment type and the full declaration is available.
11879         * gcc-interface/trans.c (process_type): Likewise.
11880         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11881         (process_freeze_entity): Likewise.
11882         * gcc-interface/utils.c (dummy_global): New static variable.
11883         (gnat_write_global_declarations): If there are types declared as used
11884         at the global level, insert them in the global hash table.
11885
11886 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11887
11888         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11889         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11890         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11891         copy.
11892         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
11893         flag of the type accordingly.
11894         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11895
11896 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11897
11898         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11899         finalizing types when updating the pointers to the designated type.
11900         <all>: Finalize the deferred types even if we didn't defer processing
11901         of incomplete types in this invocation.
11902
11903 2011-04-01  Olivier Hainque  <hainque@adacore.com>
11904             Nicolas Setton  <setton@adacore.com>
11905             Eric Botcazou  <ebotcazou@adacore.com>
11906
11907         * gcc-interface/misc.c (gnat_descriptive_type): New function.
11908         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11909
11910 2011-03-28  Kai Tietz  <ktietz@redhat.com>
11911
11912         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11913         Windows targets.
11914         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11915         * system-mingw.ads (System): Change ZCX_By_Default default to True.
11916
11917         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11918
11919 2011-03-28  Tristan Gingold  <gingold@adacore.com>
11920
11921         PR ada/44431
11922         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11923         Use ada output of gnatbind.
11924         (ada/b_gnatb.adb): Ditto.
11925         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11926         (ada.mostlyclean, ada.stage1)
11927         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11928         (ada.stagefeedback): Adjust.
11929         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11930         Use ada output of gnatbind.
11931         (b_gnatm.adb): Ditto.
11932         (b_gnatl.o, b_gnatm.o): New rules.
11933
11934 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11935
11936         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11937         for the padded type built to support a specified size or alignment.
11938
11939 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11940
11941         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11942         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11943         unconditionally to the end of the unit when the designated type is
11944         limited_with'ed.
11945         <all>: Rename local variable.  Attempt to un-defer types only and do it
11946         for limited_with'ed types as well.
11947         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
11948         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11949         consistently and remove redundant call to finalize_from_with_types.
11950
11951 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11952
11953         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11954         subprograms without a previous spec declared in the same unit.
11955         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11956         subprograms at the end of the unit instead of at the beginning.
11957         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11958         isn't public for the special handling of non-inline functions nested
11959         inside inline external functions.
11960
11961 2011-03-25  Jeff Law  <law@redhat.com>
11962
11963         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11964
11965 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11966
11967         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11968         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11969         to compute Set_Size_Depends_On_Discriminant.
11970         (Layout_Type): Call it on array types in back-end layout mode.
11971         * sem_util.adb (Requires_Transient_Scope): Return true for array
11972         types only if the size depends on the value of discriminants.
11973         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11974         type if the RHS is a call to a function that returns an unconstrained
11975         type with default discriminant.
11976
11977 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11978
11979         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11980         non-conversion to the nominal result type at the end.
11981
11982 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11983
11984         * gcc-interface/trans.c (create_temporary): New function taken from...
11985         (create_init_temporary): ...here.  Call it.
11986         (call_to_gnu): Create the temporary for the return value early, if any.
11987         Create it for a function with copy-in/copy-out parameters if there is
11988         no target; in other cases of copy-in/copy-out, use another temporary.
11989         Push the new binding level lazily.  Add and rename local variables.
11990
11991 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11992
11993         * gcc-interface/decl.c (validate_size): Improve comments and tweak
11994         error message.
11995         (set_rm_size): Likewise.
11996
11997 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11998
11999         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12000         for the padded type built in order to support a specified alignment.
12001         Fix incorrect formatting.
12002
12003 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12004
12005         PR bootstrap/48216
12006         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12007
12008 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12009
12010         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12011         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12012         to the end of the list.  Adjust recursive call.  Rename local variable.
12013         If REORDER is true, reorder components of the record type.
12014         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12015         components_to_record and adjust the parameter list.
12016
12017 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12018
12019         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12020         disabled, use the variable for bounds of loop iteration scheme.
12021
12022 2011-03-21  Kai Tietz  <ktietz@redhat.com>
12023
12024         PR target/12171
12025         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12026
12027 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
12028
12029         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12030         out whether the expression is read-only.  Short-circuit placeholder
12031         case and rename a couple of local variables.
12032
12033 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
12034
12035         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12036         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12037         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12038         (convert): Deal with conversions from a smaller form type specially.
12039
12040 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
12041
12042         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12043         its argument, except for the special -I- switch.
12044
12045 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
12046
12047         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12048         "Ada Issues".
12049
12050 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
12051
12052         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12053
12054 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
12055
12056         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12057         GNAT_FORMAL.
12058         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12059         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
12060         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
12061         Do not generate the check directly, instead instantiate the template
12062         check present in the descriptor.
12063         (make_descriptor_field): Move around.
12064         (build_vms_descriptor32): Build a template check in the POINTER field.
12065         (build_vms_descriptor): Remove useless suffixes.
12066         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12067
12068 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
12069
12070         PR bootstrap/47467
12071         * targext.c: Include target files if IN_RTS is defined.
12072
12073 2011-01-26  Richard Guenther  <rguenther@suse.de>
12074
12075         PR bootstrap/47467
12076         * targext.c: Include config.h.
12077         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12078         dependency.
12079
12080 2011-01-04  Pascal Obry  <obry@adacore.com>
12081             Eric Botcazou  <ebotcazou@adacore.com>
12082
12083         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12084
12085 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12086
12087         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12088         end-of-case on the end label and its associated gotos, if any.
12089
12090 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12091
12092         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12093         expressions of the parameter cache within the statement group of
12094         the CICO mechanism.
12095
12096 2011-01-04  Olivier Hainque  <hainque@adacore.com>
12097             Eric Botcazou  <ebotcazou@adacore.com>
12098
12099         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12100         (set_end_locus_from_node): New function.
12101         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12102         make and the function end_locus.
12103         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12104         for the elaboration subprogram.
12105         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12106         set the end_locus of the expression as well.
12107
12108 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12109
12110         PR ada/47131
12111         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12112         variables that are referenced in exception handlers volatile.
12113
12114
12115 \f
12116 Copyright (C) 2011 Free Software Foundation, Inc.
12117
12118 Copying and distribution of this file, with or without modification,
12119 are permitted in any medium without royalty provided the copyright
12120 notice and this notice are preserved.