OSDN Git Service

2011-08-29 Pascal Obry <obry@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-08-29  Pascal Obry  <obry@adacore.com>
2
3         * exp_disp.adb: Minor comment fix.
4         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
5         to avoid warnings when compiling with -Wall.
6         (Make_Disp_Conditional_Select_Body): Likewise.
7         (Make_Disp_Timed_Select_Body): Likewise.
8
9 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
10
11         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
12         an entity name, generate reference for it.
13
14 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
15
16         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
17         iterator form.
18         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
19         the class-wide type.
20         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
21
22 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
23
24         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
25         subtype for an object whose type is an unconstrained union.
26
27 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
28
29         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
30         is allowed in a component definition, by AI95-406.
31
32 2011-08-29  Matthew Heaney  <heaney@adacore.com>
33
34         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
35
36 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
37
38         * a-except-2005.adb: Alphabetize all routines.
39         (Triggered_By_Abort): New routine.
40         * a-except-2005.ads (Triggered_By_Abort): New routine.
41         * a-except.adb Alphabetize all routines.
42         (Triggered_By_Abort): New routine.
43         * a-except.ads (Triggered_By_Abort): New routine.
44         * exp_ch7.adb: Update all comments involving the detection of aborts in
45         finalization code.
46         (Build_Object_Declarations): Do not generate code to detect the
47         presence of an abort at the start of finalization code, use a runtime
48         routine istead.
49         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
50         RE_Unit_Table.
51         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
52         allocate a task on a subpool.
53         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
54         The flag disables all actions related to the maintenance of
55         Finalize_Address_Table when subpools are not in use.
56         (Allocate_Any_Controlled): Signal the machinery that subpools are in
57         use.
58         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
59         performs costly task locking when subpools are not in use.
60
61 2011-08-29  Yannick Moy  <moy@adacore.com>
62
63         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
64         types and dispatching calls in Alfa mode.
65         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
66         correspondance between body and spec scopes, to reuse utility functions
67         (Traverse_Declarations_Or_Statements): Protect access to body for stub
68         by testing the presence of the library unit for the body
69         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
70         mode the expansion of accept statements is skipped
71         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
72         the unique entity corresponding to the one returned by
73         Unique_Defining_Entity applied to the enclosing declaration of the
74         argument.
75
76 2011-08-29  Bob Duff  <duff@adacore.com>
77
78         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
79         gdb when x is not a node (it can be a node list, name_id, etc). pp is
80         an alias for pn. ppp is an alias for pt.
81
82 2011-08-29  Javier Miranda  <miranda@adacore.com>
83
84         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
85         aggregate to take a consistent decision on the need to convert into
86         assignments aggregates that initialize constant objects.
87
88 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
89
90         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
91         Build_Allocate_Deallocate_Proc in order to handle allocation of
92         non-controlled objects on subpools.
93         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
94         to be end-user visible.
95         * s-finmas.adb: Add with and use clause for System.HTable.
96         Add an instantiation of Simple_HTable which provides a mapping between
97         the address of a controlled object and the corresponding
98         Finalize_Address used to clean up the object. The table is used when a
99         master is operating in heterogeneous mode.
100         (Attach): Explain why the input node is not verified on being already
101         attached.
102         (Delete_Finalize_Address): New routine.
103         (Detach): Add pragma Assert which ensures that a node is already
104         attached.
105         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
106         since nodes are no longer removed on traversal. Explain why node
107         detachment is undesirable in this case.
108         (Get_Finalize_Address): New routine.
109         (Hash): New routine.
110         (Is_Empty_List): Removed.
111         (pm): Renamed to Print_Master. Add output for discriminant
112         Is_Homogeneous.
113         Comment reformatting.
114         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
115         * s-finmas.ads: Various comments additions / improvements.
116         Type Finalization_Master has a discriminant which determines the mode of
117         operation.
118         (Delete_Finalize_Address): New routine.
119         (Get_Finalize_Address): New routine.
120         (pm): Renamed to Print_Master.
121         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
122         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
123         use clause for System.IO.
124         (Allocate_Any_Controlled): Add machinery to set TSS primitive
125         Finalize_Address depending on the mode of allocation and the mode of
126         the master.
127         (Deallocate_Any_Controlled): Remove the relation pair object -
128         Finalize_Address regardless of the master mode. Add comment explaining
129         the reason.
130         (Detach): Ensure that fields Prev and Next are null after detachment.
131         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
132         scheme to check whether the list of subpools is empty. There is no
133         longer need to store the next subpool or advance the current pointer.
134         (Is_Empty_List): New routine.
135         (Print_Pool): New routine.
136         (Print_Subpool): New routine.
137         * s-stposu.ads: Various comments additions / improvements.
138         Field Master of type Root_Subpool is now a heterogeneous collection.
139         (Print_Pool): New routine.
140         (Print_Subpool): New routine.
141
142 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
143
144         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
145         forms, using aspects of container types.
146         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
147         Has_Implicit_Dereference flags, that may be set on the partial view.
148         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
149         container type with an indexing aspect.
150         (Analyze_Quantified_Expression): Analyze construct with expansion
151         disabled, because it will be rewritten as a loop during expansion.
152         (Try_Container_Indexing): The prefix itself may be a container type
153         with an indexing aspect, as with a vector of vectors.
154         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
155         the original doamin of iteration, for name capture.
156         (Analyze_Iterator_Specification): If the domain is an expression that
157         needs finalization, create a separate declaration for it.
158         For an iterator with "of" retrieve default iterator info from aspect of
159         container type. For "in" iterator, retrieve type of Iterate function.
160         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
161         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
162         analysis, to prevent spurious errors about late attributes.
163         * sprint.adb: Handle quantified expression with either loop or iterator
164         specification.
165         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
166         iterator.
167
168 2011-08-29  Vincent Celier  <celier@adacore.com>
169
170         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
171         Binder or Linker of the main project file.
172
173 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
174
175         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
176         unit.
177
178 2011-08-29  Yannick Moy  <moy@adacore.com>
179
180         * exp_ch9.adb: Partial revert of previous change for Alfa mode
181
182 2011-08-29  Yannick Moy  <moy@adacore.com>
183
184         * exp_ch11.adb: Minor expansion of comment.
185
186 2011-08-29  Yannick Moy  <moy@adacore.com>
187
188         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
189
190 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
191
192         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
193         interpretation, set the type before resolving the operands, because
194         legality checks on an exponention operand need to know the type of the
195         context.
196
197 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
198
199         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
200         cleanups on a master if the instance is within a generic unit.
201         Complement to the corresponding fix to inline.adb for K520-030.
202
203 2011-08-29  Tristan Gingold  <gingold@adacore.com>
204
205         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
206         occurrence.
207         * exp_intr.adb: Minor comment fix.
208
209 2011-08-29  Bob Duff  <duff@adacore.com>
210
211         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
212         Delay_Required was used as an uninitialized variable.
213
214 2011-08-29  Robert Dewar  <dewar@adacore.com>
215
216         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
217         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
218         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
219
220 2011-08-29  Thomas Quinot  <quinot@adacore.com>
221
222         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
223         Remove unused variables.
224
225 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
226
227         * sem_res.adb: Remove Build_Explicit_Dereference.
228         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
229         from sem_res.adb, used in analysis of additional constructs.
230         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
231         expansion of iterators.
232         (Is_Object_Reference): Recognize variables rewritten as explicit
233         dereferences in Ada2012.
234         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
235         Reversible_Iterator names, for expansion of Ada2012 iterators.
236         * aspects.ads, aspects.adb (Find_Aspect): Utility.
237         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
238         linked list container.
239         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
240         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
241
242 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
243
244         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
245         containers.
246
247 2011-08-29  Vincent Celier  <celier@adacore.com>
248
249         * make.adb (Gnatmake): Get the maximum number of simultaneous
250         compilation processes after the Builder switches has been scanned, as
251         there may include -jnn.
252
253 2011-08-29  Matthew Heaney  <heaney@adacore.com>
254
255         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
256
257 2011-08-29  Tristan Gingold  <gingold@adacore.com>
258
259         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
260         GNAT_DRIVER_COMMAND_LINE to 255.
261
262 2011-08-29  Pascal Obry  <obry@adacore.com>
263
264         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
265         reformatting and style fix (class attribute casing).
266
267 2011-08-29  Yannick Moy  <moy@adacore.com>
268
269         * exp_ch11.adb: Yet another case where expansion should be common
270         between CodePeer and Alfa.
271
272 2011-08-29  Yannick Moy  <moy@adacore.com>
273
274         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
275
276 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
277
278         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
279         incomplete type and its completion match.
280
281 2011-08-29  Yannick Moy  <moy@adacore.com>
282
283         * exp_ch13.adb: Adjust previous change.
284
285 2011-08-29  Robert Dewar  <dewar@adacore.com>
286
287         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
288         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
289         Minor reformatting.
290
291 2011-08-29  Emmanuel Briot  <briot@adacore.com>
292
293         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
294         initialize aggregated projects.
295
296 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
297
298         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
299         depth of candidates to resolve a potentially spurious ambiguity between
300         two visible subprograms.
301
302 2011-08-29  Yannick Moy  <moy@adacore.com>
303
304         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
305         Requires/Ensures.
306         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
307         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
308         Requires/Ensures.
309
310 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
311
312         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
313         Add comment.
314
315 2011-08-29  Thomas Quinot  <quinot@adacore.com>
316
317         * sem_res.adb: Minor reformatting.
318
319 2011-08-29  Johannes Kanig  <kanig@adacore.com>
320
321         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
322         mode.
323         * gnat1drv.adb (Adjust_Global_Switches): Set
324         Use_Expressions_With_Actions to False in ALFA mode.
325         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
326         ALFA mode.
327
328 2011-08-29  Yannick Moy  <moy@adacore.com>
329
330         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
331         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
332         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
333         tagged types and dispatching calls in Alfa mode.
334
335 2011-08-29  Javier Miranda  <miranda@adacore.com>
336
337         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
338         we do not report an error on an Empty node.
339
340 2011-08-29  Geert Bosch  <bosch@adacore.com>
341
342         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
343         a-nlrear.o and a-nurear.o.
344
345 2011-08-29  Robert Dewar  <dewar@adacore.com>
346
347         * freeze.adb: Minor code reorganization.
348         Minor reformatting.
349         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
350         sem_ch6.adb: Minor reformatting
351
352 2011-08-29  Tristan Gingold  <gingold@adacore.com>
353
354         * s-except.ads, s-except.adb: Provide dummy body.
355
356 2011-08-29  Yannick Moy  <moy@adacore.com>
357
358         * sem_warn.adb (Within_Postcondition): Take into account the case of
359         an Ensures component in a Test_Case.
360
361 2011-08-29  Tristan Gingold  <gingold@adacore.com>
362
363         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
364         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
365         System_Exceptions_Debug
366         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
367         * a-except.adb: With and use System.Exceptions_Debug instead of
368         System.Exceptions.
369         * a-except-2005.adb: Likewise.
370         * s-assert.adb: Likewise.
371         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
372         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
373         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
374         s-excdeb. Update dependencies.
375         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
376         as these no longer need external libraries.
377
378 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
379
380         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
381         exponentiation operator on universal values in a context that requires
382         a fixed-point type.
383
384 2011-08-29  Tristan Gingold  <gingold@adacore.com>
385
386         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
387         before calling notify_handled_exception.
388         * a-exextr.adb: Fix comment.
389
390 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
391
392         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
393         Finalize_Address of the access type's finalization master.
394         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
395         access type's finalization master. Add a guard to prevent
396         Associated_Storage_Pool from being set on .NET/JVM.
397         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
398         attribute Finalize_Address of the access type's finalization master.
399         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
400         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
401         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
402         RE_Unit_Table.
403         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
404         use clause for System.IO
405         (Detach): Relax the assertion, to be reinstated later.
406         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
407         Relax the assertion on Finalize_Address, to be reinstated later.
408         (Is_Empty_List): New routine.
409         (pm): New debug routine.
410         (Set_Finalize_Address): New routine.
411         * s-finmas.ads (pm): New debug routine.
412         (Set_Finalize_Address): New routine.
413         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
414
415 2011-08-29  Tristan Gingold  <gingold@adacore.com>
416
417         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
418         Remove convention C.
419
420 2011-08-29  Tristan Gingold  <gingold@adacore.com>
421
422         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
423         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
424         (Finalize_TCB): Remove its finalization.
425         (Initialize): Remove assignment of GET_Exc_Stack_Addr
426         * s-soflin.adb (NT_Exc_Stack): Remove
427         (Get_Exc_Stack_Addr_NT): Likewise.
428         (Get_Exc_Stack_Addr_Soft): Likewise.
429         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
430         (Get_Exc_Stack_Addr): Likewise.
431         (Get_Exc_Stack_Addr_Soft): Likewise
432         * s-taspri-vms.ads (Exc_Stack_T): Remove.
433         (Exc_Stack_Ptr_T): Likewise.
434         (Private_Data): Remove Exc_Stack_Ptr component.
435
436 2011-08-29  Tristan Gingold  <gingold@adacore.com>
437
438         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
439
440 2011-08-29  Tristan Gingold  <gingold@adacore.com>
441
442         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
443
444 2011-08-29  Geert Bosch  <bosch@adacore.com>
445
446         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
447         L2_Norm, Swap_Column): New generic subprograms
448         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
449         L2_Norm, Swap_Column): Implement new subprograms in order to
450         eliminate dependency on BLAS and LAPACK libraries in
451         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
452         version. Forward_Eliminate/Back_Substitute can be used to put a
453         matrix in row echelon or reduced row echelon form using partial
454         pivoting.
455         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
456         Swap_Column): Instantiate from System.Generic_Array_Operations.
457         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
458         (Sqrt): Local function for simple computation of square root without
459         adding dependencies on Generic_Elementary_Functions.
460         (Swap): New subprogram to exchange floating point numbers.
461         (Inverse): Reimplement using Jordan-Gauss elimination.
462         (Jacobi): New procedure implementing Jacobi's method for computation
463         of eigensystems, based on Rutishauser's implementation.
464         (L2_Norm): Implement directly using the inner product.
465         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
466         decreasing eigenvalue as required by the Ada RM.
467         (Swap_Column): New helper procedure for Sort_Eigensystem.
468         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
469         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
470         Sort_Eigensystems.
471
472 2011-08-29  Thomas Quinot  <quinot@adacore.com>
473
474         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
475         statements line.
476
477 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
478
479         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
480         than the current node.
481         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
482         Finalization_Master. The list headers have two fields instead of three.
483         This should fix alignment issue but subpool allocations are now
484         unusable. Alphabetize subprograms.
485         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
486         the size of the header when converting the beginning of the object to
487         a FM_Node. Set the master's Finalize_Address attribute if not already
488         set.
489         (Deallocate_Any_Controlled): Use the offset rather than the size of the
490         header when converting the beginning of the object to a FM_Node.
491
492 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
493
494         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
495         reraise when compiling for CodePeer.
496
497 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
498
499         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
500         now needed by a-convec.adb. Fix warning.
501
502 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
503
504         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
505         processing of TSS routine Finalize_Address when compiling in
506         CodePeer_Mode.
507
508 2011-08-29  Thomas Quinot  <quinot@adacore.com>
509
510         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
511         sem_warn.adb: Minor reformatting.
512
513 2011-08-29  Emmanuel Briot  <briot@adacore.com>
514
515         * prj-conf.adb (Get_Config_Switches): Also collect the list of
516         languages from aggregated projects.
517
518 2011-08-29  Yannick Moy  <moy@adacore.com>
519
520         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
521         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
522         Traverse_Package_Declaration, Traverse_Subprogram_Body,
523         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
524         for stubs are traversed too when parameter is set
525         (Traverse_All_Compilation_Units): Traverse without going inside stubs
526         (Traverse_Declarations_Or_Statements): Do the special traversing for
527         stubs when required.
528         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
529         return subprogram or package body from stub.
530         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
531         stubs without prior subprogram decl.
532
533 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
534
535         * gnat_ugn.texi: Fix typo.
536
537 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
538
539         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
540         which accounts for size vs alignment issues and calculates the size of
541         the list header.
542         (Deallocate_Any_Controlled): Ditto.
543         (Nearest_Multiple_Rounded_Up): New routine.
544
545 2011-08-29  Tristan Gingold  <gingold@adacore.com>
546
547         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
548         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
549         (Set_Exception_Msg): Ditto.
550         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
551         Private_Data.
552         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
553         Use Save_Occurrence instead of Save_Occurrence_No_Private.
554         (Raise_With_Msg): Remove Cleanup_Flag.
555         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
556         Clean_Flag and Private_Data components.
557
558 2011-08-29  Yannick Moy  <moy@adacore.com>
559
560         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
561         in CodePeer mode.
562         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
563         of an explicitly declared type, so that the base types of the original
564         type and this generated type are the same, and a "type" (not a subtype
565         like previously).
566         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
567         small" in Alfa mode, like in CodePeer mode.
568         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
569         clauses in Alfa mode.
570
571 2011-08-29  Javier Miranda  <miranda@adacore.com>
572
573         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
574         function to the package spec.
575         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
576         internally generated bodies of null procedures locate the internally
577         generated spec enforcing mode conformance.
578         (Is_Interface_Conformant): Ensure that the controlling formal of the
579         primitives match.
580
581 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
582
583         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
584         reject the pragma if it appears to apply to a formal subprogram.
585
586 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
587
588         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
589         inner expression, to prevent double evaluation.
590
591 2011-08-29  Tristan Gingold  <gingold@adacore.com>
592
593         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
594         they were unused.
595         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
596         * a-except-2005.adb (Propagate_Exception): Adjust spec.
597         (Raise_Current_Excep): Adjust call.
598         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
599
600 2011-08-29  Thomas Quinot  <quinot@adacore.com>
601
602         * exp_disp.adb: Minor reformatting.
603
604 2011-08-29  Tristan Gingold  <gingold@adacore.com>
605
606         * a-exexpr.adb (Setup_Exception): Removed.
607         * a-exexpr-gcc.adb (Setup_Exception): Removed.
608         * a-except.adb (Exception_Propagation): Removed.
609         * a-except-2005.adb (Setup_Exception): Removed.
610         (Reraise): Remove call to Setup_Exception.
611         (Reraise_Occurrence): Ditto.
612         (Reraise_Occurrence_Always): Ditto.
613         (Reraise_Occurrence_No_Defer): Ditto.
614         (Transfer_Occurrence): Ditto.
615         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
616         (Set_Exception_Msg): Ditto.
617
618 2011-08-29  Robert Dewar  <dewar@adacore.com>
619
620         * a-convec.adb, exp_disp.adb: Minor reformatting.
621
622 2011-08-29  Tristan Gingold  <gingold@adacore.com>
623
624         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
625
626 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
627
628         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
629         Exception_Handlers to No_List instead of Empty_List in the case where
630         there are no handlers.
631
632 2011-08-29  Tristan Gingold  <gingold@adacore.com>
633
634         * gcc-interface/gigi.h (enum standard_datatypes): Add
635         ADT_reraise_zcx_decl
636         (reraise_zcx_decl): New macro.
637         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
638         (gigi): Set reraise_zcx_decl.
639         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
640         (gnat_to_gnu): Handle N_Raise_Statement.
641
642 2011-08-29  Robert Dewar  <dewar@adacore.com>
643
644         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
645         a-undesu.adb: Minor reformatting.
646
647 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
648
649         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
650         table, accept an unfrozen untagged component if it is an actual for a
651         formal incomplete type.
652         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
653         provide new iterator forms over vectors.
654         Introduce type Iterator in package body to implement operations of
655         Reversible_Iterator interface.
656         * a-iteint.ads: Make package pure so it is usable with new container
657         packages, that are categorized Remote_Types.
658
659 2011-08-29  Robert Dewar  <dewar@adacore.com>
660
661         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
662
663 2011-08-29  Bob Duff  <duff@adacore.com>
664
665         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
666         of <>, because this is the routine that checks for dimensionality
667         errors (for example, for a two-dimensional array, (others => <>) should
668         be (others => (others => <>)).
669
670 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
671
672         * impunit.adb: Add new run-time units.
673         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
674         s-stposu.ads, s-stposu.adb: Code clean up.
675         Handle protected class-wide or task class-wide types
676         Handle C/C++/CIL/Java types.
677         * s-spsufi.adb, s-spsufi.ads: New files.
678
679 2011-08-29  Yannick Moy  <moy@adacore.com>
680
681         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
682         library-level subprogram.
683         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
684         placement.
685         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
686         component.
687         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
688         component.
689         * gnat_rm.texi: Update doc for Test_Case pragma.
690
691 2011-08-29  Tristan Gingold  <gingold@adacore.com>
692
693         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
694         convention C.
695         (GCC_Exception_Access): New type.
696         (Unwind_DeleteException): New imported procedure
697         (Foreign_Exception): Import it.
698         (GNAT_GCC_Exception): Simply have the occurrence inside.
699         (To_GCC_Exception): New function.
700         (To_GNAT_GCC_Exception): New function.
701         (GNAT_GCC_Exception_Cleanup): New procedure..
702         (Propagate_GCC_Exception): New procedure.
703         (Reraise_GCC_Exception): New procedure.
704         (Setup_Current_Excep): New procedure.
705         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
706         (Unwind_RaiseException): Ditto.
707         (Unwind_ForcedUnwind): Ditto.
708         (Remove): Removed.
709         (Begin_Handler): Change type of parameter.
710         (End_Handler): Ditto. Now delete the exception if still present.
711         (Setup_Key): Removed.
712         (Is_Setup_And_Not_Propagated): Removed.
713         (Set_Setup_And_Not_Propagated): Ditto.
714         (Clear_Setup_And_Not_Propagated): Ditto.
715         (Save_Occurrence_And_Private): Ditto.
716         (EID_For): Add 'not null' constraint on parameter.
717         (Setup_Exception): Does nothing.
718         (Propagate_Exception): Simplified.
719         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
720         re-raise is not expanded anymore.
721         * s-except.ads (Foreign_Exception): New exception - placeholder for
722         non Ada exceptions.
723         * raise-gcc.c (__gnat_setup_current_excep): Declare
724         (CXX_EXCEPTION_CLASS): Define (not yet used)
725         (GNAT_EXCEPTION_CLASS): Define.
726         (is_handled_by): Handle foreign exceptions.
727         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
728
729 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
730
731         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
732
733 2011-08-29  Thomas Quinot  <quinot@adacore.com>
734
735         * a-synbar-posix.adb: Minor reformatting.
736
737 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
738
739         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
740         a-exetim-default.ads (Interrupt_Clocks_Supported,
741         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
742         definitions to be compliant with AI-0171. The target systems do not
743         support separate account for the execution time of interrupt handlers.
744
745 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
746
747         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
748         in the barrier to put first the easiest to evaluate (and the one which
749         will be True more often). More efficient.
750
751 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
752
753         * s-atocou-x86.adb: Fix constraint in machine code insertion.
754
755 2011-08-29  Bob Duff  <duff@adacore.com>
756
757         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
758         attributes that are now aspects, as specified by AI05-0229-1.
759         * sem_ch13.adb (Analyze_Aspect_Specifications,
760         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
761         pragmas or attribute references, as appropriate.
762
763 2011-08-29  Robert Dewar  <dewar@adacore.com>
764
765         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
766         a-synbar-posix.ads: Minor reformatting.
767
768 2011-08-29  Yannick Moy  <moy@adacore.com>
769
770         * snames.ads-tmpl: Add name Force.
771
772 2011-08-29  Pascal Obry  <obry@adacore.com>
773
774         * prj-nmsc.adb: Minor reformatting.
775
776 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
777
778         * a-exetim.ads (Interrupt_Clocks_Supported,
779         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
780         definitions to be compliant with AI-0171.
781
782 2011-08-29  Robert Dewar  <dewar@adacore.com>
783
784         * a-ngelfu.adb: Add comments.
785
786 2011-08-29  Geert Bosch  <bosch@adacore.com>
787
788         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
789         the closest machine number to Pi / 2.0.
790
791 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
792
793         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
794         package Ada.Synchronous_Barriers.
795         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
796         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
797         default implementation using protected objects and another one
798         a-synbar-posix using POSIX barriers as the underlying support.
799         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
800         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
801         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
802         Clean up dependencies.
803         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
804
805 2011-08-29  Robert Dewar  <dewar@adacore.com>
806
807         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
808         exp_dist.adb: Minor code reorganization.
809         Minor reformatting.
810
811 2011-08-29  Thomas Quinot  <quinot@adacore.com>
812
813         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
814         primitive operation must support external streaming if it is not a
815         controlling access result.
816
817 2011-08-29  Thomas Quinot  <quinot@adacore.com>
818
819         * sinfo.ads, sem_ch7.adb: Minor reformatting.
820
821 2011-08-29  Bob Duff  <duff@adacore.com>
822
823         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
824         restriction on allocators, as required by AI05-0013-1.
825         * restrict.ads: Minor comment fix.
826
827 2011-08-29  Tristan Gingold  <gingold@adacore.com>
828
829         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
830         (To_Jmpbuf_Address): Ditto
831         (builtin_longjmp): Ditto
832
833 2011-08-29  Thomas Quinot  <quinot@adacore.com>
834
835         * sem_res.adb: Minor reformatting.
836
837 2011-08-29  Vincent Celier  <celier@adacore.com>
838
839         * make.adb (Gnatmake): Move special processing for VM targets after the
840         call to Get_Target_Parameters.
841
842 2011-08-29  Thomas Quinot  <quinot@adacore.com>
843
844         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
845
846 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
847
848         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
849         where an anonymous access discriminant of a limited designated type
850         appears in a non-immutably limited discriminated type and issue an
851         error message. Add local variable Desig_T and replace all occurrences
852         of Designated_Type.
853
854 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
855
856         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
857         implementation is compliant to RM D.15(15/2) after the modification
858         imposed by AI05-0094-1 (binding interpretation).
859
860 2011-08-29  Robert Dewar  <dewar@adacore.com>
861
862         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
863         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
864
865 2011-08-29  Thomas Quinot  <quinot@adacore.com>
866
867         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
868         the scope name, do not report a missing label as a style violation (it
869         will be diagnosed as an illegality).
870         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
871         variant records: Get_Enum_Lit_From_Pos already returns a usage
872         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
873         on Expr in Integer_Literal case so that it can be used by
874         Build_To_Any_Call.
875
876 2011-08-29  Tristan Gingold  <gingold@adacore.com>
877
878         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
879         Adjust comment.
880         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
881         (Build_Abort_Block_Handler): New function to build an Abort_Signal
882         exception handler.
883         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
884         Build_Abort_Block_Handler to build the exception handler. Do not
885         undefer aborts for the Abort_Signal exception handler if back-end
886         exception mechanism.
887         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
888         back_end exceptions for all others and abort_signal.
889         * s-except.ads (ZCX_By_Default): New constant.
890         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
891         (Raise_Exception_Always): Ditto.
892         (Raise_From_Signal_Handler): Ditto.
893         (Raise_With_Location_And_Msg): Ditto.
894         (Raise_With_Msg): Ditto.
895         (Reraise): Ditto.
896         (Reraise_Occurence): Ditto.
897         (Reraise_Occurrence_Always): Ditto.
898         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
899         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
900
901 2011-08-29  Thomas Quinot  <quinot@adacore.com>
902
903         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
904
905 2011-08-29  Robert Dewar  <dewar@adacore.com>
906
907         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
908         Minor code reorganization.
909
910 2011-08-29  Bob Duff  <duff@adacore.com>
911
912         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
913         2012, not just Ada 2005.
914
915 2011-08-29  Vincent Celier  <celier@adacore.com>
916
917         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
918         with a project file or with gprbuid, if -gnatep= is specified, the
919         builder may need to be invoked with -x.
920
921 2011-08-29  Tristan Gingold  <gingold@adacore.com>
922
923         * a-exexpr-gcc.adb: Minor comment fix.
924
925 2011-08-29  Robert Dewar  <dewar@adacore.com>
926
927         * sem_ch8.adb: Minor reformatting.
928
929 2011-08-29  Bob Duff  <duff@adacore.com>
930
931         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
932         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
933         treating "some" as unreserved in earlier Ada versions. This is now
934         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
935         rather than Name_Some, since Tok_Some is now recognized as reserved.
936         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
937         reserved word.
938         * scans.ads: Minor comment fixes.
939         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
940         for other language versions.
941         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
942         treating "some" as unreserved in earlier Ada versions. This is now
943         handled in Snames.Is_Keyword_Name.
944         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
945         Ada 2012.
946         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
947         unreserved in earlier Ada versions. This is now handled in
948         Snames.Is_Keyword_Name.
949         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
950         words as for other language versions.
951         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
952         Ada 2012, not just Ada 2005.
953
954 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
955
956         * sem_ch13.adb: Additional semantic checks for aspects involved in
957         iterators.
958
959 2011-08-29  Matthew Heaney  <heaney@adacore.com>
960
961         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
962         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
963         Container parameter.
964         (Ancestor_Find): ditto.
965
966 2011-08-29  Thomas Quinot  <quinot@adacore.com>
967
968         * par-endh.adb: Minor reformatting.
969
970 2011-08-29  Tristan Gingold  <gingold@adacore.com>
971
972         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
973         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
974         (Adjust_N_CLeanups_For): Remove.
975         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
976         stack is reached.
977         (Propgate_Exception): Adjust.
978         * raise-gcc.c: Add a few static/const.
979         (Adjust_N_Cleanups_For): Remove declaration.
980         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
981
982 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
983
984         * sem_ch8.adb: Use type of function return when rewriting as object
985         declaration.
986
987 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
988
989         * sem_type.adb: Minor reformatting.
990
991 2011-08-29  Robert Dewar  <dewar@adacore.com>
992
993         * makeutl.adb: Minor reformatting.
994
995 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
996
997         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
998         function call of a limited type, the expansion of the renaming is
999         complicated by the presence of various temporaries and subtypes that
1000         capture constraints of the renamed object.
1001         Rewrite node as an object declaration, whose expansion is simpler.
1002         Given that the object is limited there is no copy involved and no
1003         performance hit.
1004
1005 2011-08-29  Robert Dewar  <dewar@adacore.com>
1006
1007         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
1008         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
1009
1010 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1011
1012         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
1013         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
1014         system-linux-hppa.ads, system-linux-s390.ads,
1015         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
1016         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
1017         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
1018         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
1019         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
1020         system-solaris-sparc.ads, system-lynxos-x86.ads,
1021         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
1022         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
1023         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
1024         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
1025         system-vxworks-x86.ads: Remove GCC_ZCX_Support
1026         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
1027         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
1028         * opt.ads: Adjust comment.
1029         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
1030         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
1031         * system.ads: Move GCC_ZCX_Support to obsolete entries.
1032
1033 2011-08-29  Emmanuel Briot  <briot@adacore.com>
1034
1035         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
1036         file name is specified on the gnatmake or gprbuild command line, and
1037         before we search for that file in the project.
1038
1039 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1040
1041         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
1042         used to determine whether a possible interpretation for an overloadable
1043         entity is declared within the current instantiation and should be
1044         included in the candidate set.
1045
1046 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
1047
1048         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
1049
1050 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1051
1052         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
1053         access subtype is access_to_subprogram, when applying checks for
1054         RM 3.10.2 (27).
1055
1056 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1057
1058         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
1059         for sibling when common parent.
1060
1061 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1062
1063         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
1064         "pragma_".
1065
1066 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1067
1068         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
1069         for the return type when in ASIS mode.
1070
1071 2011-08-29  Vincent Celier  <celier@adacore.com>
1072
1073         * make.adb (Gnatmake): Get the default search dirs, then the target
1074         parameters after getting the Builder switches, as the Builder switches
1075         may include --RTS= and that could change the default search dirs.
1076
1077 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1078
1079         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
1080         Make_Final_Call. Move the processing for class-wide types before the
1081         processing for derivations from [Limited_]Controlled.
1082         (Make_Final_Call): Move the processing for class-wide types before the
1083         processing for derivations from [Limited_]Controlled.
1084         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
1085         Add code to account for alignments larger than the list header. Add a
1086         comment illustrating the structure of the allocated object + padding +
1087         header.
1088         (Deallocate_Any_Controlled): Add code to account for alignments larger
1089         than the list header.
1090
1091 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1092
1093         * sinfo.ads, sinfo.adb: New node kind
1094         N_Formal_Incomplete_Type_Definition, related flags.
1095         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
1096         Parse formal incomplete types.
1097         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
1098         sem_ch12.
1099         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
1100         Formal incomplete types do not need completion.
1101         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
1102         Validate_Incomplete_Type_Instance): New procedures to handle formal
1103         incomplete types.
1104         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
1105         that corresponds to a formal incomplete type.
1106         * sprint.adb: Handle formal incomplete type declarations.
1107         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
1108         an insertion point.
1109
1110 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1111
1112         * a-fihema.ads, a-fihema.adb: Unit removed.
1113         * a-undesu.ads, a-undesu.adb: New unit implementing
1114         Ada.Unchecked_Deallocate_Subpool.
1115         * einfo.adb: Remove Associated_Collection from the node usage.
1116         Add Finalization_Master to the node usage.
1117         (Associated_Collection): Removed.
1118         (Finalization_Master): New routine.
1119         (Set_Associated_Collection): Removed.
1120         (Set_Finalization_Master): New routine.
1121         (Write_Field23_Name): Remove Associated_Collection from the output. Add
1122         Finalization_Master to the output.
1123         * einfo.ads: Remove attribute Associated_Collection and its uses in
1124         entities.
1125         Add new attribute Finalization_Master along with its uses in entitites.
1126         (Associated_Collection): Removed along with its pragma import.
1127         (Finalization_Master): New routine along with a pragma import.
1128         (Set_Associated_Collection): Removed along with its pragma import.
1129         (Set_Finalization_Master): New routine along with a pragma import.
1130         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
1131         Build_Finalization_Collection with Build_Finalization_Master.
1132         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
1133         before the bodies of the predefined routines. Add comment explaining
1134         this. Replace call to Build_Finalization_Collection with
1135         Build_Finalization_Master.
1136         (Freeze_Type): Replace call to Build_Finalization_Collection with
1137         Build_Finalization_Master.
1138         (Make_Finalize_Address_Body): Comment reformatting.
1139         (Make_Predefined_Primitive_Specs): Code reformatting.
1140         (Stream_Operation_OK): Update comment mentioning finalization
1141         collections. Replace RE_Finalization_Collection with
1142         RE_Finalization_Master.
1143         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
1144         Associated_Collection with Finalization_Master. Replace call to
1145         Build_Finalization_Collection with Build_Finalization_Master.
1146         (Expand_Allocator_Expression): Replace call to Associated_Collection
1147         with Finalization_Master. Replace call to Set_Associated_Collection with
1148         Set_Finalization_Master. Remove the generation of
1149         Set_Finalize_Address_Ptr.
1150         (Expand_N_Allocator): Replace call to Associated_Collection with
1151         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
1152         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
1153         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
1154         comment on usage. Replace call to Needs_BIP_Collection with
1155         Needs_BIP_Finalization_Master Remplace BIP_Collection with
1156         BIP_Finalization_Master. Update all comments which mention finalization
1157         collections. Replace Associated_Collection with
1158         Finalization_Master. Replace Build_Finalization_Collection with
1159         Build_Finalization_Master.
1160         (BIP_Formal_Suffix): Update BIP_Collection's case.
1161         (Build_Heap_Allocator): Update the related comment. Rename local
1162         variable Collect to Fin_Mas_Id and update its occurrences. Update
1163         comments which mention finalization collections. Replace
1164         Set_Associated_Collection with Set_Finalization_Master.
1165         (Expand_Call): Update the code which detects a special piece of library
1166         code for .NET/JVM.
1167         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
1168         Add_Collection_Actual_To_Build_In_Place_Call with
1169         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
1170         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
1171         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
1172         Add_Collection_Actual_To_Build_In_Place_Call with
1173         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1174         (Make_Build_In_Place_Call_In_Assignment): Replace call to
1175         Add_Collection_Actual_To_Build_In_Place_Call with
1176         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1177         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1178         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
1179         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1180         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
1181         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
1182         Replace call to Set_Associated_Collection with Set_Finalization_Master.
1183         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
1184         Replace the call to Associated_Collection with Finalization_Master.
1185         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
1186         Update the way finalization master names are generated. Update the
1187         retrieval of the correct access type which will carry the pool and
1188         master attributes.
1189         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
1190         (Make_Finalize_Address_Body): Abstract types do not need
1191         Finalize_Address. Code reformatting.
1192         (Make_Finalize_Address_Stmts): Update comment on usage.
1193         (Make_Set_Finalize_Address_Ptr_Call): Removed.
1194         (Process_Declarations): Update comments.
1195         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
1196         Build_Finalization_Master. Update associated comment.
1197         (Make_Set_Finalize_Address_Ptr_Call): Removed.
1198         * exp_ch13.adb: Update comments which mention finalization collections.
1199         (Expand_N_Free_Statement): Replace the call to Associated_Collection
1200         with Finalization_Master.
1201         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
1202         create calls to routines Allocate_Any_Controlled and
1203         Deallocate_Any_Controlled.
1204         (Find_Finalize_Address): New routine.
1205         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
1206         comparison.
1207         (Requires_Cleanup_Actions): Update the comment on freeze node
1208         inspection.
1209         * exp_util.ads: Remove comment on generated code for
1210         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
1211         is better to simply look in the body.
1212         * freeze.adb (Freeze_All): Update the comment of finalization
1213         collections. Replace the call to Associated_Collection with
1214         Finalization_Master. Replace the call to Build_Finalization_Collection
1215         with Build_Finalization_Master.
1216         * impunit.adb: Add a-undesu and s-stposu to the list of units.
1217         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
1218         a-fihema.
1219         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
1220         Ada.Finalization. Add processing for children of System.Storage_Pools.
1221         * rtsfind.ads: Remove the naming of second level children of
1222         Ada.Finalization.
1223         Remove Ada_Finalization_Heap_Management from the list of units.
1224         Remove subtype Ada_Finalization_Child.
1225         Remove the following subprogram entities:
1226         
1227            RE_Allocate
1228            RE_Deallocate
1229            RE_Finalization_Collection
1230            RE_Finalization_Collection_Ptr
1231            RE_Set_Finalize_Address_Ptr
1232         
1233         Add the naming of second level children of System.Storage_Pools.
1234         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
1235         the list of units.
1236         Add subtype System_Storage_Pools_Child.
1237         Add the following subprogram entities to System.Finalization_Masters:
1238         
1239            RE_Finalization_Master
1240            RE_Finalization_Master_Ptr
1241         
1242         Add the following subprogram entities to System.Storage_Pools.Subpools:
1243         
1244            RE_Allocate_Any_Controlled
1245            RE_Deallocate_Any_Controlled
1246            RE_Root_Storage_Pool_With_Subpools
1247            RE_Root_Subpool
1248            RE_Subpool_Handle
1249         
1250         Move the following subprogram entities from
1251         Ada.Finalization.Heap_Management to System.Finalization_Masters:
1252         
1253            RE_Add_Offset_To_Address
1254            RE_Attach
1255            RE_Base_Pool
1256            RE_Detach
1257         
1258         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
1259         Set_Associated_Collection with Set_Finalization_Master.
1260         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
1261         BIP_Finalization_Master is created.
1262         * s-finmas.adb: New unit System.Finalization_Masters.
1263         * s-finmas.ads: New unit System.Finalization_Masters.
1264         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
1265         * s-stposu.ads, s-stposu.adb: New unit implementing
1266         System.Storage_Pools.Subpools.
1267
1268 2011-08-29  Bob Duff  <duff@adacore.com>
1269
1270         * tbuild.adb: Add assertion.
1271
1272 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1273
1274         * s-pooglo.adb: Minor reformatting.
1275
1276 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1277
1278         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
1279         an indexed component of a packed array whose element type is a record
1280         with a representation clause different from that of the right-hand
1281         side, generate a temporary to minimuze the number of bit-field
1282         operations generated.
1283
1284 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1285
1286         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
1287         declarations, and thus are likely insertion points for actions.
1288
1289 2011-08-29  Bob Duff  <duff@adacore.com>
1290
1291         * einfo.ads: Minor comment fix.
1292
1293 2011-08-29  Robert Dewar  <dewar@adacore.com>
1294
1295         * frontend.adb, gnat1drv.adb: Minor reformatting.
1296
1297 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1298
1299         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
1300         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
1301         space in front of the header.
1302
1303 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1304
1305         * frontend.adb (Frontend): Exit after creating Standard package when
1306         -gnatd.H is present.
1307         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
1308         present.
1309
1310 2011-08-29  Robert Dewar  <dewar@adacore.com>
1311
1312         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
1313         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
1314         snames.ads-tmpl: Minor reformatting.
1315
1316 2011-08-29  Philippe Gil  <gil@adacore.com>
1317
1318         * prj.adb (Reset_Units_In_Table): New procedure.
1319         Reset units to avoid access to freed memory.
1320
1321 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1322
1323         * get_scos.adb: When reading a P statement SCO without a pragma name
1324         (from an older ALI file), ensure that the Pragma_Name component is set
1325         to Unknown_Pragma (not left uninitialized).
1326
1327 2011-08-29  Vincent Celier  <celier@adacore.com>
1328
1329         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
1330         modified to compute correctly the object path of a SAL project that is
1331         extending another library project.
1332         (Write_Path_File): New procedure.
1333         * makeutl.ads (Directories): New table moved from Buildgpr
1334         (Get_Directories): New procedure moved from Buildgpr
1335         (Write_Path_File): New procedure
1336         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
1337         paths before binding SALs, instead of Set_Ada_Paths.
1338         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
1339         Prj.
1340         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
1341         (Current_Source_Path_File_Of): New function
1342         (Set_Current_Object_Path_File_Of): New procedure
1343         (Current_Source_Object_File_Of): New function
1344         (Set_Current_Object_Path_File_Of): New procedure
1345         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
1346         (Current_Source_Path_File_Of): New function
1347         (Set_Current_Object_Path_File_Of): New procedure
1348         (Current_Source_Object_File_Of): New function
1349         (Set_Current_Object_Path_File_Of): New procedure
1350
1351 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1352
1353         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
1354         packed entity, use a bit-field assignment only if there is no change of
1355         representation.
1356
1357 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1358
1359         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
1360         Is_RTU instead of using Chars comparisons.
1361
1362 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1363
1364         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
1365         temporary object if the actual is constrained, and the discriminants
1366         read from the stream don't match.
1367
1368 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1369
1370         * sem_attr.adb, exp_attr.adb: Add handling of
1371         Attribute_System_Allocator_Alignment
1372         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
1373         Attribute_System_Allocator_Alignment.
1374         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
1375         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
1376         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
1377         get_target_system_allocator_alignment.
1378
1379 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1380
1381         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1382         dependencies.
1383
1384 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1385
1386         * exp_ch3.adb (In_Runtime): Fix typo.
1387
1388 2011-08-29  Bob Duff  <duff@adacore.com>
1389
1390         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
1391
1392 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1393
1394         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
1395         and a separate tag assignment is generated, ensure that the tag
1396         assignment is analyzed.
1397
1398 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1399
1400         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
1401         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
1402         of statement lists that may contain local declarations.
1403         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
1404         duplicate the triggering statements needed for the expansion of this
1405         construct, when the trigger is a dispatching call to a synchronized
1406         primitive.
1407
1408 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1409
1410         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
1411         * bindgen.adb: Add comments.
1412         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
1413         in CodePeer mode.
1414
1415 2011-08-29  Robert Dewar  <dewar@adacore.com>
1416
1417         * exp_attr.adb: Minor reformatting.
1418         Minor code reorganization and commenting.
1419         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
1420         reformatting.
1421
1422 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1423
1424         * get_scos.adb: Ignore chaining indicators not currently supported
1425         by Ada.
1426
1427 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1428
1429         * system.ads: Minor editing.
1430
1431 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1432
1433         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
1434         CodePeer mode.
1435         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
1436         Attribute_Elab_Subp_Body.
1437         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
1438         * sem_util.adb: Update comments.
1439
1440 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1441
1442         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
1443         pragma name for each SCO statement corresponding to a pragma.
1444
1445 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1446
1447         * opt.ads: Minor editing.
1448
1449 2011-08-29  Yannick Moy  <moy@adacore.com>
1450
1451         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
1452         that only made sense for CodePeer mode.
1453
1454 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1455
1456         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
1457         which is no longer used.
1458         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
1459         handling of the 64-bit division check.
1460         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
1461         division available.
1462         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
1463         longer used.
1464
1465 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1466
1467         * get_scos.adb: Minor reformatting.
1468
1469 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1470
1471         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
1472         statement list is wrapped in a block, the block is explicitly analyzed
1473         in order to properly redecorate the entities and create a servicing
1474         finalizer.
1475
1476 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1477
1478         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
1479         (Set_Zero_Cost_Handling): Remove.
1480
1481 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1482
1483         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
1484
1485 2011-08-29  Geert Bosch  <bosch@adacore.com>
1486
1487         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
1488         instruction, as the latter may produce -0.0, which is not a valid VAX
1489         F float number.
1490         (Neg_G): Likewise for VAX F float.
1491
1492 2011-08-29  Robert Dewar  <dewar@adacore.com>
1493
1494         * exp_util.adb: Minor reformatting.
1495
1496 2011-08-29  Yannick Moy  <moy@adacore.com>
1497
1498         * sem_ch3.adb: Minor comment update.
1499
1500 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1501
1502         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
1503         the operand type.
1504
1505 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1506
1507         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
1508         current statement sequence on a generic instantiation or a subprogram
1509         declaration.
1510
1511 2011-08-29  Robert Dewar  <dewar@adacore.com>
1512
1513         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
1514         Minor reformatting.
1515
1516 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1517
1518         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1519         Correct the check which involves the freeze node of a controlled or
1520         access-to-controlled type.
1521
1522 2011-08-29  Geert Bosch  <bosch@adacore.com>
1523
1524         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
1525         statements.
1526         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
1527         Asm statements.
1528
1529 2011-08-29  Yannick Moy  <moy@adacore.com>
1530
1531         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
1532         for every index type and component type that is not a subtype_mark.
1533         (Process_Subtype): Set Etype of subtype.
1534
1535 2011-08-29  Robert Dewar  <dewar@adacore.com>
1536
1537         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
1538         reorganization.  Minor reformatting.
1539
1540 2011-08-29  Steve Baird  <baird@adacore.com>
1541
1542         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
1543         for CodePeer and ALFA modes.
1544
1545 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1546
1547         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
1548         that comes from an enclosing scope if it is not the renaming of an
1549         actual, to handle properly a spurious ambiguity in an instance.
1550
1551 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
1552
1553         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
1554         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
1555         use it instead of the Esize of the first parameter.
1556         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
1557         above change.
1558         <Size>: Likewise.  Call it for composite types on the RM size.
1559
1560 2011-08-29  Yannick Moy  <moy@adacore.com>
1561
1562         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
1563         * sem_util.adb (Unique_Name): Correct behaviour for names of
1564         compilation units.
1565
1566 2011-08-29  Yannick Moy  <moy@adacore.com>
1567
1568         * sem_prag.adb (Check_Precondition_Postcondition): In formal
1569         verification mode, analyze pragma expression for correctness, for
1570         pre/post on library-level subprogram, as it is not expanded later.
1571
1572 2011-08-29  Yannick Moy  <moy@adacore.com>
1573
1574         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
1575         in formal verification.
1576
1577 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1578
1579         * sem_util.adb: Minor reformatting.
1580         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
1581         there's no pragma.
1582         * par_sco.ads, par_sco.adb: Update comments.
1583
1584 2011-08-29  Yannick Moy  <moy@adacore.com>
1585
1586         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
1587         associated getter/setter.
1588         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
1589
1590 2011-08-29  Vincent Celier  <celier@adacore.com>
1591
1592         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
1593         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
1594         with declarations for Language_Kind and Dependency_Kind for Ada.
1595         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
1596         (Process_Compiler): Take into account the new attributes Dependency_Kind
1597         and Language_Kind.
1598         (Check_Configuration): Check if language kind is unit based, not if the
1599         language name is Ada.
1600         (Process_Exceptions_Unit_Based): Ditto
1601         (Add_Language): Remove default additions of language and dependency kind
1602         * prj.ads: Minor comment change
1603         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
1604
1605 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1606
1607         * debug.adb: Update comments.
1608
1609 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
1610
1611         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
1612         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
1613         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
1614         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
1615         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
1616
1617 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1618
1619         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
1620         (GNATLIBCFLAGS_FOR_C): Replace
1621         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
1622         (gnatlib-shared-default, gnatlib-shared-dual-win32)
1623         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
1624         (gnatlib-sjlj, gnatlib-zcx): Likewise.
1625
1626 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
1627
1628         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
1629
1630         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
1631
1632         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
1633
1634 2011-08-05  Nicolas Roche  <roche@adacore.com>
1635
1636         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
1637         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
1638         canadian cross.
1639         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
1640
1641 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1642
1643         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
1644         subprogram bodies declared out-of-order.
1645
1646 2011-08-05  Yannick Moy  <moy@adacore.com>
1647
1648         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
1649         entities directly in package Standard, otherwise skip the standard
1650         prefix.
1651
1652 2011-08-05  Robert Dewar  <dewar@adacore.com>
1653
1654         * a-cbmutr.adb: Minor reformatting
1655         (Allocate_Node): refactor node allocation algorithm
1656
1657 2011-08-05  Robert Dewar  <dewar@adacore.com>
1658
1659         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
1660         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
1661         mode.
1662         (Analyze_Pragma, case Check_Policy): Ditto.
1663         * sem_prag.ads (Check_Disabled): New function
1664         * snames.ads-tmpl: Add Name_Disable.
1665
1666 2011-08-05  Robert Dewar  <dewar@adacore.com>
1667
1668         * gnat_rm.texi: Document implementation-defined policy DISABLE for
1669         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
1670
1671 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1672
1673         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
1674         that appears in a generic formal part and applies to a formal
1675         subprogram.
1676
1677 2011-08-05  Robert Dewar  <dewar@adacore.com>
1678
1679         * a-cbmutr.ads: Minor reformatting.
1680
1681 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1682
1683         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
1684         to check count, check sign of value instead.
1685         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
1686         (Copy_Subtree): allocate copy of source element
1687         (Equal_Subtree): compare elements, not access objects
1688
1689 2011-08-05  Vincent Celier  <celier@adacore.com>
1690
1691         * gnat_ugn.texi: Fix VMS alternative.
1692
1693 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1694
1695         * sem_ch11.adb: Add comment.
1696
1697 2011-08-05  Robert Dewar  <dewar@adacore.com>
1698
1699         * exp_util.adb: Minor comment fix.
1700
1701 2011-08-05  Robert Dewar  <dewar@adacore.com>
1702
1703         * scng.adb (Error_Unterminated_String): Improve flag position when
1704         comma present.
1705
1706 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1707
1708         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
1709         tree containers).
1710         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
1711         multiway tree containers.
1712
1713 2011-08-05  Robert Dewar  <dewar@adacore.com>
1714
1715         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
1716         * stylesw.adb: Implement -gnatyC to control comment spacing
1717         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
1718         -gnatyc/C).
1719         * usage.adb: Add line for -gnatyC.
1720
1721 2011-08-05  Robert Dewar  <dewar@adacore.com>
1722
1723         * gnat_ugn.texi: Document -gnatyC.
1724         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
1725         synonym for COMMENTS2).
1726
1727 2011-08-05  Robert Dewar  <dewar@adacore.com>
1728
1729         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
1730         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
1731         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
1732         a-comutr.ads, lib-xref.adb: Minor reformatting.
1733
1734 2011-08-05  Robert Dewar  <dewar@adacore.com>
1735
1736         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
1737         warning if there is an exception handler present.
1738
1739 2011-08-05  Pascal Obry  <obry@adacore.com>
1740
1741         * a-iteint.ads: Fix copyright year.
1742
1743 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1744
1745         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
1746         statement SCO for a USE clause or a representation clause.
1747
1748 2011-08-05  Yannick Moy  <moy@adacore.com>
1749
1750         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
1751         between body and spec for stub.
1752         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
1753         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
1754         pragma precondition or postcondition, for which the enclosing
1755         subprogram or package in the AST is not the desired one, return empty.
1756
1757 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1758
1759         * g-expect.adb: Minor reformatting.
1760
1761 2011-08-05  Bob Duff  <duff@adacore.com>
1762
1763         * a-fihema.adb: Comment out OS_Lib.
1764
1765 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1766
1767         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
1768         (unbounded multiway tree containers) and a-iteint.ads.
1769         * a-comutr.ads, a-comutr.adb:
1770         This is the new Ada 2012 unit for unbounded multiway tree containers
1771         * a-cimutr.ads, a-cimutr.adb
1772         This is the new Ada 2012 unit for indefinite multiway tree containers
1773         * a-iteint.ads: New file.
1774
1775 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1776
1777         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1778
1779 2011-08-05  Bob Duff  <duff@adacore.com>
1780
1781         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1782         subpools.
1783         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1784
1785 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1786
1787         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1788         general indexing aspects of Ada2012. Called when analyzing indexed
1789         components when other interpretations fail.
1790         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1791         in an expression context where overloading is meaningful. This excludes
1792         the occurrence in an aspect specification (efficiency only).
1793         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1794         related to iterators can be set by an attribute specification, but
1795         cannot be queried.
1796         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1797         Constant_Indexing and Variable_Indexing.
1798         (Check_Indexing_Functions): New procedure to perform legality checks.
1799         Additional semantic checks at end of declarations.
1800
1801 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1802
1803         * tree_io.ads: Update ASIS_Version_Number because of the change of the
1804         order of calling Tree_Write/Tree_Read routines made for aspects.
1805
1806 2011-08-05  Bob Duff  <duff@adacore.com>
1807
1808         * a-fihema.adb (Finalize): Fix race condition.
1809
1810 2011-08-05  Yannick Moy  <moy@adacore.com>
1811
1812         * sem_ch12.adb (Analyze_Package_Instantiation,
1813         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1814         mode.
1815
1816 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1817
1818         * sem_type.adb (Specific_Type): in an instance, the type-specific
1819         operand of an equality check that involves null may have a private
1820         type. Use full view to determine legality of construct.
1821
1822 2011-08-05  Vincent Celier  <celier@adacore.com>
1823
1824         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1825         delete or close the file when the call to gnatmake was successful.
1826
1827 2011-08-05  Yannick Moy  <moy@adacore.com>
1828
1829         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1830         Global_Discard_Names.
1831
1832 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1833
1834         * sinfo.ads: comments on use of entity field for aspect specifications.
1835
1836 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1837
1838         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1839         node is not itself an entity but a selected component, it is a
1840         rewritten parameterless call to an en enclosing synchronized operation,
1841         and this expansion will be performed again in the instance, so there is
1842         no global information to preserve.
1843
1844 2011-08-05  Javier Miranda  <miranda@adacore.com>
1845
1846         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1847         for renamings of predefined primitives.
1848         (In_Predef_Prims_DT): New subprogram.
1849
1850 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1851
1852         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1853         possible interpretation of name is a reference type, add an
1854         interpretation that is the designated type of the reference
1855         discriminant of that type.
1856         * sem_res.adb (resolve): If the interpretation imposed by context is an
1857         implicit dereference, rewrite the node as the deference of the
1858         reference discriminant.
1859         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1860         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1861         parent type or base type.
1862         * sem_ch4.adb (Process_Indexed_Component,
1863         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1864         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1865         Check for implicit dereference.
1866         (List_Operand_Interps): Indicate when an implicit dereference is
1867         ambiguous.
1868         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1869
1870 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1871
1872         * scos.ads: Update documentation of SCO table. Pragma statements can now
1873         be marked as disabled (using 'p' instead of 'P' as the statement kind).
1874         * par_sco.ads, par_sco.adb: Implement the above change.
1875         (Process_Decisions_Defer): Generate a P decision for the first parameter
1876         of a dyadic pragma Debug.
1877         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1878         necessary.
1879         * put_scos.adb: Code simplification based on above change.
1880
1881 2011-08-05  Robert Dewar  <dewar@adacore.com>
1882
1883         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1884         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1885         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1886         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1887
1888 2011-08-05  Bob Duff  <duff@adacore.com>
1889
1890         * a-stunau.ads, g-spipat.adb: Update comments.
1891
1892 2011-08-05  Bob Duff  <duff@adacore.com>
1893
1894         * a-fihema.ads: Minor comment fix.
1895         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1896         correct.
1897         (Attach, Detach): Remove some unnecessary code.
1898         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1899
1900 2011-08-05  Bob Duff  <duff@adacore.com>
1901
1902         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1903         allocation for Objects component. This simplifies the code somewhat. It
1904         is also a little more efficient in the not-so-unusual case where there
1905         are no controlled objects allocated.
1906         Make Finalization_Started flag atomic.
1907         (Finalize): Avoid unnecessary detachment of items from the list.
1908         (pcol): Minor cleanup.
1909
1910 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1911
1912         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1913         package whose name is the same as that of the generic unit, or its
1914         ultimate prefix.
1915
1916 2011-08-05  Bob Duff  <duff@adacore.com>
1917
1918         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1919         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1920         Minor comment fixes.
1921
1922 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
1923
1924         * make.adb (Linking_Phase): No longer need to set source search path
1925         before calling gnatlink in CodePeer mode.
1926         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1927         gcc in CodePeer mode, since the binder generated file no longer has a
1928         'with Main'.
1929         * switch.ads, switch.adb (Is_Language_Switch): Removed.
1930         * switch-c.adb: Update comment.
1931
1932 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1933
1934         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1935
1936 2011-08-05  Nicolas Roche  <roche@adacore.com>
1937
1938         * gnat_ugn.texi: Fix minor syntax error issue.
1939
1940 2011-08-05  Vincent Celier  <celier@adacore.com>
1941
1942         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1943         delete or close the file when the call to gnatmake returns a non
1944         successful return code.
1945
1946 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1947
1948         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1949         check, indicate that the copy of the original node does not come from
1950         source, to prevent an infinite recursion of the expansion.
1951
1952 2011-08-05  Johannes Kanig  <kanig@adacore.com>
1953
1954         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1955         VC generation for subprogram bodies.
1956
1957 2011-08-05  Yannick Moy  <moy@adacore.com>
1958
1959         * einfo.ads: Typo.
1960         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1961         the base type with the smallest allowed base type.
1962
1963 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1964
1965         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1966         aspects.
1967
1968 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1969
1970         * sem_ch12.ads: minor comment updates.
1971
1972 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1973
1974         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1975         instantiation and a formal package the compiler generates a package
1976         renaming declaration so that the generic name within the declaration
1977         is interpreted as a renaming of the instance. At the end of a formal
1978         package declaration, this renaming must become invisible.
1979
1980 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1981
1982         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1983         comparison and rely on concrete entities instead.
1984
1985 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1986
1987         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1988         and discriminants, to indicate that the type has an access discriminant
1989         that supports implicit dereference.
1990         * snames.ads-tmpl: Add names of aspects and attributes related to
1991         Ada2012 iterators: constant_indexing, default_iterator,
1992         iterator_element, implicit_dereference, variable_indexing.
1993         * aspects.ads, aspects.adb: entries for iterator-related aspects.
1994         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1995         iterator-related aspects.
1996         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1997
1998 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1999
2000         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
2001         metrics in gnatmetric to cover new kinds of coupling mentrics.
2002
2003 2011-08-05  Steve Baird  <baird@adacore.com>
2004
2005         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2006         of calling the user-defined main subprogram.
2007         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
2008         is set) Call_Main_Subprogram ahead of, as opposed to
2009         inside of, Main.
2010         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
2011         generation of a "with" of the user-defined main subprogram.
2012         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
2013         (which is now called from Gen_Main instead).
2014
2015 2011-08-05  Emmanuel Briot  <briot@adacore.com>
2016
2017         * projects.texi: Added reference to the Makefile package.
2018
2019 2011-08-05  Thomas Quinot  <quinot@adacore.com>
2020
2021         * exp_ch7.adb: Minor comment rewording.
2022
2023 2011-08-05  Ed Falis  <falis@adacore.com>
2024
2025         * env.c: Fix comment.
2026
2027 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2028
2029         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
2030         character comparison and rely on concrete entities instead.
2031
2032 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2033
2034         * sem_ch3.adb: (Check_Private_Overriding): better error message,
2035         suggested by AI95-0068.
2036
2037 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
2038
2039         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
2040         the two potential initialization calls. This accounts for any
2041         access-before-elaboration checks which may precede the initialization
2042         calls.
2043         (Next_Suitable_Statement): New routine. Returns the next real statement
2044         after the input node while skipping generated checks.
2045         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
2046         with comment on usage.
2047         Do not generate Elaborate_All when the trigger is a finalization call
2048         coming from a type init proc.
2049         (Check_Elab_Call): Propagate the initialization procedure context to
2050         subsequent calls to Check_A_Call.
2051         (Check_Internal_Call_Continue): Propagate the initialization procedure
2052         context to subsequent calls to Check_Elab_Call.
2053         (Is_Finalization_Procedure): New routine. Returns True if the input
2054         entity denotes a [Deep_]Finalize routine.
2055         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
2056         along with comment on usage.
2057
2058 2011-08-05  Vadim Godunko  <godunko@adacore.com>
2059
2060         * s-atocou.ads: Add list of supported platforms.
2061
2062 2011-08-05  Yannick Moy  <moy@adacore.com>
2063
2064         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
2065
2066         * opt.ads (Disable_ALI_File): new Boolean flag
2067         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
2068
2069 2011-08-05  Ed Falis  <falis@adacore.com>
2070
2071         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
2072         environ is properly defined.
2073
2074 2011-08-05  Vincent Celier  <celier@adacore.com>
2075
2076         * make.adb (Compilation_Phase): Exit immediately when all objects have
2077         been found up to date, to avoid multiple exit messages.
2078         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
2079         same project for languages with no compiler.
2080         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
2081         -eI.
2082 2011-08-05  Robert Dewar  <dewar@adacore.com>
2083
2084         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
2085         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
2086         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
2087         s-atocou-builtin.adb: Minor reformatting.
2088
2089 2011-08-05  Yannick Moy  <moy@adacore.com>
2090
2091         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
2092         if the node to wrap is a pragma check, this node and enclosed
2093         expression are not expanded, so do not apply any transformations here.
2094         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
2095         introducing transient scopes.
2096
2097 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
2098
2099         * adaint.c (__gnat_set_writable, __gnat_set_readable,
2100         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
2101         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
2102         routine is available, so we use the default implementation of these
2103         functions.
2104         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
2105         support for copying attributes on VxWorks 6.
2106
2107 2011-08-05  Yannick Moy  <moy@adacore.com>
2108
2109         * debug.adb: Remove use of -gnatd.D.
2110         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
2111         * opt.ads: Simplify variables for ALFA mode, to keep one only
2112         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
2113         to ALFA mode.
2114
2115 2011-08-05  Vincent Celier  <celier@adacore.com>
2116
2117         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
2118         Builder'Default_Switches.
2119
2120 2011-08-05  Vincent Celier  <celier@adacore.com>
2121
2122         * makeusg.adb: Add lines for --create-map-file switches.
2123
2124 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2125
2126         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
2127         profile is incomplete and the full view is available, replace it with
2128         the full view.
2129         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
2130         incomplete, freezing the subprogram is delayed until the full view is
2131         frozen.
2132         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
2133         fixed-point multiplication operator and the predefined operator is
2134         resolved in favor of the user-defined one.
2135
2136 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2137
2138         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
2139         CONST_CAST.
2140
2141 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2142
2143         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
2144         whether a type lacks user-defined Read or Write operations, or has a
2145         component that lacks them.
2146         * sem_attr.adb (Check_Stream_Attribute): if restriction
2147         No_Default_Stream_Attributes is active, verify that all subcomponent
2148         types of the target have user-defined stream operations, and report
2149         error otherwise.
2150         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
2151         * exp_strm.adb: Build_Elementary_Input_Call,
2152         Build_Elementary_Write_Call): remove checks for restriction
2153         No_Default_Stream_Attributes, now checked in semantics.
2154
2155 2011-08-04  Vincent Celier  <celier@adacore.com>
2156
2157         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
2158         switches on the command line, look for all valid --RTS switches in the
2159         Builder switches and for each language use the first runtime name found
2160         to invoke gprconfig.
2161         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
2162         command line and there is no auto-configuration.
2163         (Runtime_Name_Set_For): New function.
2164
2165 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2166
2167         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
2168         elaborate initialization expression for variable Abort when processing
2169         a package body or a declaration.
2170         (Create_Finalizer): Propagate the package context when creating the
2171         exception-related variables.
2172         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
2173         For_Package along with usage comment.
2174
2175 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2176
2177         * gcc-interface/Makefile.in: Clean up targets.
2178         Enable new package for atomic counters and copy-on-write implementation
2179         of unbounded strings on x86 platforms.
2180         * gcc-interface/Make-lang.in: Update dependencies.
2181
2182 2011-08-04  Robert Dewar  <dewar@adacore.com>
2183
2184         * exp_ch7.adb: Minor reformatting.
2185
2186 2011-08-04  Robert Dewar  <dewar@adacore.com>
2187
2188         * exp_strm.adb: Minor reformatting.
2189
2190 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2191
2192         * s-atocou.adb: Replace by dummy version and use on targets where atomic
2193         operations are not supported.
2194         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
2195         * s-atocou-x86.adb: New file.
2196         * Makefile.rtl: Add s-atocou.o file
2197
2198 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2199
2200         * make.adb (Compile): Move setting of CodePeer_Mode to ...
2201         (Compilation_Phase): ... here.
2202         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
2203
2204 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2205
2206         * Make-generated.in: Fix minor typo in comment.
2207
2208 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2209
2210         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
2211         the project path.
2212
2213 2011-08-04  Robert Dewar  <dewar@adacore.com>
2214
2215         * a-coinho.adb: Minor reformatting.
2216
2217 2011-08-04  Robert Dewar  <dewar@adacore.com>
2218
2219         * a-coinho.ads: Minor reformatting.
2220
2221 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2222
2223         * s-atocou.ads, s-atocou.adb: New files.
2224         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
2225         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
2226         direct use of GCC's atomic builtins and replace them by use of new
2227         atomic counter package.
2228
2229 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2230
2231         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
2232
2233 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2234
2235         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
2236         with a call to Get_External_Tag.
2237         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
2238         subprogram usage. Remove the guard against package declarations and
2239         bodies since Build_Cleanup_Statements is no longer invoked in that
2240         context.
2241         (Build_Components): Initialize Tagged_Type_Stmts when the context
2242         contains at least one library-level tagged type.
2243         (Build_Finalizer): New local variables Has_Tagged_Types and
2244         Tagged_Type_Stmts along with associated comments on usage. Update the
2245         logic to include tagged type processing.
2246         (Create_Finalizer): Insert all library-level tagged type unregistration
2247         code before the jump block circuitry.
2248         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
2249         (Expand_N_Package_Declaration): Remove the call to
2250         Build_Cleanup_Statements.
2251         (Process_Tagged_Type_Declaration): New routine. Generate a call to
2252         unregister the external tag of a tagged type.
2253         (Processing_Actions): Reimplemented to handle tagged types.
2254         (Process_Declarations): Detect the declaration of a library-level
2255         tagged type and carry out the appropriate actions.
2256         (Unregister_Tagged_Types): Removed. The machinery has been directly
2257         merged with Build_Finalizer.
2258
2259 2011-08-04  Robert Dewar  <dewar@adacore.com>
2260
2261         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
2262         gnatls.adb, exp_ch3.adb: Minor reformatting.
2263
2264 2011-08-04  Marc Sango  <sango@adacore.com>
2265
2266         * sem_attr.adb (Analyze_Attribute): Replace the message
2267         "invisible attribute of}" of the spark restriction violation in
2268         attribute reference by the simple message "invisible attribute of type".
2269         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
2270         two insertion characters: '&' and '}'.
2271
2272 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2273
2274         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
2275         * a-coinho.ads, a-coinho.adb: New file.
2276         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
2277
2278 2011-08-04  Nicolas Roche  <roche@adacore.com>
2279
2280         * alfa_test.adb: Not all ali files are containing alfa information even
2281         if compiled with -gnatd.F. So suppress warning about missing ALFA
2282         information.
2283
2284 2011-08-04  Yannick Moy  <moy@adacore.com>
2285
2286         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
2287         scope.
2288         * put_alfa.adb: Check that scope name is not empty.
2289
2290 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2291
2292         * exp_ch3.adb (Stream_Operation_Ok): new predicate
2293         Needs_Elementary_Stream_Operation, to determine whether user-defined
2294         Read and Write attributes are available for the elementary components
2295         of the given type. If only the predefined attributes are available,
2296         then when restriction No_Default_Stream_Attributes is active the
2297         predefined stream attributes for the composite type cannot be created.
2298
2299 2011-08-04  Robert Dewar  <dewar@adacore.com>
2300
2301         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
2302         Put routines in alpha order
2303
2304 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
2305
2306         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
2307         * gcc-interface/Make-lang.in: Update dependencies.
2308
2309 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2310
2311         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
2312         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
2313         gnat1why).
2314
2315 2011-08-04  Robert Dewar  <dewar@adacore.com>
2316
2317         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
2318         lib-xref-alfa.adb: Minor reformatting.
2319
2320 2011-08-04  Marc Sango  <sango@adacore.com>
2321
2322         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
2323         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
2324         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
2325         mode.
2326
2327 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2328
2329         * bindgen.adb (Gen_Adainit_C): Remove.
2330         (Gen_Adafinal_C): Ditto.
2331         (Gen_Elab_Externals_C): Ditto.
2332         (Gen_Elab_Calls_C): Ditto.
2333         (Gen_Elab_Order_C): Ditto.
2334         (Gen_Elab_Defs_C): Ditto.
2335         (Gen_Finalize_Library_C): Ditto.
2336         (Gen_Finalize_Library_Defs_C): Ditto.
2337         (Gen_Main_C): Ditto.
2338         (Gen_Output_File_C): Ditto.
2339         (Gen_Restrictions_C): Ditto.
2340         (Gen_Versions_C): Ditto.
2341         (Write_Info_Ada_C): Ditto.
2342         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
2343         (Gen_Output_File): Do not force Ada_Bind_File anymore.
2344         Always call Gen_Output_File_Ada.
2345         * gnatlink.adb (Begin_Info): Now a constant.
2346         (End_Info): Ditto.
2347         (Ada_Bind_File): Remove
2348         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
2349         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
2350         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
2351         * opt.ads (Ada_Bind_File): Remove.
2352
2353 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2354
2355         * projects.texi: Document target-specific directory in default project
2356         path for gnatmake.
2357
2358 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2359
2360         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
2361         path in all cases .
2362
2363 2011-08-04  Yannick Moy  <moy@adacore.com>
2364
2365         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
2366         opt.ads, lib-xref.ads: Code clean up.
2367
2368 2011-08-04  Yannick Moy  <moy@adacore.com>
2369
2370         * gnat_rm.texi: Update description of Test_Case
2371         * gnat_ugn.texi: Typo.
2372
2373 2011-08-04  Ed Falis  <falis@adacore.com>
2374
2375         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
2376
2377 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2378
2379         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
2380         it is of type Root_Controlled. This action eliminates fields Prev and
2381         Next from type equality.
2382
2383 2011-08-04  Yannick Moy  <moy@adacore.com>
2384
2385         * lib-xref-alfa.adb: Correct typo.
2386
2387 2011-08-04  Matthew Heaney  <heaney@adacore.com>
2388
2389         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
2390         component.
2391
2392 2011-08-04  Yannick Moy  <moy@adacore.com>
2393
2394         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
2395         (Analyze_Pragma): allow static string expression for name of Test_Case,
2396         instead of simply string literals.
2397         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
2398         expressions.
2399
2400 2011-08-04  Vincent Celier  <celier@adacore.com>
2401
2402         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
2403         case suffixes to find truncated main sources.
2404
2405 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2406
2407         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
2408         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
2409         (Compute_Current_Task): Ditto.
2410
2411 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2412
2413         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
2414
2415 2011-08-04  Yannick Moy  <moy@adacore.com>
2416
2417         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
2418         library-level constant.
2419         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
2420         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
2421         used as selector of parameter association, in ALFA mode.
2422
2423 2011-08-04  Robert Dewar  <dewar@adacore.com>
2424
2425         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
2426         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
2427         reformatting.
2428
2429 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2430
2431         * make.adb (Linking_Phase): Set source search path before calling
2432         gnatlink in CodePeer mode.
2433
2434 2011-08-04  Javier Miranda  <miranda@adacore.com>
2435
2436         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
2437         Remove code which takes care of building TSDs.
2438         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
2439         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
2440         the accessibility check in VM targets.
2441         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
2442         (Building_Static_DT): Now returns false for VM targets.
2443         (Build_VM_TSDs): Removed.
2444         (Expand_Interface_Conversion): Generate missing runtime check for
2445         conversions to interface types whose target type is unknown at compile
2446         time.
2447         (Make_VM_TSD): Add missing code to disable the generation of calls to
2448         Check_TSD if the tagged type is not defined at library level, or not
2449         has a representation clause specifying its external tag, or -gnatdQ is
2450         active.
2451         * exp_disp.ads (Build_VM_TSDs): Removed.
2452         (Make_VM_TSDs): Spec relocated from exp_disp.adb
2453         * sem_disp.adb (Check_Dispatching_Operation): No code required to
2454         register primitives in the dispatch tables in VM targets.
2455         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
2456         initialization of class-wide interface objects in VM targets.
2457         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
2458         of Make_DT).
2459
2460 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2461
2462         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
2463         when dotnet-ld cannot be found.
2464
2465 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2466
2467         * bindgen.adb: Simplify significantly generation of binder body file in
2468         CodePeer mode.
2469         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
2470         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
2471         not expanded).
2472
2473 2011-08-04  Yannick Moy  <moy@adacore.com>
2474
2475         * sem_prag.adb, sem.ads: Code cleanup.
2476
2477 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2478
2479         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
2480         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
2481         results if possible.
2482         * s-stusta.adb (Print): Adjust after changes in s-stausa.
2483         * gnat_ugn.texi: Update dynamic stack usage section.
2484
2485 2011-08-04  Steve Baird  <baird@adacore.com>
2486
2487         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
2488         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
2489         contains only a call to the user-defined main subprogram.
2490         (Gen_Main_Ada) - If CodePeer_Mode is set, then
2491         call the "wrapper" subprogram instead of directly
2492         calling the user-defined main subprogram.
2493
2494 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2495
2496         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
2497         alternatives of a case statement for controlled objects. Rename local
2498         variable A to Dead_Alt.
2499         (Expand_N_If_Statement): Check the then and else statements of an if
2500         statement for controlled objects. Check the then statements of all
2501         elsif parts of an if statement for controlled objects.
2502         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
2503         objects.
2504         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
2505         detects a loop associated with the expansion of an array object.
2506         Augment the processing of the loop statements to account for a possible
2507         wrap done by Process_Statements_For_Controlled_Objects.
2508         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
2509         statements and abortable part of an asynchronous select for controlled
2510         objects.
2511         (Expand_N_Conditional_Entry_Call): Check the else statements of a
2512         conditional entry call for controlled objects.
2513         (Expand_N_Selective_Accept): Check the alternatives of a selective
2514         accept for controlled objects.
2515         (Expand_N_Timed_Entry_Call): Check the entry call and delay
2516         alternatives of a timed entry call for controlled objects.
2517         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
2518         exception handler for controlled objects.
2519         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2520         Add formal parameter Nested_Constructs along with its associated
2521         comment.
2522         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
2523         Requires_Cleanup_Actions.
2524         (Process_Statements_For_Controlled_Objects): New routine.
2525         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
2526         routine. Inspect a node which contains a non-handled sequence of
2527         statements for controlled objects. If such an object is found, the
2528         statements are wrapped in a block.
2529
2530 2011-08-04  Bob Duff  <duff@adacore.com>
2531
2532         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
2533         need to compare with Class_Wide_Type (T2), in order to get at the
2534         original class-wide type node.
2535         * sem_type.ads (Covers): Improve the comment.
2536         * einfo.ads (Class_Wide_Type): Improve the comment.
2537         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
2538         the type of the Deref.
2539
2540 2011-08-04  Yannick Moy  <moy@adacore.com>
2541
2542         * gnat_rm.texi: Document that Test_Case pragma can only appear on
2543         separate declarations.
2544         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
2545         check identifier of pragma argument.
2546         (Chain_TC): check that no other test case associated to the same entity
2547         share the same name.
2548         (Check_Test_Case): disallow test case inside subprogram body
2549         (Analyze_Pragma): correct call to check identifier and not argument
2550         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
2551         function gets name from test case pragma.
2552
2553 2011-08-04  Yannick Moy  <moy@adacore.com>
2554
2555         * gnat_rm.texi: Document new pragma and aspect.
2556         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
2557         (No_Duplicates_Allowed): new constant array defining whether duplicates
2558         aspects of each kind can appear on the same declaration.
2559         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
2560         field, which points to a node holding the previous Spec_PPC_List.
2561         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
2562         through the indirection with Contract.
2563         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
2564         * par-prag.adb (Prag): do nothing on Test_Case pragma
2565         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
2566         be called directly.
2567         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
2568         component Ensures of Test_Case.
2569         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
2570         (Analyze_Generic_Subprogram_Declaration,
2571         Analyze_Subprogram_Instantiation,
2572         Analyze_Abstract_Subprogram_Declaration,
2573         Analyze_Subprogram_Body_Helper,
2574         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
2575         insert contract in subprogram node at point of definition
2576         * sem_ch13.adb
2577         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
2578         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
2579         corresponding pragma
2580         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
2581         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
2582         similar to the analysis of pre/post
2583         (Derive_Subprogram): insert contract in subprogram node at point of
2584         derivation.
2585         * sem_prag.adb, sem_prag.ads
2586         (Check_Arg_Is_String_Literal, Check_Identifier):
2587         new checking procedures to be called in treatment of pragmas
2588         (Check_Test_Case): new procedure to check that a Test_Case aspect or
2589         pragma is well-formed. This does not check currently that 'Result is
2590         used only in the Ensures component of a Test_Case.
2591         (Analyze_Pragma): add case for Test_Case
2592         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
2593         components of a Test_Case.
2594         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
2595         expressions in the 3rd (and 4th if present) arguments of a Test_Case
2596         pragma, treated as spec expressions.
2597         (Sig_Flags): add value -1 for Test_Case.
2598         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
2599         Get_Requires_From_Test_Case_Pragma): getters for both expression
2600         components of a Test_Case.
2601         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
2602         indirection between an entry or [generic] subprogram entity and its
2603         pre/post + test-cases.
2604         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
2605         get/set for fields of an N_Contract node.
2606         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
2607         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
2608         names and pragma for Test_Case.
2609         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
2610
2611 2011-08-04  Vincent Celier  <celier@adacore.com>
2612
2613         * gnat_ugn.texi: Improve documentation of gnatmake switch
2614         --source-info-file=.
2615
2616 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2617
2618         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
2619         type). Initialize Atyp to the appropriate type which is later checked
2620         for completion. Rewrite the assertion associated with private type
2621         completion.
2622
2623 2011-08-04  Ed Falis  <falis@adacore.com>
2624
2625         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
2626         initialize the number of CPUs.
2627
2628 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2629
2630         * sem_type.adb (Disambiguate): New subsidiary routine
2631         In_Same_Declaration_List, to implement AI05-0020: a user-defined
2632         equality on an anonymous access type whose designated type is private
2633         does not lead to an ambiguity with the universal access equality
2634         operator in the body or child units of the defining package. The same
2635         is true for a multiplication operator on a private type completed with
2636         a fixed-point-type.
2637
2638 2011-08-04  Javier Miranda  <miranda@adacore.com>
2639
2640         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
2641         (Normalize_Scalars_Config): Removed.
2642         * opt.adb
2643         (Register_Opt_Config_Switches): Remove registering config values of
2644         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
2645         (Restore_Opt_Config_Switches): Remove code which restores the values of
2646         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2647         Init_Or_Norm_Scalars.
2648         (Save_Opt_Config_Switches): Remove code which saves values of
2649         Init_Or_Norm_Scalars and Normalize_Scalars.
2650         (Set_Opt_Config_Switches): Remove code which restores config values of
2651         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2652         Init_Or_Norm_Scalars.
2653
2654 2011-08-04  Yannick Moy  <moy@adacore.com>
2655
2656         * frontend.adb (Frontend): remove previous patch to avoid full
2657         qualification in ALFA mode.
2658         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
2659         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
2660         unique name for an entity, which could be used to identify the entity
2661         across compilation units.
2662
2663 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2664
2665         * prj-env.adb
2666         (Initialize_Default_Project_Path): Add target specific directory
2667         ($prefix/$target/lib/gnat) in front of project path in all cases
2668         (making gnatmake's behaviour consistent with gprbuild).
2669         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
2670         Pass target name from Sdefault to project subsystem.
2671         * gnatls.adb: Show new target specific default project directory.
2672
2673 2011-08-04  Johannes Kanig  <kanig@adacore.com>
2674
2675         * cstand.adb: Add Information to Identifier in Standard
2676         (Identifer_For): Set Entity to the corresponding entity
2677
2678 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2679
2680         * gnat_ugn.texi: Update doc on gnatcheck.
2681
2682 2011-08-04  Yannick Moy  <moy@adacore.com>
2683
2684         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
2685         xrefs in a scope.
2686
2687 2011-08-04  Yannick Moy  <moy@adacore.com>
2688
2689         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
2690         performing expansion.
2691         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
2692         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
2693         it is not called in ALFA mode.
2694
2695 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2696
2697         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
2698         after all, so removed.
2699
2700 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2701
2702         * vms_data.ads: Add missing VMS qualifiers.
2703
2704 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2705
2706         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
2707         the list of files on the command line after processing it through
2708         Complete_Mains.
2709
2710 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2711
2712         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
2713         processing for .NET/JVM. These targets can now benefit from
2714         Raise_From_Controlled_Operation and they share the same processing with
2715         standard targets.
2716         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
2717         These targets need transient scopes in order to properly finalize short
2718         lived controlled objects.
2719         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
2720          NET/JVM. These targets can now benefit from
2721         Raise_From_Controlled_Operation and they share the same processing with
2722         standard targets.
2723
2724 2011-08-04  Geert Bosch  <bosch@adacore.com>
2725
2726         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
2727
2728 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2729
2730         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
2731         Expand_Record_Aggregate, to determine whether aggregate must be
2732         expanded into assignments. This is the case if the ancestor part is
2733         private, regarless of the setting of the flag Has_Private_Ancestor.
2734
2735 2011-08-04  Ed Falis  <falis@adacore.com>
2736
2737         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
2738
2739 2011-08-04  Bob Duff  <duff@adacore.com>
2740
2741         * sinfo.ads: Fix comment.
2742
2743 2011-08-04  Steve Baird  <baird@adacore.com>
2744
2745         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
2746         choose a package name in much the same way as is
2747         done for JGNAT when VM_Target /= No_VM, except that
2748         a slightly more distinctive prefix string is used.
2749
2750 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2751
2752         * makeutl.adb (Complete_Mains): no longer accept unit names on the
2753         gnatmake command line.
2754         This behavior was never documented (and was supported only because of
2755         an early bug in the code). This case might lead to ambiguous cases
2756         (between unit names and truncated base names without suffixes).
2757
2758 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2759
2760         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
2761         Remove the external tag of a tagged type from the internal hash table.
2762         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
2763         expanded usage of the routine. Strenghten the check for Is_Master. Add
2764         processing for tagged types.
2765         (Build_Finalizer): Create all the necessary lists used in finalizer
2766         creation when the processed context is a package that may contain
2767         tagged types.
2768         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
2769         Requires_Cleanup_Actions.
2770         (Expand_N_Package_Body): Package bodies may need clean up code
2771         depending on whether they contain tagged types.
2772         (Expand_N_Package_Declaration): Package declarations may need clean up
2773         code depending on whether they contain tagged types.
2774         (Unregister_Tagged_Types): New routine. Search through a list of
2775         declarations or statements, looking for non-abstract Ada tagged types.
2776         For each such type, generate code to unregister the external tag.
2777         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2778         Requires_Cleanup_Actions.
2779         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2780         through a list of declarations or statements looking for non-abstract
2781         Ada tagged types or controlled objects.
2782         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2783         Requires_Cleanup_Actions.
2784         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2785         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2786         RE_Unit_Table.
2787
2788 2011-08-04  Vincent Celier  <celier@adacore.com>
2789
2790         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2791         has Ada sources, not project Project, because if the root project
2792         Project has no sources of its own, all projects will be deemed without
2793         sources.
2794
2795 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2796
2797         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2798         of the No_Param_Proc acc-to-subp type used for initialization of
2799         __gnat_finalize_library_objects so that it's declared at library level
2800         rather than nested inside of the adainit routine.
2801
2802 2011-08-04  Javier Miranda  <miranda@adacore.com>
2803
2804         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2805         if the tagged type has a representation clause which specifies its
2806         external tag.
2807
2808 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2809
2810         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
2811         Remove previous procedure with that name.
2812         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
2813         when appropriate.
2814         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2815         subtype mark, the ancestor cannot have unknown discriminants.
2816         (Resolve_Record_Aggregate): if the type has invisible components
2817         because of a private ancestor, the aggregate is illegal.
2818
2819 2011-08-04  Vincent Celier  <celier@adacore.com>
2820
2821         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2822         account switches -gnat2005, -gnat12 and -gnat2012.
2823
2824 2011-08-04  Bob Duff  <duff@adacore.com>
2825
2826         * s-tasdeb.ads: Minor comment fix.
2827
2828 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2829
2830         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2831         CodePeer mode.
2832         * switch.ads, switch.adb (Is_Language_Switch): New function.
2833
2834 2011-08-04  Vincent Celier  <celier@adacore.com>
2835
2836         * switch-c.adb: Minor comment addition.
2837
2838 2011-08-04  Vincent Celier  <celier@adacore.com>
2839
2840         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2841         ending with '=' is followed by a space (missing file name).
2842
2843 2011-08-04  Pascal Obry  <obry@adacore.com>
2844
2845         * g-regist.ads: Fix size of HKEY on x86_64-windows.
2846
2847 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2848
2849         * sem_ch12.adb (Analyze_Associations): New routine
2850         Check_Overloaded_Formal_Subprogram to reject a formal package when
2851         there is a named association or a box initialisation for an overloaded
2852         formal subprogram of the corresponding generic.
2853
2854 2011-08-04  Yannick Moy  <moy@adacore.com>
2855
2856         * alfa.ads (ALFA_Xref_Record): add component for type of entity
2857         * get_alfa.adb, put_alfa.adb: Read and write new component of
2858         cross-reference.
2859         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2860
2861 2011-08-04  Pascal Obry  <obry@adacore.com>
2862
2863         * urealp.adb: Minor reformatting.
2864
2865 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2866
2867         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2868         Handle the case when Cleanup_Protected_Object returns Empty.
2869
2870 2011-08-04  Yannick Moy  <moy@adacore.com>
2871
2872         * frontend.adb (Frontend): only qualify names in non-ALFA mode
2873
2874 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2875
2876         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2877         call, ignore functions.
2878
2879 2011-08-04  Geert Bosch  <bosch@adacore.com>
2880
2881         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2882         point.
2883
2884 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2885
2886         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2887         as an index for Builder'Switches. This conforms to the documentation.
2888         * make.adb (Insert_Project_Sources): avoid duplicate code
2889
2890 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2891
2892         * makeutl.adb (Complete_Mains): if the user has passed a relative file
2893         name on the command line (for instance "../dummy"), never assume it can
2894         be a unit name.
2895
2896 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2897
2898         * bindgen.adb: Remove code the reference or create the
2899         Break_Start/__gnat_break_start procedure.
2900         * s-stalib.adb (Break_Start): Removed.
2901
2902 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2903
2904         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2905         shared with gprbuild.
2906
2907 2011-08-04  Yannick Moy  <moy@adacore.com>
2908
2909         * par-ch4.adb (P_Primary): preferentially issue an error message about
2910         a missing parenthesis arount a conditional or case expression in Ada
2911         2012 mode, if we detect that the alignment is not correct for a
2912         statement.
2913
2914 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2915
2916         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2917         tag-to-class-wide conversion as needing finalization actions.
2918         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2919         a tag-to-class-wide conversion as needing finalization actions.
2920         (Is_Finalizable_Transient): The result of a tag-to-class-wide
2921         conversion does not need finalization actions.
2922         (Is_Tag_To_CW_Conversion): New routine.
2923         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2924         whether an object is the result of a tag-to-class-wide conversion.
2925
2926 2011-08-04  Yannick Moy  <moy@adacore.com>
2927
2928         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2929         the left-hand-side and right-hand-side of a conjunct are inserted when
2930         translating a pre- or postcondition
2931         * sem_ch6.adb: Correct typo in comment
2932
2933 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2934
2935         * gnat_rm.texi: Ravenscar does not prohibit dependence on
2936         Unchecked_Conversion and Unchecked_Deallocation.
2937
2938 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2939
2940         * make.adb: Minor reformatting.
2941
2942 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2943
2944         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2945         sources in the project and its imported projects, but not in the whole
2946         tree.
2947
2948 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2949
2950         * make.adb: Remove debug trace.
2951
2952 2011-08-04  Vincent Celier  <celier@adacore.com>
2953
2954         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2955         path in canonical form, to be able to compare path names on platforms
2956         such as Windows or Darwin.
2957
2958 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2959
2960         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2961         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2962         * scos.ads: Update documentation accordingly.
2963         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2964         pragmas.
2965
2966 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2967
2968         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2969         attribute only if prefix type is scalar.
2970
2971 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2972
2973         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2974         in gnatmake for specifying mains on the command line that do not belong
2975         to the main project. These mains must currently all belong to the same
2976         project, though.
2977         (Ultimate_Extension_Of): removed, since duplicated
2978         Ultimate_Extending_Project.
2979
2980 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2981
2982         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2983         instead.
2984         (CodePeer_Mode_String): New.
2985         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2986         CodePeer mode.
2987         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2988         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2989         mode, since no useful elaboration subprogram is needed by CodePeer.
2990         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2991         In this mode, compile binder file with -gnatC and do stop after this
2992         step.
2993
2994 2011-08-04  Vincent Celier  <celier@adacore.com>
2995
2996         * exp_ch7.adb: Minor comment fix.
2997
2998 2011-08-04  Robert Dewar  <dewar@adacore.com>
2999
3000         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
3001         exp_ch4.adb, makeutl.adb: Minor reformatting.
3002
3003 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3004
3005         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
3006         Create several new subprograms to move code out of Make. This makes the
3007         code more readable, removes code duplication, and is a preparation work
3008         for adding support for aggregate projects.
3009
3010 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3011
3012         * s-po32gl.ads, s-po32gl.adb: New files.
3013         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
3014         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
3015         (Build_Finalization_Collection): Use it.
3016         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
3017         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
3018         literals.
3019         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
3020         * gcc-interface/Make-lang.in: Update dependencies.
3021
3022 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3023
3024         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
3025         the command line.
3026
3027 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3028
3029         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
3030         command line is not a file name, also check whether it could be a unit
3031         name.
3032
3033 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3034
3035         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
3036         the header of the finalization routine.
3037         If the unit has no finalizer but is a body whose spec has one, then
3038         generate the decrement of the elaboration entity only.
3039         If the unit has a finalizer and is a spec, then do not generate the
3040         decrement of the elaboration entity.
3041         (Gen_Finalize_Library_C): Likewise.
3042
3043 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3044
3045         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
3046         (Bounds_Size_Expression): Removed.
3047         (Double_Alignment_Of): New subsidiary routine.
3048         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
3049         for a hole in the dope vector of unconstrained arrays due to different
3050         index and element alignments.
3051
3052 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3053
3054         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
3055         raise program_error because body has not been seen yet.
3056
3057 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3058
3059         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
3060         an unresolved name.
3061
3062 2011-08-04  Vincent Celier  <celier@adacore.com>
3063
3064         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
3065
3066 2011-08-04  Yannick Moy  <moy@adacore.com>
3067
3068         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
3069         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
3070
3071 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3072
3073         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
3074         instantiation in RCI.
3075
3076 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3077
3078         * make.adb: Share more code with gprbuild
3079
3080 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3081
3082         * projects.texi: Added documentation for the IDE'Gnat project file
3083         attribute.
3084
3085 2011-08-04  Nicolas Roche  <roche@adacore.com>
3086
3087         * gnat_rm.texi: Minor editing.
3088
3089 2011-08-04  Javier Miranda  <miranda@adacore.com>
3090
3091         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
3092         and the library case for VM targets.
3093         (Gen_Adainit_Ada): Likewise.
3094
3095 2011-08-04  Robert Dewar  <dewar@adacore.com>
3096
3097         * g-altive.ads: Minor comment updates.
3098         * prj-nmsc.adb: Minor reformatting.
3099
3100 2011-08-04  Javier Miranda  <miranda@adacore.com>
3101
3102         * opt.ads
3103         (Normalize_Scalars_Config): Value of the configuration switch set by
3104         pragma Normalize_Scalars when it appears in the gnat.adc file.
3105         (Normalize_Scalars): New field for record Config_Switches_Type. Used
3106         to save and restore settings of this pragma.
3107         * opt.adb
3108         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
3109         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
3110
3111 2011-08-04  Vincent Celier  <celier@adacore.com>
3112
3113         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
3114
3115 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3116
3117         * makeutl.adb: Minor reformatting.
3118
3119 2011-08-04  Olivier Hainque  <hainque@adacore.com>
3120
3121         * g-altive.ads: Update comments to reflect that only the soft
3122         binding is available today.
3123
3124 2011-08-04  Robert Dewar  <dewar@adacore.com>
3125
3126         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
3127         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
3128         * gcc-interface/Make-lang.in: Update dependencies.
3129
3130 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3131
3132         * prj-env.adb: Remove local debug traces.
3133
3134 2011-08-04  Yannick Moy  <moy@adacore.com>
3135
3136         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
3137         was used instead of Hi_OK, which could cause a read of an uninitialized
3138         value later on. Detected while working on the new warning.
3139         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
3140         to local variable.
3141         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
3142         in more cases, in order to detect more unreferenced values.
3143         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
3144         object for expression, if any.
3145
3146 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3147
3148         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
3149         the operand types instead of the Esize.
3150
3151 2011-08-04  Steve Baird  <baird@adacore.com>
3152
3153         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
3154         enable CodePeer_Mode.
3155         * bindusg.adb (Display): Add help message describing -P binder switch.
3156         * gnat_ugn.texi: Document -P binder switch.
3157         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
3158         user-defined main program directly.
3159         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
3160         user-defined main program in the context clause of the package body.
3161
3162 2011-08-04  Yannick Moy  <moy@adacore.com>
3163
3164         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
3165         duplicate of Defining_Entity
3166         (Get_Unique_Entity_For_Decl): rename function into
3167         Unique_Defining_Entity
3168         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
3169         (Formal_Proof_On): remove synthesized flag
3170         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3171         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
3172         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
3173         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
3174         Annotate (Formal_Proof)
3175
3176 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3177
3178         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
3179         source files with non-standard naming schemes, in imported projects
3180
3181 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3182
3183         * makeutl.adb (Complete_Mains): when a multi-unit source file is
3184         specified on the gprbuild command line, we need to compile all units
3185         within that file, not just the first one we find
3186         Fix error message for mains that are not found.
3187
3188 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3189
3190         * sem_ch6.adb: Update comment.
3191         * sem_ch12.adb: Minor reformatting.
3192
3193 2011-08-04  Bob Duff  <duff@adacore.com>
3194
3195         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
3196         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
3197         race condition whose symptom is to fail to lock Parent. That, in turn,
3198         causes Parent.Awake_Count to be accessed without locking Parent, which
3199         causes another race condition whose symptom is that Parent.Awake_Count
3200         can be off by 1 (either too high or too low). The solution is to lock
3201         Parent unconditionally, and then lock Acceptor, before reading
3202         Acceptor.Terminate_Alternative.
3203
3204 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3205
3206         * debug.adb: Update comment.
3207
3208 2011-08-04  Robert Dewar  <dewar@adacore.com>
3209
3210         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
3211         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
3212         exp_ch6.adb: Minor reformatting.
3213
3214 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3215
3216         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
3217         checks for -gnateE.
3218
3219 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3220
3221         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
3222
3223 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3224
3225         * sinfo.ads: Minor reformatting.
3226
3227 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3228
3229         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
3230         even if there is no location.
3231
3232 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3233
3234         * sem_res.adb, sem_ch4.adb: move check for restriction
3235         No_Task_Hierarchy to resolve_allocator.
3236
3237 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3238
3239         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
3240         This flag of N_Pragma nodes is not used, remove it as well as all of
3241         the associated circuitry.
3242
3243 2011-08-04  Javier Miranda  <miranda@adacore.com>
3244
3245         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
3246         runtime check on duplicated externa tags
3247         * debug.adb Document switch -gnatdQ.
3248
3249 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3250
3251         * a-fihema.ads: Minor typo fix.
3252
3253 2011-08-04  Yannick Moy  <moy@adacore.com>
3254
3255         * sem_ch10.adb: Minor comment update.
3256
3257 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3258
3259         * einfo.adb: Update the node field usage to reflect the renaming of
3260         Return_Flag to Return_ Flag_Or_Transient_Decl.
3261         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
3262         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
3263         (Write_Field15_Name): Change Return_Flag to
3264         Return_Flag_Or_Transient_Decl.
3265         * einfo.ads: Rename node field Return_Flag to
3266         Return_Flag_Or_Transient_Decl. Update the associated comment and all
3267         occurrences in entities.
3268         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
3269         associated Inline pragma.
3270         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
3271         associated Inline pragma.
3272         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
3273         routine.
3274         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
3275         Return_Flag and Set_Return_Flag.
3276         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
3277         objects generated for controlled transients declared inside an
3278         Exception_With_Actions. Update the calls to Return_Flag.
3279         (Process_Object_Declaration): Add code to add a null guard for hook
3280         objects generated for controlled transients declared inside an
3281         Exception_With_Actions. Update related comment.
3282         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
3283         objects generated for controlled transients declared inside an
3284         Exception_With_Actions. Update the calls to Return_Flag.
3285         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
3286
3287 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3288
3289         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
3290         positional aggregate.
3291
3292 2011-08-04  Vincent Celier  <celier@adacore.com>
3293
3294         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
3295         SLOC only for pragmas.
3296
3297 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3298
3299         * projects.texi: Minor typo fix.
3300
3301 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3302
3303         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
3304         on case-sensitive file systems.
3305
3306 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3307
3308         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
3309         nested in a disabled pragma.
3310         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
3311         enclosing pragma, if any, for X decisions.
3312
3313 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3314
3315         * sem_prag.adb: Minor reformatting.
3316
3317 2011-08-04  Vincent Celier  <celier@adacore.com>
3318
3319         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
3320         allowed in no run time mode.
3321
3322 2011-08-04  Vincent Celier  <celier@adacore.com>
3323
3324         * make.adb (Check): When -gnatc is used, check for the source file
3325         inside the ALI file with a canonical case file name.
3326
3327 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3328
3329         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
3330         overriding the separator.
3331
3332 2011-08-04  Robert Dewar  <dewar@adacore.com>
3333
3334         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
3335         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
3336
3337 2011-08-04  Robert Dewar  <dewar@adacore.com>
3338
3339         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
3340
3341 2011-08-04  Yannick Moy  <moy@adacore.com>
3342
3343         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
3344         'Result only appears in postcondition of function.
3345
3346 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3347
3348         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
3349         external tag, include the value of the external tag in the exception
3350         message.
3351
3352 2011-08-04  Yannick Moy  <moy@adacore.com>
3353
3354         * sem_attr.adb (Result): modify error message for misplaced 'Result
3355
3356 2011-08-04  Sergey Rybin  <rybin@adacore.com>
3357
3358         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
3359         clear that the second argument must be an identifier.
3360
3361 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3362
3363         * exp_ch9.adb (Build_Barrier_Function): When compiling with
3364         -fpreserve-control-flow, insert an IF statement on the barrier
3365         condition to ensure that a conditional branch instruction is generated.
3366
3367 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3368
3369         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
3370         (Processing_Flags.Ignore_Missing_With): new flag.
3371
3372 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3373
3374         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
3375         Source_List_File on case-insensitive systems where the file is actually
3376         on a case-sensitive file system (NFS,...).
3377
3378 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3379
3380         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
3381         function return contains a controlled [extension] aggregate and the
3382         return statement is not part of a handled sequence of statements, wrap
3383         the return in a block. This ensures that all controlled temporaries
3384         generated during aggregate resolution will be picked up by the
3385         finalization machinery.
3386
3387 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3388
3389         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
3390         components, freeze type before resolution, to ensure that default
3391         initializations are present for all components.
3392         * sem_res.adb (Resolve_Actuals): the designated object of an
3393         accces-to-constant type is a legal actual in a call to an
3394         initialization procedure.
3395
3396 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3397
3398         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
3399         N_Unchecked_Type_Conversion to the possible containers of a renamed
3400         transient variable.
3401
3402 2011-08-04  Yannick Moy  <moy@adacore.com>
3403
3404         * par-ch13.adb (Aspect_Specifications_Present): recognize
3405         "with Identifier'Class =>" as an aspect, so that a meaningful warning
3406         is issued in Strict mode.
3407         * par.adb: Fix typos in comments.
3408
3409 2011-08-04  Yannick Moy  <moy@adacore.com>
3410
3411         * sem_attr.adb (Result): modify error message to take into account Post
3412         aspect when compiling Ada 2012 (or newer) code.
3413
3414 2011-08-04  Nicolas Roche  <roche@adacore.com>
3415
3416         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
3417         remove need for GCC exceptions.
3418
3419 2011-08-04  Vincent Celier  <celier@adacore.com>
3420
3421         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
3422         project, not the source file name.
3423         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
3424         excluded, continue looking. This excluded source will only be returned
3425         if there is no other source with the same base name that is not locally
3426         removed.
3427
3428 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3429
3430         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
3431         private and one of the operands is a real literal, use a qualified
3432         expression rather than a conversion which is not meaningful to the
3433         back-end.
3434
3435 2011-08-04  Yannick Moy  <moy@adacore.com>
3436
3437         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
3438         corresponding aspect X'Class are allowed, proceed with analysis of the
3439         aspect instead of skipping it.
3440
3441 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3442
3443         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
3444         This will allow to have an Ada implementation for the subprogram.
3445
3446 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3447
3448         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
3449         completion and aspects are present, apply them to the entity for the
3450         type which is currently the partial view, but which is the one that
3451         will be frozen.
3452         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
3453         applies to a partial view, indicate that the full view has predicates
3454         and delayed aspects.
3455         (Replace_Type_Reference): Handle properly predicates that apply to the
3456         full view of a private completion.
3457
3458 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3459
3460         * layout.adb (Layout_Type): For composite types, do not set Esize.
3461         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
3462         set Esize.
3463         (Size_Known): Look at the RM size of components instead of the Esize.
3464         (Freeze_Record_Type): Look at the RM size instead of the Esize to
3465         issue warning and activate Implicit_Packing.
3466         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
3467         if the Esize is not known.
3468         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
3469         for elementary types only.
3470         (Analyze_Record_Representation_Clause): Look at the RM size instead
3471         of the Esize to issue errors.
3472         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
3473         is not known.
3474         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
3475         obsolete block.
3476         Look at the RM size instead of the Esize for types if the latter is
3477         not known.
3478         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
3479
3480 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3481
3482         * sem_type.adb: proper handling of equality not involving anonymous
3483         access types.
3484
3485 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3486
3487         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
3488         Vis_Decls. When creating a library-level finalizer for a package spec,
3489         both the declaration and body of the finalizer are inserted either in
3490         the visible or private declarations of the package spec.
3491
3492 2011-08-04  Javier Miranda  <miranda@adacore.com>
3493
3494         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
3495         use of the full-view of a type when invoking Is_Ancestor.
3496         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
3497         the full-view of private parents is requested, then use also the
3498         full-view of the parent of the first derivation.
3499
3500 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3501
3502         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
3503         instead of the locally imported procedure.
3504         * s-taprop-mingw.adb (Enter_Task): Ditto.
3505         * s-valrea.adb (Scan_Real): Ditto.
3506         * s-imgrea.adb (Set_Image_Real): Ditto.
3507         * s-flocon.ads: Make the package pure.
3508
3509 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3510
3511         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
3512         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
3513         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
3514         New subprogram, moved here from...
3515         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
3516         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
3517         rewriting of the last argument into a procedure call statement here...
3518         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
3519         instead.
3520
3521 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3522
3523         * par_sco.adb: Minor reformatting.
3524
3525 2011-08-04  Robert Dewar  <dewar@adacore.com>
3526
3527         * erroutc.adb: Minor reformatting.
3528
3529 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3530
3531         * par_sco.adb: Comment update.
3532
3533 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3534
3535         * s-flocon.ads: New file.
3536         * g-flocon.ads: Now a renaming of s-flocon.
3537         * Makefile.rtl: Add s-flocon.o
3538
3539 2011-08-04  Javier Miranda  <miranda@adacore.com>
3540
3541         * exp_strm.adb (Build_Array_Input_Function): if the array type is
3542         constrained, do not attempt to build a subtype of it.
3543
3544 2011-08-04  Yannick Moy  <moy@adacore.com>
3545
3546         * errout.ads Change comments: remove 'R'M as an example where quotes
3547         are needed; add ALFA as another case where quotes are not needed
3548         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
3549         case where quotes are not needed.
3550         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3551         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
3552         Remove all occurrences of 'A'L'F'A
3553
3554 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3555
3556         * sem_ch13.adb: check legality of invariant pragma.
3557
3558 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3559
3560         * bindgen.adb: Add comments.
3561
3562 2011-08-04  Yannick Moy  <moy@adacore.com>
3563
3564         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
3565         synthesized flag.
3566         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
3567         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
3568
3569 2011-08-04  Robert Dewar  <dewar@adacore.com>
3570
3571         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
3572         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
3573         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
3574
3575 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3576
3577         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
3578
3579 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3580
3581         PR ada/47880
3582         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
3583         allocated object.
3584
3585 2011-08-04  Robert Dewar  <dewar@adacore.com>
3586
3587         * einfo.ads, exp_ch4.adb: Minor reformatting.
3588
3589 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3590
3591         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
3592
3593 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3594
3595         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
3596         type in all cases to compute list of primitive operations, because full
3597         view may be an itype that is not attached to the list of declarations.
3598
3599 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3600
3601         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
3602         library has already been finalized.
3603         (Gen_Adafinal_C): Likewise.
3604         (Gen_Adainit_Ada): Generate an early return if the library has
3605         already been elaborated.
3606         (Gen_Adainit_C): Likewise.
3607         (Gen_Output_File_Ada): Generate an elaboration flag.
3608         (Gen_Output_File_C): Likewise.
3609
3610 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3611
3612         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
3613         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
3614         built in the first place.
3615         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
3616         for CodePeer because Finalize_Address was not built to begin with.
3617         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
3618
3619 2011-08-04  Pascal Obry  <obry@adacore.com>
3620
3621         * adaint.c (__gnat_tmp_name): Use current process id to create temp
3622         filenames, this ensures unicity of filenames across processes.
3623
3624 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3625
3626         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
3627         Raise_Controlled to Raise_From_Controlled_Operation. Update the
3628         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
3629         Add False as the actual to From_Abort in the generated call to
3630         Raise_From_Controlled_Operation.
3631
3632 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3633
3634         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
3635         so that the ali file name can be retrieved from outside of this package.
3636         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
3637         doing nothing in the general case, but used to update the object file
3638         timestamp if directly generated by the backend.
3639         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
3640         to a later time than the ali file one.
3641
3642 2011-08-04  Yannick Moy  <moy@adacore.com>
3643
3644         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
3645         entities whose body contains an Annotate pragma which forces formal
3646         proof on this body.
3647         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3648         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
3649         Mark_Non_ALFA_Subprogram to pass in a message and node.
3650         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
3651         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
3652         surrounding subprogram.
3653         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
3654         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
3655         as not in ALFA is annotated with Formal_Proof being On, then an error
3656         is issued based on the additional parameters for message and node.
3657         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
3658         * gcc-interface/Make-lang.in: Update dependencies.
3659
3660 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3661
3662         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
3663         Finalize_Address when CodePeer is enabled.
3664
3665 2011-08-04  Pascal Obry  <obry@adacore.com>
3666
3667         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
3668         the latter returns a pointer to a static buffer which is deallocated
3669         at the end of the routine.
3670
3671 2011-08-04  Yannick Moy  <moy@adacore.com>
3672
3673         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
3674         after index creation; mark unconstrained base array type generated as
3675         being in/not in ALFA as well
3676         (Make_Index): mark subtype created as in/not in ALFA
3677         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
3678         over a loop as in/not in ALFA, depending on its type and form of loop
3679         iteration.
3680
3681 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3682
3683         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
3684         directly to False on .NET and JVM.
3685
3686 2011-08-04  Yannick Moy  <moy@adacore.com>
3687
3688         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
3689         constraint that subtype must come from source code to be in ALFA, so
3690         that anonymous subtypes can be in ALFA too.
3691
3692 2011-08-04  Yannick Moy  <moy@adacore.com>
3693
3694         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
3695         reference for ALFA mode.
3696         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
3697         procedure public so as to use it from formal verification back-end.
3698
3699 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3700
3701         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
3702         invalid checks of the Parameter, making Remove_Switch not working
3703         correctly.
3704
3705 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3706
3707         * targparm.ads: Update header: no run-time exception is needed on this
3708         file.
3709
3710 2011-08-04  Vincent Celier  <celier@adacore.com>
3711
3712         * a-fihema.adb: Use System.IO instead of GNAT.IO
3713
3714 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3715
3716         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
3717         are forbidden in Compiler_Unit mode.
3718
3719 2011-08-04  Robert Dewar  <dewar@adacore.com>
3720
3721         * sem_util.adb: Minor reformatting.
3722
3723 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3724
3725         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
3726         library-level finalizers.
3727         (Gen_Finalize_Library_C): Update the import string for library-level
3728         finalizers.
3729         (Gen_Finalize_Library_Defs_C): Update the definition name of a
3730         library-level finalizer.
3731         * exp_ch7.adb: Remove with and use clauses for Stringt.
3732         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
3733         Spec_Decl. Add local variable Body_Id. The names of library-level
3734         finalizers are now manually fully qualified and are no longer external.
3735         A single name is now capable of servicing .NET, JVM and non-VM targets.
3736         Pragma Export is no longer required to provide visibility for the name.
3737         (Create_Finalizer_String): Removed.
3738         (New_Finalizer_Name): New routine which mimics New_..._Name.
3739
3740 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3741
3742         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
3743         elaboration counter to Standard_Short_Integer.
3744         * sem_util.adb (Build_Elaboration_Entity): Likewise.
3745         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
3746         (Gen_Elab_Externals_C): Likewise.
3747
3748 2011-08-04  Ed Falis  <falis@adacore.com>
3749
3750         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
3751         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
3752         system-vxworks-mips.ads, system-vxworks-x86.ads
3753         (Always_Compatible_Rep): set to False for all VxWorks targets.
3754
3755 2011-08-04  Robert Dewar  <dewar@adacore.com>
3756
3757         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
3758         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
3759         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
3760         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
3761         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
3762         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
3763         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
3764         Minor reformatting and code reorganization.
3765
3766 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3767
3768         * projects.texi: Added doc for aggregate projects.
3769
3770 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3771
3772         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3773         Add support for overriding the Project_Path in aggregate projects.
3774
3775 2011-08-04  Robert Dewar  <dewar@adacore.com>
3776
3777         * a-cofove.ads: Minor reformatting.
3778
3779 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3780
3781         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3782         on the generated code.
3783         (Build_Finalize_Statements): Update the comment on the generated code.
3784         (Build_Initialize_Statements): Update the comment on the generated code.
3785         (Build_Object_Declarations): Add local variable Result. The object
3786         declarations are now built in sequence.
3787         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3788         RE_Unit_Table.
3789
3790 2011-08-04  Robert Dewar  <dewar@adacore.com>
3791
3792         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3793
3794 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3795
3796         * einfo.ads (Elaboration_Entity): Document new definition and use.
3797         (Elaboration_Entity_Required): Adjust to above change.
3798         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3799         * exp_ch12.adb: And with and use for Snames.
3800         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3801         * exp_util.adb (Set_Elaboration_Flag): Likewise.
3802         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3803         <Check_Unit_Name>: Deal with N_Expanded_Name.
3804         <Attribute_Elaborated>: Extend to all unit names.
3805         * sem_elab.adb: And with and use for Uintp.
3806         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
3807         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
3808         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
3809         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
3810         from Gen_Adainit_Ada.
3811         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
3812         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
3813         case, do not call System.Standard_Library.Adafinal; instead call
3814         finalize_library if needed.
3815         (Gen_Adafinal_C): Likewise.
3816         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3817         non-main program case.
3818         (Gen_Adainit_C): Generate a couple of external declarations here.
3819         In the main program case, set SSL.Finalize_Library_Objects.
3820         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3821         (Gen_Elab_Calls_C): Likewise.
3822         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
3823         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
3824         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3825         objects here.
3826         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3827         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
3828         Gen_Adafinal_Ada.
3829         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3830         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
3831         of external declarations.  Call Gen_Finalize_Library_C.
3832
3833 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3834
3835         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3836         Compute_Compilation_Phases): new subprogram.
3837         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3838         The number of mains as well as the various compilation phases that
3839         need to be run are now project tree specific, since various
3840         aggregated trees might have different requirements. In particular,
3841         they do not all require bind or link phases.
3842
3843 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3844
3845         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3846         (Project_Tree_Appdata): New type.
3847         It is now possible to associate application-specific data to a project
3848         tree. In particular, this is used in the gprbuild builder to avoid a
3849         number of global tables and htables, especially now that there can be
3850         several project trees loaded at once because of aggregate projects.
3851         (Debug_Name): new procedure.
3852         * projects.texi: Clarify syntax of "**" for Source_Dirs
3853
3854 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3855
3856         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3857         the "roots" for a main.
3858         (Fill_From_Project): add support for aggregate projects. Main units
3859         in aggregated projects are now automatically added in the list of
3860         files to build (although this fails later on in gprbuild, because
3861         these files are not using the root proejct tree, so this needs
3862         further cleanup)
3863         * gcc-interface/Make-lang.in: Update dependencies.
3864
3865 2011-08-03  Yannick Moy  <moy@adacore.com>
3866
3867         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3868         conditional expression in ALFA.
3869         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3870         expressions as not in ALFA.
3871
3872 2011-08-03  Robert Dewar  <dewar@adacore.com>
3873
3874         * a-cofove.adb: Minor reformatting.
3875
3876 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3877
3878         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3879         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3880         gprbuild sources.
3881         These packages are more logically placed in the Queue package, since
3882         they manipulate the queue. It is also likely that they can be adapted
3883         for gnatmake, thus sharing more code.
3884         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3885         that we could move the above.
3886
3887 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3888
3889         * errutil.adb (Finalize): clean up the list of error messages on exit.
3890         Calling this subprogram multiple times will no longer show duplicate
3891         error messages on stderr.
3892
3893 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3894
3895         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3896         Getopt_Switches when we have already define a command line
3897         configuration.
3898
3899 2011-08-03  Yannick Moy  <moy@adacore.com>
3900
3901         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3902         in ALFA. Instead, they are considered as assertions to prove.
3903         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3904         nodes as not in ALFA. Instead, include conditional expressions in ALFA
3905         if they have no ELSE part, or if they occur in pre- and postconditions,
3906         where the Condition cannot have side-effects in ALFA
3907         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3908         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3909         Instead, include type conversion between scalar types in ALFA.
3910         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3911         if-and-only-if its type is in ALFA.
3912
3913 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3914
3915         * scos.adb, get_scos.adb, put_scos.adb
3916         New code letter for decisions: G (entry guard)
3917         * par_sco.adb
3918         (Traverse_Subprogram_Body): Rename to...
3919         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3920         (Traverse_Protected_Body): New subprogram
3921         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3922         protected bodies and entry bodies.
3923
3924 2011-08-03  Yannick Moy  <moy@adacore.com>
3925
3926         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3927         entities with get/set subprograms, which is set on procedure entities
3928         generated by the compiler for a postcondition.
3929         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3930         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3931         entity for a declaration
3932         (Get_Unique_Entity_For_Decl): new function returning an entity which
3933         represents a declaration, so that matching spec and body have the same
3934         entity.
3935
3936 2011-08-03  Robert Dewar  <dewar@adacore.com>
3937
3938         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3939         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3940
3941 2011-08-03  Yannick Moy  <moy@adacore.com>
3942
3943         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3944         library-level because retriction No_Implicit_Dynamic_Code in the
3945         front-end prevents its definition as a local subprogram
3946         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3947         for reuse in other contexts
3948         (Traverse_Declarations_Or_Statements,
3949         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3950         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3951         procedures take a callback parameter to be called on all declarations
3952         * lib-xref.ads
3953         (Traverse_All_Compilation_Units): new generic function to traverse a
3954         compilation unit and call a callback parameter on all declarations
3955
3956 2011-08-03  Javier Miranda  <miranda@adacore.com>
3957
3958         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3959         in Java since they are always enclosed in a namespace that
3960         differentiates them, and overloaded entities are supported by the VM.
3961
3962 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3963
3964         * checks.adb (Determine_Range): If a computed bound of an operation is
3965         outside the range of the base type of the expression, and overflow
3966         checks are enabled, the result is unknown and cannot be used for any
3967         subsequent constant folding.
3968         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3969         unknown, so is the result of the comparison.
3970
3971 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3972
3973         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3974         From_Abort. When finalization was triggered by an abort, propagate
3975         Standard'Abort_Signal rather than Program_Error.
3976         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3977         From_Abort.
3978         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3979         From_Abort. When finalization was triggered by an abort, propagate
3980         Standard'Abort_Signal rather than Program_Error.
3981         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3982         From_Abort.
3983         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3984         Abort_Id. Update the calls to Build_Object_Declarations and
3985         Build_Raise_Statement to include Abort_Id.
3986         (Build_Adjust_Statements): New local variable Abort_Id. Update the
3987         calls to Build_Object_Declarations and Build_Raise_Statement to include
3988         Abort_Id.
3989         (Build_Finalize_Statements): New local variable Abort_Id. Update the
3990         calls to Build_Object_Declarations and Build_Raise_Statement to include
3991         Abort_Id.
3992         (Build_Components): Create an entity for Abort_Id when exceptions are
3993         allowed on the target.
3994         (Build_Finalizer): New local variable Abort_Id.
3995         (Build_Initialize_Statements): New local variable Abort_Id. Update the
3996         calls to Build_Object_Declarations and Build_Raise_Statement to include
3997         Abort_Id.
3998         (Build_Object_Declarations): Add new formal Abort_Id. Create the
3999         declaration of flag Abort_Id to preserve the original abort status
4000         before finalization code is executed.
4001         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
4002         runtime routine Raise_From_Controlled_Operation.
4003         (Create_Finalizer): Update the call to Build_Raise_Statement to include
4004         Abort_Id. Update the call to Build_Object_Declarations to include
4005         Abort_Id. Update the layout of the finalizer body.
4006         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
4007         (Process_Transient_Objects): New local variable Abort_Id. Remove the
4008         clunky code to create all flags and objects related to
4009         exception propagation and replace it with a call to
4010         Build_Object_Declarations. Update the call to Build_Raise_Statement to
4011         include Abort_Id.
4012         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
4013         Add new formal Abort_Id and associated comment on its use.
4014         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
4015         on its use.
4016         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
4017         Remove the clunky code to create all flags and objects related to
4018         exception propagation and replace it with a call to
4019         Build_Object_Declarations. Update the call to Build_Raise_Statement.
4020
4021 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4022
4023         * s-tassta.adb: Fix minor typos.
4024
4025 2011-08-03  Robert Dewar  <dewar@adacore.com>
4026
4027         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
4028         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
4029
4030 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4031
4032         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
4033         to packages. This ensures that the finalizer body will not end up
4034         inside the freeze node.
4035         (Process_Declarations): Add code to detect whether a freeze node has a
4036         nested finalization collection.
4037
4038 2011-08-03  Pascal Obry  <obry@adacore.com>
4039
4040         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
4041         (Current_Session): Return a not null access to Session_Type.
4042         (Default_Session): Likewise.
4043
4044 2011-08-03  Robert Dewar  <dewar@adacore.com>
4045
4046         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
4047         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
4048
4049 2011-08-03  Pascal Obry  <obry@adacore.com>
4050
4051         * g-awk.ads: Minor comment fix.
4052
4053 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4054
4055         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4056         the tree structure related to discriminant constraints.
4057         Original_Discriminant cannot be used any more for computing the
4058         defining name for the reference to a discriminant.
4059
4060 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4061
4062         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
4063         function is not visibly tagged, this is not a dispatching call and
4064         therfore is not Tag_Indeterminate, even if the function is marked as
4065         dispatching on result.
4066
4067 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4068
4069         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
4070         (Expand_N_Free_Statement): Add a guard to protect against run-times
4071         which do not support controlled types.
4072         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
4073         against run-times which do not support controlled types.
4074         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
4075         against run-times which do not support controlled types.
4076         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
4077         against run-times which do not support controlled types.
4078         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
4079         protect against run-times which do not support controlled types.
4080
4081 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4082
4083         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
4084         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
4085
4086 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4087
4088         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
4089         modified in the source, to prevent spurious warnings when compiling
4090         with -gnatg.
4091
4092 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4093
4094         * a-except-2005.adb: Minor reformatting.
4095
4096 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4097
4098         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
4099         is a renaming declaration in the private part of a package, do not emit
4100         a warning that the with_clause could be moved because the renaming may
4101         be used in the body or in a child unit.
4102
4103 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4104
4105         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4106         Propagate the Comes_From_Source attribute from the original return
4107         object to the renaming.
4108
4109 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4110
4111         * exp_ch7.adb (Build_Raise_Statement): Do not call
4112         Raise_From_Controlled_Operation when this routine is not present in
4113         the run-time library.
4114         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
4115         libraries (Ravenscar), tasks are non-terminating, and protected objects
4116         and tasks can only appear at library level, so we do not want
4117         finalization of protected objects nor tasks.
4118         * exp_intr.adb: Minor clarification in comment.
4119         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
4120         Gen_Output_File_C): Remove references to finalization of library-level
4121         objects when using restricted run-time libraries.
4122
4123 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4124
4125         * sem_ch3.adb (Build_Discriminant_Constraints): Set
4126         Original_Discriminant only if the parent type is a generic formal.
4127
4128 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4129
4130         * exp_ch13.adb: Add with and use clause for Targparm;
4131         (Expand_N_Free_Statement): Prevent the generation of a custom
4132         Deallocate on .NET/JVM targets since this requires pools and address
4133         arithmetic.
4134         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
4135         .NET/JVM targets, attach the newly allocated object to the access
4136         type's finalization collection. Do not generate a call to
4137         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
4138         exist in the runtime.
4139         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
4140         create a custom Allocate for object that do not require initialization.
4141         Attach a newly allocated object to the access type's finalization
4142         collection on .NET/JVM.
4143         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
4144         assignment of controlled types on .NET/JVM. The two hidden pointers
4145         Prev and Next and stored and later restored after the assignment takes
4146         place.
4147         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
4148         kludge for .NET/JVM to recognize a particular piece of code coming from
4149         Heap_Management and change the call to Finalize into Deep_Finalize.
4150         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
4151         finalization collections on .NET/JVM only for types derived from
4152         Controlled. Separate the association of storage pools with a collection
4153         and only allow it on non-.NET/JVM targets.
4154         (Make_Attach_Call): New routine.
4155         (Make_Detach_Call): New routine.
4156         (Process_Object_Declarations): Suppress the generation of
4157         build-in-place return object clean up code on .NET/JVM since it uses
4158         pools.
4159         * exp_ch7.ads (Make_Attach_Call): New routine.
4160         (Make_Detach_Call): New routine.
4161         * exp_intr.adb Add with and use clause for Targparm.
4162         (Expand_Unc_Deallocation): Detach a controlled object from a collection
4163         on .NET/JVM targets.
4164         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
4165         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
4166         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
4167         names used in finalization.
4168
4169 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4170
4171         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
4172         (Attach, Detach): Lock the current task when chaining an object onto a
4173         collection.
4174
4175 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4176
4177         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
4178         Rewritten to create the message strings when the exception is not
4179         raised by an abort during finalization.
4180         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
4181         Raise_From_Controlled_Operation and update its associated comment.
4182         * a-fihema.ads, a-fihema.adb: New GNAT unit.
4183         Ada.Finalization.Heap_Management provides key functionality
4184         associated with controlled objects on the heap, their creation,
4185         finalization and reclamation. Type Finalization_Collection is
4186         effectively a wrapper which sits ontop of a storage pool and performs
4187         all necessary bookkeeping for all the objects it contains. Each
4188         access-to-controlled or access-to-class-wide type receives a collection
4189         as part of its expansion. The compiler generates buffer code and
4190         invokes Allocate / Deallocate to create and destroy allocated
4191         controlled objects.
4192         * a-finali.adb ("="): Removed.
4193         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
4194         fields Prev and Next.
4195         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
4196         A library unit with at least one controlled object on the library level
4197         has a special finalizer which is invoked by the binder. To signal this,
4198         ali files carry field PF.
4199         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
4200         associated comment on field usage.
4201         * a-tags.adb (Get_RC_Offset): Removed.
4202         (Needs_Finalization): New routine.
4203         * a-tags.ads: Update the structure of the GNAT dispatch tables.
4204         Dispatch tables now carry field Needs_Finalization which provides
4205         runtime indication whether a type is controlled or has controlled
4206         components or both. Remove field RC_Offset.
4207         (Get_RC_Offset): Removed along with its associated pragma Export.
4208         Since tagged types with controlled components no longer carry hidden
4209         field _controller, the special mechanism to retrieve its location is no
4210         longer needed.
4211         (Needs_Finalization): New routine.
4212         * atree.ads, atree.adb (Elist24): New routine.
4213         (Set_Elist24): New routine.
4214         * atree.h: Add a define clause for Elist24.
4215         * bindgen.adb New library-level variable Lib_Final_Built.
4216         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
4217         presence of a VM target, the routine generates calls to the proper
4218         library finalization routine.
4219         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
4220         targets. Set the correct library finalization routine depending on
4221         whether the library has controlled objects or this is a VM compilation.
4222         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
4223         to library-level finalizers of compiled units in reverse order of
4224         elaboration. It also produces exception management code and reraises a
4225         potential exception after all units have been finalized.
4226         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
4227         library-level finalizers of compiled units in reverse order of
4228         elaboration.
4229         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
4230         definitions of all library-level finalizers available to the compilation
4231         (Gen_Main_Ada): Directly call Adafinal which now contails all target
4232         dependent code.
4233         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
4234         System.Standard_Library.Adafinal directly. If the library needs
4235         finalization actions, create the sequence of finalization calls.
4236         (Gen_Output_File_Ada): Alphabetize local variables and constants.
4237         Generate a with clause for System.Soft_Links when compiling for a VM.
4238         Remove the code which imports System.Standard_Library.Adafinal as
4239         Do_Finalize. Generate the library finalization routine.
4240         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
4241         If the library needs finalization actions, create all the definitions
4242         of library- level finalizers.
4243         (Has_Finalizer): New routine. Determines whether at least one compiled
4244         unit has a library-level finalizer.
4245         Add type Qualification_Mode.
4246         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
4247         * einfo.adb: New usage of field 15 as Return_Flag.
4248         Remove Finalization_Chain_Entity from the usages of field 19.
4249         Remove Associated_Final_Chain from the usages of field 23.
4250         New usage of field 23 as Associated_Collection.
4251         New usage of field 24 as Finalizer.
4252         New usage of flag 252 as Is_Processed_Transient.
4253         (Associated_Final_Chain): Removed.
4254         (Associated_Collection): New routine.
4255         (Finalization_Chain_Entity): Removed.
4256         (Finalizer): New routine.
4257         (Is_Finalizer): New routine.
4258         (Is_Processed_Transient): New routine.
4259         (Return_Flag): New routine.
4260         (Set_Associated_Final_Chain): Removed.
4261         (Set_Associated_Collection): New routine.
4262         (Set_Finalization_Chain_Entity): Removed.
4263         (Set_Finalizer): New routine.
4264         (Set_Is_Processed_Transient): New routine.
4265         (Set_Return_Flag): New routine.
4266         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
4267         displayed flags.
4268         (Write_Field8_Name): Alphabetize the output.
4269         (Write_Field11_Name): Alphabetize the output.
4270         (Write_Field12_Name): Alphabetize the output.
4271         (Write_Field13_Name): Alphabetize the output.
4272         (Write_Field14_Name): Alphabetize the output.
4273         (Write_Field15_Name): Alphabetize the output.
4274         (Write_Field16_Name): Alphabetize the output.
4275         (Write_Field17_Name): Alphabetize the output.
4276         (Write_Field18_Name): Alphabetize the output.
4277         (Write_Field19_Name): Alphabetize the output. Remove the output of
4278         Finalization_Chain_Entity.
4279         (Write_Field20_Name): Alphabetize the output.
4280         (Write_Field21_Name): Alphabetize the output.
4281         (Write_Field22_Name): Alphabetize the output.
4282         (Write_Field23_Name): Alphabetize the output. Remove the output of
4283         Associated_Final_Chain. Add output for Associated_Collection.
4284         (Write_Field24_Name): Alphabetize the output.
4285         (Write_Field25_Name): Add output for Finalizer.
4286         (Write_Field26_Name): Alphabetize the output.
4287         (Write_Field27_Name): Alphabetize the output.
4288         (Write_Field28_Name): Alphabetize the output.
4289         * einfo.ads: Add new field description for Associated_Collection and
4290         its uses in nodes.
4291         Remove Associated_Final_Chain and its uses in nodes.
4292         Remove Finalization_Chain_Entity and its uses in nodes.
4293         Add new field description for Finalizer and its uses in nodes.
4294         Add new synthesized attribute Is_Finalizer.
4295         Add new flag description for Is_Processed_Transient and its uses in
4296         nodes.
4297         Add new field description for Return_Flag and its uses in nodes.
4298         (Associated_Final_Chain): Removed along with its pragma Inline.
4299         (Associated_Collection): New routine and pragma Inline.
4300         (Finalization_Chain_Entity): Removed along with its pragma Inline.
4301         (Finalizer): New routine and pragma Inline.
4302         (Is_Finalizer): New routine and pragma Inline.
4303         (Is_Processed_Transient): New routine and pragma Inline.
4304         (Return_Flag): New routine and pragma Inline.
4305         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
4306         (Set_Associated_Collection): New routine and pragma Inline.
4307         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
4308         (Set_Finalizer): New routine and pragma Inline.
4309         (Set_Is_Processed_Transient): New routine and pragma Inline.
4310         (Set_Return_Flag): New routine and pragma Inline.
4311         * exp_aggr.adb: Alphabetize subprograms.
4312         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
4313         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
4314         associated comments. Remove local variables External_Final_List and
4315         Attach.
4316         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
4317         Ancestor. Remove the retrieval of finalization lists. Update the call to
4318         Make_Adjust_Call.
4319         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
4320         lists. Update the call to Late_Expansion.
4321         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
4322         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
4323         (Gen_Assign): Remove the retrieval of the finalization list used to
4324         build the assignment. Update the calls to Make_Init_Call and
4325         Make_Adjust_Call.
4326         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
4327         Remove the mechanism to determine attachment levels and finalization
4328         list retrieval. Remove the processing for coextensions.
4329         (Init_Controller): Removed. Controllers no longer exist.
4330         (Late_Expansion): Remove formals Flist and Obj along with their
4331         associated comments. Update the calls to Build_Record_Aggr_Code and
4332         Build_Array_Aggr_Code.
4333         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
4334         (Expand_N_Freeze_Entity): Add special processing for finalizers which
4335         appear in entry bodies, protected subprograms and task bodies.
4336         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
4337         * exp_ch3.adb (Add_Final_Chain): Removed.
4338         (Build_Array_Init_Proc): Alphabetize local variables.
4339         (Build_Assignment): Alphabetize local variables. Update the call to
4340         Maked_Adjust_Call.
4341         (Build_Class_Wide_Master): Rename local variables to better reflect
4342         their role.
4343         (Build_Discriminant_Assignments): Code reformatting.
4344         (Build_Init_Call_Thru): Code reformatting.
4345         (Build_Init_Procedure): Code reformatting. Generate a special version
4346         of Deep_Finalize which is capable of finalizing all initialized
4347         components and ignore the rest.
4348         (Build_Init_Statements): Rename local variables to better reflect their
4349         role.
4350         Reimplement the mechanism to include the creation and update of an index
4351         variable called a "counter". It is used as a bookmark for tracing
4352         initialized and non-initialized components.
4353         (Build_Initialization_Call): Remove local variable Controller_Typ.
4354         Alphabetize all local variables. Remove the initialization of the
4355         record controller and update the call to Make_Init_Call.
4356         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
4357         New local variable Counter.
4358         (Constrain_Array): Alphabetize.
4359         (Expand_Freeze_Array_Type): Create a collection instead of a
4360         finalization list.
4361         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
4362         Finalize_Address which is used in conjunction with allocated controlled
4363         objects.
4364         (Expand_N_Object_Declaration): Remove the creation of a finalization
4365         list for anonymous access types. Update the calls to Make_Init_Call and
4366         Make_Adjust_Call.
4367         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
4368         retrieval of finalization lists. Remove the expansion of the record
4369         controller. Create TSS primitive Finalize_Address used in conjunction
4370         with controlled objects on the heap. Create finalization collections
4371         for access-to-controlled record components.
4372         (Expand_Record_Controller): Removed.
4373         (Freeze_Type): Remove the freezing of record controllers. Freezing of
4374         class-wide types now requires additional processing. Create
4375         finalization collections for access-to-controlled types.
4376         (Increment_Counter): New routine.
4377         (Make_Counter): New routine.
4378         (Make_Eq_If): Remove the mention of Name_uController.
4379         (Make_Predefined_Primitive_Specs): There is no longer need to skip
4380         types coming from System.Finalization_Root.
4381         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
4382         (Predefined_Primitive_Bodies): There is no longer need to skip types
4383         coming from System.Finalization_Root.
4384         (Stream_Operation_OK): Do not generate stream routines for
4385         type Ada.Finalization.Heap_Management.Finalization_Collection.
4386         * exp_ch3.ads: Alphabetize subprograms.
4387         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
4388         Add with and use clause for Lib.
4389         (Complete_Coextension_Finalization): Removed.
4390         (Complete_Controlled_Allocation): New routine. Create a finalization
4391         collection for anonymous access-to-controlled types. Create a custom
4392         Allocate which interfaces with the back end and the machinery in
4393         Heap_Management.
4394         (Expand_Allocator_Expression): Add necessary calls to
4395         Complete_Controlled_Allocation. Remove the retrieval of finalization
4396         lists. Update the calls to Make_Adjust_Call. Generate a call to
4397         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4398         the associated collection.
4399         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
4400         Code clean up. Remove the retrieval of finalization lists and
4401         attachment levels.
4402         Update the call to Make_Init_Call. Generate a call to
4403         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4404         the associated collection.
4405         (Get_Allocator_Final_List): Removed. Finalization lists are not
4406         available.
4407         (Suitable_Element): Remove the mention of Name_uController.
4408         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
4409         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
4410         the left hand side, carry out the assignment and adjust the left hand
4411         side.
4412         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
4413         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
4414         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
4415         BIP_Collection and BIPcollection.
4416         (Build_Heap_Allocator): New routine used to allocate the return object
4417         of a build-in-place function onto a collection.
4418         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
4419         (Expand_Call): Do not replace direct calls to Deep routines with their
4420         aliases.
4421         (Expand_N_Extended_Return_Statement): Give all variables shorter names
4422         and update their occurrences. Add a special return flag to monitor the
4423         [ab]normal execution of the function. The flag is set right before the
4424         return statement.
4425         Rewrite the mechanism used to allocate a build-in-place return object
4426         on the heap or on a storage pool.
4427         (Is_Direct_Deep_Call): New routine.
4428         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
4429         build-in-place function call instead of a final list. Build a call to
4430         Set_Finalize_Address_Ptr to decorate the associated collection.
4431         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
4432         order to name the build-in-place function call's result for later
4433         finalization. Add a collection to a build-in-place function call
4434         instead of a final list.
4435         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
4436         build-in-place function call instead of a final list. Remove the code
4437         which moves one final list and transforms it into the actual in a
4438         nested build-in-place call.
4439         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
4440         build-in-place function call instead of a final list.
4441         (Move_Final_List): Removed.
4442         (Needs_BIP_Collection): New routine.
4443         (Needs_BIP_Final_List): Removed.
4444         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
4445         enumeration type BIP_Formal_Kind.
4446         Update the related comment.
4447         (Needs_BIP_Collection): New routine.
4448         (Needs_BIP_Final_List): Removed.
4449         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
4450         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
4451         majority of subprograms in this unit. Add Name_Finalize_Address to
4452         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
4453         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
4454         statements for an array type.
4455         (Build_Adjust_Statements): Create the adjust statements for a record
4456         type.
4457         (Build_Cleanup_Statements): New routine. A procedure which given any
4458         construct containing asynchronous calls, references to _master, or is a
4459         task body, a task allocation or a protected body produces the necessary
4460         runtime calls to clean up these constructs.
4461         (Build_Exception_Handler): New routine.
4462         (Build_Final_List): Removed.
4463         (Build_Finalization_Collection): New routine. A core procedure which
4464         creates a collection to service heap allocated controlled objects
4465         associated with an access-to-controlled type.
4466         (Build_Finalize_Statements): Create the finalization statements for a
4467         record types.
4468         (Build_Finalizer): New routine. A core procedure which given any
4469         construct with declarations and/or statements detects all objects which
4470         need any type of clean up (controlled objects, protected objects) and
4471         generates all necessary code to clean up the said objects in the proper
4472         order.
4473         (Build_Finalizer_Call): New routine.
4474         (Build_Initialize_Statements): Create the initialization statements for
4475         an array type. The generated routine contains code to finalize partially
4476         initialized arrays.
4477         (Build_Object_Declarations): New routine.
4478         (Build_Raise_Statement): New routine.
4479         (Clean_Simple_Protected_Objects): Removed.
4480         (Controller_Component): Removed.
4481         (Enclosing_Function): New routine.
4482         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
4483         either declarations or statements or both.
4484         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
4485         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
4486         package.
4487         (Find_Final_List): Removed.
4488         (Global_Flist_Ref): Removed.
4489         (In_Finalization_Root): Removed.
4490         (Insert_Actions_In_Scope_Around): Determine the range of the transient
4491         scope in terms of tree nodes. Process all transient variables within
4492         that range.
4493         (Make_Adjust_Call): Rewritten. There is no longer an attach call
4494         generated after the adjust.
4495         (Make_Attach_Call): Removed.
4496         (Make_Call): New routine.
4497         (Make_Clean): Removed.
4498         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
4499         build routines.
4500         (Make_Deep_Proc): Rewritten to generate the new profile signature used
4501         in Deep routines.
4502         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
4503         build routines.
4504         (Make_Final_Call): Modified to simply create a call to either
4505         Deep_Finalize or Finalize.
4506         (Make_Finalize_Address_Body): New routine.
4507         (Make_Finalize_Address_Stmts): New routine. A function which produces
4508         TSS primitive Finalize_Address used in conjunction with heap allocated
4509         controlled objects.
4510         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
4511         (Make_Init_Call): Rewritten. There is no longer an attach call
4512         generated after initialization.
4513         (Make_Local_Deep_Finalize): New routine.
4514         (Make_Set_Finalize_Address_Ptr_Call): New routine.
4515         (Make_Transient_Block): Remove the finalization list retrieval and
4516         manipulation.
4517         (Needs_Finalization): Moved to Exp_Util.
4518         (Parent_Field_Type): New routine.
4519         (Preprocess_Components): New routine.
4520         (Process_Transient_Objects): New routine.
4521         (Wrap_HSS_In_Block): New routine.
4522         (Wrap_Transient_Declaration): Remove finalization list management and
4523         controller insertion.
4524         (Wrap_Transient_Expression): Code reformatting.
4525         (Wrap_Transient_Statement): Code reformatting.
4526         * exp_ch7.ads (Build_Final_List): Removed.
4527         (Build_Finalization_Collection): New routine.
4528         (Build_Raise_Statement): New routine.
4529         (Controller_Component): Removed.
4530         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
4531         (Find_Final_List): Removed.
4532         (In_Finalization_Root): Removed.
4533         (Is_Simple_Protected_Type): Update related comment.
4534         (Make_Adjust_Call): New parameter profile and associated comments.
4535         (Make_Attach_Call): Removed.
4536         (Make_Final_Call): New parameter profile and associated comments.
4537         (Make_Finalize_Address_Body): New routine.
4538         (Make_Init_Call): New parameter profile and associated comments.
4539         (Make_Local_Deep_Finalize): New routine.
4540         (Make_Set_Finalize_Address_Ptr_Call): New routine.
4541         (Needs_Finalization): Moved to Exp_Util.
4542         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
4543         (Expand_N_Protected_Body): Remove the handling of finalization lists.
4544         (Find_Protection_Type): Moved to Exp_Util.
4545         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
4546         (Make_DT): Update sequence of dispatch table initialization. Remove the
4547         initialization of field RC_Offset. Add initialization of field Needs_
4548         Finalization.
4549         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
4550         Reimplement how an object is first finalized, then deallocated.
4551         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4552         Code reformatting.
4553         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
4554         Register TSS_Finalize_Address with type TSS_Names.
4555         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
4556         procedure provides the interface between an allocation / deallocation
4557         and the support machinery in Ada.Finalization.Heap_Management.
4558         (Find_Init_Call): Code reformatting.
4559         (Find_Init_Call_In_List): Code reformatting.
4560         (Find_Protection_Type): Moved from Exp_Ch9.
4561         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
4562         (Has_Controlled_Coextensions): Removed.
4563         (Has_Controlled_Objects): New routine.
4564         (In_Library_Level_Package_Body): New routine.
4565         (Insert_Action_After): New routine.
4566         (Is_Finalizable_Transient): New routine. This predicate determines
4567         whether an object declaration is one of the many variants of controlled
4568         transients.
4569         (Is_Null_Access_BIP_Func_Call): New routine.
4570         (Is_Non_BIP_Func_Call): New routine.
4571         (Is_Related_To_Func_Return): New routine.
4572         (Needs_Finalization): Moved from Exp_Ch7.
4573         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
4574         (Find_Protection_Type): Moved from Exp_Ch9.
4575         (Has_Controlled_Coextensions): Removed.
4576         (Has_Controlled_Objects): New routine.
4577         (In_Library_Level_Package_Body): New routine.
4578         (Insert_Action_After): New routine.
4579         (Is_Finalizable_Transient): New routine.
4580         (Is_Null_Access_BIP_Func_Call): New routine.
4581         (Is_Non_BIP_Func_Call): New routine.
4582         (Is_Related_To_Func_Return): New routine.
4583         (Needs_Finalization): Moved from Exp_ch7.
4584         * expander.adb (Expand): Add a case for N_Free_Statement.
4585         * freeze.adb (Freeze_All): Replace the generation of a finalization
4586         list with a collection for access-to-controlled types.
4587         (Freeze_Entity): Code reformatting.
4588         (Freeze_Record_Type): Remove the freezing of a record controller
4589         component.
4590         (Freeze_Subprogram): Code reformatting.
4591         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
4592         finalization list.
4593         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
4594         has a library-level finalizer.
4595         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
4596         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
4597         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
4598         files. Add a-fihema to the list of object files.
4599         * par-ch4.adb:
4600         Alphabetize the associations in type Is_Parameterless_Attribute.
4601         * rtsfind.ads: Ada.Finalization_List.Controller and
4602         System.Finalization_Implementation are no longer a GNAT unit.
4603         Update the range of type Ada_Finalization_Child. Remove the following
4604         recoverable entities:
4605
4606            RE_Attach_To_Final_List
4607            RE_Deep_Tag_Attach
4608            RE_Finalize_List
4609            RE_Finalize_One
4610            RE_Finalizable_Ptr_Ptr
4611            RE_Global_Final_List
4612            RE_Limited_Record_Controller
4613            RE_List_Controller
4614            RE_Move_Final_List
4615            RE_Record_Controller
4616            RE_Simple_List_Controller
4617
4618         Add the following recoverable entities:
4619
4620            RE_Add_Offset_To_Address
4621            RE_Allocate
4622            RE_Base_Pool
4623            RE_Deallocate
4624            RE_Exception_Identity
4625            RE_Finalization_Collection
4626            RE_Finalization_Collection_Ptr
4627            RE_Needs_Finalization
4628            RE_Save_Library_Occurrence
4629            RE_Set_Finalize_Address_Ptr
4630            RE_Set_Storage_Pool_Ptr
4631            RE_Storage_Count
4632         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
4633         Name_uController.
4634         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
4635         (First_Stored_Discriminant): Remove the mention of Name_uController.
4636         * sem_aux.ads: Comment reformatting.
4637         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
4638         to redecorate an already existing class-wide type.
4639         (Decorate_Tagged_Type): New parameter profile and associated comment.
4640         Create a "shadow class-wide type" for a shadow entity.
4641         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
4642         of the final chain along with the associated comment.
4643         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
4644         Full_Desig and set it to the full view of the designated type.
4645         Initialize the finalization collection to empty.
4646         (Build_Derived_Record_Type): Alphabetize local variables. Code
4647         reformatting.
4648         (Collect_Fixed_Components): Remove the mention of Name_uController.
4649         (Create_Constrained_Components): Remove the mention of Name_uController.
4650         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
4651         class-wide type of a shadow entity.
4652         (Process_Full_View): Update the machinery which marks type
4653         Limited_Controlled's entity as limited.
4654         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
4655         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
4656         list, instead make a collection build-in-place formal.
4657         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
4658         a designated type in order to establish a match between the renaming
4659         and the renamed entity.
4660         (Find_Selected_Component): Add guard to prevent spurious exceptions
4661         from being raised on .NET/JVM.
4662         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
4663         to the list of primitive that need special processing. Update arrays
4664         C_Names and D_Names.
4665         (Replace_Types): Handle class-wide types.
4666         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
4667         different parameter profile, look at the first formal.
4668         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
4669         use clauses for Exp_Util.
4670         * sem_res.adb: Remove with and use clauses for Elists.
4671         (Propagate_Coextensions): Removed.
4672         (Resolve_Allocator): Do not propagate the list of coextensions from one
4673         allocator to another.
4674         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
4675         Deaccessed_T to Desig_Typ.
4676         (Enter_Name): Remove the mention of Name_uController.
4677         (Gather_Components): Remove the mention of Name_uController.
4678         (Incomplete_Or_Private_View): New routine.
4679         (Is_Coextension_Root): Removed.
4680         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
4681         * sem_util.ads (Incomplete_Or_Private_View): New routine.
4682         (Is_Coextension_Root): Removed.
4683         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
4684         Controlled types are now derived from a null tagged record. Remove
4685         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
4686         * sinfo.adb (Coextensions): Removed.
4687         (Set_Coextensions): Removed.
4688         * sinfo.ads: Remove Coextensions from the explanation of node fields
4689         and its uses in nodes.
4690         Update the field usage of N_Allocator.
4691         (Coextensions): Removed along with its pragma Inline.
4692         (Set_Coextensions): Removed along with its pragma Inline.
4693         * snames.ads-tmpl: Remove names
4694
4695           Name_uClean
4696           Name_uController
4697           Name_uFinal_List
4698           Name_uLocal_Final_List
4699           Name_Finalization_Root
4700           Name_Next
4701           Name_Prev
4702
4703         Add names
4704
4705           Name_uFinalizer
4706           Name_Finalize_Address
4707         * s-pooglo.adb (Allocate): Add overriding indicator.
4708         (Deallocate): Add overriding indicator.
4709         (Storage_Size): Add overriding indicator.
4710         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
4711         than Finalize_Global_List.
4712         (Null_Finalize_Global_List): Removed.
4713         (Save_Library_Occurrence): New routine.
4714         * s-soflin.ads: Remove variable Finalize_Global_List along with its
4715         initialization. Add variable Finalize_Library_Objects along with its
4716         pragma Export. Add variables Library_Exception and
4717         Library_Exception_Set along with their pragma Export.
4718         (Null_Finalize_Global_List): Removed.
4719         (Save_Library_Occurrence): New routine.
4720         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
4721         rather than Finalize_Global_List.
4722         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
4723         of the constructed node.
4724
4725 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4726
4727         * link.c: Include "auto-host.h" before system headers.
4728
4729 2011-08-03  Vincent Celier  <celier@adacore.com>
4730
4731         * make.adb (Gnatmake): Add to table Library_Projs only library projects
4732         that are not extended. Do not check if a library project that is
4733         extended should be regenerated. Do not add to table Library_Paths the
4734         libraries that are in extended projects. Link only with libraries that
4735         are in libray projects that are not extended.
4736         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
4737         for a library project that is extended.
4738
4739 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4740
4741         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
4742         conforming subprogram renamings that appear to be completions if they
4743         are not fully conformant.
4744         Such renamings are homographs but not completions.
4745         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
4746         names in a subprogram renaming that appears in an instance.
4747
4748 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4749
4750         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
4751         not immutably limited, build actual subtype from expression to provide
4752         proper bounds to caller.
4753
4754 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4755
4756         * sem_ch8.adb: Minor comment correction.
4757
4758 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4759
4760         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
4761         returning a limited array, use an extended return statement.
4762
4763 2011-08-03  Vincent Celier  <celier@adacore.com>
4764
4765         * make.adb (Initialize): If --subdirs= is used, but no project file is
4766         specified, attempt to create the specify subdir if it does not already
4767         exist and use it as the object directory as if -D had been specified.
4768
4769 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4770
4771         * s-tpopsp-vms.adb: New file.
4772         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4773         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4774
4775 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4776
4777         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4778         package.
4779
4780 2011-08-03  Yannick Moy  <moy@adacore.com>
4781
4782         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4783         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4784         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4785         detect that an array has static bounds.
4786
4787 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4788
4789         * exp_dist.adb: Minor reformatting.
4790
4791 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4792
4793         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4794         (ATCB_Key): Removed, not always used.
4795
4796 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4797
4798         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4799         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4800         most remaining global variables.
4801
4802 2011-08-03  Robert Dewar  <dewar@adacore.com>
4803
4804         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4805         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4806         reformatting.
4807
4808 2011-08-03  Javier Miranda  <miranda@adacore.com>
4809
4810         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
4811         that must be passed by copy in VM targets.
4812
4813 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4814
4815         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4816         duplicates a similar htable now in the project tree.
4817
4818 2011-08-03  Claire Dross  <dross@adacore.com>
4819
4820         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4821         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4822         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4823         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4824         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4825         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4826         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4827         update.
4828
4829 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4830
4831         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4832         (ATCB_Key): Removed, not always used.
4833         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4834         s-taprop-posix.adb.
4835         * s-tpopsp-tls.adb: New file.
4836         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4837         x86/x64/ia64/powerpc/sparc Linux.
4838
4839 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4840
4841         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4842         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4843
4844 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4845
4846         * rtsfind.ads, exp_dist.adb, exp_dist.ads
4847         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4848         Fix type selection for mapping integer types to PolyORB types.
4849
4850 2011-08-03  Bob Duff  <duff@adacore.com>
4851
4852         * sem_ch7.adb: Minor comment clarification.
4853
4854 2011-08-03  Bob Duff  <duff@adacore.com>
4855
4856         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4857         an error analyzing a choice, skip further processing. Further
4858         processing could cause a crash or cascade errors.
4859
4860 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4861
4862         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4863         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4864         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4865         prj-env.ads (Shared_Project_Tree_Data): new type
4866         An aggregate project and its aggregated trees need to share the common
4867         data structures used for lists of strings, packages,... This makes the
4868         code simpler since otherwise we have to pass the root tree (also used
4869         for the configuration file data) in addition to the current project
4870         tree. This also avoids ambiguities as to which tree should be used.
4871         And finally this saves a bit of memory.
4872         (For_Every_Project_Imported): new parameter Tree.
4873         Since aggregated projects are using a different tree, we need to let
4874         the caller know which tree to use to manipulate the returned project.
4875
4876 2011-08-03  Robert Dewar  <dewar@adacore.com>
4877
4878         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4879         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4880         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4881         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4882
4883 2011-08-03  Javier Miranda  <miranda@adacore.com>
4884
4885         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4886         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4887
4888 2011-08-03  Bob Duff  <duff@adacore.com>
4889
4890         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4891         the Base_Type.
4892
4893 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
4894
4895         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4896         g-sehash.ads: Fix typo. Update header.
4897
4898 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4899
4900         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4901         expansion.
4902
4903 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4904
4905         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4906         prefixes of private types along with records, since the selector may be
4907         a discriminant.
4908         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4909         private types along with records, since the selector may be a
4910         discriminant.
4911
4912 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4913
4914         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4915
4916 2011-08-03  Javier Miranda  <miranda@adacore.com>
4917
4918         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4919         Tagged_Type_Expansion.
4920
4921 2011-08-03  Yannick Moy  <moy@adacore.com>
4922
4923         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4924         violation when the argument of concatenation is the name of a
4925         constant.
4926
4927 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4928
4929         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4930         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4931         (Process_Declarative_Items): new parameter Child_Env.
4932
4933 2011-08-03  Yannick Moy  <moy@adacore.com>
4934
4935         * alfa.ads: Update format of ALFA section in ALI file in order to
4936         add a mapping from bodies to specs when both are present.
4937         (ALFA_Scope_Record): Add components for spec file/scope.
4938         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4939         present.
4940         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4941         collected, fill in the spec information when relevant.
4942         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4943         present.
4944
4945 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4946
4947         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4948         code unit to decide whether to add internally generated subprograms.
4949
4950 2011-08-03  Javier Miranda  <miranda@adacore.com>
4951
4952         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4953         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4954         be handled by copy in VM targets.
4955
4956 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4957
4958         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4959         code with Makeutl.Get_Switches.
4960         * prj-tree.adb: Update comment.
4961
4962 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4963
4964         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4965         subprogram with a limited formal that does not support external
4966         streaming.
4967
4968 2011-08-03  Yannick Moy  <moy@adacore.com>
4969
4970         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4971         continuation line
4972         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4973         not from current unit in two phases, because it is not possible to
4974         change the table while iterating over its content.
4975         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4976
4977 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4978
4979         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4980         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4981
4982 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4983
4984         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4985         and the component type is composite, this is ambiguous for predefined
4986         concatenation, but if the node is not overloaded and the entity is a use
4987         -defined function its profile can be used to resolve that aggregate.
4988
4989 2011-08-03  Robert Dewar  <dewar@adacore.com>
4990
4991         * exp_ch4.adb: Minor code cleanup.
4992
4993 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4994
4995         * exp_dist.adb: Do not generate distribution stubs if serious errors
4996         have been diagnosed.
4997
4998 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4999
5000         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
5001         the first formal of a primitive operation, go to the base type to
5002         handle properly an access to a derived type with constrained
5003         discriminants.
5004         * sem_type.adb (Disambiguate): an immediately visible operator hides a
5005         user-defined function that is only use-visible.
5006
5007 2011-08-03  Robert Dewar  <dewar@adacore.com>
5008
5009         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
5010         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
5011         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
5012         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
5013         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
5014         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
5015         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
5016         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
5017
5018 2011-08-03  Robert Dewar  <dewar@adacore.com>
5019
5020         * repinfo.adb (List_Mechanism): Add handling of
5021         Convention_Ada_Pass_By_XXX.
5022         * sem_mech.adb (Set_Mechanism): Ditto.
5023         * sem_prag.adb (Process_Convention): Add entries for
5024         Convention_Ada_Pass_By_XXX.
5025         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
5026
5027 2011-08-03  Pascal Obry  <obry@adacore.com>
5028
5029         * makeutl.adb: Minor reformatting.
5030
5031 2011-08-03  Vincent Celier  <celier@adacore.com>
5032
5033         * fname-uf.adb
5034         (Get_File_Name) If the file cannot be found when there are no config
5035         pragmas file and May_Fail is True, return No_File instead of the file
5036         name, to be consistent.
5037
5038 2011-08-03  Pascal Obry  <obry@adacore.com>
5039
5040         * adaint.c (__gnat_is_executable_file_attr): Avoid access
5041         to null pointer.
5042
5043 2011-08-03  Javier Miranda  <miranda@adacore.com>
5044
5045         * sem_ch13.adb
5046         (Same_Representation): In VM targets the representation of arrays with
5047         aliased components differs from arrays with non-aliased components.
5048
5049 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5050
5051         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
5052         not systematically lower case attribute indexes that contain no "."
5053         Fix definition of several Naming attributes, which take
5054         a unit name as index and therefore should be case insensitive.
5055         Minor refactoring (reduce length of variable names).
5056
5057 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5058
5059         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
5060
5061 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5062
5063         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
5064         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
5065         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
5066         prj-tree.ads (Prj.Tree.Environment): new type.
5067
5068 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5069
5070         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
5071         prj-tree.adb, prj-tree.ads (Environment): new type.
5072
5073 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5074
5075         * prj-tree.ads: Remove unused variable.
5076
5077 2011-08-03  Yannick Moy  <moy@adacore.com>
5078
5079         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
5080         issuing messages related to SPARK restriction violation.
5081
5082 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5083
5084         * sem_ch6.adb: guard against error nodes in return statements.
5085
5086 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5087
5088         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
5089         a warning can only appear on a configuration file, so emit warning
5090         without further checks.
5091
5092 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5093
5094         * s-interr.ads: add overriding keyword.
5095
5096 2011-08-03  Geert Bosch  <bosch@adacore.com>
5097
5098         * exp_attr.adb: Fix minor typo.
5099
5100 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5101
5102         * par-ch4.adb: improve error recovery.
5103
5104 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5105
5106         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
5107         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
5108         to Errout_Handling.
5109
5110 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5111
5112         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
5113         "external" as an attribute name in aggregate projects.
5114
5115 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
5116
5117         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
5118         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
5119         from 0, so we need to adjust.
5120
5121 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5122
5123         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
5124         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
5125
5126 2011-08-03  Yannick Moy  <moy@adacore.com>
5127
5128         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
5129         restriction on overloaded entity if the entity is not an operator.
5130
5131 2011-08-03  Yannick Moy  <moy@adacore.com>
5132
5133         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
5134         restrict.ads: Rename remaining Check_Formal_Restriction* into
5135         Check_SPARK_Restriction*.
5136
5137 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5138
5139         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
5140         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
5141         qualifier.
5142         (Project_Empty): removed
5143         (Empty_Project): new parameter Qualifier
5144         This is used to have fields specific to aggregate projects, cleaner
5145         New field to store the list of aggregated projects.
5146         (Check_Aggregate_Project): removed
5147         (Process_Aggregated_Projects, Free): new subprograms.
5148
5149 2011-08-03  Olivier Hainque  <hainque@adacore.com>
5150
5151         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
5152
5153 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5154
5155         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
5156         explicit dereference of an unconstrained type, create a constrained
5157         subtype for it, as is done for function calls that return an
5158         unconstrained type.
5159
5160 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5161
5162         * g-pehage.adb (Finalize): Avoid possible double-free.
5163
5164 2011-08-03  Steve Baird  <baird@adacore.com>
5165
5166         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
5167         Elab_Spec/Body attrs in CodePeer_Mode.
5168
5169 2011-08-03  Javier Miranda  <miranda@adacore.com>
5170
5171         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
5172         low bound is not known at compile time but they have no others choice.
5173         Done because in this case the bounds can be obtained directly from the
5174         aggregate.
5175
5176 2011-08-03  Ed Falis  <falis@adacore.com>
5177
5178         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
5179         on VxWorks SMP. Remove unusable constant ANY_CPU.
5180
5181 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5182
5183         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
5184         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
5185         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
5186         Prj.Env.Initialize_Empty): new subprograms
5187         (Get_Env, Find_Project): remove parameter Target_Name.
5188
5189 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5190
5191         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
5192         as a condition for the delayed call to Derived_Subprograms done for the
5193         case of the rewriting of a derived type that constrains the
5194         discriminants of its parent type.
5195         Avoids redundant subprogram derivations for private subtype derivations.
5196
5197 2011-08-03  Javier Miranda  <miranda@adacore.com>
5198
5199         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
5200         Build_Record_Aggr_Code.
5201         (Build_Record_Aggr_Code): Add missing support to initialize hidden
5202         discriminants in extension aggregates.
5203
5204 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5205
5206         * prj-pp.adb (Print): also output project qualifiers, since in
5207         particular "aggregate" is mandatory in an aggregate project.
5208
5209 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5210
5211         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
5212         (Debug_Output): new function.
5213
5214 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5215
5216         * gnat_ugn.texi: Document -Wstack-usage.
5217         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
5218
5219 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5220
5221         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
5222         have keyword LIMITED.
5223
5224 2011-08-03  Yannick Moy  <moy@adacore.com>
5225
5226         * alfa.adb, alfa.ads, alfa_test.adb: New files.
5227         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
5228         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
5229         section (does not happen in compiler, only if code directly calls
5230         Scan_ALI).
5231         * get_alfa.adb, get_alfa.ads: New files.
5232         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
5233         needed.
5234         * lib-xref-alfa.adb: New file.
5235         * lib-xref.adb, lib-xref.ads
5236         (Xref_Entry): redefine information needed in cross-references for ALFA.
5237         Push ALFA treatments in separated local package.
5238         (Enclosing_Subpragram_Or_Package): treat specially subprogram
5239         identifiers. Return entity of package body instead of spec. Return
5240         Empty for a scope with no location.
5241         (Generate_Reference): adapt to new components for ALFA information.
5242         Remove the need for D references on definitions.
5243         (Is_Local_Reference): moved to ALFA local package
5244         (Output_References): extract subfunction as Extract_Source_Name
5245         (Output_Local_References): remove procedure, replaced by filtering of
5246         cross-references in package ALFA and printing in Put_ALFA.
5247         (Write_Entity_Name): remove procedure
5248         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
5249         print exact name of entity as it appears in source file
5250         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
5251         * put_alfa.adb, put_alfa.ads: New files.
5252         * xref_lib.adb (Search_Xref): protect read of cross-references against
5253         reading other sections of the ALI file, in gnatxref
5254         (Search): protect read of cross-references against reading other
5255         sections of the ALI file, in gnatfind.
5256         * gcc-interface/Make-lang.in: Update dependencies.
5257
5258 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5259
5260         * sem_ch3.adb: Minor reformatting.
5261
5262 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
5263
5264         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
5265         raising an exception.
5266
5267 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5268
5269         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
5270         type, always use 1 as the lower bound or string, even if lower bound of
5271         context is not static, to handle properly null strings in a non-static
5272         context.
5273
5274 2011-08-03  Bob Duff  <duff@adacore.com>
5275
5276         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
5277         always legal on the right-hand side of an assignment statement; there
5278         is always an applicable index constraint in this case. Therefore, the
5279         check for Pkind = N_Assignment_Statement is now unconditional -- it
5280         doesn't depend on whether Is_Constrained (Typ).
5281
5282 2011-08-03  Robert Dewar  <dewar@adacore.com>
5283
5284         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
5285
5286 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5287
5288         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
5289         for an itype created within a generic unit.
5290
5291 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5292
5293         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
5294         suppresses all inlining.
5295
5296 2011-08-03  Robert Dewar  <dewar@adacore.com>
5297
5298         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
5299         exp_aggr.adb: Minor reformatting.
5300
5301 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5302
5303         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
5304         tagged assignment when discriminant checks are suppressed. This is
5305         useless and extremely costly in terms of static stack usage.
5306
5307 2011-08-03  Bob Duff  <duff@adacore.com>
5308
5309         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
5310         of generics, because this leads to the wrong entity in the wrong scope,
5311         causing (e.g.) pragma Export_Procedure to get an error if the entity is
5312         an instance.
5313         (Process_Interface_Name): Follow Alias for instances of generics, to
5314         correct for the above change.
5315
5316 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5317
5318         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
5319         is an integer literal it is always safe to replace the reference. In
5320         addition, if the reference appears in the generated code for an object
5321         declaration it is necessary to copy because otherwise the reference
5322         might be to the uninitilized value of the discriminant of the object
5323         itself.
5324
5325 2011-08-03  Pascal Obry  <obry@adacore.com>
5326
5327         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
5328         ACL used, in this case we want to check for ending .exe, not .exe
5329         anywhere in the path.
5330
5331 2011-08-03  Sergey Rybin  <rybin@adacore.com>
5332
5333         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5334         the tree structure (semantic decoration of references to record
5335         discriminants).
5336
5337 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5338
5339         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
5340         choices of a named array aggregate, bail out when any choices are
5341         marked as Errors_Posted.
5342
5343 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5344
5345         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
5346         in which entity is frozen, to handle properly loop variables in
5347         iterators.
5348
5349 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5350
5351         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
5352         subtype is not static, compute the upper bound using attributes, to
5353         handle properly index types that are not integer types.
5354
5355 2011-08-03  Bob Duff  <duff@adacore.com>
5356
5357         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
5358         Update copyright notice.
5359
5360 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5361
5362         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
5363         Original_Discriminant if within an instance.
5364         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
5365
5366 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5367
5368         * einfo.ads: Minor reformatting.
5369
5370 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5371
5372         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
5373         composite type with an unfrozen subcomponent, in the profile of a
5374         primitive operation.
5375
5376 2011-08-03  Robert Dewar  <dewar@adacore.com>
5377
5378         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5379
5380 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5381
5382         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
5383         unconstrained type with discriminants is initialized with an aggregate,
5384         use the constrained subtype of the aggregate as the type of the object,
5385         because it is immutable, and this allows the back-end to generate no
5386         code for the object declaration.
5387
5388 2011-08-03  Robert Dewar  <dewar@adacore.com>
5389
5390         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
5391         comparison operand is variable, and turns out to be zero or negative.
5392
5393 2011-08-03  Javier Miranda  <miranda@adacore.com>
5394
5395         * exp_intr.adb
5396         (Expand_Dispatching_Constructor_Call): Disable expansion of
5397         code required for native targets. Done to avoid generating
5398         references to unavailable runtime entities in VM targets.
5399         * exp_ch3.adb
5400         (Expand_N_Object_Declaration): Add missing support to handle
5401         the explicit initialization of class-wide interface objects.
5402         Fix documentation.
5403
5404 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5405
5406         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
5407
5408 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5409
5410         * a-cbdlli.adb (Splice): move source items from first to last
5411
5412 2011-08-03  Yannick Moy  <moy@adacore.com>
5413
5414         * sem_util.ads: comment added.
5415
5416 2011-08-03  Javier Miranda  <miranda@adacore.com>
5417
5418         * exp_aggr.adb
5419         (Expand_Record_Aggregate): In VM targets disable the expansion into
5420         assignments of aggregates whose type is not known at compile time.
5421
5422 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5423
5424         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
5425         protected entries and task entries, to build the proper renaming
5426         declaration for entry formals, used in debugging.
5427         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
5428         parameters in the same way.
5429
5430 2011-08-02  Robert Dewar  <dewar@adacore.com>
5431
5432         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
5433         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
5434         code reorganization.
5435
5436 2011-08-02  Robert Dewar  <dewar@adacore.com>
5437
5438         * debug.adb: Debug flag d.P to suppress length comparison optimization
5439         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
5440         comparison of Length by comparing First/Last instead.
5441
5442 2011-08-02  Matthew Heaney  <heaney@adacore.com>
5443
5444         * a-cobove.ads: Code clean up.
5445
5446 2011-08-02  Vincent Celier  <celier@adacore.com>
5447
5448         * adaint.c (file_names_case_sensitive_cache): New static int.
5449         (__gnat_get_file_names_case_sensitive): Cache the return value in
5450         file_names_case_sensitive_cache at the first invocation, to avoid
5451         multiple calls to getenv.
5452
5453 2011-08-02  Bob Duff  <duff@adacore.com>
5454
5455         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
5456
5457 2011-08-02  Yannick Moy  <moy@adacore.com>
5458
5459         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
5460         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
5461         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
5462         indicate that we are in a precondition or postcondition. This is used in
5463         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
5464         decide whether to flag the spec or body of the current subprogram as
5465         not in ALFA.
5466
5467 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
5468
5469         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
5470         list.
5471         * a-extiin.ads: New file.
5472
5473 2011-08-02  Bob Duff  <duff@adacore.com>
5474
5475         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
5476         now raises Name_Error instead of Use_Error in certain cases. The other
5477         parts of this AI were already implemented properly.
5478
5479 2011-08-02  Vincent Celier  <celier@adacore.com>
5480
5481         * link.c: Only import "auto-host.h" when building the gnattools.
5482
5483 2011-08-02  Yannick Moy  <moy@adacore.com>
5484
5485         * sem_util.adb: Inter-unit inlining does not work for a subprogram
5486         which calls a local subprogram, so extract subprogram
5487         from Mark_Non_ALFA_Subprogram_Body.
5488
5489 2011-08-02  Javier Miranda  <miranda@adacore.com>
5490
5491         * exp_ch9.adb
5492         (Extract_Dispatching_Call): If the type of the dispatching object is an
5493         access type then return an explicit dereference in the Object out-mode
5494         parameter.
5495
5496 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5497
5498         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
5499         compatibility checks for all indexes of an array subtype, not just the
5500         first. Reset Has_Dynamic_Range_Check on the subtype before each
5501         potential check to ensure that Insert_Range_Checks will not elide any
5502         of the dynamic checks.
5503
5504 2011-08-02  Yannick Moy  <moy@adacore.com>
5505
5506         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
5507         SPARK restriction at parsing time.
5508         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
5509         directive only if the SPARK restriction is set for this unit.
5510
5511 2011-08-02  Yannick Moy  <moy@adacore.com>
5512
5513         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
5514         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
5515         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
5516         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
5517         Mark_Non_ALFA_Subprogram_Body.
5518         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
5519         inlined.
5520
5521 2011-08-02  Yannick Moy  <moy@adacore.com>
5522
5523         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
5524         might be costly.
5525
5526 2011-08-02  Robert Dewar  <dewar@adacore.com>
5527
5528         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
5529         exp_ch3.adb: Minor reformatting.
5530
5531 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5532
5533         * adaint.c (__gnat_locate_exec_on_path): only returns executable
5534         files, not any regular file.
5535         (__gnat_locate_file_with_predicate): new subprogram.
5536
5537 2011-08-02  Yannick Moy  <moy@adacore.com>
5538
5539         * sinfo.adb, sinfo.ads: Restrict the use of flags
5540         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
5541         nodes, plus N_Subtype_Declaration for the 2nd one.
5542
5543 2011-08-02  Sergey Rybin  <rybin@adacore.com>
5544
5545         * gnat_rm.texi: Ramification of pragma Eliminate documentation
5546          - fix bugs in the description of Source_Trace;
5547          - get rid of UNIT_NAME;
5548
5549 2011-08-02  Javier Miranda  <miranda@adacore.com>
5550
5551         * exp_ch9.adb
5552         (Build_Dispatching_Requeue): Adding support for VM targets
5553         since we cannot directly reference the Tag entity.
5554         * exp_sel.adb (Build_K): Adding support for VM targets.
5555         (Build_S_Assignment): Adding support for VM targets.
5556         * exp_disp.adb
5557         (Default_Prim_Op_Position): In VM targets do not restrict availability
5558         of predefined interface primitives to compiling in Ada 2005 mode.
5559         (Is_Predefined_Interface_Primitive): In VM targets this service is not
5560         restricted to compiling in Ada 2005 mode.
5561         (Make_VM_TSD): Generate code that declares and initializes the OSD
5562         record. Needed to support dispatching calls through synchronized
5563         interfaces.
5564         * exp_ch3.adb
5565         (Make_Predefined_Primitive_Specs): Enable generation of predefined
5566         primitives associated with synchronized interfaces.
5567         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5568         primitives associated with synchronized interfaces.
5569
5570 2011-08-02  Yannick Moy  <moy@adacore.com>
5571
5572         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5573         statements hidden in SPARK if preceded by the HIDE directive
5574         (Parse_Exception_Handlers): mark each exception handler in a sequence of
5575         exception handlers as hidden in SPARK if preceded by the HIDE directive
5576         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5577         if starting with the HIDE directive
5578         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5579         starting with the HIDE directive; mark the declarations in a private
5580         part as hidden in SPARK if the private part starts with the HIDE
5581         directive
5582         * restrict.adb, restrict.ads
5583         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5584         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5585         argument node belongs to a part which is hidden in SPARK
5586         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5587         parts in SPARK; protect the possibly costly call to
5588         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5589         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5590         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5591         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5592         Tok_SPARK_Hide.
5593         (Scan): recognize special comment starting with '#' and followed by
5594         SPARK keyword "hide" as a HIDE directive.
5595
5596 2011-08-02  Yannick Moy  <moy@adacore.com>
5597
5598         * types.ads, erroutc.ads: Minor reformatting.
5599
5600 2011-08-02  Vincent Celier  <celier@adacore.com>
5601
5602         * link.c: Add response file support for cross platforms.
5603
5604 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5605
5606         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5607         in an association, set parent field of copy before partial analysis.
5608         * sem_res.adb (Resolve_Slice): create reference to itype only when
5609         expansion is enabled.
5610
5611 2011-08-02  Yannick Moy  <moy@adacore.com>
5612
5613         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5614         for new flag denoting which subprogram bodies are in ALFA
5615         * restrict.adb, sem_ch7.adb: Update comment
5616         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5617         sem_ch9.adb, sem_res.adb: Add calls to
5618         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5619         * sem_ch6.adb (Analyze_Function_Return): add calls to
5620         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5621         middle of the body, and extended return.
5622         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5623         False when missing return.
5624         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5625         to True for subprograms whose spec is in ALFA. Remove later on the flag
5626         on the entity used for a subprogram body when there exists a separate
5627         declaration.
5628         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5629         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5630         False, otherwise do nothing.
5631
5632 2011-08-02  Robert Dewar  <dewar@adacore.com>
5633
5634         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5635
5636 2011-08-02  Yannick Moy  <moy@adacore.com>
5637
5638         * sem_ch4.ads: minor formatting.
5639
5640 2011-08-02  Yannick Moy  <moy@adacore.com>
5641
5642         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5643         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5644         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5645         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5646         opt.ads: cleanup of SPARK mode
5647
5648 2011-08-02  Yannick Moy  <moy@adacore.com>
5649
5650         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5651         types.
5652         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5653         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5654         * sem_ch3.adb
5655         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5656         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5657         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5658         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5659         types.
5660         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5661         non-static range.
5662         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5663         functions whose return type is not in ALFA.
5664         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5665         specifications.
5666         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5667         parameter's type is not in ALFA.
5668         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5669         types are in ALFA.
5670
5671 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5672
5673         * sem_ch6 (Analyze_Expression_Function): treat the function as
5674         Inline_Always, and introduce a subprogram declaration for it when it is
5675         not a completion.
5676         * inline.adb (Add_Inlined_Body): recognize bodies that come from
5677         expression functions, so that the back-end can determine whether they
5678         can in fact be inlined.
5679         * sem_util.adb (Is_Expression_Function): predicate to determine whether
5680         a function body comes from an expression function.
5681
5682 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5683
5684         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5685         null exclusions to test Can_Never_Be_Null on the anonymous access types
5686         of the formals rather than testing the formals themselves. Exclude this
5687         check in cases where the Old_Formal is marked as a controlling formal,
5688         to avoid issuing spurious errors for bodies completing dispatching
5689         operations (due to the flag not getting set on controlling access
5690         formals in body specs).
5691         (Find_Corresponding_Spec): When checking full and subtype conformance of
5692         subprogram bodies in instances, pass Designated and E in that order, for
5693         consistency with the expected order of the formals (New_Id followed by
5694         Old_Id).
5695
5696 2011-08-02  Robert Dewar  <dewar@adacore.com>
5697
5698         * sem_ch8.adb: Minor reformatting.
5699
5700 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5701
5702         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5703         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5704         primitive operations of class-wide actuals.
5705
5706 2011-08-02  Javier Miranda  <miranda@adacore.com>
5707
5708         * exp_atag.ads, exp_atag.adb
5709         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5710         since its value is implicitly passed in argument Typ.
5711         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5712         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5713         Build_Common_Dispatching_Select_Statements.
5714
5715 2011-08-02  Robert Dewar  <dewar@adacore.com>
5716
5717         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5718         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5719         Minor reformatting.
5720
5721 2011-08-02  Robert Dewar  <dewar@adacore.com>
5722
5723         * sem_res.adb: Minor reformatting.
5724         * sem_prag.adb: Minor reformatting.
5725
5726 2011-08-02  Javier Miranda  <miranda@adacore.com>
5727
5728         * exp_atag.adb, exp_atags.ads
5729         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5730         by the tagged type Entity. Required to use this routine in the VM
5731         targets since we do not have available the Tag entity in the VM
5732         platforms.
5733         * exp_ch6.adb
5734         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5735         Ada.Tags has not been previously loaded.
5736         * exp_ch7.adb
5737         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5738         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5739         * sem_aux.adb
5740         (Enclosing_Dynamic_Scope): Add missing support to handle the full
5741         view of enclosing scopes. Required to handle enclosing scopes that
5742         are synchronized types whose full view is a task type.
5743         * exp_disp.adb
5744         (Build_VM_TSDs): Minor code improvement to avoid generating and
5745         analyzing lists with empty nodes.
5746         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5747         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5748         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5749         (Make_Disp_Timed_Select_Body): Add support for VM targets.
5750         (Make_Select_Specific_Data_Table): Add support for VM targets.
5751         (Make_VM_TSD): Generate code to initialize the SSD structure of
5752         the TSD.
5753
5754 2011-08-02  Yannick Moy  <moy@adacore.com>
5755
5756         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5757         cross-references section in ALI.
5758         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5759         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5760         Sub).
5761         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5762         subprogram or package entity of a node
5763         (Is_Local_Reference_Type): new function returns True for references
5764         selected in local cross-references.
5765         (Lt): function extracted from Lt in Output_References
5766         (Write_Entity_Name): function extracted from Output_References
5767         (Generate_Definition): generate reference with type 'D' for definition
5768         of objects (object declaration and parameter specification), with
5769         appropriate locations and units, for use in local cross-references.
5770         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5771         references of type 'I' for initialization in object definition.
5772         (Output_References): move part of function Lt and procedure
5773         Write_Entity_Name outside of the body. Ignore references of types 'D'
5774         and 'I' introduced for local cross-references.
5775         (Output_Local_References): new procedure to output the local
5776         cross-references sections.
5777         (Lref_Entity_Status): new array defining whether an entity is a local
5778         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5779         with 'I' type when initialization expression is present.
5780         * get_scos.adb, get_scos.ads: Correct comments and typos
5781
5782 2011-08-02  Javier Miranda  <miranda@adacore.com>
5783
5784         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5785         the JVM target.
5786         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5787         the JVM target.
5788         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5789         TSD support.
5790
5791 2011-08-02  Vincent Celier  <celier@adacore.com>
5792
5793         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5794         (No_Space_Img): New function
5795         (Find_Excluded_Sources): When reading from a file, record the file name
5796         and the line number for each excluded source.
5797         (Mark_Excluded_Sources): When reporting an error, if the excluded
5798         sources were read from a file, include file name and line number in
5799         the error message.
5800
5801 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5802
5803         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5804
5805 2011-08-02  Robert Dewar  <dewar@adacore.com>
5806
5807         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5808
5809 2011-08-02  Javier Miranda  <miranda@adacore.com>
5810
5811         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5812         generation of TSDs to the DOTNET compiler.
5813         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5814         generation of TSDs to the DOTNET compiler.
5815
5816 2011-08-02  Javier Miranda  <miranda@adacore.com>
5817
5818         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5819         record of all the tagged types declared inside library level package
5820         declarations, library level package bodies or library level subprograms.
5821         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5822         associated with a given tagged type.
5823         (Build_VM_TSDs): New subprogram.
5824         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5825         compilation units that are subprograms.
5826         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5827         compilation units that are package bodies.
5828         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5829         units that are a package declaration or a package instantiation.
5830         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5831         reorganization to improve the error generated by the frontend when the
5832         function Ada.Tags.Secondary_Tag is not available.
5833         * rtsfind.ads (RE_Register_TSD): New runtime entity.
5834         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5835
5836 2011-08-02  Javier Miranda  <miranda@adacore.com>
5837
5838         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5839
5840 2011-08-02  Robert Dewar  <dewar@adacore.com>
5841
5842         * s-imenne.ads: Minor reformatting.
5843
5844 2011-08-02  Robert Dewar  <dewar@adacore.com>
5845
5846         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5847         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5848         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5849
5850 2011-08-02  Robert Dewar  <dewar@adacore.com>
5851
5852         * einfo.ads (Materialize_Entity): Document this is only for renamings
5853         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5854         required debug information in the case where we transform the object
5855         declaration into a renaming declaration.
5856         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5857         object
5858         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5859         Materialize_Entity.
5860
5861 2011-08-02  Robert Dewar  <dewar@adacore.com>
5862
5863         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5864         Suppress_Init_Procs.
5865         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5866         Suppress_Initialization/Initialization_Suppressed.
5867         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5868         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5869         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5870         * sem_prag.adb: New processing for pragma Suppress_Initialization.
5871
5872 2011-08-02  Robert Dewar  <dewar@adacore.com>
5873
5874         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5875         Minor reformatting.
5876
5877 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5878
5879         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5880         only have inheritable classwide pre/postconditions.
5881
5882 2011-08-02  Javier Miranda  <miranda@adacore.com>
5883
5884         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5885         * rtsfind.ads (RE_Check_TSD): New runtime entity.
5886         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5887         checks if the external tag of a type is the same as the external tag
5888         of some other declaration.
5889
5890 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5891
5892         * s-taskin.ads: Minor reformatting.
5893
5894 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5895
5896         * g-comlin.adb (Display_Help): swap the order in which it prints the
5897         short help and the general usage.
5898
5899 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5900
5901         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5902         the aspect declarations and attach them to the generic copy for
5903         subsequent analysis.
5904         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5905         declarations of the generic tree to the new subprogram declarations.
5906         * sem_attr.adb (Check_Precondition_Postcondition): recognize
5907         conditions that apply to a subprogram instance.
5908
5909 2011-08-02  Robert Dewar  <dewar@adacore.com>
5910
5911         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5912
5913 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5914
5915         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5916         private type with a tagged full view is not derived in the immediate
5917         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5918
5919 2011-08-02  Robert Dewar  <dewar@adacore.com>
5920
5921         * exp_ch4.adb: Minor reformatting.
5922
5923 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5924
5925         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
5926         Ada2012 iterator, the loop will be rewritten during expansion into a
5927         while loop with a cursor and an element declaration. Do not analyze the
5928         body in this case, because if the container is for indefinite types the
5929         actual subtype of the elements will only be determined when the cursor
5930         declaration is analyzed.
5931
5932 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5933
5934         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5935         size/alignment related attributes in CodePeer_Mode.
5936
5937 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5938
5939         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5940         Prepend_Element, since this can result in the operation getting the
5941         wrong slot in the full type's dispatch table if the full type has
5942         inherited operations. The incomplete type's operation will get added
5943         to the proper position in the full type's primitives
5944         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5945         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5946         dispatching operations, since there are cases where nonprimitive
5947         subprograms can get added to the list of incomplete dependents (such
5948         as subprograms in nested packages).
5949         * sem_ch6.adb (Process_Formals): First, remove test for being in a
5950         private part when determining whether to add a primitive with a
5951         parameter of a tagged incomplete type to the Private_Dependents list.
5952         Such primitives can also occur in the visible part, and should not have
5953         been excluded from being private dependents.
5954         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5955         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5956         list of a Taft-amendment incomplete type is a primitive before issuing
5957         an error that the full type must appear in the same unit. There are
5958         cases where nonprimitives can be in the list (such as subprograms in
5959         nested packages).
5960         * sem_disp.adb (Derives_From): Use correct condition for checking that
5961         a formal's type is derived from the type of the corresponding formal in
5962         the parent subprogram (the condition was completely wrong). Add
5963         checking that was missing for controlling result types being derived
5964         from the result type of the parent operation.
5965
5966 2011-08-02  Yannick Moy  <moy@adacore.com>
5967
5968         * errout.adb (First_Node): minor renaming
5969         * restrict.adb (Check_Formal_Restriction): put restriction warning on
5970         first node.
5971
5972 2011-08-02  Yannick Moy  <moy@adacore.com>
5973
5974         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5975         before accessing operands.
5976         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5977         decide whether an initialization expression respects SPARK rules, as
5978         the plain node is the expanded one. This allows for more valid warnings
5979         to be issued.
5980         * gnat_rm.texi: Minor update.
5981
5982 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5983
5984         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5985         previous change.
5986
5987 2011-08-02  Robert Dewar  <dewar@adacore.com>
5988
5989         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5990
5991 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5992
5993         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5994         loop statements and the element renaming declaration with a block when
5995         the element type is controlled.
5996
5997 2011-08-02  Yannick Moy  <moy@adacore.com>
5998
5999         * sinfo.ads: Minor formatting.
6000
6001 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6002
6003         * sem_aggr.adb (Add_Association): if the association has a box and no
6004         expression, use the Sloc of the aggregate itself for the new
6005         association.
6006         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
6007         the Original_Node.
6008
6009 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6010
6011         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
6012         When a container is provided via a function call, generate a renaming
6013         of the function result. This avoids the creation of a transient scope
6014         and the premature finalization of the container.
6015         * exp_ch7.adb (Is_Container_Cursor): Removed.
6016         (Wrap_Transient_Declaration): Remove the supression of the finalization
6017         of the list controller when the declaration denotes a container cursor,
6018         it is not needed.
6019
6020 2011-08-02  Yannick Moy  <moy@adacore.com>
6021
6022         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
6023         node is from source, instead of the original node being from source.
6024         * sem_aggr.adb
6025         (Resolve_Array_Aggregate): refine the check for a static expression, to
6026         recognize also static ranges
6027         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
6028         Array_Type_Declaration): postpone the test for the type being a subtype
6029         mark after the type has been resolved, so that component-selection and
6030         expanded-name are discriminated.
6031         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
6032         to distinguish the case of an iteration scheme, so that an error is
6033         issed on a non-static range in SPARK except in an iteration scheme.
6034         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
6035         In_Iter_Schm = True.
6036         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
6037         user-defined operators so that they are allowed in renaming
6038         * sem_ch8.adb
6039         (Find_Selected_Component): refine the check for prefixing of operators
6040         so that they are allowed in renaming. Move the checks for restrictions
6041         on selector name after analysis discriminated between
6042         component-selection and expanded-name.
6043         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
6044         concatenation argument of string type if it is static.
6045         * sem_util.adb, sem_util.ads
6046         (Check_Later_Vs_Basic_Declarations): add a new function
6047         Is_Later_Declarative_Item to decice which declarations are allowed as
6048         later items, in the two different modes Ada 83 and SPARK. In the SPARK
6049         mode, add that renamings are considered as later items.
6050         (Enclosing_Package): new function to return the enclosing package
6051         (Enter_Name): correct the rule for homonyms in SPARK
6052         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
6053         from source (result of expansion) to avoid issuing wrong warnings.
6054
6055 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6056
6057         * errout.adb: On anything but an expression First_Node returns its
6058         argument.
6059
6060 2011-08-02  Pascal Obry  <obry@adacore.com>
6061
6062         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6063
6064 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6065
6066         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6067         Set the associated loop as the related expression of internally
6068         generated cursors.
6069         * exp_ch7.adb (Is_Container_Cursor): New routine.
6070         (Wrap_Transient_Declaration): Supress the finalization of the list
6071         controller when the declaration denotes a container cursor.
6072
6073 2011-08-02  Yannick Moy  <moy@adacore.com>
6074
6075         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6076         command line now.
6077         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6078         expression is a simple expression. This check cannot be performed in
6079         the semantics, so just drop it.
6080         (P_Index_Or_Discriminant_Constraint): move check that the index or
6081         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6082         semantics. Other cases were previously checked in the semantics.
6083         * par-ch4.adb (P_Name): move checks that a selector name is not
6084         character literal or an operator symbol to Find_Selected_Component in
6085         the semantics
6086         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6087         declarations are not placed after later declarations in a separate
6088         procedure in Sem_Util (possibly not the best choice?), to be used both
6089         during parsing, for Ada 83 mode, and during semantic analysis, for
6090         SPARK mode.
6091         * par-endh.adb (Check_End): move check that end label is not missing
6092         to Process_End_Label in the semantics
6093         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6094         the special case for SPARK restriction
6095         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6096         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6097         parameter Force to issue the error message even on internal node (used
6098         for generated end label). Call Check_Restriction to check when an error
6099         must be issued. In SPARK mode, issue an error message even if the
6100         restriction is not set.
6101         (Check_Restriction): new procedure with an additional out parameter to
6102         inform the caller that a message has been issued
6103         * sem_aggr.adb: Minor modification of message
6104         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6105         instead of issuing an error message directly
6106         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6107         declarations are not placed after later declarations, by calling
6108         Check_Later_Vs_Basic_Declarations
6109         (Analyze_Subtype_Declaration): move here the check that an index or
6110         discriminant constraint must be a subtype mark. Change the check that
6111         a subtype of String must start at one so that it works on subtype marks.
6112         * sem_ch4.adb (Analyze_Call): move here the check that a named
6113         association cannot follow a positional one in a call
6114         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6115         instead of issuing an error message directly
6116         * sem_ch8.adb (Find_Selected_Component): move here the check that a
6117         selector name is not a character literal or an operator symbol. Move
6118         here the check that the prefix of an expanded name cannot be a
6119         subprogram or a loop statement.
6120         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6121         procedure called from parsing and semantics to check that basic
6122         declarations are not placed after later declarations
6123         (Process_End_Label): move here the check that end label is not missing
6124
6125 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6126
6127         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
6128         representation clause in codepeer mode, since it confuses CodePeer and
6129         does not bring useful info.
6130
6131 2011-08-02  Ed Falis  <falis@adacore.com>
6132
6133         * init.c: initialize fp hw on MILS.
6134
6135 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6136
6137         * errout.adb (First_Node): for bodies, return the node itself (small
6138         optimization). For other nodes, do not check source_unit if the node
6139         comes from Standard.
6140
6141 2011-08-02  Robert Dewar  <dewar@adacore.com>
6142
6143         * exp_ch3.adb: Minor comment additions.
6144         * sem_ch13.adb: Minor reformatting.
6145
6146 2011-08-02  Pascal Obry  <obry@adacore.com>
6147
6148         * make.adb, makeutl.adb: Removes some superfluous directory separator.
6149
6150 2011-08-02  Robert Dewar  <dewar@adacore.com>
6151
6152         * sem_attr.adb: Minor reformatting.
6153
6154 2011-08-02  Robert Dewar  <dewar@adacore.com>
6155
6156         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
6157         (Has_Default_Component_Value): Removed
6158         * einfo.ads Comment updates
6159         (Has_Default_Aspect): Replaces Has_Default_Value
6160         (Has_Default_Component_Value): Removed
6161         * exp_ch13.adb
6162         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
6163         * exp_ch3.adb
6164         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
6165         (Get_Simple_Init_Val): Handle Default_Value aspect
6166         (Needs_Simple_Initialization): Handle Default_Value aspect
6167         * exp_ch3.ads: Needs_Simple_Initialization
6168         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
6169         * par-prag.adb (Pragma_Default[_Component]Value) Removed
6170         * sem_ch13.adb
6171         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
6172         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
6173         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
6174
6175 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6176
6177         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
6178         package containing iteration primitives.
6179         exp_ch5.adb (Expand_Iterator_Loop): ditto.
6180
6181 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6182
6183         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
6184         "of", pre-analyze expression in case it is a function call with
6185         finalization actions that must be placed ahead of the loop.
6186         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
6187         on an Ada2012 iterator, insert them ahead of the rewritten loop.
6188
6189 2011-08-02  Geert Bosch  <bosch@adacore.com>
6190
6191         * cstand.adb (Create_Float_Types): Only consider C's long double for
6192         Long_Long_Float, in addition to double.
6193
6194 2011-08-02  Robert Dewar  <dewar@adacore.com>
6195
6196         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
6197         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
6198         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
6199         Minor reformatting.
6200
6201 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6202
6203         * sem_attr.adb: handle properly 'Result when it is a prefix of an
6204         indexed component.
6205
6206 2011-08-02  Javier Miranda  <miranda@adacore.com>
6207
6208         * einfo.ads, einfo.adb
6209         (Original_Access_Type): Move this attribute to Node26 since there was
6210         an undocumented use of Node21 in E_Access_Subprogram_Type entities
6211         which causes conflicts and breaks the generation of the .NET compiler.
6212         (Interface_Name): Add missing documentation on JGNAT only uses of
6213         this attribute.
6214
6215 2011-08-02  Geert Bosch  <bosch@adacore.com>
6216
6217         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
6218         (Find_Back_End_Float_Type): Likewise
6219         (Create_Back_End_Float_Types): Likewise
6220         (Create_Float_Types): Likewise
6221         (Register_Float_Type): Likewise
6222         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6223         Nlist and split out type selection in new local Find_Base_Type function.
6224         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6225         Nlist
6226         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6227
6228 2011-08-02  Robert Dewar  <dewar@adacore.com>
6229
6230         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6231         alpha order).
6232         * opt.ads: Minor comment change.
6233         * sem_ch12.adb: Minor code reorganization.
6234
6235 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6236
6237         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6238         subtype's list of rep items to the list on the full subtype in the case
6239         where the lists are the same.
6240
6241 2011-08-02  Geert Bosch  <bosch@adacore.com>
6242
6243         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6244         using the one from System.Strings, which also deallocates all strings.
6245
6246 2011-08-02  Geert Bosch  <bosch@adacore.com>
6247
6248         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6249         function.
6250         * gcc-interface/Make-lang.in: Update dependencies.
6251
6252 2011-08-02  Olivier Hainque  <hainque@adacore.com>
6253
6254         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6255         end_locus.
6256
6257 2011-08-02  Javier Miranda  <miranda@adacore.com>
6258
6259         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6260         associated with anonymous access to subprograms.
6261
6262 2011-08-02  Geert Bosch  <bosch@adacore.com>
6263
6264         * opt.ads
6265         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6266         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6267         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6268         (Add_Symbol_Definition): Move to switch-c.adb
6269         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6270         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6271         (Add_Symbol_Definition): Move to switch-c.adb.
6272         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6273         * sem_warn.adb
6274         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6275         Move to warnsw.adb.
6276         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6277         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6278         Move to warnsw.adb.
6279         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6280         (Add_Symbol_Definition): Moved from Prepcomp.
6281         * switch-c.ads: Update copyright notice. Use String_List instead of
6282         Argument_List, removing dependency on System.OS_Lib.
6283
6284 2011-08-02  Yannick Moy  <moy@adacore.com>
6285
6286         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6287         mode on initialization expression which does not respect SPARK
6288         restrictions.
6289         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6290         if the tree referenced by its argument represents an initialization
6291         expression in SPARK, suitable for initializing an object in an object
6292         declaration.
6293
6294 2011-08-02  Javier Miranda  <miranda@adacore.com>
6295
6296         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6297         internally generated access to subprogram with its associated protected
6298         subprogram type.
6299         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6300
6301 2011-08-02  Geert Bosch  <bosch@adacore.com>
6302
6303         * cstand.adb (Register_Float_Type): Print information about type to
6304         register, if the Debug_Flag_Dot_B is set.
6305         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6306         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6307         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6308         with a requested precision of more than Max_Digits digits and no more
6309         than Max_Base_Digits digits, if a range specification is present and the
6310         Predefined_Float_Types list has a suitable type to derive from.
6311         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6312         case of type completion with pragma Import
6313         * sem_prag.adb
6314         (Process_Import_Predefined_Type): Processing to complete a type
6315         with pragma Import. Currently supports floating point types only.
6316         (Set_Convention_From_Pragma): Do nothing without underlying type.
6317         (Process_Convention): Guard against absence of underlying type,
6318         which may happen when importing incomplete types.
6319         (Process_Import_Or_Interface): Handle case of importing predefined
6320         types. Tweak error message.
6321
6322 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6323
6324         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6325         functions to previous change.  Reorganize code slightly.
6326
6327 2011-08-02  Geert Bosch  <bosch@adacore.com>
6328
6329         * back_end.ads (Register_Type_Proc): New call back procedure type for
6330         allowing the back end to provide information about available types.
6331         (Register_Back_End_Types): New procedure to register back end types.
6332         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6333         available types.
6334         * cstand.adb (Back_End_Float_Types): New list for floating point types
6335         supported by the back end.
6336         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6337         (Copy_Float_Type): New procedure to make new copies of predefined types.
6338         (Register_Float_Type): New call back procedure to populate the BEFT list
6339         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6340         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6341         (Create_Float_Types): New procedure to create entities for floating
6342         point types predefined in Standard, and put these and any remaining
6343         BEFTs on the Predefined_Float_Types list.
6344         * stand.ads (Predefined_Float_Types): New list for predefined floating
6345         point types that do not have declarations in package Standard.
6346
6347 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6348
6349         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
6350         entity node for the unit containing the parameter.
6351         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6352         (Add_Inlined_Subprogram): Likewise.
6353         * gcc-interface/Make-lang.in: Update dependencies.
6354
6355 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6356
6357         * s-stusta.adb (Print): Make sure Pos is always initialized to a
6358         suitable value.
6359
6360 2011-08-02  Geert Bosch  <bosch@adacore.com>
6361
6362         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6363
6364 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6365
6366         * sem_type.adb (Covers): Move trivial case to the top and reuse the
6367         computed value of Base_Type.
6368
6369 2011-08-02  Yannick Moy  <moy@adacore.com>
6370
6371         * restrict.adb (Check_Restriction): issue an error for any use of
6372         class-wide, even if the No_Dispatch restriction is not set.
6373         * sem_aggr.adb: Correct typos in comments and messages in formal mode
6374         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6375         when completing a private extension, the type named in the private part
6376         is not the same as that named in the visible part.
6377         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6378         of an inherited primitive operations of a tagged type or type extension
6379         that returns the tagged type.
6380         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6381         function which returns True for an implicit operation inherited by the
6382         derived type declaration for the argument type.
6383         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6384         order.
6385
6386 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6387
6388         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6389         Process_Bounds, to perform analysis with expansion of a range or an
6390         expression that is the iteration scheme for a loop.
6391         (Analyze_Iterator_Specification): If domain of iteration is given by a
6392         function call with a controlled result, as is the case if call returns
6393         a predefined container, ensure that finalization actions are properly
6394         generated.
6395         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6396
6397 2011-08-02  Javier Miranda  <miranda@adacore.com>
6398
6399         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6400         * gcc-interface/Make-lang.in: Update dependencies.
6401
6402 2011-08-02  Javier Miranda  <miranda@adacore.com>
6403
6404         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6405         determine if the analysis is performed using N or Original_Node (N).
6406         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6407         functionality of routine Is_Variable avoids code duplication.
6408         * checks.adb (Determine_Range): Handle temporaries generated by
6409         Remove_Side_Effects.
6410
6411 2011-08-02  Javier Miranda  <miranda@adacore.com>
6412
6413         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6414         expansion of the condition. Required since the previous analysis was
6415         done with expansion disabled (see Resolve_Quantified_Expression) and
6416         hence checks were not inserted and record comparisons have not been
6417         expanded.
6418
6419 2011-08-02  Ed Falis  <falis@adacore.com>
6420
6421         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6422         Update header.
6423
6424 2011-08-02  Bob Duff  <duff@adacore.com>
6425
6426         * opt.ads: Minor comment fix.
6427
6428 2011-08-02  Bob Duff  <duff@adacore.com>
6429
6430         * sem_ch12.adb (Analyze_Package_Instantiation,
6431         Analyze_Subprogram_Instantiation): Turn off style checking while
6432         analyzing an instance. Whatever style checks that apply to the generic
6433         unit should apply, so it makes no sense to apply them in an instance.
6434         This was causing trouble when compiling an instance of a runtime
6435         unit that violates the -gnatyO switch.
6436         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6437         one of the two case statements, causing spurious errors.
6438
6439 2011-08-02  Robert Dewar  <dewar@adacore.com>
6440
6441         * uname.adb: Minor reformatting.
6442         * gnatcmd.adb: Minor reformatting.
6443         * exp_attr.adb: Minor reformatting.
6444
6445 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6446
6447         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6448         No_Dispatching_Calls, do not look for the Assign primitive, because
6449         predefined primitives are not created in this case.
6450
6451 2011-08-02  Bob Duff  <duff@adacore.com>
6452
6453         * stylesw.ads: Minor comment fixes.
6454
6455 2011-08-02  Robert Dewar  <dewar@adacore.com>
6456
6457         * freeze.adb (Add_To_Result): New procedure.
6458
6459 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6460
6461         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6462         time, if the specific run-time routines for handling streams of strings
6463         are not available, use the default mechanism.
6464
6465 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6466
6467         * s-regpat.ads: Fix typo.
6468
6469 2011-08-02  Vincent Celier  <celier@adacore.com>
6470
6471         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6472         not null, call it to create the in memory config project file without
6473         parsing an existing default config project file.
6474
6475 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6476
6477         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6478
6479 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6480
6481         * sem_elim.adb: an abstract subprogram does not need an eliminate
6482         pragma for its descendant to be eliminable.
6483
6484 2011-08-02  Ed Falis  <falis@adacore.com>
6485
6486         * init.c: revert to handling before previous checkin for VxWorks
6487         * s-intman-vxworks.adb: delete unnecessary declarations related to
6488         using Ada interrupt facilities for handling signals.
6489         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6490         * s-intman-vxworks.ads: Import __gnat_install_handler as
6491         Initialize_Interrupts.
6492         * s-taprop-vxworks.adb: Delete Signal_Mask.
6493         (Abort_Handler): change construction of mask to unblock exception
6494         signals.
6495
6496 2011-08-02  Jerome Guitton  <guitton@adacore.com>
6497
6498         * a-except-2005.adb (Raise_From_Signal_Handler): Call
6499         Debug_Raise_Exception before propagation starts.
6500
6501 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6502
6503         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6504         to Restriction_Check_Required.
6505         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6506         * sem_res.adb (Resolve_Call): Likewise.
6507         * sem_attr.adb (Check_Stream_Attribute): Likewise.
6508
6509 2011-08-02  Bob Duff  <duff@adacore.com>
6510
6511         * stylesw.ads: Update comment.
6512         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6513         * errout.ads: Remove obsolete comment.
6514
6515 2011-08-02  Javier Miranda  <miranda@adacore.com>
6516
6517         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6518         (Set_Is_Safe_To_Reevaluate): new procedure.
6519         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6520         assignment is allowed on safe-to-reevaluate variables.
6521         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6522         temporary created to remove side effects in expressions that use
6523         the secondary stack as safe-to-reevaluate.
6524         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6525         variables that are not true constants.
6526
6527 2011-08-02  Robert Dewar  <dewar@adacore.com>
6528
6529         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6530         sem_res.adb, sem_ch6.adb: Minor reformatting.
6531
6532 2011-08-02  Jerome Guitton  <guitton@adacore.com>
6533
6534         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6535
6536 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6537
6538         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6539         not set Overridden_Operation if subprogram is an initialization
6540         procedure.
6541
6542 2011-08-02  Yannick Moy  <moy@adacore.com>
6543
6544         * par-ch6.adb: Correct obsolete name in comments
6545         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6546         which takes two message arguments (existing function takes one), with
6547         second message used for continuation.
6548         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6549         block statements that originate from a source block statement, not
6550         generated block statements
6551         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6552         symmetry with procedure case
6553         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6554         function to issue an error in formal mode if a package specification
6555         contains more than one tagged type or type extension.
6556         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6557         parameters matching formals of tagged types are objects (or ancestor
6558         type conversions of objects), not general expressions. Issue an error
6559         on view conversions that are not involving ancestor conversion of an
6560         extended type.
6561         (Resolve_Type_Conversion): in formal mode, issue an error on the
6562         operand of an ancestor type conversion which is not an object
6563         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6564         procedure so that it works also for actuals of function calls
6565         (Is_Actual_Tagged_Parameter): new function which determines if its
6566         argument is an actual parameter of a formal of tagged type in a
6567         subprogram call
6568         (Is_SPARK_Object_Reference): new function which determines if the tree
6569         referenced by its argument represents an object in SPARK
6570
6571 2011-08-02  Robert Dewar  <dewar@adacore.com>
6572
6573         * sem_ch3.adb: Minor reformatting
6574         Minor comment addition
6575         Minor error msg text change
6576
6577 2011-08-02  Javier Miranda  <miranda@adacore.com>
6578
6579         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6580         function. Used to be more precise when we generate a variable plus one
6581         assignment to remove side effects in the evaluation of the Bound
6582         expressions.
6583         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6584         of the bound expression to force its re-analysis and thus expand the
6585         associated transient scope (if required). Code cleanup replacing the
6586         previous code that declared the constant entity by an invocation to
6587         routine Force_Evaluation which centralizes this work in the frontend.
6588
6589 2011-08-02  Robert Dewar  <dewar@adacore.com>
6590
6591         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6592         (Base_Type): Now uses improved Is_Base_Type function
6593         * einfo.ads (Base_Type): Inline this function
6594
6595 2011-08-02  Robert Dewar  <dewar@adacore.com>
6596
6597         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6598         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6599
6600 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6601
6602         * gcc-interface/Make-lang.in: Update dependencies.
6603         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6604         targets.
6605
6606 2011-08-02  Yannick Moy  <moy@adacore.com>
6607
6608         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6609         non-simple expression used in delta constraint
6610         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6611         index constraint which is not a subtype mark
6612         * par.adb: With and use Restrict
6613         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6614         mode on component type which is not a subtype mark and default
6615         expression on component
6616         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6617         of string which does not have a lower index bound equal to 1
6618         (Array_Type_Declaration): issue an error in formal mode on index or
6619         component type which is not a subtype mark, and on aliased keyword on
6620         component
6621         (Derived_Type_Declaration): issue an error in formal mode on interface,
6622         limited or abstract type
6623         (Record_Type_Declaration): issue an error in formal mode on interface
6624         (Record_Type_Definition): issue an error in formal mode on tagged types
6625         and type extensions not declared in the specification of a library unit
6626         package; on null non-tagged record; on variant part
6627
6628 2011-08-02  Vincent Celier  <celier@adacore.com>
6629
6630         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6631         not declared for qualified library project when Library_Name is not
6632         declared, but Library_Dir is.
6633
6634 2011-08-02  Robert Dewar  <dewar@adacore.com>
6635
6636         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6637         pragmas (affects aspects [Component_]Default_Value
6638         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6639         component type for the resolution
6640
6641 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6642
6643         * einfo.adb (Base_Type): Tune implementation for speed.
6644
6645 2011-08-02  Robert Dewar  <dewar@adacore.com>
6646
6647         * freeze.adb: Minor reformatting.
6648
6649 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6650
6651         * scos.ads: Update comments.
6652
6653 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6654
6655         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6656         base type, because the parent may be a subtype of a private type whose
6657         convention is established in a private part.
6658
6659 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6660
6661         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6662         statement in a block when the expansion of the return expression has
6663         created a finalization chain.
6664         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6665         with the parent node.
6666         Add N_Extended_Return_Statement to handle the case where a transient
6667         object declaration appears in the Return_Object_Declarations list of
6668         an extended return statement.
6669
6670 2011-08-02  Matthew Gingell  <gingell@adacore.com>
6671
6672         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6673         unused parameter 'name'.
6674
6675 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6676
6677         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6678         inherited operation, check whether its alias, which is the source
6679         operastion that it renames, has been marked eliminated.
6680
6681 2011-08-02  Javier Miranda  <miranda@adacore.com>
6682
6683         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6684         in-mode parameter whose type is an access type since it can be used to
6685         modify its designated object. Enforce code that handles as safe an
6686         access type that is not access-to-constant but it is the result of a
6687         previous removal of side-effects.
6688         (Remove_Side_Effects): Minor code reorganization of cases which require
6689         no action. Done to incorporate documentation on new cases uncovered
6690         working in this ticket: no action needed if this routine was invoked
6691         too early and the nodes are not yet decorated.
6692         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6693         to routine Remove_Side_Effects by calls to Force_Evaluation since they
6694         were issued with actuals that are implicitly provided by
6695         Force_Evaluation.
6696
6697 2011-08-02  Robert Dewar  <dewar@adacore.com>
6698
6699         * sem_ch3.adb, sem_res.adb: Minor reformatting.
6700
6701 2011-08-02  Yannick Moy  <moy@adacore.com>
6702
6703         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6704         to issue an error in formal mode on attribute not supported in this mode
6705         (Analyze_Attribute): issue errors on standard attributes not supported
6706         in formal mode.
6707         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6708         comment, and issue error in formal mode on modulus which is not a power
6709         of 2.
6710         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6711         range.
6712         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6713         subtype mark.
6714         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6715         operator on modular type (except 'not').
6716
6717 2011-08-02  Robert Dewar  <dewar@adacore.com>
6718
6719         * gnat_rm.texi: Minor reformatting.
6720
6721 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6722
6723         * s-osinte-linux.ads: Minor comment update and reformatting.
6724         * i-cexten.ads: Make this unit pure, as for its parent.
6725         Will allow its usage in more contexts if needed.
6726
6727 2011-08-02  Robert Dewar  <dewar@adacore.com>
6728
6729         * s-utf_32.ads: Minor comment fix.
6730
6731 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6732
6733         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6734         operation of a tagged synchronized type, handle the case where the
6735         controlling argument is overloaded.
6736
6737 2011-08-02  Yannick Moy  <moy@adacore.com>
6738
6739         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6740         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6741         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6742         SPARK mode and formal verification mode on processing SPARK restriction
6743         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6744         requiring consistency checking.
6745
6746 2011-08-02  Robert Dewar  <dewar@adacore.com>
6747
6748         * sem_res.adb: Minor reformatting.
6749
6750 2011-08-02  Robert Dewar  <dewar@adacore.com>
6751
6752         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6753         a-cforse.ads: Remove unneeded with of Ada.Containers
6754         Remove commented out pragma Inline's
6755         Move specifications of new subprograms to the actual specs
6756
6757 2011-08-02  Yannick Moy  <moy@adacore.com>
6758
6759         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6760         a-cforse.ads: Update comments.
6761
6762 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6763
6764         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6765
6766 2011-08-02  Robert Dewar  <dewar@adacore.com>
6767
6768         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6769         a-cforse.ads, a-cofove.ads: Minor reformatting.
6770
6771 2011-08-02  Claire Dross  <dross@adacore.com>
6772
6773         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6774         a-cofove.ads: Add comments.
6775
6776 2011-08-02  Yannick Moy  <moy@adacore.com>
6777
6778         * gnat_rm.texi: Document formal containers.
6779
6780 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6781
6782         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6783         are empty sections.
6784
6785 2011-08-02  Robert Dewar  <dewar@adacore.com>
6786
6787         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6788         reformatting.
6789
6790 2011-08-02  Robert Dewar  <dewar@adacore.com>
6791
6792         * aspects.adb: New aspects Default_Value and Default_Component_Value
6793         New format of Aspect_Names table checks for omitted entries
6794         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6795         handling of boolean aspects for derived types.
6796         New aspects Default_Value and Default_Component_Value
6797         New format of Aspect_Names table checks for omitted entries
6798         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6799         (Has_Default_Value): New flag
6800         (Has_Default_Component_Value): New flag
6801         (Has_Default_Value): New flag
6802         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6803         table.
6804         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6805         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6806         Default_Value and Default_Component_Value
6807         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6808         New aspects Default_Value and Default_Component_Value
6809         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6810         * sprint.adb: Print N_Aspect_Specification node when called from gdb
6811
6812 2011-08-02  Vincent Celier  <celier@adacore.com>
6813
6814         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6815         inherit library kind.
6816
6817 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6818
6819         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6820         Minor reformatting.
6821
6822 2011-08-02  Robert Dewar  <dewar@adacore.com>
6823
6824         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6825
6826 2011-08-02  Yannick Moy  <moy@adacore.com>
6827
6828         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6829
6830 2011-08-02  Robert Dewar  <dewar@adacore.com>
6831
6832         * impunit.adb: Add comment.
6833
6834 2011-08-02  Yannick Moy  <moy@adacore.com>
6835
6836         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6837         qualification of aggregates in formal mode
6838         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6839         another aggregate
6840         (Resolve_Aggregate): complete the test that an aggregate is adequately
6841         qualified in formal mode
6842
6843 2011-08-02  Pascal Obry  <obry@adacore.com>
6844
6845         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6846         * mlib-prj.adb: Supress warning when compiling binder generated file.
6847         (Build_Library): Supress all warnings when compiling the binder
6848         generated file.
6849
6850 2011-08-02  Yannick Moy  <moy@adacore.com>
6851
6852         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6853         from here...
6854         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6855         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6856         Add with/use clauses to make Check_Formal_Restriction visible
6857
6858 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6859
6860         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6861         in-parameters when type of the generic formal is private in the generic
6862         spec and non-private in the body.
6863
6864 2011-08-02  Claire Dross  <dross@adacore.com>
6865
6866         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6867         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6868         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6869         * impunit.adb, Makefile.rtl: Take new files into account.
6870
6871 2011-08-02  Robert Dewar  <dewar@adacore.com>
6872
6873         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6874         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6875
6876 2011-08-02  Yannick Moy  <moy@adacore.com>
6877
6878         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6879         formal mode
6880         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6881         matching static array bounds, taking into account the special case of
6882         string literals
6883         * sem_ch3.adb: Typo in comment.
6884
6885 2011-08-02  Yannick Moy  <moy@adacore.com>
6886
6887         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6888         which issues an error in formal mode if its argument node is originally
6889         from source
6890         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6891         has a discriminant specification so that it does not include the case
6892         of derived types
6893         (Derived_Type_Declaration): move here the test that a derived type has a
6894         discriminant specification
6895         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6896         first element of a component association before accessing its choices
6897         (presence of component association is not enough)
6898         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6899         declaration is a library item before accessing the next element in a
6900         list, as library items are not member of lists
6901         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6902         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6903         Check_Formal_Restriction whenever possible.
6904
6905 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6906
6907         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6908         reference when needed.
6909
6910 2011-08-02  Bob Duff  <duff@adacore.com>
6911
6912         * gnat_ugn.texi: Fix typo.
6913
6914 2011-08-02  Vincent Celier  <celier@adacore.com>
6915
6916         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6917         archive file name. Do not use the full path name of archives for Open
6918         VMS.
6919
6920 2011-08-02  Robert Dewar  <dewar@adacore.com>
6921
6922         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6923         Analyze_Aspect_Specifications
6924         * sem_ch13.adb
6925         (Analyze_Aspect_Specifications): New handling for boolean aspects
6926         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6927         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6928         sequence for Analyze_Aspect_Specifications
6929         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6930         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6931
6932 2011-08-02  Robert Dewar  <dewar@adacore.com>
6933
6934         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6935         aspects, since these no longer exist.
6936
6937 2011-08-02  Robert Dewar  <dewar@adacore.com>
6938
6939         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6940         semicolon, do not try to see if there are aspects following it.
6941         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6942         aspect spec.
6943
6944 2011-08-02  Robert Dewar  <dewar@adacore.com>
6945
6946         * sem_ch8.adb, aspects.ads: Minor reformatting.
6947
6948 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6949
6950         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6951         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6952         extracted from...
6953         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
6954
6955 2011-08-02  Yannick Moy  <moy@adacore.com>
6956
6957         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6958         mode on subprogram declaration outside of package specification, unless
6959         it is followed by a pragma Import
6960         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6961         Access_Type_Declaration): issue error in formal mode on access type
6962         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6963         incomplete type
6964         (Analyze_Object_Declaration): issue error in formal mode on object
6965         declaration which does not respect SPARK restrictions
6966         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6967         declaration which does not respect SPARK restrictions
6968         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6969         error in formal mode on digits or delta constraint
6970         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6971         decimal fixed point type
6972         (Derived_Type_Declaration): issue error in formal mode on derived type
6973         other than type extensions of tagged record types
6974         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6975         with check on access definition
6976         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6977         mode on protected definition.
6978         (Analyze_Task_Definition): issue error in formal mode on task definition
6979
6980 2011-08-02  Robert Dewar  <dewar@adacore.com>
6981
6982         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6983
6984 2011-08-02  Javier Miranda  <miranda@adacore.com>
6985
6986         * sem_ch6.adb (Can_Override_Operator): New function.
6987         (Verify_Overriding_Indicator): Add missing code to check overriding
6988         indicator in operators. Fixes regression.
6989         (Check_Overriding_Indicator): Minor reformating after replacing the
6990         code that evaluates if the subprogram can override an operator by
6991         invocations to the above new function.
6992         * einfo.adb
6993         (Write_Field26_Name): Add missing code to ensure that, following
6994         the documentation in einfo.ads, this field is not shown as attribute
6995         "Static_Initialization" on non-dispatching functions.
6996
6997 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6998
6999         * sem_res.adb (Resolve_Call): A call to
7000         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
7001         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
7002         i.e., when the second parameter is of type Time_Span.
7003
7004 2011-08-02  Vincent Celier  <celier@adacore.com>
7005
7006         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
7007         with an archive instead of -L<library dir> -l<library name>.
7008
7009 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7010
7011         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
7012         mark the base types In_Use in addition to making the operations
7013         use_visible.
7014
7015 2011-08-02  Ed Falis  <falis@adacore.com>
7016
7017         * init.c: add and setup __gnat_signal_mask for the exception signals
7018         * s-inmaop-vxworks.adb: new file.
7019         * s-intman-vxworks.adb: remove unnecessary initializations and
7020         simplify remaining
7021         * s-intman-vxworks.ads: remove unnecessary variable
7022         * s-taprop-vxworks.adb: simplify signal initialization
7023
7024 2011-08-02  Robert Dewar  <dewar@adacore.com>
7025
7026         * sem_ch8.adb: Minor code reorganization, comment updates.
7027
7028 2011-08-02  Robert Dewar  <dewar@adacore.com>
7029
7030         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
7031         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
7032         here from Sem_Res.
7033         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
7034         (Matching_Static_Array_Bounds): Moved here from Sem_Res
7035
7036 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7037
7038         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
7039         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
7040         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
7041         use_type_clauses, to handle more efficiently use_type and use_all_type
7042         constructs.
7043         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
7044         Ada2012 Use_All_Type clause.
7045         (Use_Class_Wide_Operations): new procedure.
7046
7047 2011-08-02  Robert Dewar  <dewar@adacore.com>
7048
7049         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
7050         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
7051         expression to expression function.
7052
7053 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7054
7055         * sem_ch4.adb: transform simple Ada2012 membership into equality only
7056         if types are compatible.
7057
7058 2011-08-02  Yannick Moy  <moy@adacore.com>
7059
7060         * sem_res.adb (Matching_Static_Array_Bounds): new function which
7061         returns True if its argument array types have same dimension and same
7062         static bounds at each index.
7063         (Resolve_Actuals): issue an error in formal mode on actuals passed as
7064         OUT or IN OUT paramaters which are not view conversions in SPARK.
7065         (Resolve_Arithmetic_Op): issue an error in formal mode on
7066         multiplication or division with operands of fixed point types which are
7067         not qualified or explicitly converted.
7068         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7069         Boolean or array type (except String) operands.
7070         (Resolve_Equality_Op): issue an error in formal mode on equality
7071         operators for array types other than String with non-matching static
7072         bounds.
7073         (Resolve_Logical_Op): issue an error in formal mode on logical operators
7074         for array types with non-matching static bounds. Factorize the code in
7075         Matching_Static_Array_Bounds.
7076         (Resolve_Qualified_Expression): issue an error in formal mode on
7077         qualified expressions for array types with non-matching static bounds.
7078         (Resolve_Type_Conversion): issue an error in formal mode on type
7079         conversion for array types with non-matching static bounds
7080
7081 2011-08-02  Robert Dewar  <dewar@adacore.com>
7082
7083         * par-ch10.adb: Minor code reorganization (use Nkind_In).
7084
7085 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7086
7087         * par-ch9.adb: save location of entry for proper error message.
7088
7089 2011-08-02  Javier Miranda  <miranda@adacore.com>
7090
7091         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7092         (Use_Full_View) which permits this routine to climb through the
7093         ancestors using the full-view of private parents.
7094         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7095         Use_Full_View to true in calls to Is_Ancestor.
7096         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7097         true in call to Is_Ancestor.
7098         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7099         Use_Full_View to true in call to Is_Ancestor.
7100         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7101         call to Is_Ancestor.
7102         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7103         Use_Full_View to true in calls to Is_Ancestor.
7104         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7105         Make_Select_Specific_Data_Table, Register_Primitive,
7106         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7107         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7108         to true in call to Is_Ancestor.
7109         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7110         Use_Full_View to true in calls to Is_Ancestor.
7111         * exp_cg.adb
7112         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7113         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7114
7115 2011-08-02  Robert Dewar  <dewar@adacore.com>
7116
7117         * gnat_rm.texi: Minor reformatting.
7118         * sem_prag.adb: Minor reformatting.
7119
7120 2011-08-02  Tristan Gingold  <gingold@adacore.com>
7121
7122         * vms_data.ads: Add VMS qualifier for -gnateP.
7123
7124 2011-08-02  Robert Dewar  <dewar@adacore.com>
7125
7126         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7127         * par-ch7.adb (P_Package): Proper placement of aspects for package
7128         decl/instantiation.
7129         * par-endh.adb (Check_End): Ad Is_Sloc parameter
7130         (End_Statements): Add Is_Sloc parameterr
7131         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
7132         (Check_End): Ad Is_Sloc parameter
7133         (End_Statements): Add Is_Sloc parameterr
7134
7135 2011-08-02  Vincent Celier  <celier@adacore.com>
7136
7137         * ug_words: Add VMS qualifier equivalent to -gnateP:
7138         /SYMBOL_PREPROCESSING.
7139
7140 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
7141
7142         * gnat-style.texi: For hexadecimal numeric literals the typical
7143         grouping of digits is 4 to represent 2 bytes.
7144         A procedure spec which is split into several lines is indented two
7145         characters.
7146
7147 2011-08-02  Yannick Moy  <moy@adacore.com>
7148
7149         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
7150         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
7151         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
7152         properly qualified
7153         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
7154         choice in array aggregate
7155         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
7156         mark as ancestor
7157         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
7158         positional and named aggregate for record, or others in record
7159         aggregate, or multiple choice in record aggregate
7160         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
7161         array operands to logical operations AND, OR and XOR do not have the
7162         same static lower and higher bounds
7163         * sem_ch5.adb, sinfo.ads: Correct typos in comments
7164
7165 2011-08-01  Robert Dewar  <dewar@adacore.com>
7166
7167         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
7168         Replaces Last_Source_Node_In_Sequence.
7169         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
7170         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
7171         parens and blank in string (this was inconsistently implemented).
7172         * errout.ads
7173         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
7174         blank in string (this was inconsistently implemented).
7175         * gnat1drv.adb
7176         (Set_Global_Switches): Set formal mode switches appropriately
7177         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
7178         * par-prag.adb
7179         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
7180         call Set_Error_Msg_Lang to set "spark" as language name.
7181         * par.adb: Remove unnecessary call to set formal language for errout
7182         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
7183         appropriately and call Set_Error_Msg_Lang to set "spark" as language
7184         name.
7185         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
7186         calls to it, moved after resolution so that types are known
7187         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
7188         result of concatenation is not of type String
7189         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
7190         concatenation is not properly restricted
7191         * gnat_rm.texi: Add doc on pragma Spark_95.
7192         * gcc-interface/Makefile.in: Remove obsolete target pairs for
7193         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
7194         * gcc-interface/Make-lang.in: Update dependencies.
7195
7196 2011-08-01  Javier Miranda  <miranda@adacore.com>
7197
7198         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
7199         condition that detects if the overridden operation must replace an
7200         existing entity.
7201
7202 2011-08-01  Javier Miranda  <miranda@adacore.com>
7203
7204         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
7205         code declarations inserted by Insert_Actions in each alternative of the
7206         N_Case_Expression node.
7207
7208 2011-08-01  Robert Dewar  <dewar@adacore.com>
7209
7210         * sem_ch6.adb: Minor code reorganization.
7211         * sem_util.adb: Minor reformatting.
7212
7213 2011-08-01  Pascal Obry  <obry@adacore.com>
7214
7215         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
7216         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
7217
7218 2011-08-01  Yannick Moy  <moy@adacore.com>
7219
7220         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7221         literal or operator symbol which is prefixed
7222         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7223         mode on access attributes.
7224         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7225         that concatenation operands are properly restricted in formal mode
7226         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7227         Analyze_Concatenation_Operand. Issue an error in formal mode if the
7228         result of the concatenation has a type different from String.
7229         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7230         Analyze_Quantified_Expression, Analyze_Slice,
7231         Analyze_Null): issue an error in formal mode on unsupported constructs
7232         * sem_ch5.adb
7233         (Analyze_Block_Statement): only issue error on source block statement
7234         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7235         function which returns the last node in a list of nodes for which
7236         Comes_From_Source returns True, if any
7237         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7238         Last_Source_Node_In_Sequence
7239         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7240         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7241         mode on unsupported constructs
7242         * sem_ch9.adb Do not return after issuing error in formal mode, as the
7243         rest of the actions may be needed later on since the error is marked as
7244         not serious.
7245         * sinfo.ads: Typos in comments.
7246
7247 2011-08-01  Pascal Obry  <obry@adacore.com>
7248
7249         * projects.texi: Minor editing.
7250
7251 2011-08-01  Yannick Moy  <moy@adacore.com>
7252
7253         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7254         insertion character ~~
7255         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7256         (Set_Error_Msg_Lang): new procedure which fixes the language for use
7257         with insertion character ~~
7258         (Set_Msg_Text): treat insertion character ~~
7259         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7260         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7261         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7262         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7263         errors related to the formal language restriction not serious
7264         (insertion character |).
7265         * par.adb (Par): set formal language for error messages if needed
7266         * sem_ch6.adb (Check_Missing_Return): take into account possible
7267         generated statements at the end of the function
7268         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7269         enumeration value to define a new pragma SPARK_95
7270         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7271         SPARK_Version): new type and variables to store the SPARK version
7272         (none by default).
7273         (SPARK_Mode): return True when SPARK_Version is set
7274         * par-prag.adb: Correct indentation
7275         (Prag): take Pragma_SPARK_95 into account
7276         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7277         into account.
7278
7279 2011-08-01  Robert Dewar  <dewar@adacore.com>
7280
7281         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7282         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7283         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7284
7285 2011-08-01  Pascal Obry  <obry@adacore.com>
7286
7287         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7288         Target_Name to Get_Path call.
7289         (Parse_Single_Project): Likewise.
7290         (Post_Parse_Context_Clause): Likewise.
7291         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7292         Call Initialise_Project_Path with the proper Target_Name.
7293         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7294         search path.
7295         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7296         with the proper Target_Name.
7297         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7298         Part.Parse routine.
7299         (Parse_Project_And_Apply_Config): Likewise.
7300         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7301         This is fine as this part of the code is supporting only native
7302         compilation.
7303         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7304         is fine as this part of the code is supporting only native compilation.
7305
7306 2011-08-01  Yannick Moy  <moy@adacore.com>
7307
7308         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7309         of homonym, unless the homonym is one of the cases allowed in SPARK
7310         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7311         package declaration occurring after a body.
7312
7313 2011-08-01  Robert Dewar  <dewar@adacore.com>
7314
7315         * checks.adb, exp_ch4.adb: Minor reformatting.
7316
7317 2011-08-01  Javier Miranda  <miranda@adacore.com>
7318
7319         * einfo.ads (Access_Disp_Table): Fix documentation.
7320         (Dispatch_Table_Wrappers): Fix documentation.
7321
7322 2011-08-01  Pascal Obry  <obry@adacore.com>
7323
7324         * prj-env.adb, prj-env.ads: Minor reformatting.
7325
7326 2011-08-01  Yannick Moy  <moy@adacore.com>
7327
7328         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7329         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7330         procedures out of these packages.
7331         * errout.ads, errout.adb
7332         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7333         procedures in of this package
7334         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7335         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7336         on misplaced later vs initial declarations, like in Ada 83
7337         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7338         formal mode on attribute of private type whose full type declaration
7339         is not visible
7340         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7341         package declaration inside a package specification
7342         (Analyze_Full_Type_Declaration): issue error in formal mode on
7343         controlled type or discriminant type
7344         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7345         user-defined operator means that it should come from the source
7346         (New_Overloaded_Entity): issue error in formal mode on overloaded
7347         entity.
7348         * sem_ch6.ads, sem_ch13.ads: typos in comments.
7349
7350 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7351
7352         * atree.adb: Minor reformatting.
7353         * checks.adb: Minor reformatting.
7354
7355 2011-08-01  Vincent Celier  <celier@adacore.com>
7356
7357         * s-parame-vms-ia64.ads: Fix typo in comment
7358         Minor reformatting
7359         * s-parame-vms-restrict.ads: Removed, unused.
7360
7361 2011-08-01  Javier Miranda  <miranda@adacore.com>
7362
7363         * exp_ch3.adb
7364         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7365         * sem_ch3.adb
7366         (Constrain_Index): Remove side effects in the evaluation of the bounds.
7367         * sem_ch3.ads, sem_ch3.adb
7368         (Is_Constant_Bound): New extended version of the subprogram that was
7369         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7370         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7371         * sem_aux.ads (Constant_Value): Fix typo in comment.
7372         * checks.adb (Generate_Index_Checks): New implementation which, for
7373         array objects with constant bounds, generates the runtime check
7374         referencing the bounds of the array type. For other cases this routine
7375         provides its previous behavior obtaining such values from the array
7376         object.
7377         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7378         parent type.
7379         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7380         we cannot have semantic interpretations of the new node.
7381
7382 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7383
7384         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7385         expressions.
7386
7387 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7388
7389         * sem_ch8.adb: Minor code editing.
7390         * s-vxwext.adb: Remove trailing space.
7391         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7392         consistency with other files.
7393
7394 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7395
7396         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7397
7398 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7399
7400         * par-ch10.adb: reject parameterized expressions as compilation unit.
7401         * sem_ch4.adb: handle properly conditional expression with overloaded
7402         then_clause and no else_clause.
7403
7404 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7405
7406         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7407         like done by System.Aux_DEC.
7408         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7409
7410 2011-08-01  Yannick Moy  <moy@adacore.com>
7411
7412         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7413         missing label at end of declaration (subprogram or package)
7414         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7415         of positional and named parameter association
7416         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7417         Error_Msg_SP which adds a prefix to the error message giving the name
7418         of the formal language analyzed
7419         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7420         access result type in subprogram, unconstrained array as result type,.
7421         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7422         procedure
7423         * sem_ch8.adb: Code clean up.
7424
7425 2011-08-01  Javier Miranda  <miranda@adacore.com>
7426
7427         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7428         * einfo.ads (Access_Disp_Table): Fix documentation.
7429         (Dispatch_Table_Wrappers): Fix documentation.
7430         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7431         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7432         to enforce the documentation of this attribute.
7433         (Set_Is_Interface): Cleanup the assertion.
7434         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7435         the Underlying_Type entity before reading attribute Access_Disp_Table.
7436         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7437         Locate the Underlying_Type before reading attribute Access_Disp_Table.
7438         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7439         the Underlying_Type entity before reading attribute Access_Disp_Table.
7440         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7441         Locate the Underlying_Type entity before reading attribute
7442         Access_Disp_Table.
7443
7444 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7445
7446         * s-poosiz.ads: Additional overriding indicators.
7447
7448 2011-08-01  Yannick Moy  <moy@adacore.com>
7449
7450         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7451         formal mode.
7452         (Analyze_Iteration_Scheme): issue error in formal mode when loop
7453         parameter specification does not include a subtype mark.
7454         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7455         formal mode on abstract subprogram.
7456         (Analyze_Subprogram_Specification): issue error in formal mode on
7457         user-defined operator.
7458         (Process_Formals): issue error in formal mode on access parameter and
7459         default expression.
7460         * sem_ch9.adb (Analyze_Abort_Statement,
7461         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7462         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7463         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7464         Analyze_Requeue, Analyze_Selective_Accept,
7465         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7466         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7467         issue error in formal mode on user-defined raise statement.
7468
7469 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7470
7471         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7472         declaration being hidden when overriding an implicit inherited
7473         subprogram.
7474         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7475         (-gnats), do not complain about a source file that contains only a
7476         pragma No_Body.
7477
7478 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7479
7480         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7481         variable if already set.
7482
7483 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7484
7485         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7486         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7487         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7488         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7489         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7490         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7491         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7492         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7493         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7494         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7495         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7496         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7497         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7498         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7499         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7500         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7501         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7502         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7503         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7504         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7505         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7506         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7507         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7508         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7509         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7510         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7511         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7512         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7513         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7514         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7515         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7516         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7517         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7518         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7519         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7520         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7521         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7522         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7523         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7524         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7525         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7526         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7527         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7528         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7529         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7530         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7531         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7532         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7533         s-osinte-mingw.ads: Update to GPLv3 run-time license.
7534         Use GNAT instead of GNARL.
7535
7536 2011-08-01  Bob Duff  <duff@adacore.com>
7537
7538         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7539         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7540         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7541         reformatting.
7542
7543 2011-08-01  Yannick Moy  <moy@adacore.com>
7544
7545         * debug.adb (d.D) reverve flag for the SPARK mode
7546         (d.E) reverve flag for SPARK generation mode
7547         (d.F) reverve flag for Why generation mode
7548         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7549         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
7550         functions which return True when the corresponding modes are set
7551         (Formal_Language): return "spark" or "alfa" when in formal verification
7552         mode.
7553         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7554         Error_Msg to prefix the error message with a tag giving the formal
7555         language
7556         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7557         message with a tag giving the formal language
7558         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7559         block statement
7560         (Analyze_Case_Statement): issue error in formal mode on case statement
7561         with a single "others" case alternative
7562         (Analyze_Exit_Statement): issue errors in formal mode on exit
7563         statements which do not respect SPARK restrictions
7564         (Analyze_Goto_Statement): issue error in formal mode on goto statement
7565         (Check_Unreachable_Code): always issue an error (not a warning) in
7566         formal mode on unreachable code (concerns both code after an infinite
7567         loop and after an unconditional jump, both not allowed in SPARK)
7568         * sem_ch6.adb (Analyze_Return_Statement): add call to
7569         Set_Return_Present for a procedure containing a return statement
7570         (already done for functions in Analyze_Function_Return)
7571         (Analyze_Function_Return): issue error in formal mode on extended
7572         return or if return is not last statement in function
7573         (Check_Missing_Return): issue error in formal mode if function does
7574         not end with return or if procedure contains a return
7575         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7576         function to detect if there is an inner scope of its parameter S which
7577         is a loop.
7578
7579 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7580
7581         * sem_ch6.ads: Minor reformatting.
7582
7583 2011-08-01  Javier Miranda  <miranda@adacore.com>
7584
7585         * sem_util.adb (Abstract_Interface_List): Complete condition when
7586         processing private type declarations to avoid reading unavailable
7587         attribute.
7588         (Is_Synchronized_Tagged_Type): Complete condition when processing
7589         private extension declaration nodes to avoid reading unavailable
7590         attribute.
7591
7592 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7593
7594         * sem_ch3.adb: Minor reformatting.
7595
7596 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7597
7598         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7599         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7600         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7601         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7602         for VMS, instead parametrize the common implementation with
7603         System.Parameters declarations.
7604
7605 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
7606
7607         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7608
7609 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7610
7611         * seh_init.c: Fix SEH handler installation on win64.
7612
7613 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7614
7615         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7616         double analysis of an anonymous access to subprogram, because it can
7617         lead to improper sharing of profiles and a back-end crash.
7618
7619 2011-08-01  Robert Dewar  <dewar@adacore.com>
7620
7621         * make.adb, sem_ch4.adb: Minor reformatting.
7622         * gcc-interface/Make-lang.in: Update dependencies.
7623         * sem_util.adb, exp_ch5.adb: Minor reformatting.
7624
7625 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7626
7627         * gnat_rm.texi: Fix definition of Long_Integer.
7628
7629 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7630
7631         * exp_aggr.adb: check limit size of static aggregate unconditionally,
7632         to prevent storage exhaustion.
7633         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7634         finalized is a function body, insert the cleanup code before the final
7635         return statement, to prevent spurious warnings.
7636         * s-pooglo.ads: add overriding indicator.
7637
7638 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7639
7640         * sem_ch4.adb (Operator_Check): improve error message when both a
7641         with_clause and a use_clause are needed to make operator usage legal.
7642         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7643         determine whether a compilation unit is visible within an other,
7644         either through a with_clause in the current unit, or a with_clause in
7645         its library unit or one one of its parents.
7646
7647 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7648
7649         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7650         over an arbitrary expression of an array or container type.
7651         * lib-xref.adb: clarify comment.
7652
7653 2011-08-01  Bob Duff  <duff@adacore.com>
7654
7655         * einfo.ads: Minor reformatting.
7656         * debug.adb: Minor comment improvement.
7657
7658 2011-08-01  Javier Miranda  <miranda@adacore.com>
7659
7660         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7661         consider hidden subprograms as valid candidates.
7662
7663 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7664
7665         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7666
7667 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
7668
7669         * gnat_ugn.texi: Fix typo.
7670
7671 2011-08-01  Robert Dewar  <dewar@adacore.com>
7672
7673         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7674         lib-xref.adb: Minor reformatting
7675
7676 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7677
7678         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7679         when to generate a call to Move_Final_List.
7680         (Has_Controlled_Parts): Remove this function.
7681
7682 2011-08-01  Geert Bosch  <bosch@adacore.com>
7683
7684         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7685         "," in choice list.
7686
7687 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7688
7689         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7690         explicit raise of a predefined exception as Comes_From_Source if the
7691         original N_Raise_Statement comes from source.
7692
7693 2011-08-01  Robert Dewar  <dewar@adacore.com>
7694
7695         * sinfo.ads: Add comment.
7696         * sem_ch6.adb: Minor reformatting.
7697
7698 2011-08-01  Robert Dewar  <dewar@adacore.com>
7699
7700         * freeze.adb (Freeze_Entity): Refine check for bad component size
7701         clause to avoid rejecting confirming clause when atomic/aliased present.
7702
7703 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7704
7705         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7706         better determine whether an entity reference is a write.
7707         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7708         subcomponent.
7709         * lib-xref.adb (Output_References): Do no suppress a read reference at
7710         the same location as an immediately preceeding modify-reference, to
7711         handle properly in-out actuals.
7712
7713 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7714
7715         * env.c (__gnat_setenv) [VMS]: Refine previous change.
7716
7717 2011-08-01  Quentin Ochem  <ochem@adacore.com>
7718
7719         * i-cstrin.adb (New_String): Changed implementation, now uses only the
7720         heap to compute the result.
7721
7722 2011-08-01  Robert Dewar  <dewar@adacore.com>
7723
7724         * atree.ads: Minor reformatting.
7725
7726 2011-08-01  Emmanuel Briot  <briot@adacore.com>
7727
7728         * g-expect.adb (Get_Command_Output): Fix memory leak.
7729
7730 2011-08-01  Geert Bosch  <bosch@adacore.com>
7731
7732         * cstand.adb (P_Float_Type): New procedure to print the definition of
7733         predefined fpt types.
7734         (P_Mixed_Name): New procedure to print a name using mixed case
7735         (Print_Standard): Use P_Float_Type for printing floating point types
7736         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7737         precision IEEE float.
7738
7739 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7740
7741         * sem_ch3.adb: Minor reformatting.
7742
7743 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7744
7745         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7746         the completion of a generic function, insert the new body rather than
7747         rewriting the original.
7748
7749 2011-08-01  Yannick Moy  <moy@adacore.com>
7750
7751         * sinfo.ads, errout.ads: Typos in comments.
7752
7753 2011-08-01  Robert Dewar  <dewar@adacore.com>
7754
7755         * par-endh.adb: Minor reformatting.
7756
7757 2011-08-01  Robert Dewar  <dewar@adacore.com>
7758
7759         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7760         (Pre_Post_Aspects): New subtype.
7761         * par-ch12.adb (P_Generic): New syntax for aspects in packages
7762         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7763         * par-ch7.adb (P_Package): Remove Decl parameter
7764         (P_Package): Handle new syntax for aspects (before IS)
7765         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7766         new aspect syntax
7767         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7768         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7769         (P_Package): Remove Decl parameter
7770         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7771         aspects
7772         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7773         specs
7774         * sem_util.ads, sem_util.adb (Static_Boolean): New function
7775         * sinfo.ads: Document new syntax for aspects in packages etc.
7776         * sprint.adb: Handle new syntax of aspects before IS in package
7777
7778 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7779
7780         * atree.ads: Minor reformatting.
7781         * sem_prag.adb: Minor reformatting.
7782
7783 2011-08-01  Robert Dewar  <dewar@adacore.com>
7784
7785         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7786         case expr alternative.
7787
7788 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7789
7790         * sem_ch12.adb: Fix typo.
7791
7792 2011-08-01  Geert Bosch  <bosch@adacore.com>
7793
7794         * sem_prag.adb (Check_No_Link_Name): New procedure.
7795         (Process_Import_Or_Interface): Use Check_No_Link_Name.
7796         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7797         instead of Standard_Long_Long_Float_Size global. Preparation for
7798         eventual removal of per type constants.
7799         * exp_util.ads (Get_Stream_Size): New function returning the stream
7800         size value of subtype E.
7801         * exp_util.adb (Get_Stream_Size): Implement new function.
7802         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7803         function.
7804         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7805         * einfo.adb:
7806         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7807
7808 2011-08-01  Geert Bosch  <bosch@adacore.com>
7809
7810         * cstand.adb: Fix comments.
7811         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7812         count of arguments.
7813
7814 2011-08-01  Robert Dewar  <dewar@adacore.com>
7815
7816         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7817
7818 2011-08-01  Geert Bosch  <bosch@adacore.com>
7819
7820         * atree.ads: Fix comment.
7821
7822 2011-08-01  Robert Dewar  <dewar@adacore.com>
7823
7824         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7825         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7826         * par.adb: Add with for Namet.Sp.
7827         * par-tchk.adb: Minor reformatting.
7828
7829 2011-08-01  Vincent Celier  <celier@adacore.com>
7830
7831         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7832         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7833         of the init procedure of a SAL.
7834         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7835         New procedure.
7836
7837 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7838
7839         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7840         reformatting.
7841
7842 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7843
7844         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7845
7846 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7847
7848         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7849         conformant with its spec (return True only for types that have
7850         an overriding Initialize primitive operation that prevents them from
7851         having preelaborable initialization).
7852         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7853         initialization for controlled types in Ada 2005 or later mode.
7854
7855 2011-08-01  Robert Dewar  <dewar@adacore.com>
7856
7857         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7858         Postcondition.
7859         (Same_Aspect): New function.
7860         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7861         Type_Invariant, Precondition, Postcondition.
7862         * snames.ads-tmpl: Add Name_Type_Invariant.
7863
7864 2011-08-01  Robert Dewar  <dewar@adacore.com>
7865
7866         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7867         here.
7868         (Freeze_All_Ent): Fix error in handling inherited aspects.
7869         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7870         already analyzed, but don't skip entire processing of a declaration,
7871         that's wrong in some cases of declarations being rewritten.
7872         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7873         Don't delay for integer, string literals
7874         Treat predicates in usual manner for delay, remove special case code,
7875         not needed.
7876         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7877         (Build_Predicate_Function): Update saved expression in aspect
7878         (Build_Invariant_Procedure): Update saved expression in aspect
7879         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7880         of replacement of discriminant references if the reference is simple.
7881
7882 2011-08-01  Robert Dewar  <dewar@adacore.com>
7883
7884         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7885         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7886         Static_Predicate and Dynamic_Predicate.
7887         (Build_Predicate_Function): Add processing for Static_Predicate
7888         and Dynamic_Predicate.
7889         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7890         (From_Static_Predicate): New flag
7891         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7892
7893 2011-08-01  Robert Dewar  <dewar@adacore.com>
7894
7895         * usage.adb: Documentation cleanup for Ada version modes in usage.
7896         * expander.adb: Minor reformatting.
7897
7898 2011-08-01  Robert Dewar  <dewar@adacore.com>
7899
7900         * atree.ads: Minor comment fix.
7901         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7902         a-witeio.ads, sem_prag.adb: Minor reformatting.
7903
7904 2011-08-01  Doug Rupp  <rupp@adacore.com>
7905
7906         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7907         pointers. Use descrip.h header file for convenience. Add some
7908         comments.
7909
7910 2011-08-01  Robert Dewar  <dewar@adacore.com>
7911
7912         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7913         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7914         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7915         New procedure.
7916         (Check_Aspect_At_End_Of_Declarations): New procedure
7917         (Analye_Aspect_Specification): Minor changes for above procedures
7918         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7919         specification node as well.
7920
7921 2011-08-01  Pascal Obry  <obry@adacore.com>
7922
7923         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7924         Windows files. Use GetFilesAttributes() in this case to check for file
7925         existence instead of returning with an error code.
7926
7927 2011-08-01  Vincent Celier  <celier@adacore.com>
7928
7929         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7930         High is above Source length.
7931
7932 2011-08-01  Robert Dewar  <dewar@adacore.com>
7933
7934         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7935
7936 2011-08-01  Robert Dewar  <dewar@adacore.com>
7937
7938         * aspects.ads (Boolean_Aspects): New subtype.
7939         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7940         for derived types in cases where the parent type and derived type have
7941         aspects.
7942         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7943         with aspects when parent type also has aspects.
7944         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7945         boolean expression at this point).
7946         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7947         accordance with final decision on the Ada 2012 feature.
7948         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7949
7950 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7951
7952         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7953
7954 2011-08-01  Pascal Obry  <obry@adacore.com>
7955
7956         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7957         Fix Replace_Slice when High is above current string size.
7958         (Replace_Slice): Fix DL computation when High is above current
7959         string length.
7960
7961 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7962
7963         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7964
7965 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7966
7967         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7968         of node.
7969
7970 2011-08-01  Pascal Obry  <obry@adacore.com>
7971
7972         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7973         reformatting.
7974
7975 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7976
7977         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7978         access to protected subprograms in generic bodies.
7979         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7980         protected type, indicate that the convention of the subprogram is
7981         Convention_Protected, because it may be used in subsequent declarations
7982         within the protected declaration.
7983
7984 2011-08-01  Vincent Celier  <celier@adacore.com>
7985
7986         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7987         and "final" procedures when the name of the library is "ada", to avoid
7988         duplicate symbols "adainit" and "adafinal" in executables.
7989
7990 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7991
7992         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7993         quantified expression that appears within a postcondition and uses the
7994         Ada2012 'Result attribute.
7995
7996 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7997
7998         * init.c (__gnat_error_handler): Cast reason to int.
7999         (__gnat_install_handler): Explain sa_sigaction use.
8000
8001 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8002
8003         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
8004         subprogram has copy-in copy-out parameters, try to promote the mode of
8005         the return type if it is passed in registers.
8006
8007 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8008
8009         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
8010         left operand as addressable.
8011
8012 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
8013
8014         * gcc-interface/gigi.h (build_function_stub): Remove.
8015         (build_return_expr): Likewise.
8016         (convert_vms_descriptor): Declare.
8017         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
8018         (build_function_stub): Move to...
8019         * gcc-interface/utils2.c (build_return_expr): Move to...
8020         * gcc-interface/trans.c (build_function_stub): ...here.
8021         (build_return_expr): ...here.
8022         (Subprogram_Body_to_gnu): Add local variable for language_function.
8023         Disconnect the parameter attributes cache, if any, once done with it.
8024         Call end_subprog_body only after setting the end_locus.
8025         Build the stub associated with the function, if any, at the very end.
8026         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
8027         variables and streamline control flow.
8028
8029 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
8030
8031         PR ada/49819
8032         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
8033         g-trasym-dwarf.adb.
8034
8035 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8036
8037         PR bootstrap/49794
8038         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
8039         Assign to act.sa_sigaction.
8040         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
8041         current->return_address to char * before arithmetic.
8042
8043 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8044
8045         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
8046         Correct argument types.
8047         Extract code from reason.
8048         (__gnat_install_handler): Assign to act.sa_sigaction.
8049
8050 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
8051
8052         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
8053         (GNAT1_OBJS): ...here.
8054
8055 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
8056
8057         PR ada/48711
8058         * g-socthi-mingw.adb (Fill): Fix formatting.
8059
8060         * gcc-interface/gigi.h: Move around comment.
8061
8062 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
8063
8064         PR ada/46350
8065         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8066
8067 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
8068
8069         PR ada/48711
8070         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8071
8072 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
8073
8074         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8075         range comparison if Pmode is SImode.
8076
8077 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
8078             Eric Botcazou  <ebotcazou@adacore.com>
8079
8080         * adadecode.c: Wrap up in extern "C" block.
8081         * adadecode.h: Likewise.
8082         * adaint.c: Likewise.  Remove 'const' keyword.
8083         * adaint.h: Likewise.
8084         * argv.c: Likewise.
8085         * atree.h: Likewise.
8086         * cio.c: Likewise.
8087         * cstreams.c: Likewise.
8088         * env.c: Likewise.
8089         * exit.c: Likewise.
8090         * fe.h: Likewise.
8091         * final.c: Likewise.
8092         * init.c: Likewise.
8093         * initialize.c: Likewise.
8094         * link.c: Likewise.
8095         * namet.h: Likewise.
8096         * nlists.h: Likewise.
8097         * raise.c: Likewise.
8098         * raise.h: Likewise.
8099         * repinfo.h: Likewise.
8100         * seh_init.c: Likewise.
8101         * targext.c: Likewise.
8102         * tracebak.c: Likewise.
8103         * uintp.h: Likewise.
8104         * urealp.h: Likewise.
8105         * xeinfo.adb: Wrap up generated C code in extern "C" block.
8106         * xsinfo.adb: Likewise.
8107         * xsnamest.adb: Likewise.
8108         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8109         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8110         * gcc-interface/misc.c: Likewise.
8111         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8112         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
8113         ada/targext.o here...
8114         (GNAT_ADA_OBJS): ...and not here.
8115         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8116         (GNATBIND_OBJS): Reorder.
8117
8118 2011-07-07  Richard Henderson  <rth@redhat.com>
8119
8120         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8121         dwarf2out_frame_init.
8122
8123 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
8124
8125         * gcc-interface/misc.c (gnat_init): Tweak previous change.
8126
8127 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8128
8129         PR target/39150
8130         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
8131
8132 2011-07-06  Richard Guenther  <rguenther@suse.de>
8133
8134         * gcc-interface/misc.c (gnat_init): Merge calls to
8135         build_common_tree_nodes and build_common_tree_nodes_2.
8136         Re-initialize boolean_false_node.
8137
8138 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
8139             Olivier Hainque  <hainque@adacore.com>
8140             Nicolas Setton  <setton@adacore.com>
8141
8142         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
8143         the type according to the ARTIFICIAL_P parameter.
8144         (create_type_decl): Likewise.
8145         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
8146
8147 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
8148
8149         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
8150         (gnatbind): Likewise.
8151
8152 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8153
8154         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
8155
8156 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8157
8158         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
8159         local variable throughout.  Remove useless call to Base_Type.
8160         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
8161         Take it also into account for the volatileness of the field.  Set the
8162         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
8163
8164 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8165
8166         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
8167         on a dereference built for a by-ref object if it has an address clause.
8168
8169 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8170
8171         * einfo.ads (Address_Taken): Document use for the second argument of
8172         Asm_Input and Asm_Output attributes.
8173         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
8174         argument is an entity name, then set Address_Taken on it.
8175         <Attribute_Asm_Output>: Likewise.
8176         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
8177         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
8178         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
8179         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
8180
8181 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
8182
8183         PR middle-end/46500
8184         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
8185
8186 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
8187
8188         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
8189         (ada/utils.o): Update dependencies.
8190         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
8191         ../../../libcpp/libcpp.a.
8192         * gcc-interface/utils.c: Include common/common-target.h.
8193         (process_attributes): Use targetm_common.have_named_sections.
8194
8195 2011-06-07  Richard Guenther  <rguenther@suse.de>
8196
8197         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
8198         set_sizetype.
8199
8200 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8201
8202         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
8203         TREE_THIS_NOTRAP flag.
8204
8205 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8206
8207         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
8208         Fix thinko.
8209
8210 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8211
8212         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
8213         constants whose full view has discriminants specially.
8214
8215 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8216
8217         * gcc-interface/utils.c: Include diagnostic.h.
8218         (gnat_write_global_declarations): Output debug information for all
8219         global type declarations before finalizing the compilation unit.
8220         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8221
8222 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
8223
8224         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8225
8226 2011-05-25  Kai Tietz  <ktietz@redhat.com>
8227
8228         * adaint.c (__gnat_to_canonical_file_list_next): Use array
8229         initialization instead of const/none-const pointer assignment.
8230
8231 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
8232
8233         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8234         $(EXTRA_GNAT1_OBJS).
8235         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8236         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8237         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8238         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8239         libcommon-target.a instead of prefix.o.
8240
8241 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
8242
8243         PR ada/49097
8244         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8245
8246 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
8247
8248         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8249         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8250         instead of version.o.
8251
8252 2011-05-18  Kai Tietz <ktietz@redhat.com>
8253
8254         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8255         boolean_false_node instead of integer_zero_node.
8256         (convert_with_check): Likewise.
8257         * gcc-interface/decl.c (choices_to_gnu): Likewise.
8258
8259 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
8260
8261         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8262         type of the parameter is an unconstrained array, convert the actual to
8263         the type of the formal in the In Out and Out cases as well.
8264
8265 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
8266
8267         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8268         call build_function_type_array or build_varargs_function_type_array
8269         instead.
8270         (create_subprog_type): Don't call build_function_type; call
8271         build_function_type_vec instead.
8272
8273 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
8274
8275         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8276         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8277         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8278
8279 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
8280
8281         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8282
8283         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8284         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8285
8286 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
8287
8288         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8289
8290 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
8291
8292         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8293         instead of accessing TYPE_ARG_TYPES directly.
8294         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8295
8296 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8297
8298         PR ada/48844
8299         * gcc-interface/gigi.h (get_variant_part): Declare.
8300         * gcc-interface/decl.c (get_variant_part): Make global.
8301         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8302         types have the same constant size, are record types and T1 has a
8303         variant part while T2 doesn't.
8304
8305 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8306
8307         * gcc-interface/utils.c (begin_subprog_body): Do not call
8308         get_pending_sizes.
8309         (end_subprog_body): Likewise.
8310
8311 2011-05-04  Richard Guenther  <rguenther@suse.de>
8312
8313         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8314         int_const_binop.
8315         (pos_to_constructor): Likewise.
8316
8317 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
8318             Eric Botcazou  <ebotcazou@adacore.com>
8319
8320         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8321         of build_function_type.  Adjust calls to...
8322         (build_raise_check): ...this.  Do not take a void_tree parameter.
8323         Call build_function_type_list instead of build_function_type.
8324         Fix head comment and swap couple of conditional blocks.
8325
8326 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
8327
8328         * gnatvsn.ads (Library_Version): Bump to 4.7.
8329         (Current_Year): Bump to 2011.
8330
8331 2011-04-29  Michael Matz  <matz@suse.de>
8332
8333         * gcc-interface/misc.c (gnat_handle_option): Set
8334         warn_maybe_uninitialized.
8335
8336 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
8337
8338         * gnat_ugn.texi (Complexity Metrics Control): Update link to
8339         the Watson/McCabe paper.
8340
8341 2011-04-23  Jim Meyering  <meyering@redhat.com>
8342
8343         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8344
8345 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8346
8347         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8348         onto the new type.
8349
8350 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8351
8352         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8353         parameter.
8354         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
8355         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8356         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8357         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8358         <all>: Do not set flags on the reused DECL node coming from an alias.
8359         Set DECL_IGNORED_P on the DECL node built for subprograms if they
8360         don't need debug info here...
8361         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8362         (gigi): Adjust calls to create_subprog_decl.
8363         (build_raise_check): Likewise.
8364         (establish_gnat_vms_condition_handler): Likewise.
8365         (Compilation_Unit_to_gnu): Likewise.
8366         (gnat_to_gnu): Likewise.
8367
8368 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
8369
8370         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8371         (NO_REORDER_ADAFLAGS): New variable.
8372         (EXTRA_GNATTOOLS): Always define.
8373         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8374         Clean up and adjust list of files compiled with special options.
8375         * gcc-interface/Make-lang.in: Likewise.
8376         (ada/decl.o): Cosmetical change.
8377         (ada/misc.o): Remove dependency on $(PLUGIN_H).
8378
8379 2011-04-20  Jim Meyering  <meyering@redhat.com>
8380
8381         * initialize.c (__gnat_initialize): Remove useless if-before-free.
8382
8383 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8384
8385         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8386         $(CFLAGS) on the link line.
8387
8388 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8389
8390         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8391         padded type built for the return type if it is unconstrained.
8392
8393 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
8394
8395         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8396
8397 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
8398
8399         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8400         before calling TREE_CHAIN.
8401         * gcc-interface/misc.c (gnat_init_ts): New function.
8402         (LANG_HOOKS_INIT_TS): Define.
8403
8404 2011-04-12  Martin Jambor  <mjambor@suse.cz>
8405
8406         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8407         instead of cgraph_node.
8408
8409 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8410
8411         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8412         alignment on fields of the RETURN type built for the Copy-In Copy-Out
8413         mechanism.
8414
8415 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8416
8417         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8418         of aggregate types that contain a placeholder.
8419
8420 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
8421
8422         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8423         TYPE_ARG_TYPES.
8424         (handle_type_generic_attribute): Likewise.
8425
8426 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
8427
8428         PR ada/47163
8429         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8430
8431 2011-04-04  Kai Tietz  <ktietz@redhat.com>
8432
8433         PR ada/47163
8434         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8435         to flag value.
8436
8437 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8438
8439         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8440         type case, do not strip a padding type around the array type.
8441
8442 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8443
8444         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8445         types.
8446
8447 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8448
8449         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8450         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8451         code for -feliminate-unused-debug-types.
8452         (gnat_post_options): Likewise.
8453
8454 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8455
8456         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8457         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8458         distinct copy.
8459
8460 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8461
8462         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8463         DECL_ARTIFICIAL flag on enumeration types.
8464
8465 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8466
8467         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8468         fat pointer types artificial unconditionally.
8469         <E_Array_Subtype>: Attach the base array type as a parallel type if it
8470         isn't artificial.
8471
8472 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8473
8474         * gcc-interface/gigi.h (get_dummy_type): Declare.
8475         (build_dummy_unc_pointer_types): Likewise.
8476         (finish_fat_pointer_type): Likewise.
8477         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8478         fat pointer type has been built, complete it in place.
8479         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8480         and thin pointers.  Remove useless variable.
8481         (finish_fat_pointer_type): Make global and move to...
8482         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8483         (get_dummy_type): New function.
8484         (build_dummy_unc_pointer_types): Likewise.
8485         (gnat_pushdecl): Propage the name to the anonymous variants only.
8486         (update_pointer_to): Only adjust the pointer types in the unconstrained
8487         array case.
8488
8489 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8490
8491         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8492         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8493         if this is a Taft amendment type and the full declaration is available.
8494         * gcc-interface/trans.c (process_type): Likewise.
8495         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8496         (process_freeze_entity): Likewise.
8497         * gcc-interface/utils.c (dummy_global): New static variable.
8498         (gnat_write_global_declarations): If there are types declared as used
8499         at the global level, insert them in the global hash table.
8500
8501 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8502
8503         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8504         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8505         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8506         copy.
8507         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
8508         flag of the type accordingly.
8509         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8510
8511 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8512
8513         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8514         finalizing types when updating the pointers to the designated type.
8515         <all>: Finalize the deferred types even if we didn't defer processing
8516         of incomplete types in this invocation.
8517
8518 2011-04-01  Olivier Hainque  <hainque@adacore.com>
8519             Nicolas Setton  <setton@adacore.com>
8520             Eric Botcazou  <ebotcazou@adacore.com>
8521
8522         * gcc-interface/misc.c (gnat_descriptive_type): New function.
8523         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8524
8525 2011-03-28  Kai Tietz  <ktietz@redhat.com>
8526
8527         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8528         Windows targets.
8529         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8530         * system-mingw.ads (System): Change ZCX_By_Default default to True.
8531
8532         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8533
8534 2011-03-28  Tristan Gingold  <gingold@adacore.com>
8535
8536         PR ada/44431
8537         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8538         Use ada output of gnatbind.
8539         (ada/b_gnatb.adb): Ditto.
8540         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8541         (ada.mostlyclean, ada.stage1)
8542         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8543         (ada.stagefeedback): Adjust.
8544         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8545         Use ada output of gnatbind.
8546         (b_gnatm.adb): Ditto.
8547         (b_gnatl.o, b_gnatm.o): New rules.
8548
8549 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8550
8551         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8552         for the padded type built to support a specified size or alignment.
8553
8554 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8555
8556         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8557         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8558         unconditionally to the end of the unit when the designated type is
8559         limited_with'ed.
8560         <all>: Rename local variable.  Attempt to un-defer types only and do it
8561         for limited_with'ed types as well.
8562         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
8563         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8564         consistently and remove redundant call to finalize_from_with_types.
8565
8566 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8567
8568         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8569         subprograms without a previous spec declared in the same unit.
8570         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8571         subprograms at the end of the unit instead of at the beginning.
8572         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8573         isn't public for the special handling of non-inline functions nested
8574         inside inline external functions.
8575
8576 2011-03-25  Jeff Law  <law@redhat.com>
8577
8578         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8579
8580 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
8581
8582         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8583         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8584         to compute Set_Size_Depends_On_Discriminant.
8585         (Layout_Type): Call it on array types in back-end layout mode.
8586         * sem_util.adb (Requires_Transient_Scope): Return true for array
8587         types only if the size depends on the value of discriminants.
8588         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8589         type if the RHS is a call to a function that returns an unconstrained
8590         type with default discriminant.
8591
8592 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
8593
8594         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8595         non-conversion to the nominal result type at the end.
8596
8597 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8598
8599         * gcc-interface/trans.c (create_temporary): New function taken from...
8600         (create_init_temporary): ...here.  Call it.
8601         (call_to_gnu): Create the temporary for the return value early, if any.
8602         Create it for a function with copy-in/copy-out parameters if there is
8603         no target; in other cases of copy-in/copy-out, use another temporary.
8604         Push the new binding level lazily.  Add and rename local variables.
8605
8606 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8607
8608         * gcc-interface/decl.c (validate_size): Improve comments and tweak
8609         error message.
8610         (set_rm_size): Likewise.
8611
8612 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8613
8614         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8615         for the padded type built in order to support a specified alignment.
8616         Fix incorrect formatting.
8617
8618 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8619
8620         PR bootstrap/48216
8621         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8622
8623 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8624
8625         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8626         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8627         to the end of the list.  Adjust recursive call.  Rename local variable.
8628         If REORDER is true, reorder components of the record type.
8629         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8630         components_to_record and adjust the parameter list.
8631
8632 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8633
8634         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8635         disabled, use the variable for bounds of loop iteration scheme.
8636
8637 2011-03-21  Kai Tietz  <ktietz@redhat.com>
8638
8639         PR target/12171
8640         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8641
8642 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8643
8644         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8645         out whether the expression is read-only.  Short-circuit placeholder
8646         case and rename a couple of local variables.
8647
8648 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8649
8650         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8651         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8652         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8653         (convert): Deal with conversions from a smaller form type specially.
8654
8655 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
8656
8657         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8658         its argument, except for the special -I- switch.
8659
8660 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
8661
8662         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8663         "Ada Issues".
8664
8665 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
8666
8667         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8668
8669 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
8670
8671         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8672         GNAT_FORMAL.
8673         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8674         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
8675         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
8676         Do not generate the check directly, instead instantiate the template
8677         check present in the descriptor.
8678         (make_descriptor_field): Move around.
8679         (build_vms_descriptor32): Build a template check in the POINTER field.
8680         (build_vms_descriptor): Remove useless suffixes.
8681         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8682
8683 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
8684
8685         PR bootstrap/47467
8686         * targext.c: Include target files if IN_RTS is defined.
8687
8688 2011-01-26  Richard Guenther  <rguenther@suse.de>
8689
8690         PR bootstrap/47467
8691         * targext.c: Include config.h.
8692         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8693         dependency.
8694
8695 2011-01-04  Pascal Obry  <obry@adacore.com>
8696             Eric Botcazou  <ebotcazou@adacore.com>
8697
8698         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8699
8700 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8701
8702         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8703         end-of-case on the end label and its associated gotos, if any.
8704
8705 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8706
8707         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8708         expressions of the parameter cache within the statement group of
8709         the CICO mechanism.
8710
8711 2011-01-04  Olivier Hainque  <hainque@adacore.com>
8712             Eric Botcazou  <ebotcazou@adacore.com>
8713
8714         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8715         (set_end_locus_from_node): New function.
8716         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8717         make and the function end_locus.
8718         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8719         for the elaboration subprogram.
8720         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8721         set the end_locus of the expression as well.
8722
8723 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8724
8725         PR ada/47131
8726         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8727         variables that are referenced in exception handlers volatile.
8728
8729
8730 \f
8731 Copyright (C) 2011 Free Software Foundation, Inc.
8732
8733 Copying and distribution of this file, with or without modification,
8734 are permitted in any medium without royalty provided the copyright
8735 notice and this notice are preserved.
8736
8737         * gnat_rm.texi: Ramification of pragma Eliminate documentation
8738          - fix bugs in the description of Source_Trace;
8739          - get rid of UNIT_NAME;
8740
8741 2011-08-02  Javier Miranda  <miranda@adacore.com>
8742
8743         * exp_ch9.adb
8744         (Build_Dispatching_Requeue): Adding support for VM targets
8745         since we cannot directly reference the Tag entity.
8746         * exp_sel.adb (Build_K): Adding support for VM targets.
8747         (Build_S_Assignment): Adding support for VM targets.
8748         * exp_disp.adb
8749         (Default_Prim_Op_Position): In VM targets do not restrict availability
8750         of predefined interface primitives to compiling in Ada 2005 mode.
8751         (Is_Predefined_Interface_Primitive): In VM targets this service is not
8752         restricted to compiling in Ada 2005 mode.
8753         (Make_VM_TSD): Generate code that declares and initializes the OSD
8754         record. Needed to support dispatching calls through synchronized
8755         interfaces.
8756         * exp_ch3.adb
8757         (Make_Predefined_Primitive_Specs): Enable generation of predefined
8758         primitives associated with synchronized interfaces.
8759         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8760         primitives associated with synchronized interfaces.
8761
8762 2011-08-02  Yannick Moy  <moy@adacore.com>
8763
8764         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8765         statements hidden in SPARK if preceded by the HIDE directive
8766         (Parse_Exception_Handlers): mark each exception handler in a sequence of
8767         exception handlers as hidden in SPARK if preceded by the HIDE directive
8768         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8769         if starting with the HIDE directive
8770         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8771         starting with the HIDE directive; mark the declarations in a private
8772         part as hidden in SPARK if the private part starts with the HIDE
8773         directive
8774         * restrict.adb, restrict.ads
8775         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8776         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8777         argument node belongs to a part which is hidden in SPARK
8778         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8779         parts in SPARK; protect the possibly costly call to
8780         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8781         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8782         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8783         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8784         Tok_SPARK_Hide.
8785         (Scan): recognize special comment starting with '#' and followed by
8786         SPARK keyword "hide" as a HIDE directive.
8787
8788 2011-08-02  Yannick Moy  <moy@adacore.com>
8789
8790         * types.ads, erroutc.ads: Minor reformatting.
8791
8792 2011-08-02  Vincent Celier  <celier@adacore.com>
8793
8794         * link.c: Add response file support for cross platforms.
8795
8796 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8797
8798         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8799         in an association, set parent field of copy before partial analysis.
8800         * sem_res.adb (Resolve_Slice): create reference to itype only when
8801         expansion is enabled.
8802
8803 2011-08-02  Yannick Moy  <moy@adacore.com>
8804
8805         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8806         for new flag denoting which subprogram bodies are in ALFA
8807         * restrict.adb, sem_ch7.adb: Update comment
8808         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8809         sem_ch9.adb, sem_res.adb: Add calls to
8810         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8811         * sem_ch6.adb (Analyze_Function_Return): add calls to
8812         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8813         middle of the body, and extended return.
8814         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8815         False when missing return.
8816         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8817         to True for subprograms whose spec is in ALFA. Remove later on the flag
8818         on the entity used for a subprogram body when there exists a separate
8819         declaration.
8820         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8821         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8822         False, otherwise do nothing.
8823
8824 2011-08-02  Robert Dewar  <dewar@adacore.com>
8825
8826         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8827
8828 2011-08-02  Yannick Moy  <moy@adacore.com>
8829
8830         * sem_ch4.ads: minor formatting.
8831
8832 2011-08-02  Yannick Moy  <moy@adacore.com>
8833
8834         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8835         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8836         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8837         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8838         opt.ads: cleanup of SPARK mode
8839
8840 2011-08-02  Yannick Moy  <moy@adacore.com>
8841
8842         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8843         types.
8844         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8845         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8846         * sem_ch3.adb
8847         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8848         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8849         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8850         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8851         types.
8852         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8853         non-static range.
8854         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8855         functions whose return type is not in ALFA.
8856         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8857         specifications.
8858         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8859         parameter's type is not in ALFA.
8860         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8861         types are in ALFA.
8862
8863 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8864
8865         * sem_ch6 (Analyze_Expression_Function): treat the function as
8866         Inline_Always, and introduce a subprogram declaration for it when it is
8867         not a completion.
8868         * inline.adb (Add_Inlined_Body): recognize bodies that come from
8869         expression functions, so that the back-end can determine whether they
8870         can in fact be inlined.
8871         * sem_util.adb (Is_Expression_Function): predicate to determine whether
8872         a function body comes from an expression function.
8873
8874 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8875
8876         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8877         null exclusions to test Can_Never_Be_Null on the anonymous access types
8878         of the formals rather than testing the formals themselves. Exclude this
8879         check in cases where the Old_Formal is marked as a controlling formal,
8880         to avoid issuing spurious errors for bodies completing dispatching
8881         operations (due to the flag not getting set on controlling access
8882         formals in body specs).
8883         (Find_Corresponding_Spec): When checking full and subtype conformance of
8884         subprogram bodies in instances, pass Designated and E in that order, for
8885         consistency with the expected order of the formals (New_Id followed by
8886         Old_Id).
8887
8888 2011-08-02  Robert Dewar  <dewar@adacore.com>
8889
8890         * sem_ch8.adb: Minor reformatting.
8891
8892 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8893
8894         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8895         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8896         primitive operations of class-wide actuals.
8897
8898 2011-08-02  Javier Miranda  <miranda@adacore.com>
8899
8900         * exp_atag.ads, exp_atag.adb
8901         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8902         since its value is implicitly passed in argument Typ.
8903         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8904         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8905         Build_Common_Dispatching_Select_Statements.
8906
8907 2011-08-02  Robert Dewar  <dewar@adacore.com>
8908
8909         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8910         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8911         Minor reformatting.
8912
8913 2011-08-02  Robert Dewar  <dewar@adacore.com>
8914
8915         * sem_res.adb: Minor reformatting.
8916         * sem_prag.adb: Minor reformatting.
8917
8918 2011-08-02  Javier Miranda  <miranda@adacore.com>
8919
8920         * exp_atag.adb, exp_atags.ads
8921         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8922         by the tagged type Entity. Required to use this routine in the VM
8923         targets since we do not have available the Tag entity in the VM
8924         platforms.
8925         * exp_ch6.adb
8926         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8927         Ada.Tags has not been previously loaded.
8928         * exp_ch7.adb
8929         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8930         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8931         * sem_aux.adb
8932         (Enclosing_Dynamic_Scope): Add missing support to handle the full
8933         view of enclosing scopes. Required to handle enclosing scopes that
8934         are synchronized types whose full view is a task type.
8935         * exp_disp.adb
8936         (Build_VM_TSDs): Minor code improvement to avoid generating and
8937         analyzing lists with empty nodes.
8938         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8939         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8940         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8941         (Make_Disp_Timed_Select_Body): Add support for VM targets.
8942         (Make_Select_Specific_Data_Table): Add support for VM targets.
8943         (Make_VM_TSD): Generate code to initialize the SSD structure of
8944         the TSD.
8945
8946 2011-08-02  Yannick Moy  <moy@adacore.com>
8947
8948         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8949         cross-references section in ALI.
8950         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8951         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8952         Sub).
8953         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8954         subprogram or package entity of a node
8955         (Is_Local_Reference_Type): new function returns True for references
8956         selected in local cross-references.
8957         (Lt): function extracted from Lt in Output_References
8958         (Write_Entity_Name): function extracted from Output_References
8959         (Generate_Definition): generate reference with type 'D' for definition
8960         of objects (object declaration and parameter specification), with
8961         appropriate locations and units, for use in local cross-references.
8962         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8963         references of type 'I' for initialization in object definition.
8964         (Output_References): move part of function Lt and procedure
8965         Write_Entity_Name outside of the body. Ignore references of types 'D'
8966         and 'I' introduced for local cross-references.
8967         (Output_Local_References): new procedure to output the local
8968         cross-references sections.
8969         (Lref_Entity_Status): new array defining whether an entity is a local
8970         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8971         with 'I' type when initialization expression is present.
8972         * get_scos.adb, get_scos.ads: Correct comments and typos
8973
8974 2011-08-02  Javier Miranda  <miranda@adacore.com>
8975
8976         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8977         the JVM target.
8978         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8979         the JVM target.
8980         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8981         TSD support.
8982
8983 2011-08-02  Vincent Celier  <celier@adacore.com>
8984
8985         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8986         (No_Space_Img): New function
8987         (Find_Excluded_Sources): When reading from a file, record the file name
8988         and the line number for each excluded source.
8989         (Mark_Excluded_Sources): When reporting an error, if the excluded
8990         sources were read from a file, include file name and line number in
8991         the error message.
8992
8993 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8994
8995         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8996
8997 2011-08-02  Robert Dewar  <dewar@adacore.com>
8998
8999         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9000
9001 2011-08-02  Javier Miranda  <miranda@adacore.com>
9002
9003         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9004         generation of TSDs to the DOTNET compiler.
9005         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9006         generation of TSDs to the DOTNET compiler.
9007
9008 2011-08-02  Javier Miranda  <miranda@adacore.com>
9009
9010         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9011         record of all the tagged types declared inside library level package
9012         declarations, library level package bodies or library level subprograms.
9013         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9014         associated with a given tagged type.
9015         (Build_VM_TSDs): New subprogram.
9016         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9017         compilation units that are subprograms.
9018         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9019         compilation units that are package bodies.
9020         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9021         units that are a package declaration or a package instantiation.
9022         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9023         reorganization to improve the error generated by the frontend when the
9024         function Ada.Tags.Secondary_Tag is not available.
9025         * rtsfind.ads (RE_Register_TSD): New runtime entity.
9026         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9027
9028 2011-08-02  Javier Miranda  <miranda@adacore.com>
9029
9030         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9031
9032 2011-08-02  Robert Dewar  <dewar@adacore.com>
9033
9034         * s-imenne.ads: Minor reformatting.
9035
9036 2011-08-02  Robert Dewar  <dewar@adacore.com>
9037
9038         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9039         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9040         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9041
9042 2011-08-02  Robert Dewar  <dewar@adacore.com>
9043
9044         * einfo.ads (Materialize_Entity): Document this is only for renamings
9045         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9046         required debug information in the case where we transform the object
9047         declaration into a renaming declaration.
9048         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9049         object
9050         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9051         Materialize_Entity.
9052
9053 2011-08-02  Robert Dewar  <dewar@adacore.com>
9054
9055         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9056         Suppress_Init_Procs.
9057         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9058         Suppress_Initialization/Initialization_Suppressed.
9059         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9060         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9061         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9062         * sem_prag.adb: New processing for pragma Suppress_Initialization.
9063
9064 2011-08-02  Robert Dewar  <dewar@adacore.com>
9065
9066         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9067         Minor reformatting.
9068
9069 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9070
9071         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9072         only have inheritable classwide pre/postconditions.
9073
9074 2011-08-02  Javier Miranda  <miranda@adacore.com>
9075
9076         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9077         * rtsfind.ads (RE_Check_TSD): New runtime entity.
9078         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9079         checks if the external tag of a type is the same as the external tag
9080         of some other declaration.
9081
9082 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9083
9084         * s-taskin.ads: Minor reformatting.
9085
9086 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9087
9088         * g-comlin.adb (Display_Help): swap the order in which it prints the
9089         short help and the general usage.
9090
9091 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9092
9093         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9094         the aspect declarations and attach them to the generic copy for
9095         subsequent analysis.
9096         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9097         declarations of the generic tree to the new subprogram declarations.
9098         * sem_attr.adb (Check_Precondition_Postcondition): recognize
9099         conditions that apply to a subprogram instance.
9100
9101 2011-08-02  Robert Dewar  <dewar@adacore.com>
9102
9103         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9104
9105 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9106
9107         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9108         private type with a tagged full view is not derived in the immediate
9109         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9110
9111 2011-08-02  Robert Dewar  <dewar@adacore.com>
9112
9113         * exp_ch4.adb: Minor reformatting.
9114
9115 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9116
9117         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
9118         Ada2012 iterator, the loop will be rewritten during expansion into a
9119         while loop with a cursor and an element declaration. Do not analyze the
9120         body in this case, because if the container is for indefinite types the
9121         actual subtype of the elements will only be determined when the cursor
9122         declaration is analyzed.
9123
9124 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9125
9126         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9127         size/alignment related attributes in CodePeer_Mode.
9128
9129 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9130
9131         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9132         Prepend_Element, since this can result in the operation getting the
9133         wrong slot in the full type's dispatch table if the full type has
9134         inherited operations. The incomplete type's operation will get added
9135         to the proper position in the full type's primitives
9136         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9137         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9138         dispatching operations, since there are cases where nonprimitive
9139         subprograms can get added to the list of incomplete dependents (such
9140         as subprograms in nested packages).
9141         * sem_ch6.adb (Process_Formals): First, remove test for being in a
9142         private part when determining whether to add a primitive with a
9143         parameter of a tagged incomplete type to the Private_Dependents list.
9144         Such primitives can also occur in the visible part, and should not have
9145         been excluded from being private dependents.
9146         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9147         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9148         list of a Taft-amendment incomplete type is a primitive before issuing
9149         an error that the full type must appear in the same unit. There are
9150         cases where nonprimitives can be in the list (such as subprograms in
9151         nested packages).
9152         * sem_disp.adb (Derives_From): Use correct condition for checking that
9153         a formal's type is derived from the type of the corresponding formal in
9154         the parent subprogram (the condition was completely wrong). Add
9155         checking that was missing for controlling result types being derived
9156         from the result type of the parent operation.
9157
9158 2011-08-02  Yannick Moy  <moy@adacore.com>
9159
9160         * errout.adb (First_Node): minor renaming
9161         * restrict.adb (Check_Formal_Restriction): put restriction warning on
9162         first node.
9163
9164 2011-08-02  Yannick Moy  <moy@adacore.com>
9165
9166         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9167         before accessing operands.
9168         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9169         decide whether an initialization expression respects SPARK rules, as
9170         the plain node is the expanded one. This allows for more valid warnings
9171         to be issued.
9172         * gnat_rm.texi: Minor update.
9173
9174 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9175
9176         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9177         previous change.
9178
9179 2011-08-02  Robert Dewar  <dewar@adacore.com>
9180
9181         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9182
9183 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9184
9185         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9186         loop statements and the element renaming declaration with a block when
9187         the element type is controlled.
9188
9189 2011-08-02  Yannick Moy  <moy@adacore.com>
9190
9191         * sinfo.ads: Minor formatting.
9192
9193 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9194
9195         * sem_aggr.adb (Add_Association): if the association has a box and no
9196         expression, use the Sloc of the aggregate itself for the new
9197         association.
9198         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9199         the Original_Node.
9200
9201 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9202
9203         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9204         When a container is provided via a function call, generate a renaming
9205         of the function result. This avoids the creation of a transient scope
9206         and the premature finalization of the container.
9207         * exp_ch7.adb (Is_Container_Cursor): Removed.
9208         (Wrap_Transient_Declaration): Remove the supression of the finalization
9209         of the list controller when the declaration denotes a container cursor,
9210         it is not needed.
9211
9212 2011-08-02  Yannick Moy  <moy@adacore.com>
9213
9214         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9215         node is from source, instead of the original node being from source.
9216         * sem_aggr.adb
9217         (Resolve_Array_Aggregate): refine the check for a static expression, to
9218         recognize also static ranges
9219         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9220         Array_Type_Declaration): postpone the test for the type being a subtype
9221         mark after the type has been resolved, so that component-selection and
9222         expanded-name are discriminated.
9223         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9224         to distinguish the case of an iteration scheme, so that an error is
9225         issed on a non-static range in SPARK except in an iteration scheme.
9226         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9227         In_Iter_Schm = True.
9228         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9229         user-defined operators so that they are allowed in renaming
9230         * sem_ch8.adb
9231         (Find_Selected_Component): refine the check for prefixing of operators
9232         so that they are allowed in renaming. Move the checks for restrictions
9233         on selector name after analysis discriminated between
9234         component-selection and expanded-name.
9235         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9236         concatenation argument of string type if it is static.
9237         * sem_util.adb, sem_util.ads
9238         (Check_Later_Vs_Basic_Declarations): add a new function
9239         Is_Later_Declarative_Item to decice which declarations are allowed as
9240         later items, in the two different modes Ada 83 and SPARK. In the SPARK
9241         mode, add that renamings are considered as later items.
9242         (Enclosing_Package): new function to return the enclosing package
9243         (Enter_Name): correct the rule for homonyms in SPARK
9244         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9245         from source (result of expansion) to avoid issuing wrong warnings.
9246
9247 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9248
9249         * errout.adb: On anything but an expression First_Node returns its
9250         argument.
9251
9252 2011-08-02  Pascal Obry  <obry@adacore.com>
9253
9254         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9255
9256 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9257
9258         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9259         Set the associated loop as the related expression of internally
9260         generated cursors.
9261         * exp_ch7.adb (Is_Container_Cursor): New routine.
9262         (Wrap_Transient_Declaration): Supress the finalization of the list
9263         controller when the declaration denotes a container cursor.
9264
9265 2011-08-02  Yannick Moy  <moy@adacore.com>
9266
9267         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9268         command line now.
9269         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9270         expression is a simple expression. This check cannot be performed in
9271         the semantics, so just drop it.
9272         (P_Index_Or_Discriminant_Constraint): move check that the index or
9273         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9274         semantics. Other cases were previously checked in the semantics.
9275         * par-ch4.adb (P_Name): move checks that a selector name is not
9276         character literal or an operator symbol to Find_Selected_Component in
9277         the semantics
9278         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9279         declarations are not placed after later declarations in a separate
9280         procedure in Sem_Util (possibly not the best choice?), to be used both
9281         during parsing, for Ada 83 mode, and during semantic analysis, for
9282         SPARK mode.
9283         * par-endh.adb (Check_End): move check that end label is not missing
9284         to Process_End_Label in the semantics
9285         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9286         the special case for SPARK restriction
9287         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9288         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9289         parameter Force to issue the error message even on internal node (used
9290         for generated end label). Call Check_Restriction to check when an error
9291         must be issued. In SPARK mode, issue an error message even if the
9292         restriction is not set.
9293         (Check_Restriction): new procedure with an additional out parameter to
9294         inform the caller that a message has been issued
9295         * sem_aggr.adb: Minor modification of message
9296         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9297         instead of issuing an error message directly
9298         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9299         declarations are not placed after later declarations, by calling
9300         Check_Later_Vs_Basic_Declarations
9301         (Analyze_Subtype_Declaration): move here the check that an index or
9302         discriminant constraint must be a subtype mark. Change the check that
9303         a subtype of String must start at one so that it works on subtype marks.
9304         * sem_ch4.adb (Analyze_Call): move here the check that a named
9305         association cannot follow a positional one in a call
9306         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9307         instead of issuing an error message directly
9308         * sem_ch8.adb (Find_Selected_Component): move here the check that a
9309         selector name is not a character literal or an operator symbol. Move
9310         here the check that the prefix of an expanded name cannot be a
9311         subprogram or a loop statement.
9312         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9313         procedure called from parsing and semantics to check that basic
9314         declarations are not placed after later declarations
9315         (Process_End_Label): move here the check that end label is not missing
9316
9317 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9318
9319         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9320         representation clause in codepeer mode, since it confuses CodePeer and
9321         does not bring useful info.
9322
9323 2011-08-02  Ed Falis  <falis@adacore.com>
9324
9325         * init.c: initialize fp hw on MILS.
9326
9327 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9328
9329         * errout.adb (First_Node): for bodies, return the node itself (small
9330         optimization). For other nodes, do not check source_unit if the node
9331         comes from Standard.
9332
9333 2011-08-02  Robert Dewar  <dewar@adacore.com>
9334
9335         * exp_ch3.adb: Minor comment additions.
9336         * sem_ch13.adb: Minor reformatting.
9337
9338 2011-08-02  Pascal Obry  <obry@adacore.com>
9339
9340         * make.adb, makeutl.adb: Removes some superfluous directory separator.
9341
9342 2011-08-02  Robert Dewar  <dewar@adacore.com>
9343
9344         * sem_attr.adb: Minor reformatting.
9345
9346 2011-08-02  Robert Dewar  <dewar@adacore.com>
9347
9348         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9349         (Has_Default_Component_Value): Removed
9350         * einfo.ads Comment updates
9351         (Has_Default_Aspect): Replaces Has_Default_Value
9352         (Has_Default_Component_Value): Removed
9353         * exp_ch13.adb
9354         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9355         * exp_ch3.adb
9356         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9357         (Get_Simple_Init_Val): Handle Default_Value aspect
9358         (Needs_Simple_Initialization): Handle Default_Value aspect
9359         * exp_ch3.ads: Needs_Simple_Initialization
9360         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9361         * par-prag.adb (Pragma_Default[_Component]Value) Removed
9362         * sem_ch13.adb
9363         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9364         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9365         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9366
9367 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9368
9369         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9370         package containing iteration primitives.
9371         exp_ch5.adb (Expand_Iterator_Loop): ditto.
9372
9373 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9374
9375         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9376         "of", pre-analyze expression in case it is a function call with
9377         finalization actions that must be placed ahead of the loop.
9378         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9379         on an Ada2012 iterator, insert them ahead of the rewritten loop.
9380
9381 2011-08-02  Geert Bosch  <bosch@adacore.com>
9382
9383         * cstand.adb (Create_Float_Types): Only consider C's long double for
9384         Long_Long_Float, in addition to double.
9385
9386 2011-08-02  Robert Dewar  <dewar@adacore.com>
9387
9388         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9389         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9390         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9391         Minor reformatting.
9392
9393 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9394
9395         * sem_attr.adb: handle properly 'Result when it is a prefix of an
9396         indexed component.
9397
9398 2011-08-02  Javier Miranda  <miranda@adacore.com>
9399
9400         * einfo.ads, einfo.adb
9401         (Original_Access_Type): Move this attribute to Node26 since there was
9402         an undocumented use of Node21 in E_Access_Subprogram_Type entities
9403         which causes conflicts and breaks the generation of the .NET compiler.
9404         (Interface_Name): Add missing documentation on JGNAT only uses of
9405         this attribute.
9406
9407 2011-08-02  Geert Bosch  <bosch@adacore.com>
9408
9409         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9410         (Find_Back_End_Float_Type): Likewise
9411         (Create_Back_End_Float_Types): Likewise
9412         (Create_Float_Types): Likewise
9413         (Register_Float_Type): Likewise
9414         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9415         Nlist and split out type selection in new local Find_Base_Type function.
9416         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9417         Nlist
9418         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9419
9420 2011-08-02  Robert Dewar  <dewar@adacore.com>
9421
9422         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9423         alpha order).
9424         * opt.ads: Minor comment change.
9425         * sem_ch12.adb: Minor code reorganization.
9426
9427 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9428
9429         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9430         subtype's list of rep items to the list on the full subtype in the case
9431         where the lists are the same.
9432
9433 2011-08-02  Geert Bosch  <bosch@adacore.com>
9434
9435         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9436         using the one from System.Strings, which also deallocates all strings.
9437
9438 2011-08-02  Geert Bosch  <bosch@adacore.com>
9439
9440         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9441         function.
9442         * gcc-interface/Make-lang.in: Update dependencies.
9443
9444 2011-08-02  Olivier Hainque  <hainque@adacore.com>
9445
9446         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9447         end_locus.
9448
9449 2011-08-02  Javier Miranda  <miranda@adacore.com>
9450
9451         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9452         associated with anonymous access to subprograms.
9453
9454 2011-08-02  Geert Bosch  <bosch@adacore.com>
9455
9456         * opt.ads
9457         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9458         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9459         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9460         (Add_Symbol_Definition): Move to switch-c.adb
9461         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9462         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9463         (Add_Symbol_Definition): Move to switch-c.adb.
9464         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9465         * sem_warn.adb
9466         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9467         Move to warnsw.adb.
9468         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9469         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9470         Move to warnsw.adb.
9471         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
9472         (Add_Symbol_Definition): Moved from Prepcomp.
9473         * switch-c.ads: Update copyright notice. Use String_List instead of
9474         Argument_List, removing dependency on System.OS_Lib.
9475
9476 2011-08-02  Yannick Moy  <moy@adacore.com>
9477
9478         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9479         mode on initialization expression which does not respect SPARK
9480         restrictions.
9481         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9482         if the tree referenced by its argument represents an initialization
9483         expression in SPARK, suitable for initializing an object in an object
9484         declaration.
9485
9486 2011-08-02  Javier Miranda  <miranda@adacore.com>
9487
9488         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9489         internally generated access to subprogram with its associated protected
9490         subprogram type.
9491         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9492
9493 2011-08-02  Geert Bosch  <bosch@adacore.com>
9494
9495         * cstand.adb (Register_Float_Type): Print information about type to
9496         register, if the Debug_Flag_Dot_B is set.
9497         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9498         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9499         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9500         with a requested precision of more than Max_Digits digits and no more
9501         than Max_Base_Digits digits, if a range specification is present and the
9502         Predefined_Float_Types list has a suitable type to derive from.
9503         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9504         case of type completion with pragma Import
9505         * sem_prag.adb
9506         (Process_Import_Predefined_Type): Processing to complete a type
9507         with pragma Import. Currently supports floating point types only.
9508         (Set_Convention_From_Pragma): Do nothing without underlying type.
9509         (Process_Convention): Guard against absence of underlying type,
9510         which may happen when importing incomplete types.
9511         (Process_Import_Or_Interface): Handle case of importing predefined
9512         types. Tweak error message.
9513
9514 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9515
9516         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9517         functions to previous change.  Reorganize code slightly.
9518
9519 2011-08-02  Geert Bosch  <bosch@adacore.com>
9520
9521         * back_end.ads (Register_Type_Proc): New call back procedure type for
9522         allowing the back end to provide information about available types.
9523         (Register_Back_End_Types): New procedure to register back end types.
9524         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9525         available types.
9526         * cstand.adb (Back_End_Float_Types): New list for floating point types
9527         supported by the back end.
9528         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9529         (Copy_Float_Type): New procedure to make new copies of predefined types.
9530         (Register_Float_Type): New call back procedure to populate the BEFT list
9531         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9532         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9533         (Create_Float_Types): New procedure to create entities for floating
9534         point types predefined in Standard, and put these and any remaining
9535         BEFTs on the Predefined_Float_Types list.
9536         * stand.ads (Predefined_Float_Types): New list for predefined floating
9537         point types that do not have declarations in package Standard.
9538
9539 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9540
9541         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
9542         entity node for the unit containing the parameter.
9543         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
9544         (Add_Inlined_Subprogram): Likewise.
9545         * gcc-interface/Make-lang.in: Update dependencies.
9546
9547 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9548
9549         * s-stusta.adb (Print): Make sure Pos is always initialized to a
9550         suitable value.
9551
9552 2011-08-02  Geert Bosch  <bosch@adacore.com>
9553
9554         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
9555
9556 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9557
9558         * sem_type.adb (Covers): Move trivial case to the top and reuse the
9559         computed value of Base_Type.
9560
9561 2011-08-02  Yannick Moy  <moy@adacore.com>
9562
9563         * restrict.adb (Check_Restriction): issue an error for any use of
9564         class-wide, even if the No_Dispatch restriction is not set.
9565         * sem_aggr.adb: Correct typos in comments and messages in formal mode
9566         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
9567         when completing a private extension, the type named in the private part
9568         is not the same as that named in the visible part.
9569         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
9570         of an inherited primitive operations of a tagged type or type extension
9571         that returns the tagged type.
9572         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
9573         function which returns True for an implicit operation inherited by the
9574         derived type declaration for the argument type.
9575         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
9576         order.
9577
9578 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9579
9580         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
9581         Process_Bounds, to perform analysis with expansion of a range or an
9582         expression that is the iteration scheme for a loop.
9583         (Analyze_Iterator_Specification): If domain of iteration is given by a
9584         function call with a controlled result, as is the case if call returns
9585         a predefined container, ensure that finalization actions are properly
9586         generated.
9587         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
9588
9589 2011-08-02  Javier Miranda  <miranda@adacore.com>
9590
9591         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9592         * gcc-interface/Make-lang.in: Update dependencies.
9593
9594 2011-08-02  Javier Miranda  <miranda@adacore.com>
9595
9596         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9597         determine if the analysis is performed using N or Original_Node (N).
9598         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9599         functionality of routine Is_Variable avoids code duplication.
9600         * checks.adb (Determine_Range): Handle temporaries generated by
9601         Remove_Side_Effects.
9602
9603 2011-08-02  Javier Miranda  <miranda@adacore.com>
9604
9605         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9606         expansion of the condition. Required since the previous analysis was
9607         done with expansion disabled (see Resolve_Quantified_Expression) and
9608         hence checks were not inserted and record comparisons have not been
9609         expanded.
9610
9611 2011-08-02  Ed Falis  <falis@adacore.com>
9612
9613         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9614         Update header.
9615
9616 2011-08-02  Bob Duff  <duff@adacore.com>
9617
9618         * opt.ads: Minor comment fix.
9619
9620 2011-08-02  Bob Duff  <duff@adacore.com>
9621
9622         * sem_ch12.adb (Analyze_Package_Instantiation,
9623         Analyze_Subprogram_Instantiation): Turn off style checking while
9624         analyzing an instance. Whatever style checks that apply to the generic
9625         unit should apply, so it makes no sense to apply them in an instance.
9626         This was causing trouble when compiling an instance of a runtime
9627         unit that violates the -gnatyO switch.
9628         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9629         one of the two case statements, causing spurious errors.
9630
9631 2011-08-02  Robert Dewar  <dewar@adacore.com>
9632
9633         * uname.adb: Minor reformatting.
9634         * gnatcmd.adb: Minor reformatting.
9635         * exp_attr.adb: Minor reformatting.
9636
9637 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9638
9639         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9640         No_Dispatching_Calls, do not look for the Assign primitive, because
9641         predefined primitives are not created in this case.
9642
9643 2011-08-02  Bob Duff  <duff@adacore.com>
9644
9645         * stylesw.ads: Minor comment fixes.
9646
9647 2011-08-02  Robert Dewar  <dewar@adacore.com>
9648
9649         * freeze.adb (Add_To_Result): New procedure.
9650
9651 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9652
9653         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9654         time, if the specific run-time routines for handling streams of strings
9655         are not available, use the default mechanism.
9656
9657 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9658
9659         * s-regpat.ads: Fix typo.
9660
9661 2011-08-02  Vincent Celier  <celier@adacore.com>
9662
9663         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9664         not null, call it to create the in memory config project file without
9665         parsing an existing default config project file.
9666
9667 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9668
9669         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9670
9671 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9672
9673         * sem_elim.adb: an abstract subprogram does not need an eliminate
9674         pragma for its descendant to be eliminable.
9675
9676 2011-08-02  Ed Falis  <falis@adacore.com>
9677
9678         * init.c: revert to handling before previous checkin for VxWorks
9679         * s-intman-vxworks.adb: delete unnecessary declarations related to
9680         using Ada interrupt facilities for handling signals.
9681         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9682         * s-intman-vxworks.ads: Import __gnat_install_handler as
9683         Initialize_Interrupts.
9684         * s-taprop-vxworks.adb: Delete Signal_Mask.
9685         (Abort_Handler): change construction of mask to unblock exception
9686         signals.
9687
9688 2011-08-02  Jerome Guitton  <guitton@adacore.com>
9689
9690         * a-except-2005.adb (Raise_From_Signal_Handler): Call
9691         Debug_Raise_Exception before propagation starts.
9692
9693 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9694
9695         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9696         to Restriction_Check_Required.
9697         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9698         * sem_res.adb (Resolve_Call): Likewise.
9699         * sem_attr.adb (Check_Stream_Attribute): Likewise.
9700
9701 2011-08-02  Bob Duff  <duff@adacore.com>
9702
9703         * stylesw.ads: Update comment.
9704         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9705         * errout.ads: Remove obsolete comment.
9706
9707 2011-08-02  Javier Miranda  <miranda@adacore.com>
9708
9709         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9710         (Set_Is_Safe_To_Reevaluate): new procedure.
9711         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9712         assignment is allowed on safe-to-reevaluate variables.
9713         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9714         temporary created to remove side effects in expressions that use
9715         the secondary stack as safe-to-reevaluate.
9716         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9717         variables that are not true constants.
9718
9719 2011-08-02  Robert Dewar  <dewar@adacore.com>
9720
9721         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9722         sem_res.adb, sem_ch6.adb: Minor reformatting.
9723
9724 2011-08-02  Jerome Guitton  <guitton@adacore.com>
9725
9726         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9727
9728 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9729
9730         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9731         not set Overridden_Operation if subprogram is an initialization
9732         procedure.
9733
9734 2011-08-02  Yannick Moy  <moy@adacore.com>
9735
9736         * par-ch6.adb: Correct obsolete name in comments
9737         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9738         which takes two message arguments (existing function takes one), with
9739         second message used for continuation.
9740         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9741         block statements that originate from a source block statement, not
9742         generated block statements
9743         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9744         symmetry with procedure case
9745         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9746         function to issue an error in formal mode if a package specification
9747         contains more than one tagged type or type extension.
9748         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9749         parameters matching formals of tagged types are objects (or ancestor
9750         type conversions of objects), not general expressions. Issue an error
9751         on view conversions that are not involving ancestor conversion of an
9752         extended type.
9753         (Resolve_Type_Conversion): in formal mode, issue an error on the
9754         operand of an ancestor type conversion which is not an object
9755         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9756         procedure so that it works also for actuals of function calls
9757         (Is_Actual_Tagged_Parameter): new function which determines if its
9758         argument is an actual parameter of a formal of tagged type in a
9759         subprogram call
9760         (Is_SPARK_Object_Reference): new function which determines if the tree
9761         referenced by its argument represents an object in SPARK
9762
9763 2011-08-02  Robert Dewar  <dewar@adacore.com>
9764
9765         * sem_ch3.adb: Minor reformatting
9766         Minor comment addition
9767         Minor error msg text change
9768
9769 2011-08-02  Javier Miranda  <miranda@adacore.com>
9770
9771         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9772         function. Used to be more precise when we generate a variable plus one
9773         assignment to remove side effects in the evaluation of the Bound
9774         expressions.
9775         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9776         of the bound expression to force its re-analysis and thus expand the
9777         associated transient scope (if required). Code cleanup replacing the
9778         previous code that declared the constant entity by an invocation to
9779         routine Force_Evaluation which centralizes this work in the frontend.
9780
9781 2011-08-02  Robert Dewar  <dewar@adacore.com>
9782
9783         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9784         (Base_Type): Now uses improved Is_Base_Type function
9785         * einfo.ads (Base_Type): Inline this function
9786
9787 2011-08-02  Robert Dewar  <dewar@adacore.com>
9788
9789         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9790         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9791
9792 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9793
9794         * gcc-interface/Make-lang.in: Update dependencies.
9795         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9796         targets.
9797
9798 2011-08-02  Yannick Moy  <moy@adacore.com>
9799
9800         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9801         non-simple expression used in delta constraint
9802         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9803         index constraint which is not a subtype mark
9804         * par.adb: With and use Restrict
9805         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9806         mode on component type which is not a subtype mark and default
9807         expression on component
9808         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9809         of string which does not have a lower index bound equal to 1
9810         (Array_Type_Declaration): issue an error in formal mode on index or
9811         component type which is not a subtype mark, and on aliased keyword on
9812         component
9813         (Derived_Type_Declaration): issue an error in formal mode on interface,
9814         limited or abstract type
9815         (Record_Type_Declaration): issue an error in formal mode on interface
9816         (Record_Type_Definition): issue an error in formal mode on tagged types
9817         and type extensions not declared in the specification of a library unit
9818         package; on null non-tagged record; on variant part
9819
9820 2011-08-02  Vincent Celier  <celier@adacore.com>
9821
9822         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9823         not declared for qualified library project when Library_Name is not
9824         declared, but Library_Dir is.
9825
9826 2011-08-02  Robert Dewar  <dewar@adacore.com>
9827
9828         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9829         pragmas (affects aspects [Component_]Default_Value
9830         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9831         component type for the resolution
9832
9833 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9834
9835         * einfo.adb (Base_Type): Tune implementation for speed.
9836
9837 2011-08-02  Robert Dewar  <dewar@adacore.com>
9838
9839         * freeze.adb: Minor reformatting.
9840
9841 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9842
9843         * scos.ads: Update comments.
9844
9845 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9846
9847         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9848         base type, because the parent may be a subtype of a private type whose
9849         convention is established in a private part.
9850
9851 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9852
9853         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9854         statement in a block when the expansion of the return expression has
9855         created a finalization chain.
9856         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9857         with the parent node.
9858         Add N_Extended_Return_Statement to handle the case where a transient
9859         object declaration appears in the Return_Object_Declarations list of
9860         an extended return statement.
9861
9862 2011-08-02  Matthew Gingell  <gingell@adacore.com>
9863
9864         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9865         unused parameter 'name'.
9866
9867 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9868
9869         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9870         inherited operation, check whether its alias, which is the source
9871         operastion that it renames, has been marked eliminated.
9872
9873 2011-08-02  Javier Miranda  <miranda@adacore.com>
9874
9875         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9876         in-mode parameter whose type is an access type since it can be used to
9877         modify its designated object. Enforce code that handles as safe an
9878         access type that is not access-to-constant but it is the result of a
9879         previous removal of side-effects.
9880         (Remove_Side_Effects): Minor code reorganization of cases which require
9881         no action. Done to incorporate documentation on new cases uncovered
9882         working in this ticket: no action needed if this routine was invoked
9883         too early and the nodes are not yet decorated.
9884         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9885         to routine Remove_Side_Effects by calls to Force_Evaluation since they
9886         were issued with actuals that are implicitly provided by
9887         Force_Evaluation.
9888
9889 2011-08-02  Robert Dewar  <dewar@adacore.com>
9890
9891         * sem_ch3.adb, sem_res.adb: Minor reformatting.
9892
9893 2011-08-02  Yannick Moy  <moy@adacore.com>
9894
9895         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9896         to issue an error in formal mode on attribute not supported in this mode
9897         (Analyze_Attribute): issue errors on standard attributes not supported
9898         in formal mode.
9899         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9900         comment, and issue error in formal mode on modulus which is not a power
9901         of 2.
9902         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9903         range.
9904         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9905         subtype mark.
9906         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9907         operator on modular type (except 'not').
9908
9909 2011-08-02  Robert Dewar  <dewar@adacore.com>
9910
9911         * gnat_rm.texi: Minor reformatting.
9912
9913 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9914
9915         * s-osinte-linux.ads: Minor comment update and reformatting.
9916         * i-cexten.ads: Make this unit pure, as for its parent.
9917         Will allow its usage in more contexts if needed.
9918
9919 2011-08-02  Robert Dewar  <dewar@adacore.com>
9920
9921         * s-utf_32.ads: Minor comment fix.
9922
9923 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9924
9925         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9926         operation of a tagged synchronized type, handle the case where the
9927         controlling argument is overloaded.
9928
9929 2011-08-02  Yannick Moy  <moy@adacore.com>
9930
9931         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9932         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9933         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9934         SPARK mode and formal verification mode on processing SPARK restriction
9935         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9936         requiring consistency checking.
9937
9938 2011-08-02  Robert Dewar  <dewar@adacore.com>
9939
9940         * sem_res.adb: Minor reformatting.
9941
9942 2011-08-02  Robert Dewar  <dewar@adacore.com>
9943
9944         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9945         a-cforse.ads: Remove unneeded with of Ada.Containers
9946         Remove commented out pragma Inline's
9947         Move specifications of new subprograms to the actual specs
9948
9949 2011-08-02  Yannick Moy  <moy@adacore.com>
9950
9951         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9952         a-cforse.ads: Update comments.
9953
9954 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9955
9956         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9957
9958 2011-08-02  Robert Dewar  <dewar@adacore.com>
9959
9960         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9961         a-cforse.ads, a-cofove.ads: Minor reformatting.
9962
9963 2011-08-02  Claire Dross  <dross@adacore.com>
9964
9965         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9966         a-cofove.ads: Add comments.
9967
9968 2011-08-02  Yannick Moy  <moy@adacore.com>
9969
9970         * gnat_rm.texi: Document formal containers.
9971
9972 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9973
9974         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9975         are empty sections.
9976
9977 2011-08-02  Robert Dewar  <dewar@adacore.com>
9978
9979         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9980         reformatting.
9981
9982 2011-08-02  Robert Dewar  <dewar@adacore.com>
9983
9984         * aspects.adb: New aspects Default_Value and Default_Component_Value
9985         New format of Aspect_Names table checks for omitted entries
9986         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9987         handling of boolean aspects for derived types.
9988         New aspects Default_Value and Default_Component_Value
9989         New format of Aspect_Names table checks for omitted entries
9990         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9991         (Has_Default_Value): New flag
9992         (Has_Default_Component_Value): New flag
9993         (Has_Default_Value): New flag
9994         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9995         table.
9996         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9997         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9998         Default_Value and Default_Component_Value
9999         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10000         New aspects Default_Value and Default_Component_Value
10001         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10002         * sprint.adb: Print N_Aspect_Specification node when called from gdb
10003
10004 2011-08-02  Vincent Celier  <celier@adacore.com>
10005
10006         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10007         inherit library kind.
10008
10009 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10010
10011         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10012         Minor reformatting.
10013
10014 2011-08-02  Robert Dewar  <dewar@adacore.com>
10015
10016         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10017
10018 2011-08-02  Yannick Moy  <moy@adacore.com>
10019
10020         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10021
10022 2011-08-02  Robert Dewar  <dewar@adacore.com>
10023
10024         * impunit.adb: Add comment.
10025
10026 2011-08-02  Yannick Moy  <moy@adacore.com>
10027
10028         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10029         qualification of aggregates in formal mode
10030         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10031         another aggregate
10032         (Resolve_Aggregate): complete the test that an aggregate is adequately
10033         qualified in formal mode
10034
10035 2011-08-02  Pascal Obry  <obry@adacore.com>
10036
10037         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10038         * mlib-prj.adb: Supress warning when compiling binder generated file.
10039         (Build_Library): Supress all warnings when compiling the binder
10040         generated file.
10041
10042 2011-08-02  Yannick Moy  <moy@adacore.com>
10043
10044         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10045         from here...
10046         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10047         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10048         Add with/use clauses to make Check_Formal_Restriction visible
10049
10050 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10051
10052         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10053         in-parameters when type of the generic formal is private in the generic
10054         spec and non-private in the body.
10055
10056 2011-08-02  Claire Dross  <dross@adacore.com>
10057
10058         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10059         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10060         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10061         * impunit.adb, Makefile.rtl: Take new files into account.
10062
10063 2011-08-02  Robert Dewar  <dewar@adacore.com>
10064
10065         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10066         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10067
10068 2011-08-02  Yannick Moy  <moy@adacore.com>
10069
10070         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10071         formal mode
10072         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10073         matching static array bounds, taking into account the special case of
10074         string literals
10075         * sem_ch3.adb: Typo in comment.
10076
10077 2011-08-02  Yannick Moy  <moy@adacore.com>
10078
10079         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10080         which issues an error in formal mode if its argument node is originally
10081         from source
10082         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10083         has a discriminant specification so that it does not include the case
10084         of derived types
10085         (Derived_Type_Declaration): move here the test that a derived type has a
10086         discriminant specification
10087         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10088         first element of a component association before accessing its choices
10089         (presence of component association is not enough)
10090         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10091         declaration is a library item before accessing the next element in a
10092         list, as library items are not member of lists
10093         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10094         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10095         Check_Formal_Restriction whenever possible.
10096
10097 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10098
10099         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10100         reference when needed.
10101
10102 2011-08-02  Bob Duff  <duff@adacore.com>
10103
10104         * gnat_ugn.texi: Fix typo.
10105
10106 2011-08-02  Vincent Celier  <celier@adacore.com>
10107
10108         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10109         archive file name. Do not use the full path name of archives for Open
10110         VMS.
10111
10112 2011-08-02  Robert Dewar  <dewar@adacore.com>
10113
10114         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10115         Analyze_Aspect_Specifications
10116         * sem_ch13.adb
10117         (Analyze_Aspect_Specifications): New handling for boolean aspects
10118         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10119         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10120         sequence for Analyze_Aspect_Specifications
10121         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10122         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10123
10124 2011-08-02  Robert Dewar  <dewar@adacore.com>
10125
10126         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10127         aspects, since these no longer exist.
10128
10129 2011-08-02  Robert Dewar  <dewar@adacore.com>
10130
10131         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10132         semicolon, do not try to see if there are aspects following it.
10133         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10134         aspect spec.
10135
10136 2011-08-02  Robert Dewar  <dewar@adacore.com>
10137
10138         * sem_ch8.adb, aspects.ads: Minor reformatting.
10139
10140 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10141
10142         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10143         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10144         extracted from...
10145         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
10146
10147 2011-08-02  Yannick Moy  <moy@adacore.com>
10148
10149         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10150         mode on subprogram declaration outside of package specification, unless
10151         it is followed by a pragma Import
10152         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10153         Access_Type_Declaration): issue error in formal mode on access type
10154         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10155         incomplete type
10156         (Analyze_Object_Declaration): issue error in formal mode on object
10157         declaration which does not respect SPARK restrictions
10158         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10159         declaration which does not respect SPARK restrictions
10160         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10161         error in formal mode on digits or delta constraint
10162         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10163         decimal fixed point type
10164         (Derived_Type_Declaration): issue error in formal mode on derived type
10165         other than type extensions of tagged record types
10166         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10167         with check on access definition
10168         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10169         mode on protected definition.
10170         (Analyze_Task_Definition): issue error in formal mode on task definition
10171
10172 2011-08-02  Robert Dewar  <dewar@adacore.com>
10173
10174         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10175
10176 2011-08-02  Javier Miranda  <miranda@adacore.com>
10177
10178         * sem_ch6.adb (Can_Override_Operator): New function.
10179         (Verify_Overriding_Indicator): Add missing code to check overriding
10180         indicator in operators. Fixes regression.
10181         (Check_Overriding_Indicator): Minor reformating after replacing the
10182         code that evaluates if the subprogram can override an operator by
10183         invocations to the above new function.
10184         * einfo.adb
10185         (Write_Field26_Name): Add missing code to ensure that, following
10186         the documentation in einfo.ads, this field is not shown as attribute
10187         "Static_Initialization" on non-dispatching functions.
10188
10189 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10190
10191         * sem_res.adb (Resolve_Call): A call to
10192         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10193         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10194         i.e., when the second parameter is of type Time_Span.
10195
10196 2011-08-02  Vincent Celier  <celier@adacore.com>
10197
10198         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10199         with an archive instead of -L<library dir> -l<library name>.
10200
10201 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10202
10203         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10204         mark the base types In_Use in addition to making the operations
10205         use_visible.
10206
10207 2011-08-02  Ed Falis  <falis@adacore.com>
10208
10209         * init.c: add and setup __gnat_signal_mask for the exception signals
10210         * s-inmaop-vxworks.adb: new file.
10211         * s-intman-vxworks.adb: remove unnecessary initializations and
10212         simplify remaining
10213         * s-intman-vxworks.ads: remove unnecessary variable
10214         * s-taprop-vxworks.adb: simplify signal initialization
10215
10216 2011-08-02  Robert Dewar  <dewar@adacore.com>
10217
10218         * sem_ch8.adb: Minor code reorganization, comment updates.
10219
10220 2011-08-02  Robert Dewar  <dewar@adacore.com>
10221
10222         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10223         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10224         here from Sem_Res.
10225         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10226         (Matching_Static_Array_Bounds): Moved here from Sem_Res
10227
10228 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10229
10230         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10231         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10232         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10233         use_type_clauses, to handle more efficiently use_type and use_all_type
10234         constructs.
10235         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10236         Ada2012 Use_All_Type clause.
10237         (Use_Class_Wide_Operations): new procedure.
10238
10239 2011-08-02  Robert Dewar  <dewar@adacore.com>
10240
10241         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10242         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10243         expression to expression function.
10244
10245 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10246
10247         * sem_ch4.adb: transform simple Ada2012 membership into equality only
10248         if types are compatible.
10249
10250 2011-08-02  Yannick Moy  <moy@adacore.com>
10251
10252         * sem_res.adb (Matching_Static_Array_Bounds): new function which
10253         returns True if its argument array types have same dimension and same
10254         static bounds at each index.
10255         (Resolve_Actuals): issue an error in formal mode on actuals passed as
10256         OUT or IN OUT paramaters which are not view conversions in SPARK.
10257         (Resolve_Arithmetic_Op): issue an error in formal mode on
10258         multiplication or division with operands of fixed point types which are
10259         not qualified or explicitly converted.
10260         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10261         Boolean or array type (except String) operands.
10262         (Resolve_Equality_Op): issue an error in formal mode on equality
10263         operators for array types other than String with non-matching static
10264         bounds.
10265         (Resolve_Logical_Op): issue an error in formal mode on logical operators
10266         for array types with non-matching static bounds. Factorize the code in
10267         Matching_Static_Array_Bounds.
10268         (Resolve_Qualified_Expression): issue an error in formal mode on
10269         qualified expressions for array types with non-matching static bounds.
10270         (Resolve_Type_Conversion): issue an error in formal mode on type
10271         conversion for array types with non-matching static bounds
10272
10273 2011-08-02  Robert Dewar  <dewar@adacore.com>
10274
10275         * par-ch10.adb: Minor code reorganization (use Nkind_In).
10276
10277 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10278
10279         * par-ch9.adb: save location of entry for proper error message.
10280
10281 2011-08-02  Javier Miranda  <miranda@adacore.com>
10282
10283         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10284         (Use_Full_View) which permits this routine to climb through the
10285         ancestors using the full-view of private parents.
10286         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10287         Use_Full_View to true in calls to Is_Ancestor.
10288         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10289         true in call to Is_Ancestor.
10290         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10291         Use_Full_View to true in call to Is_Ancestor.
10292         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10293         call to Is_Ancestor.
10294         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10295         Use_Full_View to true in calls to Is_Ancestor.
10296         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10297         Make_Select_Specific_Data_Table, Register_Primitive,
10298         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10299         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10300         to true in call to Is_Ancestor.
10301         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10302         Use_Full_View to true in calls to Is_Ancestor.
10303         * exp_cg.adb
10304         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10305         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10306
10307 2011-08-02  Robert Dewar  <dewar@adacore.com>
10308
10309         * gnat_rm.texi: Minor reformatting.
10310         * sem_prag.adb: Minor reformatting.
10311
10312 2011-08-02  Tristan Gingold  <gingold@adacore.com>
10313
10314         * vms_data.ads: Add VMS qualifier for -gnateP.
10315
10316 2011-08-02  Robert Dewar  <dewar@adacore.com>
10317
10318         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10319         * par-ch7.adb (P_Package): Proper placement of aspects for package
10320         decl/instantiation.
10321         * par-endh.adb (Check_End): Ad Is_Sloc parameter
10322         (End_Statements): Add Is_Sloc parameterr
10323         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10324         (Check_End): Ad Is_Sloc parameter
10325         (End_Statements): Add Is_Sloc parameterr
10326
10327 2011-08-02  Vincent Celier  <celier@adacore.com>
10328
10329         * ug_words: Add VMS qualifier equivalent to -gnateP:
10330         /SYMBOL_PREPROCESSING.
10331
10332 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10333
10334         * gnat-style.texi: For hexadecimal numeric literals the typical
10335         grouping of digits is 4 to represent 2 bytes.
10336         A procedure spec which is split into several lines is indented two
10337         characters.
10338
10339 2011-08-02  Yannick Moy  <moy@adacore.com>
10340
10341         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10342         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10343         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10344         properly qualified
10345         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10346         choice in array aggregate
10347         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10348         mark as ancestor
10349         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10350         positional and named aggregate for record, or others in record
10351         aggregate, or multiple choice in record aggregate
10352         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10353         array operands to logical operations AND, OR and XOR do not have the
10354         same static lower and higher bounds
10355         * sem_ch5.adb, sinfo.ads: Correct typos in comments
10356
10357 2011-08-01  Robert Dewar  <dewar@adacore.com>
10358
10359         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10360         Replaces Last_Source_Node_In_Sequence.
10361         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10362         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10363         parens and blank in string (this was inconsistently implemented).
10364         * errout.ads
10365         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10366         blank in string (this was inconsistently implemented).
10367         * gnat1drv.adb
10368         (Set_Global_Switches): Set formal mode switches appropriately
10369         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10370         * par-prag.adb
10371         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10372         call Set_Error_Msg_Lang to set "spark" as language name.
10373         * par.adb: Remove unnecessary call to set formal language for errout
10374         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10375         appropriately and call Set_Error_Msg_Lang to set "spark" as language
10376         name.
10377         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10378         calls to it, moved after resolution so that types are known
10379         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10380         result of concatenation is not of type String
10381         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10382         concatenation is not properly restricted
10383         * gnat_rm.texi: Add doc on pragma Spark_95.
10384         * gcc-interface/Makefile.in: Remove obsolete target pairs for
10385         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10386         * gcc-interface/Make-lang.in: Update dependencies.
10387
10388 2011-08-01  Javier Miranda  <miranda@adacore.com>
10389
10390         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10391         condition that detects if the overridden operation must replace an
10392         existing entity.
10393
10394 2011-08-01  Javier Miranda  <miranda@adacore.com>
10395
10396         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10397         code declarations inserted by Insert_Actions in each alternative of the
10398         N_Case_Expression node.
10399
10400 2011-08-01  Robert Dewar  <dewar@adacore.com>
10401
10402         * sem_ch6.adb: Minor code reorganization.
10403         * sem_util.adb: Minor reformatting.
10404
10405 2011-08-01  Pascal Obry  <obry@adacore.com>
10406
10407         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10408         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10409
10410 2011-08-01  Yannick Moy  <moy@adacore.com>
10411
10412         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10413         literal or operator symbol which is prefixed
10414         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10415         mode on access attributes.
10416         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10417         that concatenation operands are properly restricted in formal mode
10418         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10419         Analyze_Concatenation_Operand. Issue an error in formal mode if the
10420         result of the concatenation has a type different from String.
10421         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10422         Analyze_Quantified_Expression, Analyze_Slice,
10423         Analyze_Null): issue an error in formal mode on unsupported constructs
10424         * sem_ch5.adb
10425         (Analyze_Block_Statement): only issue error on source block statement
10426         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10427         function which returns the last node in a list of nodes for which
10428         Comes_From_Source returns True, if any
10429         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10430         Last_Source_Node_In_Sequence
10431         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10432         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10433         mode on unsupported constructs
10434         * sem_ch9.adb Do not return after issuing error in formal mode, as the
10435         rest of the actions may be needed later on since the error is marked as
10436         not serious.
10437         * sinfo.ads: Typos in comments.
10438
10439 2011-08-01  Pascal Obry  <obry@adacore.com>
10440
10441         * projects.texi: Minor editing.
10442
10443 2011-08-01  Yannick Moy  <moy@adacore.com>
10444
10445         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10446         insertion character ~~
10447         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10448         (Set_Error_Msg_Lang): new procedure which fixes the language for use
10449         with insertion character ~~
10450         (Set_Msg_Text): treat insertion character ~~
10451         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10452         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10453         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10454         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10455         errors related to the formal language restriction not serious
10456         (insertion character |).
10457         * par.adb (Par): set formal language for error messages if needed
10458         * sem_ch6.adb (Check_Missing_Return): take into account possible
10459         generated statements at the end of the function
10460         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10461         enumeration value to define a new pragma SPARK_95
10462         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10463         SPARK_Version): new type and variables to store the SPARK version
10464         (none by default).
10465         (SPARK_Mode): return True when SPARK_Version is set
10466         * par-prag.adb: Correct indentation
10467         (Prag): take Pragma_SPARK_95 into account
10468         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
10469         into account.
10470
10471 2011-08-01  Robert Dewar  <dewar@adacore.com>
10472
10473         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
10474         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
10475         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10476
10477 2011-08-01  Pascal Obry  <obry@adacore.com>
10478
10479         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10480         Target_Name to Get_Path call.
10481         (Parse_Single_Project): Likewise.
10482         (Post_Parse_Context_Clause): Likewise.
10483         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10484         Call Initialise_Project_Path with the proper Target_Name.
10485         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10486         search path.
10487         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10488         with the proper Target_Name.
10489         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10490         Part.Parse routine.
10491         (Parse_Project_And_Apply_Config): Likewise.
10492         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10493         This is fine as this part of the code is supporting only native
10494         compilation.
10495         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10496         is fine as this part of the code is supporting only native compilation.
10497
10498 2011-08-01  Yannick Moy  <moy@adacore.com>
10499
10500         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10501         of homonym, unless the homonym is one of the cases allowed in SPARK
10502         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10503         package declaration occurring after a body.
10504
10505 2011-08-01  Robert Dewar  <dewar@adacore.com>
10506
10507         * checks.adb, exp_ch4.adb: Minor reformatting.
10508
10509 2011-08-01  Javier Miranda  <miranda@adacore.com>
10510
10511         * einfo.ads (Access_Disp_Table): Fix documentation.
10512         (Dispatch_Table_Wrappers): Fix documentation.
10513
10514 2011-08-01  Pascal Obry  <obry@adacore.com>
10515
10516         * prj-env.adb, prj-env.ads: Minor reformatting.
10517
10518 2011-08-01  Yannick Moy  <moy@adacore.com>
10519
10520         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10521         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10522         procedures out of these packages.
10523         * errout.ads, errout.adb
10524         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10525         procedures in of this package
10526         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10527         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10528         on misplaced later vs initial declarations, like in Ada 83
10529         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10530         formal mode on attribute of private type whose full type declaration
10531         is not visible
10532         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10533         package declaration inside a package specification
10534         (Analyze_Full_Type_Declaration): issue error in formal mode on
10535         controlled type or discriminant type
10536         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10537         user-defined operator means that it should come from the source
10538         (New_Overloaded_Entity): issue error in formal mode on overloaded
10539         entity.
10540         * sem_ch6.ads, sem_ch13.ads: typos in comments.
10541
10542 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10543
10544         * atree.adb: Minor reformatting.
10545         * checks.adb: Minor reformatting.
10546
10547 2011-08-01  Vincent Celier  <celier@adacore.com>
10548
10549         * s-parame-vms-ia64.ads: Fix typo in comment
10550         Minor reformatting
10551         * s-parame-vms-restrict.ads: Removed, unused.
10552
10553 2011-08-01  Javier Miranda  <miranda@adacore.com>
10554
10555         * exp_ch3.adb
10556         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
10557         * sem_ch3.adb
10558         (Constrain_Index): Remove side effects in the evaluation of the bounds.
10559         * sem_ch3.ads, sem_ch3.adb
10560         (Is_Constant_Bound): New extended version of the subprogram that was
10561         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
10562         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
10563         * sem_aux.ads (Constant_Value): Fix typo in comment.
10564         * checks.adb (Generate_Index_Checks): New implementation which, for
10565         array objects with constant bounds, generates the runtime check
10566         referencing the bounds of the array type. For other cases this routine
10567         provides its previous behavior obtaining such values from the array
10568         object.
10569         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
10570         parent type.
10571         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
10572         we cannot have semantic interpretations of the new node.
10573
10574 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10575
10576         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
10577         expressions.
10578
10579 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10580
10581         * sem_ch8.adb: Minor code editing.
10582         * s-vxwext.adb: Remove trailing space.
10583         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
10584         consistency with other files.
10585
10586 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10587
10588         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
10589
10590 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10591
10592         * par-ch10.adb: reject parameterized expressions as compilation unit.
10593         * sem_ch4.adb: handle properly conditional expression with overloaded
10594         then_clause and no else_clause.
10595
10596 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10597
10598         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10599         like done by System.Aux_DEC.
10600         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10601
10602 2011-08-01  Yannick Moy  <moy@adacore.com>
10603
10604         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10605         missing label at end of declaration (subprogram or package)
10606         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10607         of positional and named parameter association
10608         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10609         Error_Msg_SP which adds a prefix to the error message giving the name
10610         of the formal language analyzed
10611         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10612         access result type in subprogram, unconstrained array as result type,.
10613         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10614         procedure
10615         * sem_ch8.adb: Code clean up.
10616
10617 2011-08-01  Javier Miranda  <miranda@adacore.com>
10618
10619         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10620         * einfo.ads (Access_Disp_Table): Fix documentation.
10621         (Dispatch_Table_Wrappers): Fix documentation.
10622         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10623         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10624         to enforce the documentation of this attribute.
10625         (Set_Is_Interface): Cleanup the assertion.
10626         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10627         the Underlying_Type entity before reading attribute Access_Disp_Table.
10628         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10629         Locate the Underlying_Type before reading attribute Access_Disp_Table.
10630         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10631         the Underlying_Type entity before reading attribute Access_Disp_Table.
10632         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10633         Locate the Underlying_Type entity before reading attribute
10634         Access_Disp_Table.
10635
10636 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10637
10638         * s-poosiz.ads: Additional overriding indicators.
10639
10640 2011-08-01  Yannick Moy  <moy@adacore.com>
10641
10642         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10643         formal mode.
10644         (Analyze_Iteration_Scheme): issue error in formal mode when loop
10645         parameter specification does not include a subtype mark.
10646         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10647         formal mode on abstract subprogram.
10648         (Analyze_Subprogram_Specification): issue error in formal mode on
10649         user-defined operator.
10650         (Process_Formals): issue error in formal mode on access parameter and
10651         default expression.
10652         * sem_ch9.adb (Analyze_Abort_Statement,
10653         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10654         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10655         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10656         Analyze_Requeue, Analyze_Selective_Accept,
10657         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10658         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10659         issue error in formal mode on user-defined raise statement.
10660
10661 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10662
10663         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10664         declaration being hidden when overriding an implicit inherited
10665         subprogram.
10666         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10667         (-gnats), do not complain about a source file that contains only a
10668         pragma No_Body.
10669
10670 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10671
10672         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10673         variable if already set.
10674
10675 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10676
10677         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10678         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10679         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10680         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10681         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10682         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10683         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10684         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10685         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10686         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10687         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10688         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10689         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10690         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10691         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10692         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10693         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10694         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10695         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10696         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10697         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10698         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10699         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10700         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10701         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10702         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10703         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10704         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10705         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10706         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10707         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10708         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10709         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10710         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10711         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10712         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10713         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10714         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10715         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10716         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10717         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10718         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10719         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10720         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10721         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10722         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10723         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10724         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10725         s-osinte-mingw.ads: Update to GPLv3 run-time license.
10726         Use GNAT instead of GNARL.
10727
10728 2011-08-01  Bob Duff  <duff@adacore.com>
10729
10730         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10731         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10732         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10733         reformatting.
10734
10735 2011-08-01  Yannick Moy  <moy@adacore.com>
10736
10737         * debug.adb (d.D) reverve flag for the SPARK mode
10738         (d.E) reverve flag for SPARK generation mode
10739         (d.F) reverve flag for Why generation mode
10740         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10741         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
10742         functions which return True when the corresponding modes are set
10743         (Formal_Language): return "spark" or "alfa" when in formal verification
10744         mode.
10745         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10746         Error_Msg to prefix the error message with a tag giving the formal
10747         language
10748         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10749         message with a tag giving the formal language
10750         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10751         block statement
10752         (Analyze_Case_Statement): issue error in formal mode on case statement
10753         with a single "others" case alternative
10754         (Analyze_Exit_Statement): issue errors in formal mode on exit
10755         statements which do not respect SPARK restrictions
10756         (Analyze_Goto_Statement): issue error in formal mode on goto statement
10757         (Check_Unreachable_Code): always issue an error (not a warning) in
10758         formal mode on unreachable code (concerns both code after an infinite
10759         loop and after an unconditional jump, both not allowed in SPARK)
10760         * sem_ch6.adb (Analyze_Return_Statement): add call to
10761         Set_Return_Present for a procedure containing a return statement
10762         (already done for functions in Analyze_Function_Return)
10763         (Analyze_Function_Return): issue error in formal mode on extended
10764         return or if return is not last statement in function
10765         (Check_Missing_Return): issue error in formal mode if function does
10766         not end with return or if procedure contains a return
10767         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10768         function to detect if there is an inner scope of its parameter S which
10769         is a loop.
10770
10771 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10772
10773         * sem_ch6.ads: Minor reformatting.
10774
10775 2011-08-01  Javier Miranda  <miranda@adacore.com>
10776
10777         * sem_util.adb (Abstract_Interface_List): Complete condition when
10778         processing private type declarations to avoid reading unavailable
10779         attribute.
10780         (Is_Synchronized_Tagged_Type): Complete condition when processing
10781         private extension declaration nodes to avoid reading unavailable
10782         attribute.
10783
10784 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10785
10786         * sem_ch3.adb: Minor reformatting.
10787
10788 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10789
10790         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10791         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10792         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10793         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10794         for VMS, instead parametrize the common implementation with
10795         System.Parameters declarations.
10796
10797 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
10798
10799         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10800
10801 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10802
10803         * seh_init.c: Fix SEH handler installation on win64.
10804
10805 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10806
10807         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10808         double analysis of an anonymous access to subprogram, because it can
10809         lead to improper sharing of profiles and a back-end crash.
10810
10811 2011-08-01  Robert Dewar  <dewar@adacore.com>
10812
10813         * make.adb, sem_ch4.adb: Minor reformatting.
10814         * gcc-interface/Make-lang.in: Update dependencies.
10815         * sem_util.adb, exp_ch5.adb: Minor reformatting.
10816
10817 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10818
10819         * gnat_rm.texi: Fix definition of Long_Integer.
10820
10821 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10822
10823         * exp_aggr.adb: check limit size of static aggregate unconditionally,
10824         to prevent storage exhaustion.
10825         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10826         finalized is a function body, insert the cleanup code before the final
10827         return statement, to prevent spurious warnings.
10828         * s-pooglo.ads: add overriding indicator.
10829
10830 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10831
10832         * sem_ch4.adb (Operator_Check): improve error message when both a
10833         with_clause and a use_clause are needed to make operator usage legal.
10834         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10835         determine whether a compilation unit is visible within an other,
10836         either through a with_clause in the current unit, or a with_clause in
10837         its library unit or one one of its parents.
10838
10839 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10840
10841         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10842         over an arbitrary expression of an array or container type.
10843         * lib-xref.adb: clarify comment.
10844
10845 2011-08-01  Bob Duff  <duff@adacore.com>
10846
10847         * einfo.ads: Minor reformatting.
10848         * debug.adb: Minor comment improvement.
10849
10850 2011-08-01  Javier Miranda  <miranda@adacore.com>
10851
10852         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10853         consider hidden subprograms as valid candidates.
10854
10855 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10856
10857         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10858
10859 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
10860
10861         * gnat_ugn.texi: Fix typo.
10862
10863 2011-08-01  Robert Dewar  <dewar@adacore.com>
10864
10865         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10866         lib-xref.adb: Minor reformatting
10867
10868 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
10869
10870         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10871         when to generate a call to Move_Final_List.
10872         (Has_Controlled_Parts): Remove this function.
10873
10874 2011-08-01  Geert Bosch  <bosch@adacore.com>
10875
10876         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10877         "," in choice list.
10878
10879 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10880
10881         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10882         explicit raise of a predefined exception as Comes_From_Source if the
10883         original N_Raise_Statement comes from source.
10884
10885 2011-08-01  Robert Dewar  <dewar@adacore.com>
10886
10887         * sinfo.ads: Add comment.
10888         * sem_ch6.adb: Minor reformatting.
10889
10890 2011-08-01  Robert Dewar  <dewar@adacore.com>
10891
10892         * freeze.adb (Freeze_Entity): Refine check for bad component size
10893         clause to avoid rejecting confirming clause when atomic/aliased present.
10894
10895 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10896
10897         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10898         better determine whether an entity reference is a write.
10899         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10900         subcomponent.
10901         * lib-xref.adb (Output_References): Do no suppress a read reference at
10902         the same location as an immediately preceeding modify-reference, to
10903         handle properly in-out actuals.
10904
10905 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10906
10907         * env.c (__gnat_setenv) [VMS]: Refine previous change.
10908
10909 2011-08-01  Quentin Ochem  <ochem@adacore.com>
10910
10911         * i-cstrin.adb (New_String): Changed implementation, now uses only the
10912         heap to compute the result.
10913
10914 2011-08-01  Robert Dewar  <dewar@adacore.com>
10915
10916         * atree.ads: Minor reformatting.
10917
10918 2011-08-01  Emmanuel Briot  <briot@adacore.com>
10919
10920         * g-expect.adb (Get_Command_Output): Fix memory leak.
10921
10922 2011-08-01  Geert Bosch  <bosch@adacore.com>
10923
10924         * cstand.adb (P_Float_Type): New procedure to print the definition of
10925         predefined fpt types.
10926         (P_Mixed_Name): New procedure to print a name using mixed case
10927         (Print_Standard): Use P_Float_Type for printing floating point types
10928         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10929         precision IEEE float.
10930
10931 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10932
10933         * sem_ch3.adb: Minor reformatting.
10934
10935 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10936
10937         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10938         the completion of a generic function, insert the new body rather than
10939         rewriting the original.
10940
10941 2011-08-01  Yannick Moy  <moy@adacore.com>
10942
10943         * sinfo.ads, errout.ads: Typos in comments.
10944
10945 2011-08-01  Robert Dewar  <dewar@adacore.com>
10946
10947         * par-endh.adb: Minor reformatting.
10948
10949 2011-08-01  Robert Dewar  <dewar@adacore.com>
10950
10951         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10952         (Pre_Post_Aspects): New subtype.
10953         * par-ch12.adb (P_Generic): New syntax for aspects in packages
10954         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10955         * par-ch7.adb (P_Package): Remove Decl parameter
10956         (P_Package): Handle new syntax for aspects (before IS)
10957         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10958         new aspect syntax
10959         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10960         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10961         (P_Package): Remove Decl parameter
10962         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10963         aspects
10964         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10965         specs
10966         * sem_util.ads, sem_util.adb (Static_Boolean): New function
10967         * sinfo.ads: Document new syntax for aspects in packages etc.
10968         * sprint.adb: Handle new syntax of aspects before IS in package
10969
10970 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10971
10972         * atree.ads: Minor reformatting.
10973         * sem_prag.adb: Minor reformatting.
10974
10975 2011-08-01  Robert Dewar  <dewar@adacore.com>
10976
10977         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10978         case expr alternative.
10979
10980 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10981
10982         * sem_ch12.adb: Fix typo.
10983
10984 2011-08-01  Geert Bosch  <bosch@adacore.com>
10985
10986         * sem_prag.adb (Check_No_Link_Name): New procedure.
10987         (Process_Import_Or_Interface): Use Check_No_Link_Name.
10988         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10989         instead of Standard_Long_Long_Float_Size global. Preparation for
10990         eventual removal of per type constants.
10991         * exp_util.ads (Get_Stream_Size): New function returning the stream
10992         size value of subtype E.
10993         * exp_util.adb (Get_Stream_Size): Implement new function.
10994         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10995         function.
10996         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10997         * einfo.adb:
10998         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10999
11000 2011-08-01  Geert Bosch  <bosch@adacore.com>
11001
11002         * cstand.adb: Fix comments.
11003         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11004         count of arguments.
11005
11006 2011-08-01  Robert Dewar  <dewar@adacore.com>
11007
11008         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11009
11010 2011-08-01  Geert Bosch  <bosch@adacore.com>
11011
11012         * atree.ads: Fix comment.
11013
11014 2011-08-01  Robert Dewar  <dewar@adacore.com>
11015
11016         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11017         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11018         * par.adb: Add with for Namet.Sp.
11019         * par-tchk.adb: Minor reformatting.
11020
11021 2011-08-01  Vincent Celier  <celier@adacore.com>
11022
11023         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11024         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11025         of the init procedure of a SAL.
11026         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11027         New procedure.
11028
11029 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11030
11031         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11032         reformatting.
11033
11034 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11035
11036         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11037
11038 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11039
11040         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11041         conformant with its spec (return True only for types that have
11042         an overriding Initialize primitive operation that prevents them from
11043         having preelaborable initialization).
11044         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11045         initialization for controlled types in Ada 2005 or later mode.
11046
11047 2011-08-01  Robert Dewar  <dewar@adacore.com>
11048
11049         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11050         Postcondition.
11051         (Same_Aspect): New function.
11052         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11053         Type_Invariant, Precondition, Postcondition.
11054         * snames.ads-tmpl: Add Name_Type_Invariant.
11055
11056 2011-08-01  Robert Dewar  <dewar@adacore.com>
11057
11058         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11059         here.
11060         (Freeze_All_Ent): Fix error in handling inherited aspects.
11061         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11062         already analyzed, but don't skip entire processing of a declaration,
11063         that's wrong in some cases of declarations being rewritten.
11064         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11065         Don't delay for integer, string literals
11066         Treat predicates in usual manner for delay, remove special case code,
11067         not needed.
11068         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11069         (Build_Predicate_Function): Update saved expression in aspect
11070         (Build_Invariant_Procedure): Update saved expression in aspect
11071         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11072         of replacement of discriminant references if the reference is simple.
11073
11074 2011-08-01  Robert Dewar  <dewar@adacore.com>
11075
11076         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11077         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11078         Static_Predicate and Dynamic_Predicate.
11079         (Build_Predicate_Function): Add processing for Static_Predicate
11080         and Dynamic_Predicate.
11081         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11082         (From_Static_Predicate): New flag
11083         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11084
11085 2011-08-01  Robert Dewar  <dewar@adacore.com>
11086
11087         * usage.adb: Documentation cleanup for Ada version modes in usage.
11088         * expander.adb: Minor reformatting.
11089
11090 2011-08-01  Robert Dewar  <dewar@adacore.com>
11091
11092         * atree.ads: Minor comment fix.
11093         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11094         a-witeio.ads, sem_prag.adb: Minor reformatting.
11095
11096 2011-08-01  Doug Rupp  <rupp@adacore.com>
11097
11098         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11099         pointers. Use descrip.h header file for convenience. Add some
11100         comments.
11101
11102 2011-08-01  Robert Dewar  <dewar@adacore.com>
11103
11104         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11105         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11106         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11107         New procedure.
11108         (Check_Aspect_At_End_Of_Declarations): New procedure
11109         (Analye_Aspect_Specification): Minor changes for above procedures
11110         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11111         specification node as well.
11112
11113 2011-08-01  Pascal Obry  <obry@adacore.com>
11114
11115         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11116         Windows files. Use GetFilesAttributes() in this case to check for file
11117         existence instead of returning with an error code.
11118
11119 2011-08-01  Vincent Celier  <celier@adacore.com>
11120
11121         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11122         High is above Source length.
11123
11124 2011-08-01  Robert Dewar  <dewar@adacore.com>
11125
11126         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11127
11128 2011-08-01  Robert Dewar  <dewar@adacore.com>
11129
11130         * aspects.ads (Boolean_Aspects): New subtype.
11131         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11132         for derived types in cases where the parent type and derived type have
11133         aspects.
11134         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11135         with aspects when parent type also has aspects.
11136         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11137         boolean expression at this point).
11138         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11139         accordance with final decision on the Ada 2012 feature.
11140         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11141
11142 2011-08-01  Matthew Heaney  <heaney@adacore.com>
11143
11144         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11145
11146 2011-08-01  Pascal Obry  <obry@adacore.com>
11147
11148         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11149         Fix Replace_Slice when High is above current string size.
11150         (Replace_Slice): Fix DL computation when High is above current
11151         string length.
11152
11153 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
11154
11155         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11156
11157 2011-08-01  Matthew Heaney  <heaney@adacore.com>
11158
11159         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11160         of node.
11161
11162 2011-08-01  Pascal Obry  <obry@adacore.com>
11163
11164         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11165         reformatting.
11166
11167 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11168
11169         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11170         access to protected subprograms in generic bodies.
11171         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11172         protected type, indicate that the convention of the subprogram is
11173         Convention_Protected, because it may be used in subsequent declarations
11174         within the protected declaration.
11175
11176 2011-08-01  Vincent Celier  <celier@adacore.com>
11177
11178         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11179         and "final" procedures when the name of the library is "ada", to avoid
11180         duplicate symbols "adainit" and "adafinal" in executables.
11181
11182 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11183
11184         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11185         quantified expression that appears within a postcondition and uses the
11186         Ada2012 'Result attribute.
11187
11188 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11189
11190         * init.c (__gnat_error_handler): Cast reason to int.
11191         (__gnat_install_handler): Explain sa_sigaction use.
11192
11193 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11194
11195         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11196         subprogram has copy-in copy-out parameters, try to promote the mode of
11197         the return type if it is passed in registers.
11198
11199 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11200
11201         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11202         left operand as addressable.
11203
11204 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11205
11206         * gcc-interface/gigi.h (build_function_stub): Remove.
11207         (build_return_expr): Likewise.
11208         (convert_vms_descriptor): Declare.
11209         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11210         (build_function_stub): Move to...
11211         * gcc-interface/utils2.c (build_return_expr): Move to...
11212         * gcc-interface/trans.c (build_function_stub): ...here.
11213         (build_return_expr): ...here.
11214         (Subprogram_Body_to_gnu): Add local variable for language_function.
11215         Disconnect the parameter attributes cache, if any, once done with it.
11216         Call end_subprog_body only after setting the end_locus.
11217         Build the stub associated with the function, if any, at the very end.
11218         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11219         variables and streamline control flow.
11220
11221 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
11222
11223         PR ada/49819
11224         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11225         g-trasym-dwarf.adb.
11226
11227 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11228
11229         PR bootstrap/49794
11230         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11231         Assign to act.sa_sigaction.
11232         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11233         current->return_address to char * before arithmetic.
11234
11235 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11236
11237         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11238         Correct argument types.
11239         Extract code from reason.
11240         (__gnat_install_handler): Assign to act.sa_sigaction.
11241
11242 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
11243
11244         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11245         (GNAT1_OBJS): ...here.
11246
11247 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
11248
11249         PR ada/48711
11250         * g-socthi-mingw.adb (Fill): Fix formatting.
11251
11252         * gcc-interface/gigi.h: Move around comment.
11253
11254 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
11255
11256         PR ada/46350
11257         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11258
11259 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
11260
11261         PR ada/48711
11262         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11263
11264 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
11265
11266         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11267         range comparison if Pmode is SImode.
11268
11269 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
11270             Eric Botcazou  <ebotcazou@adacore.com>
11271
11272         * adadecode.c: Wrap up in extern "C" block.
11273         * adadecode.h: Likewise.
11274         * adaint.c: Likewise.  Remove 'const' keyword.
11275         * adaint.h: Likewise.
11276         * argv.c: Likewise.
11277         * atree.h: Likewise.
11278         * cio.c: Likewise.
11279         * cstreams.c: Likewise.
11280         * env.c: Likewise.
11281         * exit.c: Likewise.
11282         * fe.h: Likewise.
11283         * final.c: Likewise.
11284         * init.c: Likewise.
11285         * initialize.c: Likewise.
11286         * link.c: Likewise.
11287         * namet.h: Likewise.
11288         * nlists.h: Likewise.
11289         * raise.c: Likewise.
11290         * raise.h: Likewise.
11291         * repinfo.h: Likewise.
11292         * seh_init.c: Likewise.
11293         * targext.c: Likewise.
11294         * tracebak.c: Likewise.
11295         * uintp.h: Likewise.
11296         * urealp.h: Likewise.
11297         * xeinfo.adb: Wrap up generated C code in extern "C" block.
11298         * xsinfo.adb: Likewise.
11299         * xsnamest.adb: Likewise.
11300         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11301         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11302         * gcc-interface/misc.c: Likewise.
11303         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11304         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
11305         ada/targext.o here...
11306         (GNAT_ADA_OBJS): ...and not here.
11307         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11308         (GNATBIND_OBJS): Reorder.
11309
11310 2011-07-07  Richard Henderson  <rth@redhat.com>
11311
11312         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11313         dwarf2out_frame_init.
11314
11315 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
11316
11317         * gcc-interface/misc.c (gnat_init): Tweak previous change.
11318
11319 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11320
11321         PR target/39150
11322         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11323
11324 2011-07-06  Richard Guenther  <rguenther@suse.de>
11325
11326         * gcc-interface/misc.c (gnat_init): Merge calls to
11327         build_common_tree_nodes and build_common_tree_nodes_2.
11328         Re-initialize boolean_false_node.
11329
11330 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
11331             Olivier Hainque  <hainque@adacore.com>
11332             Nicolas Setton  <setton@adacore.com>
11333
11334         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11335         the type according to the ARTIFICIAL_P parameter.
11336         (create_type_decl): Likewise.
11337         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11338
11339 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
11340
11341         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11342         (gnatbind): Likewise.
11343
11344 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11345
11346         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11347
11348 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11349
11350         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11351         local variable throughout.  Remove useless call to Base_Type.
11352         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11353         Take it also into account for the volatileness of the field.  Set the
11354         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
11355
11356 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11357
11358         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11359         on a dereference built for a by-ref object if it has an address clause.
11360
11361 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11362
11363         * einfo.ads (Address_Taken): Document use for the second argument of
11364         Asm_Input and Asm_Output attributes.
11365         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11366         argument is an entity name, then set Address_Taken on it.
11367         <Attribute_Asm_Output>: Likewise.
11368         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11369         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11370         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11371         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11372
11373 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
11374
11375         PR middle-end/46500
11376         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11377
11378 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
11379
11380         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11381         (ada/utils.o): Update dependencies.
11382         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11383         ../../../libcpp/libcpp.a.
11384         * gcc-interface/utils.c: Include common/common-target.h.
11385         (process_attributes): Use targetm_common.have_named_sections.
11386
11387 2011-06-07  Richard Guenther  <rguenther@suse.de>
11388
11389         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11390         set_sizetype.
11391
11392 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11393
11394         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11395         TREE_THIS_NOTRAP flag.
11396
11397 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11398
11399         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11400         Fix thinko.
11401
11402 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11403
11404         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11405         constants whose full view has discriminants specially.
11406
11407 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11408
11409         * gcc-interface/utils.c: Include diagnostic.h.
11410         (gnat_write_global_declarations): Output debug information for all
11411         global type declarations before finalizing the compilation unit.
11412         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11413
11414 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
11415
11416         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11417
11418 2011-05-25  Kai Tietz  <ktietz@redhat.com>
11419
11420         * adaint.c (__gnat_to_canonical_file_list_next): Use array
11421         initialization instead of const/none-const pointer assignment.
11422
11423 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
11424
11425         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11426         $(EXTRA_GNAT1_OBJS).
11427         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11428         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11429         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11430         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11431         libcommon-target.a instead of prefix.o.
11432
11433 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
11434
11435         PR ada/49097
11436         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11437
11438 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
11439
11440         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11441         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11442         instead of version.o.
11443
11444 2011-05-18  Kai Tietz <ktietz@redhat.com>
11445
11446         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11447         boolean_false_node instead of integer_zero_node.
11448         (convert_with_check): Likewise.
11449         * gcc-interface/decl.c (choices_to_gnu): Likewise.
11450
11451 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
11452
11453         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11454         type of the parameter is an unconstrained array, convert the actual to
11455         the type of the formal in the In Out and Out cases as well.
11456
11457 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
11458
11459         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11460         call build_function_type_array or build_varargs_function_type_array
11461         instead.
11462         (create_subprog_type): Don't call build_function_type; call
11463         build_function_type_vec instead.
11464
11465 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
11466
11467         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11468         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11469         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
11470
11471 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
11472
11473         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
11474
11475         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11476         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11477
11478 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
11479
11480         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11481
11482 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
11483
11484         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11485         instead of accessing TYPE_ARG_TYPES directly.
11486         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11487
11488 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
11489
11490         PR ada/48844
11491         * gcc-interface/gigi.h (get_variant_part): Declare.
11492         * gcc-interface/decl.c (get_variant_part): Make global.
11493         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11494         types have the same constant size, are record types and T1 has a
11495         variant part while T2 doesn't.
11496
11497 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
11498
11499         * gcc-interface/utils.c (begin_subprog_body): Do not call
11500         get_pending_sizes.
11501         (end_subprog_body): Likewise.
11502
11503 2011-05-04  Richard Guenther  <rguenther@suse.de>
11504
11505         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11506         int_const_binop.
11507         (pos_to_constructor): Likewise.
11508
11509 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
11510             Eric Botcazou  <ebotcazou@adacore.com>
11511
11512         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11513         of build_function_type.  Adjust calls to...
11514         (build_raise_check): ...this.  Do not take a void_tree parameter.
11515         Call build_function_type_list instead of build_function_type.
11516         Fix head comment and swap couple of conditional blocks.
11517
11518 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
11519
11520         * gnatvsn.ads (Library_Version): Bump to 4.7.
11521         (Current_Year): Bump to 2011.
11522
11523 2011-04-29  Michael Matz  <matz@suse.de>
11524
11525         * gcc-interface/misc.c (gnat_handle_option): Set
11526         warn_maybe_uninitialized.
11527
11528 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
11529
11530         * gnat_ugn.texi (Complexity Metrics Control): Update link to
11531         the Watson/McCabe paper.
11532
11533 2011-04-23  Jim Meyering  <meyering@redhat.com>
11534
11535         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11536
11537 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
11538
11539         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11540         onto the new type.
11541
11542 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
11543
11544         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
11545         parameter.
11546         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
11547         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
11548         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
11549         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
11550         <all>: Do not set flags on the reused DECL node coming from an alias.
11551         Set DECL_IGNORED_P on the DECL node built for subprograms if they
11552         don't need debug info here...
11553         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
11554         (gigi): Adjust calls to create_subprog_decl.
11555         (build_raise_check): Likewise.
11556         (establish_gnat_vms_condition_handler): Likewise.
11557         (Compilation_Unit_to_gnu): Likewise.
11558         (gnat_to_gnu): Likewise.
11559
11560 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
11561
11562         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
11563         (NO_REORDER_ADAFLAGS): New variable.
11564         (EXTRA_GNATTOOLS): Always define.
11565         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
11566         Clean up and adjust list of files compiled with special options.
11567         * gcc-interface/Make-lang.in: Likewise.
11568         (ada/decl.o): Cosmetical change.
11569         (ada/misc.o): Remove dependency on $(PLUGIN_H).
11570
11571 2011-04-20  Jim Meyering  <meyering@redhat.com>
11572
11573         * initialize.c (__gnat_initialize): Remove useless if-before-free.
11574
11575 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
11576
11577         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
11578         $(CFLAGS) on the link line.
11579
11580 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
11581
11582         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
11583         padded type built for the return type if it is unconstrained.
11584
11585 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
11586
11587         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
11588
11589 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
11590
11591         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11592         before calling TREE_CHAIN.
11593         * gcc-interface/misc.c (gnat_init_ts): New function.
11594         (LANG_HOOKS_INIT_TS): Define.
11595
11596 2011-04-12  Martin Jambor  <mjambor@suse.cz>
11597
11598         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11599         instead of cgraph_node.
11600
11601 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
11602
11603         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11604         alignment on fields of the RETURN type built for the Copy-In Copy-Out
11605         mechanism.
11606
11607 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
11608
11609         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11610         of aggregate types that contain a placeholder.
11611
11612 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
11613
11614         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11615         TYPE_ARG_TYPES.
11616         (handle_type_generic_attribute): Likewise.
11617
11618 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
11619
11620         PR ada/47163
11621         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11622
11623 2011-04-04  Kai Tietz  <ktietz@redhat.com>
11624
11625         PR ada/47163
11626         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11627         to flag value.
11628
11629 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11630
11631         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11632         type case, do not strip a padding type around the array type.
11633
11634 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11635
11636         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11637         types.
11638
11639 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11640
11641         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11642         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11643         code for -feliminate-unused-debug-types.
11644         (gnat_post_options): Likewise.
11645
11646 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11647
11648         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11649         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11650         distinct copy.
11651
11652 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11653
11654         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11655         DECL_ARTIFICIAL flag on enumeration types.
11656
11657 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11658
11659         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11660         fat pointer types artificial unconditionally.
11661         <E_Array_Subtype>: Attach the base array type as a parallel type if it
11662         isn't artificial.
11663
11664 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11665
11666         * gcc-interface/gigi.h (get_dummy_type): Declare.
11667         (build_dummy_unc_pointer_types): Likewise.
11668         (finish_fat_pointer_type): Likewise.
11669         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11670         fat pointer type has been built, complete it in place.
11671         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11672         and thin pointers.  Remove useless variable.
11673         (finish_fat_pointer_type): Make global and move to...
11674         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11675         (get_dummy_type): New function.
11676         (build_dummy_unc_pointer_types): Likewise.
11677         (gnat_pushdecl): Propage the name to the anonymous variants only.
11678         (update_pointer_to): Only adjust the pointer types in the unconstrained
11679         array case.
11680
11681 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11682
11683         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11684         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11685         if this is a Taft amendment type and the full declaration is available.
11686         * gcc-interface/trans.c (process_type): Likewise.
11687         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11688         (process_freeze_entity): Likewise.
11689         * gcc-interface/utils.c (dummy_global): New static variable.
11690         (gnat_write_global_declarations): If there are types declared as used
11691         at the global level, insert them in the global hash table.
11692
11693 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11694
11695         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11696         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11697         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11698         copy.
11699         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
11700         flag of the type accordingly.
11701         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11702
11703 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11704
11705         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11706         finalizing types when updating the pointers to the designated type.
11707         <all>: Finalize the deferred types even if we didn't defer processing
11708         of incomplete types in this invocation.
11709
11710 2011-04-01  Olivier Hainque  <hainque@adacore.com>
11711             Nicolas Setton  <setton@adacore.com>
11712             Eric Botcazou  <ebotcazou@adacore.com>
11713
11714         * gcc-interface/misc.c (gnat_descriptive_type): New function.
11715         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11716
11717 2011-03-28  Kai Tietz  <ktietz@redhat.com>
11718
11719         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11720         Windows targets.
11721         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11722         * system-mingw.ads (System): Change ZCX_By_Default default to True.
11723
11724         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11725
11726 2011-03-28  Tristan Gingold  <gingold@adacore.com>
11727
11728         PR ada/44431
11729         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11730         Use ada output of gnatbind.
11731         (ada/b_gnatb.adb): Ditto.
11732         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11733         (ada.mostlyclean, ada.stage1)
11734         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11735         (ada.stagefeedback): Adjust.
11736         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11737         Use ada output of gnatbind.
11738         (b_gnatm.adb): Ditto.
11739         (b_gnatl.o, b_gnatm.o): New rules.
11740
11741 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11742
11743         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11744         for the padded type built to support a specified size or alignment.
11745
11746 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11747
11748         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11749         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11750         unconditionally to the end of the unit when the designated type is
11751         limited_with'ed.
11752         <all>: Rename local variable.  Attempt to un-defer types only and do it
11753         for limited_with'ed types as well.
11754         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
11755         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11756         consistently and remove redundant call to finalize_from_with_types.
11757
11758 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11759
11760         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11761         subprograms without a previous spec declared in the same unit.
11762         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11763         subprograms at the end of the unit instead of at the beginning.
11764         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11765         isn't public for the special handling of non-inline functions nested
11766         inside inline external functions.
11767
11768 2011-03-25  Jeff Law  <law@redhat.com>
11769
11770         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11771
11772 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11773
11774         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11775         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11776         to compute Set_Size_Depends_On_Discriminant.
11777         (Layout_Type): Call it on array types in back-end layout mode.
11778         * sem_util.adb (Requires_Transient_Scope): Return true for array
11779         types only if the size depends on the value of discriminants.
11780         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11781         type if the RHS is a call to a function that returns an unconstrained
11782         type with default discriminant.
11783
11784 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11785
11786         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11787         non-conversion to the nominal result type at the end.
11788
11789 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11790
11791         * gcc-interface/trans.c (create_temporary): New function taken from...
11792         (create_init_temporary): ...here.  Call it.
11793         (call_to_gnu): Create the temporary for the return value early, if any.
11794         Create it for a function with copy-in/copy-out parameters if there is
11795         no target; in other cases of copy-in/copy-out, use another temporary.
11796         Push the new binding level lazily.  Add and rename local variables.
11797
11798 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11799
11800         * gcc-interface/decl.c (validate_size): Improve comments and tweak
11801         error message.
11802         (set_rm_size): Likewise.
11803
11804 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11805
11806         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11807         for the padded type built in order to support a specified alignment.
11808         Fix incorrect formatting.
11809
11810 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11811
11812         PR bootstrap/48216
11813         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11814
11815 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11816
11817         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11818         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11819         to the end of the list.  Adjust recursive call.  Rename local variable.
11820         If REORDER is true, reorder components of the record type.
11821         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11822         components_to_record and adjust the parameter list.
11823
11824 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11825
11826         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11827         disabled, use the variable for bounds of loop iteration scheme.
11828
11829 2011-03-21  Kai Tietz  <ktietz@redhat.com>
11830
11831         PR target/12171
11832         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11833
11834 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
11835
11836         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11837         out whether the expression is read-only.  Short-circuit placeholder
11838         case and rename a couple of local variables.
11839
11840 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
11841
11842         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11843         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11844         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11845         (convert): Deal with conversions from a smaller form type specially.
11846
11847 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
11848
11849         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11850         its argument, except for the special -I- switch.
11851
11852 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
11853
11854         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11855         "Ada Issues".
11856
11857 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
11858
11859         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11860
11861 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
11862
11863         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11864         GNAT_FORMAL.
11865         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11866         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
11867         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
11868         Do not generate the check directly, instead instantiate the template
11869         check present in the descriptor.
11870         (make_descriptor_field): Move around.
11871         (build_vms_descriptor32): Build a template check in the POINTER field.
11872         (build_vms_descriptor): Remove useless suffixes.
11873         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11874
11875 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
11876
11877         PR bootstrap/47467
11878         * targext.c: Include target files if IN_RTS is defined.
11879
11880 2011-01-26  Richard Guenther  <rguenther@suse.de>
11881
11882         PR bootstrap/47467
11883         * targext.c: Include config.h.
11884         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11885         dependency.
11886
11887 2011-01-04  Pascal Obry  <obry@adacore.com>
11888             Eric Botcazou  <ebotcazou@adacore.com>
11889
11890         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11891
11892 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11893
11894         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11895         end-of-case on the end label and its associated gotos, if any.
11896
11897 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11898
11899         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11900         expressions of the parameter cache within the statement group of
11901         the CICO mechanism.
11902
11903 2011-01-04  Olivier Hainque  <hainque@adacore.com>
11904             Eric Botcazou  <ebotcazou@adacore.com>
11905
11906         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11907         (set_end_locus_from_node): New function.
11908         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11909         make and the function end_locus.
11910         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11911         for the elaboration subprogram.
11912         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11913         set the end_locus of the expression as well.
11914
11915 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11916
11917         PR ada/47131
11918         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11919         variables that are referenced in exception handlers volatile.
11920
11921
11922 \f
11923 Copyright (C) 2011 Free Software Foundation, Inc.
11924
11925 Copying and distribution of this file, with or without modification,
11926 are permitted in any medium without royalty provided the copyright
11927 notice and this notice are preserved.