OSDN Git Service

2011-08-29 Yannick Moy <moy@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-08-29  Yannick Moy  <moy@adacore.com>
2
3         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4         types and dispatching calls in Alfa mode.
5         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
6         correspondance between body and spec scopes, to reuse utility functions
7         (Traverse_Declarations_Or_Statements): Protect access to body for stub
8         by testing the presence of the library unit for the body
9         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
10         mode the expansion of accept statements is skipped
11         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
12         the unique entity corresponding to the one returned by
13         Unique_Defining_Entity applied to the enclosing declaration of the
14         argument.
15
16 2011-08-29  Bob Duff  <duff@adacore.com>
17
18         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
19         gdb when x is not a node (it can be a node list, name_id, etc). pp is
20         an alias for pn. ppp is an alias for pt.
21
22 2011-08-29  Javier Miranda  <miranda@adacore.com>
23
24         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
25         aggregate to take a consistent decision on the need to convert into
26         assignments aggregates that initialize constant objects.
27
28 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
29
30         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
31         Build_Allocate_Deallocate_Proc in order to handle allocation of
32         non-controlled objects on subpools.
33         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
34         to be end-user visible.
35         * s-finmas.adb: Add with and use clause for System.HTable.
36         Add an instantiation of Simple_HTable which provides a mapping between
37         the address of a controlled object and the corresponding
38         Finalize_Address used to clean up the object. The table is used when a
39         master is operating in heterogeneous mode.
40         (Attach): Explain why the input node is not verified on being already
41         attached.
42         (Delete_Finalize_Address): New routine.
43         (Detach): Add pragma Assert which ensures that a node is already
44         attached.
45         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
46         since nodes are no longer removed on traversal. Explain why node
47         detachment is undesirable in this case.
48         (Get_Finalize_Address): New routine.
49         (Hash): New routine.
50         (Is_Empty_List): Removed.
51         (pm): Renamed to Print_Master. Add output for discriminant
52         Is_Homogeneous.
53         Comment reformatting.
54         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
55         * s-finmas.ads: Various comments additions / improvements.
56         Type Finalization_Master has a discriminant which determines the mode of
57         operation.
58         (Delete_Finalize_Address): New routine.
59         (Get_Finalize_Address): New routine.
60         (pm): Renamed to Print_Master.
61         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
62         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
63         use clause for System.IO.
64         (Allocate_Any_Controlled): Add machinery to set TSS primitive
65         Finalize_Address depending on the mode of allocation and the mode of
66         the master.
67         (Deallocate_Any_Controlled): Remove the relation pair object -
68         Finalize_Address regardless of the master mode. Add comment explaining
69         the reason.
70         (Detach): Ensure that fields Prev and Next are null after detachment.
71         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
72         scheme to check whether the list of subpools is empty. There is no
73         longer need to store the next subpool or advance the current pointer.
74         (Is_Empty_List): New routine.
75         (Print_Pool): New routine.
76         (Print_Subpool): New routine.
77         * s-stposu.ads: Various comments additions / improvements.
78         Field Master of type Root_Subpool is now a heterogeneous collection.
79         (Print_Pool): New routine.
80         (Print_Subpool): New routine.
81
82 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
83
84         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
85         forms, using aspects of container types.
86         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
87         Has_Implicit_Dereference flags, that may be set on the partial view.
88         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
89         container type with an indexing aspect.
90         (Analyze_Quantified_Expression): Analyze construct with expansion
91         disabled, because it will be rewritten as a loop during expansion.
92         (Try_Container_Indexing): The prefix itself may be a container type
93         with an indexing aspect, as with a vector of vectors.
94         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
95         the original doamin of iteration, for name capture.
96         (Analyze_Iterator_Specification): If the domain is an expression that
97         needs finalization, create a separate declaration for it.
98         For an iterator with "of" retrieve default iterator info from aspect of
99         container type. For "in" iterator, retrieve type of Iterate function.
100         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
101         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
102         analysis, to prevent spurious errors about late attributes.
103         * sprint.adb: Handle quantified expression with either loop or iterator
104         specification.
105         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
106         iterator.
107
108 2011-08-29  Vincent Celier  <celier@adacore.com>
109
110         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
111         Binder or Linker of the main project file.
112
113 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
114
115         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
116         unit.
117
118 2011-08-29  Yannick Moy  <moy@adacore.com>
119
120         * exp_ch9.adb: Partial revert of previous change for Alfa mode
121
122 2011-08-29  Yannick Moy  <moy@adacore.com>
123
124         * exp_ch11.adb: Minor expansion of comment.
125
126 2011-08-29  Yannick Moy  <moy@adacore.com>
127
128         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
129
130 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
131
132         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
133         interpretation, set the type before resolving the operands, because
134         legality checks on an exponention operand need to know the type of the
135         context.
136
137 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
138
139         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
140         cleanups on a master if the instance is within a generic unit.
141         Complement to the corresponding fix to inline.adb for K520-030.
142
143 2011-08-29  Tristan Gingold  <gingold@adacore.com>
144
145         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
146         occurrence.
147         * exp_intr.adb: Minor comment fix.
148
149 2011-08-29  Bob Duff  <duff@adacore.com>
150
151         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
152         Delay_Required was used as an uninitialized variable.
153
154 2011-08-29  Robert Dewar  <dewar@adacore.com>
155
156         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
157         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
158         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
159
160 2011-08-29  Thomas Quinot  <quinot@adacore.com>
161
162         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
163         Remove unused variables.
164
165 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
166
167         * sem_res.adb: Remove Build_Explicit_Dereference.
168         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
169         from sem_res.adb, used in analysis of additional constructs.
170         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
171         expansion of iterators.
172         (Is_Object_Reference): Recognize variables rewritten as explicit
173         dereferences in Ada2012.
174         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
175         Reversible_Iterator names, for expansion of Ada2012 iterators.
176         * aspects.ads, aspects.adb (Find_Aspect): Utility.
177         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
178         linked list container.
179         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
180         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
181
182 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
183
184         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
185         containers.
186
187 2011-08-29  Vincent Celier  <celier@adacore.com>
188
189         * make.adb (Gnatmake): Get the maximum number of simultaneous
190         compilation processes after the Builder switches has been scanned, as
191         there may include -jnn.
192
193 2011-08-29  Matthew Heaney  <heaney@adacore.com>
194
195         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
196
197 2011-08-29  Tristan Gingold  <gingold@adacore.com>
198
199         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
200         GNAT_DRIVER_COMMAND_LINE to 255.
201
202 2011-08-29  Pascal Obry  <obry@adacore.com>
203
204         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
205         reformatting and style fix (class attribute casing).
206
207 2011-08-29  Yannick Moy  <moy@adacore.com>
208
209         * exp_ch11.adb: Yet another case where expansion should be common
210         between CodePeer and Alfa.
211
212 2011-08-29  Yannick Moy  <moy@adacore.com>
213
214         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
215
216 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
217
218         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
219         incomplete type and its completion match.
220
221 2011-08-29  Yannick Moy  <moy@adacore.com>
222
223         * exp_ch13.adb: Adjust previous change.
224
225 2011-08-29  Robert Dewar  <dewar@adacore.com>
226
227         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
228         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
229         Minor reformatting.
230
231 2011-08-29  Emmanuel Briot  <briot@adacore.com>
232
233         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
234         initialize aggregated projects.
235
236 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
237
238         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
239         depth of candidates to resolve a potentially spurious ambiguity between
240         two visible subprograms.
241
242 2011-08-29  Yannick Moy  <moy@adacore.com>
243
244         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
245         Requires/Ensures.
246         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
247         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
248         Requires/Ensures.
249
250 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
251
252         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
253         Add comment.
254
255 2011-08-29  Thomas Quinot  <quinot@adacore.com>
256
257         * sem_res.adb: Minor reformatting.
258
259 2011-08-29  Johannes Kanig  <kanig@adacore.com>
260
261         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
262         mode.
263         * gnat1drv.adb (Adjust_Global_Switches): Set
264         Use_Expressions_With_Actions to False in ALFA mode.
265         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
266         ALFA mode.
267
268 2011-08-29  Yannick Moy  <moy@adacore.com>
269
270         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
271         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
272         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
273         tagged types and dispatching calls in Alfa mode.
274
275 2011-08-29  Javier Miranda  <miranda@adacore.com>
276
277         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
278         we do not report an error on an Empty node.
279
280 2011-08-29  Geert Bosch  <bosch@adacore.com>
281
282         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
283         a-nlrear.o and a-nurear.o.
284
285 2011-08-29  Robert Dewar  <dewar@adacore.com>
286
287         * freeze.adb: Minor code reorganization.
288         Minor reformatting.
289         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
290         sem_ch6.adb: Minor reformatting
291
292 2011-08-29  Tristan Gingold  <gingold@adacore.com>
293
294         * s-except.ads, s-except.adb: Provide dummy body.
295
296 2011-08-29  Yannick Moy  <moy@adacore.com>
297
298         * sem_warn.adb (Within_Postcondition): Take into account the case of
299         an Ensures component in a Test_Case.
300
301 2011-08-29  Tristan Gingold  <gingold@adacore.com>
302
303         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
304         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
305         System_Exceptions_Debug
306         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
307         * a-except.adb: With and use System.Exceptions_Debug instead of
308         System.Exceptions.
309         * a-except-2005.adb: Likewise.
310         * s-assert.adb: Likewise.
311         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
312         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
313         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
314         s-excdeb. Update dependencies.
315         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
316         as these no longer need external libraries.
317
318 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
319
320         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
321         exponentiation operator on universal values in a context that requires
322         a fixed-point type.
323
324 2011-08-29  Tristan Gingold  <gingold@adacore.com>
325
326         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
327         before calling notify_handled_exception.
328         * a-exextr.adb: Fix comment.
329
330 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
331
332         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
333         Finalize_Address of the access type's finalization master.
334         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
335         access type's finalization master. Add a guard to prevent
336         Associated_Storage_Pool from being set on .NET/JVM.
337         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
338         attribute Finalize_Address of the access type's finalization master.
339         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
340         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
341         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
342         RE_Unit_Table.
343         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
344         use clause for System.IO
345         (Detach): Relax the assertion, to be reinstated later.
346         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
347         Relax the assertion on Finalize_Address, to be reinstated later.
348         (Is_Empty_List): New routine.
349         (pm): New debug routine.
350         (Set_Finalize_Address): New routine.
351         * s-finmas.ads (pm): New debug routine.
352         (Set_Finalize_Address): New routine.
353         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
354
355 2011-08-29  Tristan Gingold  <gingold@adacore.com>
356
357         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
358         Remove convention C.
359
360 2011-08-29  Tristan Gingold  <gingold@adacore.com>
361
362         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
363         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
364         (Finalize_TCB): Remove its finalization.
365         (Initialize): Remove assignment of GET_Exc_Stack_Addr
366         * s-soflin.adb (NT_Exc_Stack): Remove
367         (Get_Exc_Stack_Addr_NT): Likewise.
368         (Get_Exc_Stack_Addr_Soft): Likewise.
369         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
370         (Get_Exc_Stack_Addr): Likewise.
371         (Get_Exc_Stack_Addr_Soft): Likewise
372         * s-taspri-vms.ads (Exc_Stack_T): Remove.
373         (Exc_Stack_Ptr_T): Likewise.
374         (Private_Data): Remove Exc_Stack_Ptr component.
375
376 2011-08-29  Tristan Gingold  <gingold@adacore.com>
377
378         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
379
380 2011-08-29  Tristan Gingold  <gingold@adacore.com>
381
382         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
383
384 2011-08-29  Geert Bosch  <bosch@adacore.com>
385
386         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
387         L2_Norm, Swap_Column): New generic subprograms
388         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
389         L2_Norm, Swap_Column): Implement new subprograms in order to
390         eliminate dependency on BLAS and LAPACK libraries in
391         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
392         version. Forward_Eliminate/Back_Substitute can be used to put a
393         matrix in row echelon or reduced row echelon form using partial
394         pivoting.
395         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
396         Swap_Column): Instantiate from System.Generic_Array_Operations.
397         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
398         (Sqrt): Local function for simple computation of square root without
399         adding dependencies on Generic_Elementary_Functions.
400         (Swap): New subprogram to exchange floating point numbers.
401         (Inverse): Reimplement using Jordan-Gauss elimination.
402         (Jacobi): New procedure implementing Jacobi's method for computation
403         of eigensystems, based on Rutishauser's implementation.
404         (L2_Norm): Implement directly using the inner product.
405         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
406         decreasing eigenvalue as required by the Ada RM.
407         (Swap_Column): New helper procedure for Sort_Eigensystem.
408         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
409         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
410         Sort_Eigensystems.
411
412 2011-08-29  Thomas Quinot  <quinot@adacore.com>
413
414         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
415         statements line.
416
417 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
418
419         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
420         than the current node.
421         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
422         Finalization_Master. The list headers have two fields instead of three.
423         This should fix alignment issue but subpool allocations are now
424         unusable. Alphabetize subprograms.
425         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
426         the size of the header when converting the beginning of the object to
427         a FM_Node. Set the master's Finalize_Address attribute if not already
428         set.
429         (Deallocate_Any_Controlled): Use the offset rather than the size of the
430         header when converting the beginning of the object to a FM_Node.
431
432 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
433
434         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
435         reraise when compiling for CodePeer.
436
437 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
438
439         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
440         now needed by a-convec.adb. Fix warning.
441
442 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
443
444         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
445         processing of TSS routine Finalize_Address when compiling in
446         CodePeer_Mode.
447
448 2011-08-29  Thomas Quinot  <quinot@adacore.com>
449
450         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
451         sem_warn.adb: Minor reformatting.
452
453 2011-08-29  Emmanuel Briot  <briot@adacore.com>
454
455         * prj-conf.adb (Get_Config_Switches): Also collect the list of
456         languages from aggregated projects.
457
458 2011-08-29  Yannick Moy  <moy@adacore.com>
459
460         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
461         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
462         Traverse_Package_Declaration, Traverse_Subprogram_Body,
463         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
464         for stubs are traversed too when parameter is set
465         (Traverse_All_Compilation_Units): Traverse without going inside stubs
466         (Traverse_Declarations_Or_Statements): Do the special traversing for
467         stubs when required.
468         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
469         return subprogram or package body from stub.
470         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
471         stubs without prior subprogram decl.
472
473 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
474
475         * gnat_ugn.texi: Fix typo.
476
477 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
478
479         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
480         which accounts for size vs alignment issues and calculates the size of
481         the list header.
482         (Deallocate_Any_Controlled): Ditto.
483         (Nearest_Multiple_Rounded_Up): New routine.
484
485 2011-08-29  Tristan Gingold  <gingold@adacore.com>
486
487         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
488         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
489         (Set_Exception_Msg): Ditto.
490         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
491         Private_Data.
492         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
493         Use Save_Occurrence instead of Save_Occurrence_No_Private.
494         (Raise_With_Msg): Remove Cleanup_Flag.
495         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
496         Clean_Flag and Private_Data components.
497
498 2011-08-29  Yannick Moy  <moy@adacore.com>
499
500         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
501         in CodePeer mode.
502         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
503         of an explicitly declared type, so that the base types of the original
504         type and this generated type are the same, and a "type" (not a subtype
505         like previously).
506         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
507         small" in Alfa mode, like in CodePeer mode.
508         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
509         clauses in Alfa mode.
510
511 2011-08-29  Javier Miranda  <miranda@adacore.com>
512
513         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
514         function to the package spec.
515         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
516         internally generated bodies of null procedures locate the internally
517         generated spec enforcing mode conformance.
518         (Is_Interface_Conformant): Ensure that the controlling formal of the
519         primitives match.
520
521 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
522
523         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
524         reject the pragma if it appears to apply to a formal subprogram.
525
526 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
527
528         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
529         inner expression, to prevent double evaluation.
530
531 2011-08-29  Tristan Gingold  <gingold@adacore.com>
532
533         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
534         they were unused.
535         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
536         * a-except-2005.adb (Propagate_Exception): Adjust spec.
537         (Raise_Current_Excep): Adjust call.
538         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
539
540 2011-08-29  Thomas Quinot  <quinot@adacore.com>
541
542         * exp_disp.adb: Minor reformatting.
543
544 2011-08-29  Tristan Gingold  <gingold@adacore.com>
545
546         * a-exexpr.adb (Setup_Exception): Removed.
547         * a-exexpr-gcc.adb (Setup_Exception): Removed.
548         * a-except.adb (Exception_Propagation): Removed.
549         * a-except-2005.adb (Setup_Exception): Removed.
550         (Reraise): Remove call to Setup_Exception.
551         (Reraise_Occurrence): Ditto.
552         (Reraise_Occurrence_Always): Ditto.
553         (Reraise_Occurrence_No_Defer): Ditto.
554         (Transfer_Occurrence): Ditto.
555         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
556         (Set_Exception_Msg): Ditto.
557
558 2011-08-29  Robert Dewar  <dewar@adacore.com>
559
560         * a-convec.adb, exp_disp.adb: Minor reformatting.
561
562 2011-08-29  Tristan Gingold  <gingold@adacore.com>
563
564         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
565
566 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
567
568         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
569         Exception_Handlers to No_List instead of Empty_List in the case where
570         there are no handlers.
571
572 2011-08-29  Tristan Gingold  <gingold@adacore.com>
573
574         * gcc-interface/gigi.h (enum standard_datatypes): Add
575         ADT_reraise_zcx_decl
576         (reraise_zcx_decl): New macro.
577         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
578         (gigi): Set reraise_zcx_decl.
579         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
580         (gnat_to_gnu): Handle N_Raise_Statement.
581
582 2011-08-29  Robert Dewar  <dewar@adacore.com>
583
584         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
585         a-undesu.adb: Minor reformatting.
586
587 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
588
589         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
590         table, accept an unfrozen untagged component if it is an actual for a
591         formal incomplete type.
592         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
593         provide new iterator forms over vectors.
594         Introduce type Iterator in package body to implement operations of
595         Reversible_Iterator interface.
596         * a-iteint.ads: Make package pure so it is usable with new container
597         packages, that are categorized Remote_Types.
598
599 2011-08-29  Robert Dewar  <dewar@adacore.com>
600
601         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
602
603 2011-08-29  Bob Duff  <duff@adacore.com>
604
605         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
606         of <>, because this is the routine that checks for dimensionality
607         errors (for example, for a two-dimensional array, (others => <>) should
608         be (others => (others => <>)).
609
610 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
611
612         * impunit.adb: Add new run-time units.
613         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
614         s-stposu.ads, s-stposu.adb: Code clean up.
615         Handle protected class-wide or task class-wide types
616         Handle C/C++/CIL/Java types.
617         * s-spsufi.adb, s-spsufi.ads: New files.
618
619 2011-08-29  Yannick Moy  <moy@adacore.com>
620
621         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
622         library-level subprogram.
623         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
624         placement.
625         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
626         component.
627         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
628         component.
629         * gnat_rm.texi: Update doc for Test_Case pragma.
630
631 2011-08-29  Tristan Gingold  <gingold@adacore.com>
632
633         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
634         convention C.
635         (GCC_Exception_Access): New type.
636         (Unwind_DeleteException): New imported procedure
637         (Foreign_Exception): Import it.
638         (GNAT_GCC_Exception): Simply have the occurrence inside.
639         (To_GCC_Exception): New function.
640         (To_GNAT_GCC_Exception): New function.
641         (GNAT_GCC_Exception_Cleanup): New procedure..
642         (Propagate_GCC_Exception): New procedure.
643         (Reraise_GCC_Exception): New procedure.
644         (Setup_Current_Excep): New procedure.
645         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
646         (Unwind_RaiseException): Ditto.
647         (Unwind_ForcedUnwind): Ditto.
648         (Remove): Removed.
649         (Begin_Handler): Change type of parameter.
650         (End_Handler): Ditto. Now delete the exception if still present.
651         (Setup_Key): Removed.
652         (Is_Setup_And_Not_Propagated): Removed.
653         (Set_Setup_And_Not_Propagated): Ditto.
654         (Clear_Setup_And_Not_Propagated): Ditto.
655         (Save_Occurrence_And_Private): Ditto.
656         (EID_For): Add 'not null' constraint on parameter.
657         (Setup_Exception): Does nothing.
658         (Propagate_Exception): Simplified.
659         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
660         re-raise is not expanded anymore.
661         * s-except.ads (Foreign_Exception): New exception - placeholder for
662         non Ada exceptions.
663         * raise-gcc.c (__gnat_setup_current_excep): Declare
664         (CXX_EXCEPTION_CLASS): Define (not yet used)
665         (GNAT_EXCEPTION_CLASS): Define.
666         (is_handled_by): Handle foreign exceptions.
667         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
668
669 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
670
671         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
672
673 2011-08-29  Thomas Quinot  <quinot@adacore.com>
674
675         * a-synbar-posix.adb: Minor reformatting.
676
677 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
678
679         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
680         a-exetim-default.ads (Interrupt_Clocks_Supported,
681         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
682         definitions to be compliant with AI-0171. The target systems do not
683         support separate account for the execution time of interrupt handlers.
684
685 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
686
687         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
688         in the barrier to put first the easiest to evaluate (and the one which
689         will be True more often). More efficient.
690
691 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
692
693         * s-atocou-x86.adb: Fix constraint in machine code insertion.
694
695 2011-08-29  Bob Duff  <duff@adacore.com>
696
697         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
698         attributes that are now aspects, as specified by AI05-0229-1.
699         * sem_ch13.adb (Analyze_Aspect_Specifications,
700         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
701         pragmas or attribute references, as appropriate.
702
703 2011-08-29  Robert Dewar  <dewar@adacore.com>
704
705         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
706         a-synbar-posix.ads: Minor reformatting.
707
708 2011-08-29  Yannick Moy  <moy@adacore.com>
709
710         * snames.ads-tmpl: Add name Force.
711
712 2011-08-29  Pascal Obry  <obry@adacore.com>
713
714         * prj-nmsc.adb: Minor reformatting.
715
716 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
717
718         * a-exetim.ads (Interrupt_Clocks_Supported,
719         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
720         definitions to be compliant with AI-0171.
721
722 2011-08-29  Robert Dewar  <dewar@adacore.com>
723
724         * a-ngelfu.adb: Add comments.
725
726 2011-08-29  Geert Bosch  <bosch@adacore.com>
727
728         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
729         the closest machine number to Pi / 2.0.
730
731 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
732
733         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
734         package Ada.Synchronous_Barriers.
735         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
736         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
737         default implementation using protected objects and another one
738         a-synbar-posix using POSIX barriers as the underlying support.
739         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
740         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
741         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
742         Clean up dependencies.
743         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
744
745 2011-08-29  Robert Dewar  <dewar@adacore.com>
746
747         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
748         exp_dist.adb: Minor code reorganization.
749         Minor reformatting.
750
751 2011-08-29  Thomas Quinot  <quinot@adacore.com>
752
753         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
754         primitive operation must support external streaming if it is not a
755         controlling access result.
756
757 2011-08-29  Thomas Quinot  <quinot@adacore.com>
758
759         * sinfo.ads, sem_ch7.adb: Minor reformatting.
760
761 2011-08-29  Bob Duff  <duff@adacore.com>
762
763         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
764         restriction on allocators, as required by AI05-0013-1.
765         * restrict.ads: Minor comment fix.
766
767 2011-08-29  Tristan Gingold  <gingold@adacore.com>
768
769         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
770         (To_Jmpbuf_Address): Ditto
771         (builtin_longjmp): Ditto
772
773 2011-08-29  Thomas Quinot  <quinot@adacore.com>
774
775         * sem_res.adb: Minor reformatting.
776
777 2011-08-29  Vincent Celier  <celier@adacore.com>
778
779         * make.adb (Gnatmake): Move special processing for VM targets after the
780         call to Get_Target_Parameters.
781
782 2011-08-29  Thomas Quinot  <quinot@adacore.com>
783
784         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
785
786 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
787
788         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
789         where an anonymous access discriminant of a limited designated type
790         appears in a non-immutably limited discriminated type and issue an
791         error message. Add local variable Desig_T and replace all occurrences
792         of Designated_Type.
793
794 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
795
796         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
797         implementation is compliant to RM D.15(15/2) after the modification
798         imposed by AI05-0094-1 (binding interpretation).
799
800 2011-08-29  Robert Dewar  <dewar@adacore.com>
801
802         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
803         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
804
805 2011-08-29  Thomas Quinot  <quinot@adacore.com>
806
807         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
808         the scope name, do not report a missing label as a style violation (it
809         will be diagnosed as an illegality).
810         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
811         variant records: Get_Enum_Lit_From_Pos already returns a usage
812         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
813         on Expr in Integer_Literal case so that it can be used by
814         Build_To_Any_Call.
815
816 2011-08-29  Tristan Gingold  <gingold@adacore.com>
817
818         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
819         Adjust comment.
820         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
821         (Build_Abort_Block_Handler): New function to build an Abort_Signal
822         exception handler.
823         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
824         Build_Abort_Block_Handler to build the exception handler. Do not
825         undefer aborts for the Abort_Signal exception handler if back-end
826         exception mechanism.
827         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
828         back_end exceptions for all others and abort_signal.
829         * s-except.ads (ZCX_By_Default): New constant.
830         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
831         (Raise_Exception_Always): Ditto.
832         (Raise_From_Signal_Handler): Ditto.
833         (Raise_With_Location_And_Msg): Ditto.
834         (Raise_With_Msg): Ditto.
835         (Reraise): Ditto.
836         (Reraise_Occurence): Ditto.
837         (Reraise_Occurrence_Always): Ditto.
838         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
839         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
840
841 2011-08-29  Thomas Quinot  <quinot@adacore.com>
842
843         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
844
845 2011-08-29  Robert Dewar  <dewar@adacore.com>
846
847         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
848         Minor code reorganization.
849
850 2011-08-29  Bob Duff  <duff@adacore.com>
851
852         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
853         2012, not just Ada 2005.
854
855 2011-08-29  Vincent Celier  <celier@adacore.com>
856
857         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
858         with a project file or with gprbuid, if -gnatep= is specified, the
859         builder may need to be invoked with -x.
860
861 2011-08-29  Tristan Gingold  <gingold@adacore.com>
862
863         * a-exexpr-gcc.adb: Minor comment fix.
864
865 2011-08-29  Robert Dewar  <dewar@adacore.com>
866
867         * sem_ch8.adb: Minor reformatting.
868
869 2011-08-29  Bob Duff  <duff@adacore.com>
870
871         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
872         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
873         treating "some" as unreserved in earlier Ada versions. This is now
874         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
875         rather than Name_Some, since Tok_Some is now recognized as reserved.
876         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
877         reserved word.
878         * scans.ads: Minor comment fixes.
879         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
880         for other language versions.
881         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
882         treating "some" as unreserved in earlier Ada versions. This is now
883         handled in Snames.Is_Keyword_Name.
884         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
885         Ada 2012.
886         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
887         unreserved in earlier Ada versions. This is now handled in
888         Snames.Is_Keyword_Name.
889         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
890         words as for other language versions.
891         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
892         Ada 2012, not just Ada 2005.
893
894 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
895
896         * sem_ch13.adb: Additional semantic checks for aspects involved in
897         iterators.
898
899 2011-08-29  Matthew Heaney  <heaney@adacore.com>
900
901         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
902         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
903         Container parameter.
904         (Ancestor_Find): ditto.
905
906 2011-08-29  Thomas Quinot  <quinot@adacore.com>
907
908         * par-endh.adb: Minor reformatting.
909
910 2011-08-29  Tristan Gingold  <gingold@adacore.com>
911
912         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
913         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
914         (Adjust_N_CLeanups_For): Remove.
915         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
916         stack is reached.
917         (Propgate_Exception): Adjust.
918         * raise-gcc.c: Add a few static/const.
919         (Adjust_N_Cleanups_For): Remove declaration.
920         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
921
922 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
923
924         * sem_ch8.adb: Use type of function return when rewriting as object
925         declaration.
926
927 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
928
929         * sem_type.adb: Minor reformatting.
930
931 2011-08-29  Robert Dewar  <dewar@adacore.com>
932
933         * makeutl.adb: Minor reformatting.
934
935 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
936
937         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
938         function call of a limited type, the expansion of the renaming is
939         complicated by the presence of various temporaries and subtypes that
940         capture constraints of the renamed object.
941         Rewrite node as an object declaration, whose expansion is simpler.
942         Given that the object is limited there is no copy involved and no
943         performance hit.
944
945 2011-08-29  Robert Dewar  <dewar@adacore.com>
946
947         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
948         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
949
950 2011-08-29  Tristan Gingold  <gingold@adacore.com>
951
952         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
953         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
954         system-linux-hppa.ads, system-linux-s390.ads,
955         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
956         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
957         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
958         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
959         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
960         system-solaris-sparc.ads, system-lynxos-x86.ads,
961         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
962         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
963         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
964         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
965         system-vxworks-x86.ads: Remove GCC_ZCX_Support
966         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
967         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
968         * opt.ads: Adjust comment.
969         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
970         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
971         * system.ads: Move GCC_ZCX_Support to obsolete entries.
972
973 2011-08-29  Emmanuel Briot  <briot@adacore.com>
974
975         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
976         file name is specified on the gnatmake or gprbuild command line, and
977         before we search for that file in the project.
978
979 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
980
981         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
982         used to determine whether a possible interpretation for an overloadable
983         entity is declared within the current instantiation and should be
984         included in the candidate set.
985
986 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
987
988         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
989
990 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
991
992         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
993         access subtype is access_to_subprogram, when applying checks for
994         RM 3.10.2 (27).
995
996 2011-08-29  Matthew Heaney  <heaney@adacore.com>
997
998         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
999         for sibling when common parent.
1000
1001 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1002
1003         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
1004         "pragma_".
1005
1006 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1007
1008         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
1009         for the return type when in ASIS mode.
1010
1011 2011-08-29  Vincent Celier  <celier@adacore.com>
1012
1013         * make.adb (Gnatmake): Get the default search dirs, then the target
1014         parameters after getting the Builder switches, as the Builder switches
1015         may include --RTS= and that could change the default search dirs.
1016
1017 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1018
1019         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
1020         Make_Final_Call. Move the processing for class-wide types before the
1021         processing for derivations from [Limited_]Controlled.
1022         (Make_Final_Call): Move the processing for class-wide types before the
1023         processing for derivations from [Limited_]Controlled.
1024         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
1025         Add code to account for alignments larger than the list header. Add a
1026         comment illustrating the structure of the allocated object + padding +
1027         header.
1028         (Deallocate_Any_Controlled): Add code to account for alignments larger
1029         than the list header.
1030
1031 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1032
1033         * sinfo.ads, sinfo.adb: New node kind
1034         N_Formal_Incomplete_Type_Definition, related flags.
1035         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
1036         Parse formal incomplete types.
1037         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
1038         sem_ch12.
1039         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
1040         Formal incomplete types do not need completion.
1041         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
1042         Validate_Incomplete_Type_Instance): New procedures to handle formal
1043         incomplete types.
1044         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
1045         that corresponds to a formal incomplete type.
1046         * sprint.adb: Handle formal incomplete type declarations.
1047         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
1048         an insertion point.
1049
1050 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1051
1052         * a-fihema.ads, a-fihema.adb: Unit removed.
1053         * a-undesu.ads, a-undesu.adb: New unit implementing
1054         Ada.Unchecked_Deallocate_Subpool.
1055         * einfo.adb: Remove Associated_Collection from the node usage.
1056         Add Finalization_Master to the node usage.
1057         (Associated_Collection): Removed.
1058         (Finalization_Master): New routine.
1059         (Set_Associated_Collection): Removed.
1060         (Set_Finalization_Master): New routine.
1061         (Write_Field23_Name): Remove Associated_Collection from the output. Add
1062         Finalization_Master to the output.
1063         * einfo.ads: Remove attribute Associated_Collection and its uses in
1064         entities.
1065         Add new attribute Finalization_Master along with its uses in entitites.
1066         (Associated_Collection): Removed along with its pragma import.
1067         (Finalization_Master): New routine along with a pragma import.
1068         (Set_Associated_Collection): Removed along with its pragma import.
1069         (Set_Finalization_Master): New routine along with a pragma import.
1070         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
1071         Build_Finalization_Collection with Build_Finalization_Master.
1072         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
1073         before the bodies of the predefined routines. Add comment explaining
1074         this. Replace call to Build_Finalization_Collection with
1075         Build_Finalization_Master.
1076         (Freeze_Type): Replace call to Build_Finalization_Collection with
1077         Build_Finalization_Master.
1078         (Make_Finalize_Address_Body): Comment reformatting.
1079         (Make_Predefined_Primitive_Specs): Code reformatting.
1080         (Stream_Operation_OK): Update comment mentioning finalization
1081         collections. Replace RE_Finalization_Collection with
1082         RE_Finalization_Master.
1083         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
1084         Associated_Collection with Finalization_Master. Replace call to
1085         Build_Finalization_Collection with Build_Finalization_Master.
1086         (Expand_Allocator_Expression): Replace call to Associated_Collection
1087         with Finalization_Master. Replace call to Set_Associated_Collection with
1088         Set_Finalization_Master. Remove the generation of
1089         Set_Finalize_Address_Ptr.
1090         (Expand_N_Allocator): Replace call to Associated_Collection with
1091         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
1092         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
1093         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
1094         comment on usage. Replace call to Needs_BIP_Collection with
1095         Needs_BIP_Finalization_Master Remplace BIP_Collection with
1096         BIP_Finalization_Master. Update all comments which mention finalization
1097         collections. Replace Associated_Collection with
1098         Finalization_Master. Replace Build_Finalization_Collection with
1099         Build_Finalization_Master.
1100         (BIP_Formal_Suffix): Update BIP_Collection's case.
1101         (Build_Heap_Allocator): Update the related comment. Rename local
1102         variable Collect to Fin_Mas_Id and update its occurrences. Update
1103         comments which mention finalization collections. Replace
1104         Set_Associated_Collection with Set_Finalization_Master.
1105         (Expand_Call): Update the code which detects a special piece of library
1106         code for .NET/JVM.
1107         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
1108         Add_Collection_Actual_To_Build_In_Place_Call with
1109         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
1110         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
1111         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
1112         Add_Collection_Actual_To_Build_In_Place_Call with
1113         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1114         (Make_Build_In_Place_Call_In_Assignment): Replace call to
1115         Add_Collection_Actual_To_Build_In_Place_Call with
1116         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1117         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1118         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
1119         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1120         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
1121         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
1122         Replace call to Set_Associated_Collection with Set_Finalization_Master.
1123         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
1124         Replace the call to Associated_Collection with Finalization_Master.
1125         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
1126         Update the way finalization master names are generated. Update the
1127         retrieval of the correct access type which will carry the pool and
1128         master attributes.
1129         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
1130         (Make_Finalize_Address_Body): Abstract types do not need
1131         Finalize_Address. Code reformatting.
1132         (Make_Finalize_Address_Stmts): Update comment on usage.
1133         (Make_Set_Finalize_Address_Ptr_Call): Removed.
1134         (Process_Declarations): Update comments.
1135         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
1136         Build_Finalization_Master. Update associated comment.
1137         (Make_Set_Finalize_Address_Ptr_Call): Removed.
1138         * exp_ch13.adb: Update comments which mention finalization collections.
1139         (Expand_N_Free_Statement): Replace the call to Associated_Collection
1140         with Finalization_Master.
1141         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
1142         create calls to routines Allocate_Any_Controlled and
1143         Deallocate_Any_Controlled.
1144         (Find_Finalize_Address): New routine.
1145         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
1146         comparison.
1147         (Requires_Cleanup_Actions): Update the comment on freeze node
1148         inspection.
1149         * exp_util.ads: Remove comment on generated code for
1150         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
1151         is better to simply look in the body.
1152         * freeze.adb (Freeze_All): Update the comment of finalization
1153         collections. Replace the call to Associated_Collection with
1154         Finalization_Master. Replace the call to Build_Finalization_Collection
1155         with Build_Finalization_Master.
1156         * impunit.adb: Add a-undesu and s-stposu to the list of units.
1157         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
1158         a-fihema.
1159         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
1160         Ada.Finalization. Add processing for children of System.Storage_Pools.
1161         * rtsfind.ads: Remove the naming of second level children of
1162         Ada.Finalization.
1163         Remove Ada_Finalization_Heap_Management from the list of units.
1164         Remove subtype Ada_Finalization_Child.
1165         Remove the following subprogram entities:
1166         
1167            RE_Allocate
1168            RE_Deallocate
1169            RE_Finalization_Collection
1170            RE_Finalization_Collection_Ptr
1171            RE_Set_Finalize_Address_Ptr
1172         
1173         Add the naming of second level children of System.Storage_Pools.
1174         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
1175         the list of units.
1176         Add subtype System_Storage_Pools_Child.
1177         Add the following subprogram entities to System.Finalization_Masters:
1178         
1179            RE_Finalization_Master
1180            RE_Finalization_Master_Ptr
1181         
1182         Add the following subprogram entities to System.Storage_Pools.Subpools:
1183         
1184            RE_Allocate_Any_Controlled
1185            RE_Deallocate_Any_Controlled
1186            RE_Root_Storage_Pool_With_Subpools
1187            RE_Root_Subpool
1188            RE_Subpool_Handle
1189         
1190         Move the following subprogram entities from
1191         Ada.Finalization.Heap_Management to System.Finalization_Masters:
1192         
1193            RE_Add_Offset_To_Address
1194            RE_Attach
1195            RE_Base_Pool
1196            RE_Detach
1197         
1198         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
1199         Set_Associated_Collection with Set_Finalization_Master.
1200         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
1201         BIP_Finalization_Master is created.
1202         * s-finmas.adb: New unit System.Finalization_Masters.
1203         * s-finmas.ads: New unit System.Finalization_Masters.
1204         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
1205         * s-stposu.ads, s-stposu.adb: New unit implementing
1206         System.Storage_Pools.Subpools.
1207
1208 2011-08-29  Bob Duff  <duff@adacore.com>
1209
1210         * tbuild.adb: Add assertion.
1211
1212 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1213
1214         * s-pooglo.adb: Minor reformatting.
1215
1216 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1217
1218         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
1219         an indexed component of a packed array whose element type is a record
1220         with a representation clause different from that of the right-hand
1221         side, generate a temporary to minimuze the number of bit-field
1222         operations generated.
1223
1224 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1225
1226         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
1227         declarations, and thus are likely insertion points for actions.
1228
1229 2011-08-29  Bob Duff  <duff@adacore.com>
1230
1231         * einfo.ads: Minor comment fix.
1232
1233 2011-08-29  Robert Dewar  <dewar@adacore.com>
1234
1235         * frontend.adb, gnat1drv.adb: Minor reformatting.
1236
1237 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1238
1239         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
1240         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
1241         space in front of the header.
1242
1243 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1244
1245         * frontend.adb (Frontend): Exit after creating Standard package when
1246         -gnatd.H is present.
1247         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
1248         present.
1249
1250 2011-08-29  Robert Dewar  <dewar@adacore.com>
1251
1252         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
1253         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
1254         snames.ads-tmpl: Minor reformatting.
1255
1256 2011-08-29  Philippe Gil  <gil@adacore.com>
1257
1258         * prj.adb (Reset_Units_In_Table): New procedure.
1259         Reset units to avoid access to freed memory.
1260
1261 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1262
1263         * get_scos.adb: When reading a P statement SCO without a pragma name
1264         (from an older ALI file), ensure that the Pragma_Name component is set
1265         to Unknown_Pragma (not left uninitialized).
1266
1267 2011-08-29  Vincent Celier  <celier@adacore.com>
1268
1269         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
1270         modified to compute correctly the object path of a SAL project that is
1271         extending another library project.
1272         (Write_Path_File): New procedure.
1273         * makeutl.ads (Directories): New table moved from Buildgpr
1274         (Get_Directories): New procedure moved from Buildgpr
1275         (Write_Path_File): New procedure
1276         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
1277         paths before binding SALs, instead of Set_Ada_Paths.
1278         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
1279         Prj.
1280         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
1281         (Current_Source_Path_File_Of): New function
1282         (Set_Current_Object_Path_File_Of): New procedure
1283         (Current_Source_Object_File_Of): New function
1284         (Set_Current_Object_Path_File_Of): New procedure
1285         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
1286         (Current_Source_Path_File_Of): New function
1287         (Set_Current_Object_Path_File_Of): New procedure
1288         (Current_Source_Object_File_Of): New function
1289         (Set_Current_Object_Path_File_Of): New procedure
1290
1291 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1292
1293         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
1294         packed entity, use a bit-field assignment only if there is no change of
1295         representation.
1296
1297 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1298
1299         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
1300         Is_RTU instead of using Chars comparisons.
1301
1302 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1303
1304         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
1305         temporary object if the actual is constrained, and the discriminants
1306         read from the stream don't match.
1307
1308 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1309
1310         * sem_attr.adb, exp_attr.adb: Add handling of
1311         Attribute_System_Allocator_Alignment
1312         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
1313         Attribute_System_Allocator_Alignment.
1314         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
1315         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
1316         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
1317         get_target_system_allocator_alignment.
1318
1319 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1320
1321         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1322         dependencies.
1323
1324 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1325
1326         * exp_ch3.adb (In_Runtime): Fix typo.
1327
1328 2011-08-29  Bob Duff  <duff@adacore.com>
1329
1330         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
1331
1332 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1333
1334         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
1335         and a separate tag assignment is generated, ensure that the tag
1336         assignment is analyzed.
1337
1338 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1339
1340         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
1341         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
1342         of statement lists that may contain local declarations.
1343         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
1344         duplicate the triggering statements needed for the expansion of this
1345         construct, when the trigger is a dispatching call to a synchronized
1346         primitive.
1347
1348 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1349
1350         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
1351         * bindgen.adb: Add comments.
1352         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
1353         in CodePeer mode.
1354
1355 2011-08-29  Robert Dewar  <dewar@adacore.com>
1356
1357         * exp_attr.adb: Minor reformatting.
1358         Minor code reorganization and commenting.
1359         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
1360         reformatting.
1361
1362 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1363
1364         * get_scos.adb: Ignore chaining indicators not currently supported
1365         by Ada.
1366
1367 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1368
1369         * system.ads: Minor editing.
1370
1371 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1372
1373         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
1374         CodePeer mode.
1375         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
1376         Attribute_Elab_Subp_Body.
1377         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
1378         * sem_util.adb: Update comments.
1379
1380 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1381
1382         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
1383         pragma name for each SCO statement corresponding to a pragma.
1384
1385 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1386
1387         * opt.ads: Minor editing.
1388
1389 2011-08-29  Yannick Moy  <moy@adacore.com>
1390
1391         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
1392         that only made sense for CodePeer mode.
1393
1394 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1395
1396         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
1397         which is no longer used.
1398         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
1399         handling of the 64-bit division check.
1400         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
1401         division available.
1402         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
1403         longer used.
1404
1405 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1406
1407         * get_scos.adb: Minor reformatting.
1408
1409 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1410
1411         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
1412         statement list is wrapped in a block, the block is explicitly analyzed
1413         in order to properly redecorate the entities and create a servicing
1414         finalizer.
1415
1416 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1417
1418         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
1419         (Set_Zero_Cost_Handling): Remove.
1420
1421 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1422
1423         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
1424
1425 2011-08-29  Geert Bosch  <bosch@adacore.com>
1426
1427         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
1428         instruction, as the latter may produce -0.0, which is not a valid VAX
1429         F float number.
1430         (Neg_G): Likewise for VAX F float.
1431
1432 2011-08-29  Robert Dewar  <dewar@adacore.com>
1433
1434         * exp_util.adb: Minor reformatting.
1435
1436 2011-08-29  Yannick Moy  <moy@adacore.com>
1437
1438         * sem_ch3.adb: Minor comment update.
1439
1440 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1441
1442         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
1443         the operand type.
1444
1445 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1446
1447         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
1448         current statement sequence on a generic instantiation or a subprogram
1449         declaration.
1450
1451 2011-08-29  Robert Dewar  <dewar@adacore.com>
1452
1453         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
1454         Minor reformatting.
1455
1456 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1457
1458         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1459         Correct the check which involves the freeze node of a controlled or
1460         access-to-controlled type.
1461
1462 2011-08-29  Geert Bosch  <bosch@adacore.com>
1463
1464         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
1465         statements.
1466         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
1467         Asm statements.
1468
1469 2011-08-29  Yannick Moy  <moy@adacore.com>
1470
1471         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
1472         for every index type and component type that is not a subtype_mark.
1473         (Process_Subtype): Set Etype of subtype.
1474
1475 2011-08-29  Robert Dewar  <dewar@adacore.com>
1476
1477         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
1478         reorganization.  Minor reformatting.
1479
1480 2011-08-29  Steve Baird  <baird@adacore.com>
1481
1482         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
1483         for CodePeer and ALFA modes.
1484
1485 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1486
1487         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
1488         that comes from an enclosing scope if it is not the renaming of an
1489         actual, to handle properly a spurious ambiguity in an instance.
1490
1491 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
1492
1493         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
1494         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
1495         use it instead of the Esize of the first parameter.
1496         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
1497         above change.
1498         <Size>: Likewise.  Call it for composite types on the RM size.
1499
1500 2011-08-29  Yannick Moy  <moy@adacore.com>
1501
1502         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
1503         * sem_util.adb (Unique_Name): Correct behaviour for names of
1504         compilation units.
1505
1506 2011-08-29  Yannick Moy  <moy@adacore.com>
1507
1508         * sem_prag.adb (Check_Precondition_Postcondition): In formal
1509         verification mode, analyze pragma expression for correctness, for
1510         pre/post on library-level subprogram, as it is not expanded later.
1511
1512 2011-08-29  Yannick Moy  <moy@adacore.com>
1513
1514         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
1515         in formal verification.
1516
1517 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1518
1519         * sem_util.adb: Minor reformatting.
1520         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
1521         there's no pragma.
1522         * par_sco.ads, par_sco.adb: Update comments.
1523
1524 2011-08-29  Yannick Moy  <moy@adacore.com>
1525
1526         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
1527         associated getter/setter.
1528         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
1529
1530 2011-08-29  Vincent Celier  <celier@adacore.com>
1531
1532         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
1533         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
1534         with declarations for Language_Kind and Dependency_Kind for Ada.
1535         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
1536         (Process_Compiler): Take into account the new attributes Dependency_Kind
1537         and Language_Kind.
1538         (Check_Configuration): Check if language kind is unit based, not if the
1539         language name is Ada.
1540         (Process_Exceptions_Unit_Based): Ditto
1541         (Add_Language): Remove default additions of language and dependency kind
1542         * prj.ads: Minor comment change
1543         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
1544
1545 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1546
1547         * debug.adb: Update comments.
1548
1549 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
1550
1551         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
1552         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
1553         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
1554         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
1555         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
1556
1557 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1558
1559         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
1560         (GNATLIBCFLAGS_FOR_C): Replace
1561         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
1562         (gnatlib-shared-default, gnatlib-shared-dual-win32)
1563         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
1564         (gnatlib-sjlj, gnatlib-zcx): Likewise.
1565
1566 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
1567
1568         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
1569
1570         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
1571
1572         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
1573
1574 2011-08-05  Nicolas Roche  <roche@adacore.com>
1575
1576         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
1577         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
1578         canadian cross.
1579         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
1580
1581 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1582
1583         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
1584         subprogram bodies declared out-of-order.
1585
1586 2011-08-05  Yannick Moy  <moy@adacore.com>
1587
1588         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
1589         entities directly in package Standard, otherwise skip the standard
1590         prefix.
1591
1592 2011-08-05  Robert Dewar  <dewar@adacore.com>
1593
1594         * a-cbmutr.adb: Minor reformatting
1595         (Allocate_Node): refactor node allocation algorithm
1596
1597 2011-08-05  Robert Dewar  <dewar@adacore.com>
1598
1599         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
1600         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
1601         mode.
1602         (Analyze_Pragma, case Check_Policy): Ditto.
1603         * sem_prag.ads (Check_Disabled): New function
1604         * snames.ads-tmpl: Add Name_Disable.
1605
1606 2011-08-05  Robert Dewar  <dewar@adacore.com>
1607
1608         * gnat_rm.texi: Document implementation-defined policy DISABLE for
1609         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
1610
1611 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1612
1613         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
1614         that appears in a generic formal part and applies to a formal
1615         subprogram.
1616
1617 2011-08-05  Robert Dewar  <dewar@adacore.com>
1618
1619         * a-cbmutr.ads: Minor reformatting.
1620
1621 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1622
1623         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
1624         to check count, check sign of value instead.
1625         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
1626         (Copy_Subtree): allocate copy of source element
1627         (Equal_Subtree): compare elements, not access objects
1628
1629 2011-08-05  Vincent Celier  <celier@adacore.com>
1630
1631         * gnat_ugn.texi: Fix VMS alternative.
1632
1633 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1634
1635         * sem_ch11.adb: Add comment.
1636
1637 2011-08-05  Robert Dewar  <dewar@adacore.com>
1638
1639         * exp_util.adb: Minor comment fix.
1640
1641 2011-08-05  Robert Dewar  <dewar@adacore.com>
1642
1643         * scng.adb (Error_Unterminated_String): Improve flag position when
1644         comma present.
1645
1646 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1647
1648         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
1649         tree containers).
1650         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
1651         multiway tree containers.
1652
1653 2011-08-05  Robert Dewar  <dewar@adacore.com>
1654
1655         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
1656         * stylesw.adb: Implement -gnatyC to control comment spacing
1657         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
1658         -gnatyc/C).
1659         * usage.adb: Add line for -gnatyC.
1660
1661 2011-08-05  Robert Dewar  <dewar@adacore.com>
1662
1663         * gnat_ugn.texi: Document -gnatyC.
1664         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
1665         synonym for COMMENTS2).
1666
1667 2011-08-05  Robert Dewar  <dewar@adacore.com>
1668
1669         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
1670         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
1671         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
1672         a-comutr.ads, lib-xref.adb: Minor reformatting.
1673
1674 2011-08-05  Robert Dewar  <dewar@adacore.com>
1675
1676         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
1677         warning if there is an exception handler present.
1678
1679 2011-08-05  Pascal Obry  <obry@adacore.com>
1680
1681         * a-iteint.ads: Fix copyright year.
1682
1683 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1684
1685         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
1686         statement SCO for a USE clause or a representation clause.
1687
1688 2011-08-05  Yannick Moy  <moy@adacore.com>
1689
1690         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
1691         between body and spec for stub.
1692         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
1693         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
1694         pragma precondition or postcondition, for which the enclosing
1695         subprogram or package in the AST is not the desired one, return empty.
1696
1697 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1698
1699         * g-expect.adb: Minor reformatting.
1700
1701 2011-08-05  Bob Duff  <duff@adacore.com>
1702
1703         * a-fihema.adb: Comment out OS_Lib.
1704
1705 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1706
1707         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
1708         (unbounded multiway tree containers) and a-iteint.ads.
1709         * a-comutr.ads, a-comutr.adb:
1710         This is the new Ada 2012 unit for unbounded multiway tree containers
1711         * a-cimutr.ads, a-cimutr.adb
1712         This is the new Ada 2012 unit for indefinite multiway tree containers
1713         * a-iteint.ads: New file.
1714
1715 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1716
1717         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1718
1719 2011-08-05  Bob Duff  <duff@adacore.com>
1720
1721         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1722         subpools.
1723         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1724
1725 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1726
1727         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1728         general indexing aspects of Ada2012. Called when analyzing indexed
1729         components when other interpretations fail.
1730         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1731         in an expression context where overloading is meaningful. This excludes
1732         the occurrence in an aspect specification (efficiency only).
1733         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1734         related to iterators can be set by an attribute specification, but
1735         cannot be queried.
1736         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1737         Constant_Indexing and Variable_Indexing.
1738         (Check_Indexing_Functions): New procedure to perform legality checks.
1739         Additional semantic checks at end of declarations.
1740
1741 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1742
1743         * tree_io.ads: Update ASIS_Version_Number because of the change of the
1744         order of calling Tree_Write/Tree_Read routines made for aspects.
1745
1746 2011-08-05  Bob Duff  <duff@adacore.com>
1747
1748         * a-fihema.adb (Finalize): Fix race condition.
1749
1750 2011-08-05  Yannick Moy  <moy@adacore.com>
1751
1752         * sem_ch12.adb (Analyze_Package_Instantiation,
1753         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1754         mode.
1755
1756 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1757
1758         * sem_type.adb (Specific_Type): in an instance, the type-specific
1759         operand of an equality check that involves null may have a private
1760         type. Use full view to determine legality of construct.
1761
1762 2011-08-05  Vincent Celier  <celier@adacore.com>
1763
1764         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1765         delete or close the file when the call to gnatmake was successful.
1766
1767 2011-08-05  Yannick Moy  <moy@adacore.com>
1768
1769         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1770         Global_Discard_Names.
1771
1772 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1773
1774         * sinfo.ads: comments on use of entity field for aspect specifications.
1775
1776 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1777
1778         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1779         node is not itself an entity but a selected component, it is a
1780         rewritten parameterless call to an en enclosing synchronized operation,
1781         and this expansion will be performed again in the instance, so there is
1782         no global information to preserve.
1783
1784 2011-08-05  Javier Miranda  <miranda@adacore.com>
1785
1786         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1787         for renamings of predefined primitives.
1788         (In_Predef_Prims_DT): New subprogram.
1789
1790 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1791
1792         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1793         possible interpretation of name is a reference type, add an
1794         interpretation that is the designated type of the reference
1795         discriminant of that type.
1796         * sem_res.adb (resolve): If the interpretation imposed by context is an
1797         implicit dereference, rewrite the node as the deference of the
1798         reference discriminant.
1799         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1800         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1801         parent type or base type.
1802         * sem_ch4.adb (Process_Indexed_Component,
1803         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1804         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1805         Check for implicit dereference.
1806         (List_Operand_Interps): Indicate when an implicit dereference is
1807         ambiguous.
1808         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1809
1810 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1811
1812         * scos.ads: Update documentation of SCO table. Pragma statements can now
1813         be marked as disabled (using 'p' instead of 'P' as the statement kind).
1814         * par_sco.ads, par_sco.adb: Implement the above change.
1815         (Process_Decisions_Defer): Generate a P decision for the first parameter
1816         of a dyadic pragma Debug.
1817         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1818         necessary.
1819         * put_scos.adb: Code simplification based on above change.
1820
1821 2011-08-05  Robert Dewar  <dewar@adacore.com>
1822
1823         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1824         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1825         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1826         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1827
1828 2011-08-05  Bob Duff  <duff@adacore.com>
1829
1830         * a-stunau.ads, g-spipat.adb: Update comments.
1831
1832 2011-08-05  Bob Duff  <duff@adacore.com>
1833
1834         * a-fihema.ads: Minor comment fix.
1835         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1836         correct.
1837         (Attach, Detach): Remove some unnecessary code.
1838         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1839
1840 2011-08-05  Bob Duff  <duff@adacore.com>
1841
1842         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1843         allocation for Objects component. This simplifies the code somewhat. It
1844         is also a little more efficient in the not-so-unusual case where there
1845         are no controlled objects allocated.
1846         Make Finalization_Started flag atomic.
1847         (Finalize): Avoid unnecessary detachment of items from the list.
1848         (pcol): Minor cleanup.
1849
1850 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1851
1852         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1853         package whose name is the same as that of the generic unit, or its
1854         ultimate prefix.
1855
1856 2011-08-05  Bob Duff  <duff@adacore.com>
1857
1858         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1859         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1860         Minor comment fixes.
1861
1862 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
1863
1864         * make.adb (Linking_Phase): No longer need to set source search path
1865         before calling gnatlink in CodePeer mode.
1866         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1867         gcc in CodePeer mode, since the binder generated file no longer has a
1868         'with Main'.
1869         * switch.ads, switch.adb (Is_Language_Switch): Removed.
1870         * switch-c.adb: Update comment.
1871
1872 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1873
1874         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1875
1876 2011-08-05  Nicolas Roche  <roche@adacore.com>
1877
1878         * gnat_ugn.texi: Fix minor syntax error issue.
1879
1880 2011-08-05  Vincent Celier  <celier@adacore.com>
1881
1882         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1883         delete or close the file when the call to gnatmake returns a non
1884         successful return code.
1885
1886 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1887
1888         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1889         check, indicate that the copy of the original node does not come from
1890         source, to prevent an infinite recursion of the expansion.
1891
1892 2011-08-05  Johannes Kanig  <kanig@adacore.com>
1893
1894         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1895         VC generation for subprogram bodies.
1896
1897 2011-08-05  Yannick Moy  <moy@adacore.com>
1898
1899         * einfo.ads: Typo.
1900         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1901         the base type with the smallest allowed base type.
1902
1903 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1904
1905         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1906         aspects.
1907
1908 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1909
1910         * sem_ch12.ads: minor comment updates.
1911
1912 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1913
1914         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1915         instantiation and a formal package the compiler generates a package
1916         renaming declaration so that the generic name within the declaration
1917         is interpreted as a renaming of the instance. At the end of a formal
1918         package declaration, this renaming must become invisible.
1919
1920 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1921
1922         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1923         comparison and rely on concrete entities instead.
1924
1925 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1926
1927         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1928         and discriminants, to indicate that the type has an access discriminant
1929         that supports implicit dereference.
1930         * snames.ads-tmpl: Add names of aspects and attributes related to
1931         Ada2012 iterators: constant_indexing, default_iterator,
1932         iterator_element, implicit_dereference, variable_indexing.
1933         * aspects.ads, aspects.adb: entries for iterator-related aspects.
1934         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1935         iterator-related aspects.
1936         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1937
1938 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1939
1940         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1941         metrics in gnatmetric to cover new kinds of coupling mentrics.
1942
1943 2011-08-05  Steve Baird  <baird@adacore.com>
1944
1945         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1946         of calling the user-defined main subprogram.
1947         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
1948         is set) Call_Main_Subprogram ahead of, as opposed to
1949         inside of, Main.
1950         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1951         generation of a "with" of the user-defined main subprogram.
1952         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1953         (which is now called from Gen_Main instead).
1954
1955 2011-08-05  Emmanuel Briot  <briot@adacore.com>
1956
1957         * projects.texi: Added reference to the Makefile package.
1958
1959 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1960
1961         * exp_ch7.adb: Minor comment rewording.
1962
1963 2011-08-05  Ed Falis  <falis@adacore.com>
1964
1965         * env.c: Fix comment.
1966
1967 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1968
1969         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1970         character comparison and rely on concrete entities instead.
1971
1972 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1973
1974         * sem_ch3.adb: (Check_Private_Overriding): better error message,
1975         suggested by AI95-0068.
1976
1977 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1978
1979         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1980         the two potential initialization calls. This accounts for any
1981         access-before-elaboration checks which may precede the initialization
1982         calls.
1983         (Next_Suitable_Statement): New routine. Returns the next real statement
1984         after the input node while skipping generated checks.
1985         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1986         with comment on usage.
1987         Do not generate Elaborate_All when the trigger is a finalization call
1988         coming from a type init proc.
1989         (Check_Elab_Call): Propagate the initialization procedure context to
1990         subsequent calls to Check_A_Call.
1991         (Check_Internal_Call_Continue): Propagate the initialization procedure
1992         context to subsequent calls to Check_Elab_Call.
1993         (Is_Finalization_Procedure): New routine. Returns True if the input
1994         entity denotes a [Deep_]Finalize routine.
1995         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1996         along with comment on usage.
1997
1998 2011-08-05  Vadim Godunko  <godunko@adacore.com>
1999
2000         * s-atocou.ads: Add list of supported platforms.
2001
2002 2011-08-05  Yannick Moy  <moy@adacore.com>
2003
2004         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
2005
2006         * opt.ads (Disable_ALI_File): new Boolean flag
2007         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
2008
2009 2011-08-05  Ed Falis  <falis@adacore.com>
2010
2011         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
2012         environ is properly defined.
2013
2014 2011-08-05  Vincent Celier  <celier@adacore.com>
2015
2016         * make.adb (Compilation_Phase): Exit immediately when all objects have
2017         been found up to date, to avoid multiple exit messages.
2018         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
2019         same project for languages with no compiler.
2020         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
2021         -eI.
2022 2011-08-05  Robert Dewar  <dewar@adacore.com>
2023
2024         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
2025         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
2026         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
2027         s-atocou-builtin.adb: Minor reformatting.
2028
2029 2011-08-05  Yannick Moy  <moy@adacore.com>
2030
2031         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
2032         if the node to wrap is a pragma check, this node and enclosed
2033         expression are not expanded, so do not apply any transformations here.
2034         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
2035         introducing transient scopes.
2036
2037 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
2038
2039         * adaint.c (__gnat_set_writable, __gnat_set_readable,
2040         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
2041         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
2042         routine is available, so we use the default implementation of these
2043         functions.
2044         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
2045         support for copying attributes on VxWorks 6.
2046
2047 2011-08-05  Yannick Moy  <moy@adacore.com>
2048
2049         * debug.adb: Remove use of -gnatd.D.
2050         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
2051         * opt.ads: Simplify variables for ALFA mode, to keep one only
2052         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
2053         to ALFA mode.
2054
2055 2011-08-05  Vincent Celier  <celier@adacore.com>
2056
2057         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
2058         Builder'Default_Switches.
2059
2060 2011-08-05  Vincent Celier  <celier@adacore.com>
2061
2062         * makeusg.adb: Add lines for --create-map-file switches.
2063
2064 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
2065
2066         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
2067         profile is incomplete and the full view is available, replace it with
2068         the full view.
2069         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
2070         incomplete, freezing the subprogram is delayed until the full view is
2071         frozen.
2072         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
2073         fixed-point multiplication operator and the predefined operator is
2074         resolved in favor of the user-defined one.
2075
2076 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2077
2078         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
2079         CONST_CAST.
2080
2081 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2082
2083         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
2084         whether a type lacks user-defined Read or Write operations, or has a
2085         component that lacks them.
2086         * sem_attr.adb (Check_Stream_Attribute): if restriction
2087         No_Default_Stream_Attributes is active, verify that all subcomponent
2088         types of the target have user-defined stream operations, and report
2089         error otherwise.
2090         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
2091         * exp_strm.adb: Build_Elementary_Input_Call,
2092         Build_Elementary_Write_Call): remove checks for restriction
2093         No_Default_Stream_Attributes, now checked in semantics.
2094
2095 2011-08-04  Vincent Celier  <celier@adacore.com>
2096
2097         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
2098         switches on the command line, look for all valid --RTS switches in the
2099         Builder switches and for each language use the first runtime name found
2100         to invoke gprconfig.
2101         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
2102         command line and there is no auto-configuration.
2103         (Runtime_Name_Set_For): New function.
2104
2105 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2106
2107         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
2108         elaborate initialization expression for variable Abort when processing
2109         a package body or a declaration.
2110         (Create_Finalizer): Propagate the package context when creating the
2111         exception-related variables.
2112         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
2113         For_Package along with usage comment.
2114
2115 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2116
2117         * gcc-interface/Makefile.in: Clean up targets.
2118         Enable new package for atomic counters and copy-on-write implementation
2119         of unbounded strings on x86 platforms.
2120         * gcc-interface/Make-lang.in: Update dependencies.
2121
2122 2011-08-04  Robert Dewar  <dewar@adacore.com>
2123
2124         * exp_ch7.adb: Minor reformatting.
2125
2126 2011-08-04  Robert Dewar  <dewar@adacore.com>
2127
2128         * exp_strm.adb: Minor reformatting.
2129
2130 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2131
2132         * s-atocou.adb: Replace by dummy version and use on targets where atomic
2133         operations are not supported.
2134         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
2135         * s-atocou-x86.adb: New file.
2136         * Makefile.rtl: Add s-atocou.o file
2137
2138 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2139
2140         * make.adb (Compile): Move setting of CodePeer_Mode to ...
2141         (Compilation_Phase): ... here.
2142         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
2143
2144 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2145
2146         * Make-generated.in: Fix minor typo in comment.
2147
2148 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2149
2150         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
2151         the project path.
2152
2153 2011-08-04  Robert Dewar  <dewar@adacore.com>
2154
2155         * a-coinho.adb: Minor reformatting.
2156
2157 2011-08-04  Robert Dewar  <dewar@adacore.com>
2158
2159         * a-coinho.ads: Minor reformatting.
2160
2161 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2162
2163         * s-atocou.ads, s-atocou.adb: New files.
2164         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
2165         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
2166         direct use of GCC's atomic builtins and replace them by use of new
2167         atomic counter package.
2168
2169 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2170
2171         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
2172
2173 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2174
2175         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
2176         with a call to Get_External_Tag.
2177         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
2178         subprogram usage. Remove the guard against package declarations and
2179         bodies since Build_Cleanup_Statements is no longer invoked in that
2180         context.
2181         (Build_Components): Initialize Tagged_Type_Stmts when the context
2182         contains at least one library-level tagged type.
2183         (Build_Finalizer): New local variables Has_Tagged_Types and
2184         Tagged_Type_Stmts along with associated comments on usage. Update the
2185         logic to include tagged type processing.
2186         (Create_Finalizer): Insert all library-level tagged type unregistration
2187         code before the jump block circuitry.
2188         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
2189         (Expand_N_Package_Declaration): Remove the call to
2190         Build_Cleanup_Statements.
2191         (Process_Tagged_Type_Declaration): New routine. Generate a call to
2192         unregister the external tag of a tagged type.
2193         (Processing_Actions): Reimplemented to handle tagged types.
2194         (Process_Declarations): Detect the declaration of a library-level
2195         tagged type and carry out the appropriate actions.
2196         (Unregister_Tagged_Types): Removed. The machinery has been directly
2197         merged with Build_Finalizer.
2198
2199 2011-08-04  Robert Dewar  <dewar@adacore.com>
2200
2201         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
2202         gnatls.adb, exp_ch3.adb: Minor reformatting.
2203
2204 2011-08-04  Marc Sango  <sango@adacore.com>
2205
2206         * sem_attr.adb (Analyze_Attribute): Replace the message
2207         "invisible attribute of}" of the spark restriction violation in
2208         attribute reference by the simple message "invisible attribute of type".
2209         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
2210         two insertion characters: '&' and '}'.
2211
2212 2011-08-04  Vadim Godunko  <godunko@adacore.com>
2213
2214         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
2215         * a-coinho.ads, a-coinho.adb: New file.
2216         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
2217
2218 2011-08-04  Nicolas Roche  <roche@adacore.com>
2219
2220         * alfa_test.adb: Not all ali files are containing alfa information even
2221         if compiled with -gnatd.F. So suppress warning about missing ALFA
2222         information.
2223
2224 2011-08-04  Yannick Moy  <moy@adacore.com>
2225
2226         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
2227         scope.
2228         * put_alfa.adb: Check that scope name is not empty.
2229
2230 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2231
2232         * exp_ch3.adb (Stream_Operation_Ok): new predicate
2233         Needs_Elementary_Stream_Operation, to determine whether user-defined
2234         Read and Write attributes are available for the elementary components
2235         of the given type. If only the predefined attributes are available,
2236         then when restriction No_Default_Stream_Attributes is active the
2237         predefined stream attributes for the composite type cannot be created.
2238
2239 2011-08-04  Robert Dewar  <dewar@adacore.com>
2240
2241         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
2242         Put routines in alpha order
2243
2244 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
2245
2246         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
2247         * gcc-interface/Make-lang.in: Update dependencies.
2248
2249 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2250
2251         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
2252         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
2253         gnat1why).
2254
2255 2011-08-04  Robert Dewar  <dewar@adacore.com>
2256
2257         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
2258         lib-xref-alfa.adb: Minor reformatting.
2259
2260 2011-08-04  Marc Sango  <sango@adacore.com>
2261
2262         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
2263         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
2264         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
2265         mode.
2266
2267 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2268
2269         * bindgen.adb (Gen_Adainit_C): Remove.
2270         (Gen_Adafinal_C): Ditto.
2271         (Gen_Elab_Externals_C): Ditto.
2272         (Gen_Elab_Calls_C): Ditto.
2273         (Gen_Elab_Order_C): Ditto.
2274         (Gen_Elab_Defs_C): Ditto.
2275         (Gen_Finalize_Library_C): Ditto.
2276         (Gen_Finalize_Library_Defs_C): Ditto.
2277         (Gen_Main_C): Ditto.
2278         (Gen_Output_File_C): Ditto.
2279         (Gen_Restrictions_C): Ditto.
2280         (Gen_Versions_C): Ditto.
2281         (Write_Info_Ada_C): Ditto.
2282         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
2283         (Gen_Output_File): Do not force Ada_Bind_File anymore.
2284         Always call Gen_Output_File_Ada.
2285         * gnatlink.adb (Begin_Info): Now a constant.
2286         (End_Info): Ditto.
2287         (Ada_Bind_File): Remove
2288         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
2289         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
2290         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
2291         * opt.ads (Ada_Bind_File): Remove.
2292
2293 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2294
2295         * projects.texi: Document target-specific directory in default project
2296         path for gnatmake.
2297
2298 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2299
2300         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
2301         path in all cases .
2302
2303 2011-08-04  Yannick Moy  <moy@adacore.com>
2304
2305         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
2306         opt.ads, lib-xref.ads: Code clean up.
2307
2308 2011-08-04  Yannick Moy  <moy@adacore.com>
2309
2310         * gnat_rm.texi: Update description of Test_Case
2311         * gnat_ugn.texi: Typo.
2312
2313 2011-08-04  Ed Falis  <falis@adacore.com>
2314
2315         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
2316
2317 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2318
2319         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
2320         it is of type Root_Controlled. This action eliminates fields Prev and
2321         Next from type equality.
2322
2323 2011-08-04  Yannick Moy  <moy@adacore.com>
2324
2325         * lib-xref-alfa.adb: Correct typo.
2326
2327 2011-08-04  Matthew Heaney  <heaney@adacore.com>
2328
2329         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
2330         component.
2331
2332 2011-08-04  Yannick Moy  <moy@adacore.com>
2333
2334         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
2335         (Analyze_Pragma): allow static string expression for name of Test_Case,
2336         instead of simply string literals.
2337         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
2338         expressions.
2339
2340 2011-08-04  Vincent Celier  <celier@adacore.com>
2341
2342         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
2343         case suffixes to find truncated main sources.
2344
2345 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2346
2347         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
2348         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
2349         (Compute_Current_Task): Ditto.
2350
2351 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2352
2353         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
2354
2355 2011-08-04  Yannick Moy  <moy@adacore.com>
2356
2357         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
2358         library-level constant.
2359         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
2360         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
2361         used as selector of parameter association, in ALFA mode.
2362
2363 2011-08-04  Robert Dewar  <dewar@adacore.com>
2364
2365         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
2366         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
2367         reformatting.
2368
2369 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2370
2371         * make.adb (Linking_Phase): Set source search path before calling
2372         gnatlink in CodePeer mode.
2373
2374 2011-08-04  Javier Miranda  <miranda@adacore.com>
2375
2376         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
2377         Remove code which takes care of building TSDs.
2378         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
2379         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
2380         the accessibility check in VM targets.
2381         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
2382         (Building_Static_DT): Now returns false for VM targets.
2383         (Build_VM_TSDs): Removed.
2384         (Expand_Interface_Conversion): Generate missing runtime check for
2385         conversions to interface types whose target type is unknown at compile
2386         time.
2387         (Make_VM_TSD): Add missing code to disable the generation of calls to
2388         Check_TSD if the tagged type is not defined at library level, or not
2389         has a representation clause specifying its external tag, or -gnatdQ is
2390         active.
2391         * exp_disp.ads (Build_VM_TSDs): Removed.
2392         (Make_VM_TSDs): Spec relocated from exp_disp.adb
2393         * sem_disp.adb (Check_Dispatching_Operation): No code required to
2394         register primitives in the dispatch tables in VM targets.
2395         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
2396         initialization of class-wide interface objects in VM targets.
2397         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
2398         of Make_DT).
2399
2400 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2401
2402         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
2403         when dotnet-ld cannot be found.
2404
2405 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2406
2407         * bindgen.adb: Simplify significantly generation of binder body file in
2408         CodePeer mode.
2409         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
2410         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
2411         not expanded).
2412
2413 2011-08-04  Yannick Moy  <moy@adacore.com>
2414
2415         * sem_prag.adb, sem.ads: Code cleanup.
2416
2417 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2418
2419         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
2420         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
2421         results if possible.
2422         * s-stusta.adb (Print): Adjust after changes in s-stausa.
2423         * gnat_ugn.texi: Update dynamic stack usage section.
2424
2425 2011-08-04  Steve Baird  <baird@adacore.com>
2426
2427         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
2428         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
2429         contains only a call to the user-defined main subprogram.
2430         (Gen_Main_Ada) - If CodePeer_Mode is set, then
2431         call the "wrapper" subprogram instead of directly
2432         calling the user-defined main subprogram.
2433
2434 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2435
2436         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
2437         alternatives of a case statement for controlled objects. Rename local
2438         variable A to Dead_Alt.
2439         (Expand_N_If_Statement): Check the then and else statements of an if
2440         statement for controlled objects. Check the then statements of all
2441         elsif parts of an if statement for controlled objects.
2442         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
2443         objects.
2444         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
2445         detects a loop associated with the expansion of an array object.
2446         Augment the processing of the loop statements to account for a possible
2447         wrap done by Process_Statements_For_Controlled_Objects.
2448         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
2449         statements and abortable part of an asynchronous select for controlled
2450         objects.
2451         (Expand_N_Conditional_Entry_Call): Check the else statements of a
2452         conditional entry call for controlled objects.
2453         (Expand_N_Selective_Accept): Check the alternatives of a selective
2454         accept for controlled objects.
2455         (Expand_N_Timed_Entry_Call): Check the entry call and delay
2456         alternatives of a timed entry call for controlled objects.
2457         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
2458         exception handler for controlled objects.
2459         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2460         Add formal parameter Nested_Constructs along with its associated
2461         comment.
2462         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
2463         Requires_Cleanup_Actions.
2464         (Process_Statements_For_Controlled_Objects): New routine.
2465         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
2466         routine. Inspect a node which contains a non-handled sequence of
2467         statements for controlled objects. If such an object is found, the
2468         statements are wrapped in a block.
2469
2470 2011-08-04  Bob Duff  <duff@adacore.com>
2471
2472         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
2473         need to compare with Class_Wide_Type (T2), in order to get at the
2474         original class-wide type node.
2475         * sem_type.ads (Covers): Improve the comment.
2476         * einfo.ads (Class_Wide_Type): Improve the comment.
2477         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
2478         the type of the Deref.
2479
2480 2011-08-04  Yannick Moy  <moy@adacore.com>
2481
2482         * gnat_rm.texi: Document that Test_Case pragma can only appear on
2483         separate declarations.
2484         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
2485         check identifier of pragma argument.
2486         (Chain_TC): check that no other test case associated to the same entity
2487         share the same name.
2488         (Check_Test_Case): disallow test case inside subprogram body
2489         (Analyze_Pragma): correct call to check identifier and not argument
2490         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
2491         function gets name from test case pragma.
2492
2493 2011-08-04  Yannick Moy  <moy@adacore.com>
2494
2495         * gnat_rm.texi: Document new pragma and aspect.
2496         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
2497         (No_Duplicates_Allowed): new constant array defining whether duplicates
2498         aspects of each kind can appear on the same declaration.
2499         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
2500         field, which points to a node holding the previous Spec_PPC_List.
2501         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
2502         through the indirection with Contract.
2503         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
2504         * par-prag.adb (Prag): do nothing on Test_Case pragma
2505         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
2506         be called directly.
2507         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
2508         component Ensures of Test_Case.
2509         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
2510         (Analyze_Generic_Subprogram_Declaration,
2511         Analyze_Subprogram_Instantiation,
2512         Analyze_Abstract_Subprogram_Declaration,
2513         Analyze_Subprogram_Body_Helper,
2514         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
2515         insert contract in subprogram node at point of definition
2516         * sem_ch13.adb
2517         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
2518         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
2519         corresponding pragma
2520         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
2521         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
2522         similar to the analysis of pre/post
2523         (Derive_Subprogram): insert contract in subprogram node at point of
2524         derivation.
2525         * sem_prag.adb, sem_prag.ads
2526         (Check_Arg_Is_String_Literal, Check_Identifier):
2527         new checking procedures to be called in treatment of pragmas
2528         (Check_Test_Case): new procedure to check that a Test_Case aspect or
2529         pragma is well-formed. This does not check currently that 'Result is
2530         used only in the Ensures component of a Test_Case.
2531         (Analyze_Pragma): add case for Test_Case
2532         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
2533         components of a Test_Case.
2534         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
2535         expressions in the 3rd (and 4th if present) arguments of a Test_Case
2536         pragma, treated as spec expressions.
2537         (Sig_Flags): add value -1 for Test_Case.
2538         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
2539         Get_Requires_From_Test_Case_Pragma): getters for both expression
2540         components of a Test_Case.
2541         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
2542         indirection between an entry or [generic] subprogram entity and its
2543         pre/post + test-cases.
2544         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
2545         get/set for fields of an N_Contract node.
2546         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
2547         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
2548         names and pragma for Test_Case.
2549         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
2550
2551 2011-08-04  Vincent Celier  <celier@adacore.com>
2552
2553         * gnat_ugn.texi: Improve documentation of gnatmake switch
2554         --source-info-file=.
2555
2556 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2557
2558         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
2559         type). Initialize Atyp to the appropriate type which is later checked
2560         for completion. Rewrite the assertion associated with private type
2561         completion.
2562
2563 2011-08-04  Ed Falis  <falis@adacore.com>
2564
2565         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
2566         initialize the number of CPUs.
2567
2568 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2569
2570         * sem_type.adb (Disambiguate): New subsidiary routine
2571         In_Same_Declaration_List, to implement AI05-0020: a user-defined
2572         equality on an anonymous access type whose designated type is private
2573         does not lead to an ambiguity with the universal access equality
2574         operator in the body or child units of the defining package. The same
2575         is true for a multiplication operator on a private type completed with
2576         a fixed-point-type.
2577
2578 2011-08-04  Javier Miranda  <miranda@adacore.com>
2579
2580         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
2581         (Normalize_Scalars_Config): Removed.
2582         * opt.adb
2583         (Register_Opt_Config_Switches): Remove registering config values of
2584         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
2585         (Restore_Opt_Config_Switches): Remove code which restores the values of
2586         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2587         Init_Or_Norm_Scalars.
2588         (Save_Opt_Config_Switches): Remove code which saves values of
2589         Init_Or_Norm_Scalars and Normalize_Scalars.
2590         (Set_Opt_Config_Switches): Remove code which restores config values of
2591         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2592         Init_Or_Norm_Scalars.
2593
2594 2011-08-04  Yannick Moy  <moy@adacore.com>
2595
2596         * frontend.adb (Frontend): remove previous patch to avoid full
2597         qualification in ALFA mode.
2598         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
2599         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
2600         unique name for an entity, which could be used to identify the entity
2601         across compilation units.
2602
2603 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2604
2605         * prj-env.adb
2606         (Initialize_Default_Project_Path): Add target specific directory
2607         ($prefix/$target/lib/gnat) in front of project path in all cases
2608         (making gnatmake's behaviour consistent with gprbuild).
2609         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
2610         Pass target name from Sdefault to project subsystem.
2611         * gnatls.adb: Show new target specific default project directory.
2612
2613 2011-08-04  Johannes Kanig  <kanig@adacore.com>
2614
2615         * cstand.adb: Add Information to Identifier in Standard
2616         (Identifer_For): Set Entity to the corresponding entity
2617
2618 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2619
2620         * gnat_ugn.texi: Update doc on gnatcheck.
2621
2622 2011-08-04  Yannick Moy  <moy@adacore.com>
2623
2624         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
2625         xrefs in a scope.
2626
2627 2011-08-04  Yannick Moy  <moy@adacore.com>
2628
2629         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
2630         performing expansion.
2631         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
2632         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
2633         it is not called in ALFA mode.
2634
2635 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2636
2637         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
2638         after all, so removed.
2639
2640 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2641
2642         * vms_data.ads: Add missing VMS qualifiers.
2643
2644 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2645
2646         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
2647         the list of files on the command line after processing it through
2648         Complete_Mains.
2649
2650 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2651
2652         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
2653         processing for .NET/JVM. These targets can now benefit from
2654         Raise_From_Controlled_Operation and they share the same processing with
2655         standard targets.
2656         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
2657         These targets need transient scopes in order to properly finalize short
2658         lived controlled objects.
2659         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
2660          NET/JVM. These targets can now benefit from
2661         Raise_From_Controlled_Operation and they share the same processing with
2662         standard targets.
2663
2664 2011-08-04  Geert Bosch  <bosch@adacore.com>
2665
2666         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
2667
2668 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2669
2670         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
2671         Expand_Record_Aggregate, to determine whether aggregate must be
2672         expanded into assignments. This is the case if the ancestor part is
2673         private, regarless of the setting of the flag Has_Private_Ancestor.
2674
2675 2011-08-04  Ed Falis  <falis@adacore.com>
2676
2677         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
2678
2679 2011-08-04  Bob Duff  <duff@adacore.com>
2680
2681         * sinfo.ads: Fix comment.
2682
2683 2011-08-04  Steve Baird  <baird@adacore.com>
2684
2685         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
2686         choose a package name in much the same way as is
2687         done for JGNAT when VM_Target /= No_VM, except that
2688         a slightly more distinctive prefix string is used.
2689
2690 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2691
2692         * makeutl.adb (Complete_Mains): no longer accept unit names on the
2693         gnatmake command line.
2694         This behavior was never documented (and was supported only because of
2695         an early bug in the code). This case might lead to ambiguous cases
2696         (between unit names and truncated base names without suffixes).
2697
2698 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2699
2700         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
2701         Remove the external tag of a tagged type from the internal hash table.
2702         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
2703         expanded usage of the routine. Strenghten the check for Is_Master. Add
2704         processing for tagged types.
2705         (Build_Finalizer): Create all the necessary lists used in finalizer
2706         creation when the processed context is a package that may contain
2707         tagged types.
2708         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
2709         Requires_Cleanup_Actions.
2710         (Expand_N_Package_Body): Package bodies may need clean up code
2711         depending on whether they contain tagged types.
2712         (Expand_N_Package_Declaration): Package declarations may need clean up
2713         code depending on whether they contain tagged types.
2714         (Unregister_Tagged_Types): New routine. Search through a list of
2715         declarations or statements, looking for non-abstract Ada tagged types.
2716         For each such type, generate code to unregister the external tag.
2717         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2718         Requires_Cleanup_Actions.
2719         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2720         through a list of declarations or statements looking for non-abstract
2721         Ada tagged types or controlled objects.
2722         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2723         Requires_Cleanup_Actions.
2724         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2725         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2726         RE_Unit_Table.
2727
2728 2011-08-04  Vincent Celier  <celier@adacore.com>
2729
2730         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2731         has Ada sources, not project Project, because if the root project
2732         Project has no sources of its own, all projects will be deemed without
2733         sources.
2734
2735 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2736
2737         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2738         of the No_Param_Proc acc-to-subp type used for initialization of
2739         __gnat_finalize_library_objects so that it's declared at library level
2740         rather than nested inside of the adainit routine.
2741
2742 2011-08-04  Javier Miranda  <miranda@adacore.com>
2743
2744         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2745         if the tagged type has a representation clause which specifies its
2746         external tag.
2747
2748 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2749
2750         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
2751         Remove previous procedure with that name.
2752         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
2753         when appropriate.
2754         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2755         subtype mark, the ancestor cannot have unknown discriminants.
2756         (Resolve_Record_Aggregate): if the type has invisible components
2757         because of a private ancestor, the aggregate is illegal.
2758
2759 2011-08-04  Vincent Celier  <celier@adacore.com>
2760
2761         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2762         account switches -gnat2005, -gnat12 and -gnat2012.
2763
2764 2011-08-04  Bob Duff  <duff@adacore.com>
2765
2766         * s-tasdeb.ads: Minor comment fix.
2767
2768 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2769
2770         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2771         CodePeer mode.
2772         * switch.ads, switch.adb (Is_Language_Switch): New function.
2773
2774 2011-08-04  Vincent Celier  <celier@adacore.com>
2775
2776         * switch-c.adb: Minor comment addition.
2777
2778 2011-08-04  Vincent Celier  <celier@adacore.com>
2779
2780         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2781         ending with '=' is followed by a space (missing file name).
2782
2783 2011-08-04  Pascal Obry  <obry@adacore.com>
2784
2785         * g-regist.ads: Fix size of HKEY on x86_64-windows.
2786
2787 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2788
2789         * sem_ch12.adb (Analyze_Associations): New routine
2790         Check_Overloaded_Formal_Subprogram to reject a formal package when
2791         there is a named association or a box initialisation for an overloaded
2792         formal subprogram of the corresponding generic.
2793
2794 2011-08-04  Yannick Moy  <moy@adacore.com>
2795
2796         * alfa.ads (ALFA_Xref_Record): add component for type of entity
2797         * get_alfa.adb, put_alfa.adb: Read and write new component of
2798         cross-reference.
2799         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2800
2801 2011-08-04  Pascal Obry  <obry@adacore.com>
2802
2803         * urealp.adb: Minor reformatting.
2804
2805 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2806
2807         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2808         Handle the case when Cleanup_Protected_Object returns Empty.
2809
2810 2011-08-04  Yannick Moy  <moy@adacore.com>
2811
2812         * frontend.adb (Frontend): only qualify names in non-ALFA mode
2813
2814 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2815
2816         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2817         call, ignore functions.
2818
2819 2011-08-04  Geert Bosch  <bosch@adacore.com>
2820
2821         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2822         point.
2823
2824 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2825
2826         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2827         as an index for Builder'Switches. This conforms to the documentation.
2828         * make.adb (Insert_Project_Sources): avoid duplicate code
2829
2830 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2831
2832         * makeutl.adb (Complete_Mains): if the user has passed a relative file
2833         name on the command line (for instance "../dummy"), never assume it can
2834         be a unit name.
2835
2836 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2837
2838         * bindgen.adb: Remove code the reference or create the
2839         Break_Start/__gnat_break_start procedure.
2840         * s-stalib.adb (Break_Start): Removed.
2841
2842 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2843
2844         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2845         shared with gprbuild.
2846
2847 2011-08-04  Yannick Moy  <moy@adacore.com>
2848
2849         * par-ch4.adb (P_Primary): preferentially issue an error message about
2850         a missing parenthesis arount a conditional or case expression in Ada
2851         2012 mode, if we detect that the alignment is not correct for a
2852         statement.
2853
2854 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2855
2856         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2857         tag-to-class-wide conversion as needing finalization actions.
2858         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2859         a tag-to-class-wide conversion as needing finalization actions.
2860         (Is_Finalizable_Transient): The result of a tag-to-class-wide
2861         conversion does not need finalization actions.
2862         (Is_Tag_To_CW_Conversion): New routine.
2863         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2864         whether an object is the result of a tag-to-class-wide conversion.
2865
2866 2011-08-04  Yannick Moy  <moy@adacore.com>
2867
2868         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2869         the left-hand-side and right-hand-side of a conjunct are inserted when
2870         translating a pre- or postcondition
2871         * sem_ch6.adb: Correct typo in comment
2872
2873 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2874
2875         * gnat_rm.texi: Ravenscar does not prohibit dependence on
2876         Unchecked_Conversion and Unchecked_Deallocation.
2877
2878 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2879
2880         * make.adb: Minor reformatting.
2881
2882 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2883
2884         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2885         sources in the project and its imported projects, but not in the whole
2886         tree.
2887
2888 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2889
2890         * make.adb: Remove debug trace.
2891
2892 2011-08-04  Vincent Celier  <celier@adacore.com>
2893
2894         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2895         path in canonical form, to be able to compare path names on platforms
2896         such as Windows or Darwin.
2897
2898 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2899
2900         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2901         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2902         * scos.ads: Update documentation accordingly.
2903         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2904         pragmas.
2905
2906 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2907
2908         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2909         attribute only if prefix type is scalar.
2910
2911 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2912
2913         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2914         in gnatmake for specifying mains on the command line that do not belong
2915         to the main project. These mains must currently all belong to the same
2916         project, though.
2917         (Ultimate_Extension_Of): removed, since duplicated
2918         Ultimate_Extending_Project.
2919
2920 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2921
2922         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2923         instead.
2924         (CodePeer_Mode_String): New.
2925         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2926         CodePeer mode.
2927         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2928         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2929         mode, since no useful elaboration subprogram is needed by CodePeer.
2930         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2931         In this mode, compile binder file with -gnatC and do stop after this
2932         step.
2933
2934 2011-08-04  Vincent Celier  <celier@adacore.com>
2935
2936         * exp_ch7.adb: Minor comment fix.
2937
2938 2011-08-04  Robert Dewar  <dewar@adacore.com>
2939
2940         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2941         exp_ch4.adb, makeutl.adb: Minor reformatting.
2942
2943 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2944
2945         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2946         Create several new subprograms to move code out of Make. This makes the
2947         code more readable, removes code duplication, and is a preparation work
2948         for adding support for aggregate projects.
2949
2950 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2951
2952         * s-po32gl.ads, s-po32gl.adb: New files.
2953         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2954         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2955         (Build_Finalization_Collection): Use it.
2956         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2957         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2958         literals.
2959         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2960         * gcc-interface/Make-lang.in: Update dependencies.
2961
2962 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2963
2964         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2965         the command line.
2966
2967 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2968
2969         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2970         command line is not a file name, also check whether it could be a unit
2971         name.
2972
2973 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2974
2975         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2976         the header of the finalization routine.
2977         If the unit has no finalizer but is a body whose spec has one, then
2978         generate the decrement of the elaboration entity only.
2979         If the unit has a finalizer and is a spec, then do not generate the
2980         decrement of the elaboration entity.
2981         (Gen_Finalize_Library_C): Likewise.
2982
2983 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2984
2985         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2986         (Bounds_Size_Expression): Removed.
2987         (Double_Alignment_Of): New subsidiary routine.
2988         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2989         for a hole in the dope vector of unconstrained arrays due to different
2990         index and element alignments.
2991
2992 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2993
2994         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2995         raise program_error because body has not been seen yet.
2996
2997 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2998
2999         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
3000         an unresolved name.
3001
3002 2011-08-04  Vincent Celier  <celier@adacore.com>
3003
3004         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
3005
3006 2011-08-04  Yannick Moy  <moy@adacore.com>
3007
3008         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
3009         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
3010
3011 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3012
3013         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
3014         instantiation in RCI.
3015
3016 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3017
3018         * make.adb: Share more code with gprbuild
3019
3020 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3021
3022         * projects.texi: Added documentation for the IDE'Gnat project file
3023         attribute.
3024
3025 2011-08-04  Nicolas Roche  <roche@adacore.com>
3026
3027         * gnat_rm.texi: Minor editing.
3028
3029 2011-08-04  Javier Miranda  <miranda@adacore.com>
3030
3031         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
3032         and the library case for VM targets.
3033         (Gen_Adainit_Ada): Likewise.
3034
3035 2011-08-04  Robert Dewar  <dewar@adacore.com>
3036
3037         * g-altive.ads: Minor comment updates.
3038         * prj-nmsc.adb: Minor reformatting.
3039
3040 2011-08-04  Javier Miranda  <miranda@adacore.com>
3041
3042         * opt.ads
3043         (Normalize_Scalars_Config): Value of the configuration switch set by
3044         pragma Normalize_Scalars when it appears in the gnat.adc file.
3045         (Normalize_Scalars): New field for record Config_Switches_Type. Used
3046         to save and restore settings of this pragma.
3047         * opt.adb
3048         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
3049         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
3050
3051 2011-08-04  Vincent Celier  <celier@adacore.com>
3052
3053         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
3054
3055 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3056
3057         * makeutl.adb: Minor reformatting.
3058
3059 2011-08-04  Olivier Hainque  <hainque@adacore.com>
3060
3061         * g-altive.ads: Update comments to reflect that only the soft
3062         binding is available today.
3063
3064 2011-08-04  Robert Dewar  <dewar@adacore.com>
3065
3066         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
3067         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
3068         * gcc-interface/Make-lang.in: Update dependencies.
3069
3070 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3071
3072         * prj-env.adb: Remove local debug traces.
3073
3074 2011-08-04  Yannick Moy  <moy@adacore.com>
3075
3076         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
3077         was used instead of Hi_OK, which could cause a read of an uninitialized
3078         value later on. Detected while working on the new warning.
3079         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
3080         to local variable.
3081         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
3082         in more cases, in order to detect more unreferenced values.
3083         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
3084         object for expression, if any.
3085
3086 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3087
3088         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
3089         the operand types instead of the Esize.
3090
3091 2011-08-04  Steve Baird  <baird@adacore.com>
3092
3093         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
3094         enable CodePeer_Mode.
3095         * bindusg.adb (Display): Add help message describing -P binder switch.
3096         * gnat_ugn.texi: Document -P binder switch.
3097         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
3098         user-defined main program directly.
3099         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
3100         user-defined main program in the context clause of the package body.
3101
3102 2011-08-04  Yannick Moy  <moy@adacore.com>
3103
3104         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
3105         duplicate of Defining_Entity
3106         (Get_Unique_Entity_For_Decl): rename function into
3107         Unique_Defining_Entity
3108         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
3109         (Formal_Proof_On): remove synthesized flag
3110         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3111         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
3112         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
3113         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
3114         Annotate (Formal_Proof)
3115
3116 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3117
3118         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
3119         source files with non-standard naming schemes, in imported projects
3120
3121 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3122
3123         * makeutl.adb (Complete_Mains): when a multi-unit source file is
3124         specified on the gprbuild command line, we need to compile all units
3125         within that file, not just the first one we find
3126         Fix error message for mains that are not found.
3127
3128 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3129
3130         * sem_ch6.adb: Update comment.
3131         * sem_ch12.adb: Minor reformatting.
3132
3133 2011-08-04  Bob Duff  <duff@adacore.com>
3134
3135         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
3136         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
3137         race condition whose symptom is to fail to lock Parent. That, in turn,
3138         causes Parent.Awake_Count to be accessed without locking Parent, which
3139         causes another race condition whose symptom is that Parent.Awake_Count
3140         can be off by 1 (either too high or too low). The solution is to lock
3141         Parent unconditionally, and then lock Acceptor, before reading
3142         Acceptor.Terminate_Alternative.
3143
3144 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3145
3146         * debug.adb: Update comment.
3147
3148 2011-08-04  Robert Dewar  <dewar@adacore.com>
3149
3150         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
3151         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
3152         exp_ch6.adb: Minor reformatting.
3153
3154 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3155
3156         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
3157         checks for -gnateE.
3158
3159 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3160
3161         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
3162
3163 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3164
3165         * sinfo.ads: Minor reformatting.
3166
3167 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3168
3169         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
3170         even if there is no location.
3171
3172 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3173
3174         * sem_res.adb, sem_ch4.adb: move check for restriction
3175         No_Task_Hierarchy to resolve_allocator.
3176
3177 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3178
3179         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
3180         This flag of N_Pragma nodes is not used, remove it as well as all of
3181         the associated circuitry.
3182
3183 2011-08-04  Javier Miranda  <miranda@adacore.com>
3184
3185         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
3186         runtime check on duplicated externa tags
3187         * debug.adb Document switch -gnatdQ.
3188
3189 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
3190
3191         * a-fihema.ads: Minor typo fix.
3192
3193 2011-08-04  Yannick Moy  <moy@adacore.com>
3194
3195         * sem_ch10.adb: Minor comment update.
3196
3197 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3198
3199         * einfo.adb: Update the node field usage to reflect the renaming of
3200         Return_Flag to Return_ Flag_Or_Transient_Decl.
3201         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
3202         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
3203         (Write_Field15_Name): Change Return_Flag to
3204         Return_Flag_Or_Transient_Decl.
3205         * einfo.ads: Rename node field Return_Flag to
3206         Return_Flag_Or_Transient_Decl. Update the associated comment and all
3207         occurrences in entities.
3208         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
3209         associated Inline pragma.
3210         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
3211         associated Inline pragma.
3212         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
3213         routine.
3214         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
3215         Return_Flag and Set_Return_Flag.
3216         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
3217         objects generated for controlled transients declared inside an
3218         Exception_With_Actions. Update the calls to Return_Flag.
3219         (Process_Object_Declaration): Add code to add a null guard for hook
3220         objects generated for controlled transients declared inside an
3221         Exception_With_Actions. Update related comment.
3222         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
3223         objects generated for controlled transients declared inside an
3224         Exception_With_Actions. Update the calls to Return_Flag.
3225         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
3226
3227 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3228
3229         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
3230         positional aggregate.
3231
3232 2011-08-04  Vincent Celier  <celier@adacore.com>
3233
3234         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
3235         SLOC only for pragmas.
3236
3237 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3238
3239         * projects.texi: Minor typo fix.
3240
3241 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3242
3243         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
3244         on case-sensitive file systems.
3245
3246 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3247
3248         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
3249         nested in a disabled pragma.
3250         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
3251         enclosing pragma, if any, for X decisions.
3252
3253 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3254
3255         * sem_prag.adb: Minor reformatting.
3256
3257 2011-08-04  Vincent Celier  <celier@adacore.com>
3258
3259         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
3260         allowed in no run time mode.
3261
3262 2011-08-04  Vincent Celier  <celier@adacore.com>
3263
3264         * make.adb (Check): When -gnatc is used, check for the source file
3265         inside the ALI file with a canonical case file name.
3266
3267 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3268
3269         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
3270         overriding the separator.
3271
3272 2011-08-04  Robert Dewar  <dewar@adacore.com>
3273
3274         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
3275         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
3276
3277 2011-08-04  Robert Dewar  <dewar@adacore.com>
3278
3279         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
3280
3281 2011-08-04  Yannick Moy  <moy@adacore.com>
3282
3283         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
3284         'Result only appears in postcondition of function.
3285
3286 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3287
3288         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
3289         external tag, include the value of the external tag in the exception
3290         message.
3291
3292 2011-08-04  Yannick Moy  <moy@adacore.com>
3293
3294         * sem_attr.adb (Result): modify error message for misplaced 'Result
3295
3296 2011-08-04  Sergey Rybin  <rybin@adacore.com>
3297
3298         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
3299         clear that the second argument must be an identifier.
3300
3301 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3302
3303         * exp_ch9.adb (Build_Barrier_Function): When compiling with
3304         -fpreserve-control-flow, insert an IF statement on the barrier
3305         condition to ensure that a conditional branch instruction is generated.
3306
3307 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3308
3309         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
3310         (Processing_Flags.Ignore_Missing_With): new flag.
3311
3312 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3313
3314         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
3315         Source_List_File on case-insensitive systems where the file is actually
3316         on a case-sensitive file system (NFS,...).
3317
3318 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3319
3320         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
3321         function return contains a controlled [extension] aggregate and the
3322         return statement is not part of a handled sequence of statements, wrap
3323         the return in a block. This ensures that all controlled temporaries
3324         generated during aggregate resolution will be picked up by the
3325         finalization machinery.
3326
3327 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3328
3329         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
3330         components, freeze type before resolution, to ensure that default
3331         initializations are present for all components.
3332         * sem_res.adb (Resolve_Actuals): the designated object of an
3333         accces-to-constant type is a legal actual in a call to an
3334         initialization procedure.
3335
3336 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3337
3338         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
3339         N_Unchecked_Type_Conversion to the possible containers of a renamed
3340         transient variable.
3341
3342 2011-08-04  Yannick Moy  <moy@adacore.com>
3343
3344         * par-ch13.adb (Aspect_Specifications_Present): recognize
3345         "with Identifier'Class =>" as an aspect, so that a meaningful warning
3346         is issued in Strict mode.
3347         * par.adb: Fix typos in comments.
3348
3349 2011-08-04  Yannick Moy  <moy@adacore.com>
3350
3351         * sem_attr.adb (Result): modify error message to take into account Post
3352         aspect when compiling Ada 2012 (or newer) code.
3353
3354 2011-08-04  Nicolas Roche  <roche@adacore.com>
3355
3356         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
3357         remove need for GCC exceptions.
3358
3359 2011-08-04  Vincent Celier  <celier@adacore.com>
3360
3361         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
3362         project, not the source file name.
3363         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
3364         excluded, continue looking. This excluded source will only be returned
3365         if there is no other source with the same base name that is not locally
3366         removed.
3367
3368 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3369
3370         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
3371         private and one of the operands is a real literal, use a qualified
3372         expression rather than a conversion which is not meaningful to the
3373         back-end.
3374
3375 2011-08-04  Yannick Moy  <moy@adacore.com>
3376
3377         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
3378         corresponding aspect X'Class are allowed, proceed with analysis of the
3379         aspect instead of skipping it.
3380
3381 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3382
3383         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
3384         This will allow to have an Ada implementation for the subprogram.
3385
3386 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3387
3388         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
3389         completion and aspects are present, apply them to the entity for the
3390         type which is currently the partial view, but which is the one that
3391         will be frozen.
3392         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
3393         applies to a partial view, indicate that the full view has predicates
3394         and delayed aspects.
3395         (Replace_Type_Reference): Handle properly predicates that apply to the
3396         full view of a private completion.
3397
3398 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3399
3400         * layout.adb (Layout_Type): For composite types, do not set Esize.
3401         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
3402         set Esize.
3403         (Size_Known): Look at the RM size of components instead of the Esize.
3404         (Freeze_Record_Type): Look at the RM size instead of the Esize to
3405         issue warning and activate Implicit_Packing.
3406         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
3407         if the Esize is not known.
3408         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
3409         for elementary types only.
3410         (Analyze_Record_Representation_Clause): Look at the RM size instead
3411         of the Esize to issue errors.
3412         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
3413         is not known.
3414         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
3415         obsolete block.
3416         Look at the RM size instead of the Esize for types if the latter is
3417         not known.
3418         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
3419
3420 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3421
3422         * sem_type.adb: proper handling of equality not involving anonymous
3423         access types.
3424
3425 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3426
3427         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
3428         Vis_Decls. When creating a library-level finalizer for a package spec,
3429         both the declaration and body of the finalizer are inserted either in
3430         the visible or private declarations of the package spec.
3431
3432 2011-08-04  Javier Miranda  <miranda@adacore.com>
3433
3434         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
3435         use of the full-view of a type when invoking Is_Ancestor.
3436         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
3437         the full-view of private parents is requested, then use also the
3438         full-view of the parent of the first derivation.
3439
3440 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3441
3442         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
3443         instead of the locally imported procedure.
3444         * s-taprop-mingw.adb (Enter_Task): Ditto.
3445         * s-valrea.adb (Scan_Real): Ditto.
3446         * s-imgrea.adb (Set_Image_Real): Ditto.
3447         * s-flocon.ads: Make the package pure.
3448
3449 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3450
3451         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
3452         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
3453         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
3454         New subprogram, moved here from...
3455         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
3456         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
3457         rewriting of the last argument into a procedure call statement here...
3458         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
3459         instead.
3460
3461 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3462
3463         * par_sco.adb: Minor reformatting.
3464
3465 2011-08-04  Robert Dewar  <dewar@adacore.com>
3466
3467         * erroutc.adb: Minor reformatting.
3468
3469 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3470
3471         * par_sco.adb: Comment update.
3472
3473 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3474
3475         * s-flocon.ads: New file.
3476         * g-flocon.ads: Now a renaming of s-flocon.
3477         * Makefile.rtl: Add s-flocon.o
3478
3479 2011-08-04  Javier Miranda  <miranda@adacore.com>
3480
3481         * exp_strm.adb (Build_Array_Input_Function): if the array type is
3482         constrained, do not attempt to build a subtype of it.
3483
3484 2011-08-04  Yannick Moy  <moy@adacore.com>
3485
3486         * errout.ads Change comments: remove 'R'M as an example where quotes
3487         are needed; add ALFA as another case where quotes are not needed
3488         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
3489         case where quotes are not needed.
3490         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3491         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
3492         Remove all occurrences of 'A'L'F'A
3493
3494 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3495
3496         * sem_ch13.adb: check legality of invariant pragma.
3497
3498 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3499
3500         * bindgen.adb: Add comments.
3501
3502 2011-08-04  Yannick Moy  <moy@adacore.com>
3503
3504         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
3505         synthesized flag.
3506         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
3507         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
3508
3509 2011-08-04  Robert Dewar  <dewar@adacore.com>
3510
3511         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
3512         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
3513         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
3514
3515 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3516
3517         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
3518
3519 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3520
3521         PR ada/47880
3522         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
3523         allocated object.
3524
3525 2011-08-04  Robert Dewar  <dewar@adacore.com>
3526
3527         * einfo.ads, exp_ch4.adb: Minor reformatting.
3528
3529 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3530
3531         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
3532
3533 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3534
3535         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
3536         type in all cases to compute list of primitive operations, because full
3537         view may be an itype that is not attached to the list of declarations.
3538
3539 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3540
3541         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
3542         library has already been finalized.
3543         (Gen_Adafinal_C): Likewise.
3544         (Gen_Adainit_Ada): Generate an early return if the library has
3545         already been elaborated.
3546         (Gen_Adainit_C): Likewise.
3547         (Gen_Output_File_Ada): Generate an elaboration flag.
3548         (Gen_Output_File_C): Likewise.
3549
3550 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3551
3552         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
3553         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
3554         built in the first place.
3555         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
3556         for CodePeer because Finalize_Address was not built to begin with.
3557         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
3558
3559 2011-08-04  Pascal Obry  <obry@adacore.com>
3560
3561         * adaint.c (__gnat_tmp_name): Use current process id to create temp
3562         filenames, this ensures unicity of filenames across processes.
3563
3564 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3565
3566         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
3567         Raise_Controlled to Raise_From_Controlled_Operation. Update the
3568         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
3569         Add False as the actual to From_Abort in the generated call to
3570         Raise_From_Controlled_Operation.
3571
3572 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3573
3574         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
3575         so that the ali file name can be retrieved from outside of this package.
3576         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
3577         doing nothing in the general case, but used to update the object file
3578         timestamp if directly generated by the backend.
3579         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
3580         to a later time than the ali file one.
3581
3582 2011-08-04  Yannick Moy  <moy@adacore.com>
3583
3584         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
3585         entities whose body contains an Annotate pragma which forces formal
3586         proof on this body.
3587         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3588         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
3589         Mark_Non_ALFA_Subprogram to pass in a message and node.
3590         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
3591         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
3592         surrounding subprogram.
3593         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
3594         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
3595         as not in ALFA is annotated with Formal_Proof being On, then an error
3596         is issued based on the additional parameters for message and node.
3597         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
3598         * gcc-interface/Make-lang.in: Update dependencies.
3599
3600 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3601
3602         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
3603         Finalize_Address when CodePeer is enabled.
3604
3605 2011-08-04  Pascal Obry  <obry@adacore.com>
3606
3607         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
3608         the latter returns a pointer to a static buffer which is deallocated
3609         at the end of the routine.
3610
3611 2011-08-04  Yannick Moy  <moy@adacore.com>
3612
3613         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
3614         after index creation; mark unconstrained base array type generated as
3615         being in/not in ALFA as well
3616         (Make_Index): mark subtype created as in/not in ALFA
3617         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
3618         over a loop as in/not in ALFA, depending on its type and form of loop
3619         iteration.
3620
3621 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3622
3623         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
3624         directly to False on .NET and JVM.
3625
3626 2011-08-04  Yannick Moy  <moy@adacore.com>
3627
3628         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
3629         constraint that subtype must come from source code to be in ALFA, so
3630         that anonymous subtypes can be in ALFA too.
3631
3632 2011-08-04  Yannick Moy  <moy@adacore.com>
3633
3634         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
3635         reference for ALFA mode.
3636         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
3637         procedure public so as to use it from formal verification back-end.
3638
3639 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3640
3641         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
3642         invalid checks of the Parameter, making Remove_Switch not working
3643         correctly.
3644
3645 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3646
3647         * targparm.ads: Update header: no run-time exception is needed on this
3648         file.
3649
3650 2011-08-04  Vincent Celier  <celier@adacore.com>
3651
3652         * a-fihema.adb: Use System.IO instead of GNAT.IO
3653
3654 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3655
3656         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
3657         are forbidden in Compiler_Unit mode.
3658
3659 2011-08-04  Robert Dewar  <dewar@adacore.com>
3660
3661         * sem_util.adb: Minor reformatting.
3662
3663 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3664
3665         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
3666         library-level finalizers.
3667         (Gen_Finalize_Library_C): Update the import string for library-level
3668         finalizers.
3669         (Gen_Finalize_Library_Defs_C): Update the definition name of a
3670         library-level finalizer.
3671         * exp_ch7.adb: Remove with and use clauses for Stringt.
3672         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
3673         Spec_Decl. Add local variable Body_Id. The names of library-level
3674         finalizers are now manually fully qualified and are no longer external.
3675         A single name is now capable of servicing .NET, JVM and non-VM targets.
3676         Pragma Export is no longer required to provide visibility for the name.
3677         (Create_Finalizer_String): Removed.
3678         (New_Finalizer_Name): New routine which mimics New_..._Name.
3679
3680 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3681
3682         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
3683         elaboration counter to Standard_Short_Integer.
3684         * sem_util.adb (Build_Elaboration_Entity): Likewise.
3685         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
3686         (Gen_Elab_Externals_C): Likewise.
3687
3688 2011-08-04  Ed Falis  <falis@adacore.com>
3689
3690         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
3691         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
3692         system-vxworks-mips.ads, system-vxworks-x86.ads
3693         (Always_Compatible_Rep): set to False for all VxWorks targets.
3694
3695 2011-08-04  Robert Dewar  <dewar@adacore.com>
3696
3697         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
3698         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
3699         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
3700         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
3701         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
3702         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
3703         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
3704         Minor reformatting and code reorganization.
3705
3706 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3707
3708         * projects.texi: Added doc for aggregate projects.
3709
3710 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3711
3712         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3713         Add support for overriding the Project_Path in aggregate projects.
3714
3715 2011-08-04  Robert Dewar  <dewar@adacore.com>
3716
3717         * a-cofove.ads: Minor reformatting.
3718
3719 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3720
3721         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3722         on the generated code.
3723         (Build_Finalize_Statements): Update the comment on the generated code.
3724         (Build_Initialize_Statements): Update the comment on the generated code.
3725         (Build_Object_Declarations): Add local variable Result. The object
3726         declarations are now built in sequence.
3727         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3728         RE_Unit_Table.
3729
3730 2011-08-04  Robert Dewar  <dewar@adacore.com>
3731
3732         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3733
3734 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3735
3736         * einfo.ads (Elaboration_Entity): Document new definition and use.
3737         (Elaboration_Entity_Required): Adjust to above change.
3738         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3739         * exp_ch12.adb: And with and use for Snames.
3740         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3741         * exp_util.adb (Set_Elaboration_Flag): Likewise.
3742         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3743         <Check_Unit_Name>: Deal with N_Expanded_Name.
3744         <Attribute_Elaborated>: Extend to all unit names.
3745         * sem_elab.adb: And with and use for Uintp.
3746         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
3747         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
3748         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
3749         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
3750         from Gen_Adainit_Ada.
3751         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
3752         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
3753         case, do not call System.Standard_Library.Adafinal; instead call
3754         finalize_library if needed.
3755         (Gen_Adafinal_C): Likewise.
3756         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3757         non-main program case.
3758         (Gen_Adainit_C): Generate a couple of external declarations here.
3759         In the main program case, set SSL.Finalize_Library_Objects.
3760         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3761         (Gen_Elab_Calls_C): Likewise.
3762         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
3763         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
3764         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3765         objects here.
3766         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3767         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
3768         Gen_Adafinal_Ada.
3769         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3770         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
3771         of external declarations.  Call Gen_Finalize_Library_C.
3772
3773 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3774
3775         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3776         Compute_Compilation_Phases): new subprogram.
3777         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3778         The number of mains as well as the various compilation phases that
3779         need to be run are now project tree specific, since various
3780         aggregated trees might have different requirements. In particular,
3781         they do not all require bind or link phases.
3782
3783 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3784
3785         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3786         (Project_Tree_Appdata): New type.
3787         It is now possible to associate application-specific data to a project
3788         tree. In particular, this is used in the gprbuild builder to avoid a
3789         number of global tables and htables, especially now that there can be
3790         several project trees loaded at once because of aggregate projects.
3791         (Debug_Name): new procedure.
3792         * projects.texi: Clarify syntax of "**" for Source_Dirs
3793
3794 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3795
3796         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3797         the "roots" for a main.
3798         (Fill_From_Project): add support for aggregate projects. Main units
3799         in aggregated projects are now automatically added in the list of
3800         files to build (although this fails later on in gprbuild, because
3801         these files are not using the root proejct tree, so this needs
3802         further cleanup)
3803         * gcc-interface/Make-lang.in: Update dependencies.
3804
3805 2011-08-03  Yannick Moy  <moy@adacore.com>
3806
3807         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3808         conditional expression in ALFA.
3809         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3810         expressions as not in ALFA.
3811
3812 2011-08-03  Robert Dewar  <dewar@adacore.com>
3813
3814         * a-cofove.adb: Minor reformatting.
3815
3816 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3817
3818         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3819         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3820         gprbuild sources.
3821         These packages are more logically placed in the Queue package, since
3822         they manipulate the queue. It is also likely that they can be adapted
3823         for gnatmake, thus sharing more code.
3824         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3825         that we could move the above.
3826
3827 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3828
3829         * errutil.adb (Finalize): clean up the list of error messages on exit.
3830         Calling this subprogram multiple times will no longer show duplicate
3831         error messages on stderr.
3832
3833 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3834
3835         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3836         Getopt_Switches when we have already define a command line
3837         configuration.
3838
3839 2011-08-03  Yannick Moy  <moy@adacore.com>
3840
3841         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3842         in ALFA. Instead, they are considered as assertions to prove.
3843         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3844         nodes as not in ALFA. Instead, include conditional expressions in ALFA
3845         if they have no ELSE part, or if they occur in pre- and postconditions,
3846         where the Condition cannot have side-effects in ALFA
3847         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3848         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3849         Instead, include type conversion between scalar types in ALFA.
3850         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3851         if-and-only-if its type is in ALFA.
3852
3853 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3854
3855         * scos.adb, get_scos.adb, put_scos.adb
3856         New code letter for decisions: G (entry guard)
3857         * par_sco.adb
3858         (Traverse_Subprogram_Body): Rename to...
3859         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3860         (Traverse_Protected_Body): New subprogram
3861         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3862         protected bodies and entry bodies.
3863
3864 2011-08-03  Yannick Moy  <moy@adacore.com>
3865
3866         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3867         entities with get/set subprograms, which is set on procedure entities
3868         generated by the compiler for a postcondition.
3869         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3870         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3871         entity for a declaration
3872         (Get_Unique_Entity_For_Decl): new function returning an entity which
3873         represents a declaration, so that matching spec and body have the same
3874         entity.
3875
3876 2011-08-03  Robert Dewar  <dewar@adacore.com>
3877
3878         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3879         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3880
3881 2011-08-03  Yannick Moy  <moy@adacore.com>
3882
3883         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3884         library-level because retriction No_Implicit_Dynamic_Code in the
3885         front-end prevents its definition as a local subprogram
3886         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3887         for reuse in other contexts
3888         (Traverse_Declarations_Or_Statements,
3889         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3890         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3891         procedures take a callback parameter to be called on all declarations
3892         * lib-xref.ads
3893         (Traverse_All_Compilation_Units): new generic function to traverse a
3894         compilation unit and call a callback parameter on all declarations
3895
3896 2011-08-03  Javier Miranda  <miranda@adacore.com>
3897
3898         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3899         in Java since they are always enclosed in a namespace that
3900         differentiates them, and overloaded entities are supported by the VM.
3901
3902 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3903
3904         * checks.adb (Determine_Range): If a computed bound of an operation is
3905         outside the range of the base type of the expression, and overflow
3906         checks are enabled, the result is unknown and cannot be used for any
3907         subsequent constant folding.
3908         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3909         unknown, so is the result of the comparison.
3910
3911 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3912
3913         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3914         From_Abort. When finalization was triggered by an abort, propagate
3915         Standard'Abort_Signal rather than Program_Error.
3916         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3917         From_Abort.
3918         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3919         From_Abort. When finalization was triggered by an abort, propagate
3920         Standard'Abort_Signal rather than Program_Error.
3921         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3922         From_Abort.
3923         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3924         Abort_Id. Update the calls to Build_Object_Declarations and
3925         Build_Raise_Statement to include Abort_Id.
3926         (Build_Adjust_Statements): New local variable Abort_Id. Update the
3927         calls to Build_Object_Declarations and Build_Raise_Statement to include
3928         Abort_Id.
3929         (Build_Finalize_Statements): New local variable Abort_Id. Update the
3930         calls to Build_Object_Declarations and Build_Raise_Statement to include
3931         Abort_Id.
3932         (Build_Components): Create an entity for Abort_Id when exceptions are
3933         allowed on the target.
3934         (Build_Finalizer): New local variable Abort_Id.
3935         (Build_Initialize_Statements): New local variable Abort_Id. Update the
3936         calls to Build_Object_Declarations and Build_Raise_Statement to include
3937         Abort_Id.
3938         (Build_Object_Declarations): Add new formal Abort_Id. Create the
3939         declaration of flag Abort_Id to preserve the original abort status
3940         before finalization code is executed.
3941         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3942         runtime routine Raise_From_Controlled_Operation.
3943         (Create_Finalizer): Update the call to Build_Raise_Statement to include
3944         Abort_Id. Update the call to Build_Object_Declarations to include
3945         Abort_Id. Update the layout of the finalizer body.
3946         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3947         (Process_Transient_Objects): New local variable Abort_Id. Remove the
3948         clunky code to create all flags and objects related to
3949         exception propagation and replace it with a call to
3950         Build_Object_Declarations. Update the call to Build_Raise_Statement to
3951         include Abort_Id.
3952         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3953         Add new formal Abort_Id and associated comment on its use.
3954         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3955         on its use.
3956         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3957         Remove the clunky code to create all flags and objects related to
3958         exception propagation and replace it with a call to
3959         Build_Object_Declarations. Update the call to Build_Raise_Statement.
3960
3961 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3962
3963         * s-tassta.adb: Fix minor typos.
3964
3965 2011-08-03  Robert Dewar  <dewar@adacore.com>
3966
3967         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3968         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3969
3970 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3971
3972         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3973         to packages. This ensures that the finalizer body will not end up
3974         inside the freeze node.
3975         (Process_Declarations): Add code to detect whether a freeze node has a
3976         nested finalization collection.
3977
3978 2011-08-03  Pascal Obry  <obry@adacore.com>
3979
3980         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3981         (Current_Session): Return a not null access to Session_Type.
3982         (Default_Session): Likewise.
3983
3984 2011-08-03  Robert Dewar  <dewar@adacore.com>
3985
3986         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3987         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3988
3989 2011-08-03  Pascal Obry  <obry@adacore.com>
3990
3991         * g-awk.ads: Minor comment fix.
3992
3993 2011-08-03  Sergey Rybin  <rybin@adacore.com>
3994
3995         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3996         the tree structure related to discriminant constraints.
3997         Original_Discriminant cannot be used any more for computing the
3998         defining name for the reference to a discriminant.
3999
4000 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4001
4002         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
4003         function is not visibly tagged, this is not a dispatching call and
4004         therfore is not Tag_Indeterminate, even if the function is marked as
4005         dispatching on result.
4006
4007 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4008
4009         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
4010         (Expand_N_Free_Statement): Add a guard to protect against run-times
4011         which do not support controlled types.
4012         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
4013         against run-times which do not support controlled types.
4014         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
4015         against run-times which do not support controlled types.
4016         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
4017         against run-times which do not support controlled types.
4018         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
4019         protect against run-times which do not support controlled types.
4020
4021 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4022
4023         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
4024         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
4025
4026 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4027
4028         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
4029         modified in the source, to prevent spurious warnings when compiling
4030         with -gnatg.
4031
4032 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4033
4034         * a-except-2005.adb: Minor reformatting.
4035
4036 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4037
4038         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
4039         is a renaming declaration in the private part of a package, do not emit
4040         a warning that the with_clause could be moved because the renaming may
4041         be used in the body or in a child unit.
4042
4043 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4044
4045         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4046         Propagate the Comes_From_Source attribute from the original return
4047         object to the renaming.
4048
4049 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4050
4051         * exp_ch7.adb (Build_Raise_Statement): Do not call
4052         Raise_From_Controlled_Operation when this routine is not present in
4053         the run-time library.
4054         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
4055         libraries (Ravenscar), tasks are non-terminating, and protected objects
4056         and tasks can only appear at library level, so we do not want
4057         finalization of protected objects nor tasks.
4058         * exp_intr.adb: Minor clarification in comment.
4059         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
4060         Gen_Output_File_C): Remove references to finalization of library-level
4061         objects when using restricted run-time libraries.
4062
4063 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4064
4065         * sem_ch3.adb (Build_Discriminant_Constraints): Set
4066         Original_Discriminant only if the parent type is a generic formal.
4067
4068 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4069
4070         * exp_ch13.adb: Add with and use clause for Targparm;
4071         (Expand_N_Free_Statement): Prevent the generation of a custom
4072         Deallocate on .NET/JVM targets since this requires pools and address
4073         arithmetic.
4074         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
4075         .NET/JVM targets, attach the newly allocated object to the access
4076         type's finalization collection. Do not generate a call to
4077         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
4078         exist in the runtime.
4079         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
4080         create a custom Allocate for object that do not require initialization.
4081         Attach a newly allocated object to the access type's finalization
4082         collection on .NET/JVM.
4083         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
4084         assignment of controlled types on .NET/JVM. The two hidden pointers
4085         Prev and Next and stored and later restored after the assignment takes
4086         place.
4087         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
4088         kludge for .NET/JVM to recognize a particular piece of code coming from
4089         Heap_Management and change the call to Finalize into Deep_Finalize.
4090         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
4091         finalization collections on .NET/JVM only for types derived from
4092         Controlled. Separate the association of storage pools with a collection
4093         and only allow it on non-.NET/JVM targets.
4094         (Make_Attach_Call): New routine.
4095         (Make_Detach_Call): New routine.
4096         (Process_Object_Declarations): Suppress the generation of
4097         build-in-place return object clean up code on .NET/JVM since it uses
4098         pools.
4099         * exp_ch7.ads (Make_Attach_Call): New routine.
4100         (Make_Detach_Call): New routine.
4101         * exp_intr.adb Add with and use clause for Targparm.
4102         (Expand_Unc_Deallocation): Detach a controlled object from a collection
4103         on .NET/JVM targets.
4104         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
4105         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
4106         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
4107         names used in finalization.
4108
4109 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4110
4111         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
4112         (Attach, Detach): Lock the current task when chaining an object onto a
4113         collection.
4114
4115 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
4116
4117         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
4118         Rewritten to create the message strings when the exception is not
4119         raised by an abort during finalization.
4120         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
4121         Raise_From_Controlled_Operation and update its associated comment.
4122         * a-fihema.ads, a-fihema.adb: New GNAT unit.
4123         Ada.Finalization.Heap_Management provides key functionality
4124         associated with controlled objects on the heap, their creation,
4125         finalization and reclamation. Type Finalization_Collection is
4126         effectively a wrapper which sits ontop of a storage pool and performs
4127         all necessary bookkeeping for all the objects it contains. Each
4128         access-to-controlled or access-to-class-wide type receives a collection
4129         as part of its expansion. The compiler generates buffer code and
4130         invokes Allocate / Deallocate to create and destroy allocated
4131         controlled objects.
4132         * a-finali.adb ("="): Removed.
4133         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
4134         fields Prev and Next.
4135         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
4136         A library unit with at least one controlled object on the library level
4137         has a special finalizer which is invoked by the binder. To signal this,
4138         ali files carry field PF.
4139         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
4140         associated comment on field usage.
4141         * a-tags.adb (Get_RC_Offset): Removed.
4142         (Needs_Finalization): New routine.
4143         * a-tags.ads: Update the structure of the GNAT dispatch tables.
4144         Dispatch tables now carry field Needs_Finalization which provides
4145         runtime indication whether a type is controlled or has controlled
4146         components or both. Remove field RC_Offset.
4147         (Get_RC_Offset): Removed along with its associated pragma Export.
4148         Since tagged types with controlled components no longer carry hidden
4149         field _controller, the special mechanism to retrieve its location is no
4150         longer needed.
4151         (Needs_Finalization): New routine.
4152         * atree.ads, atree.adb (Elist24): New routine.
4153         (Set_Elist24): New routine.
4154         * atree.h: Add a define clause for Elist24.
4155         * bindgen.adb New library-level variable Lib_Final_Built.
4156         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
4157         presence of a VM target, the routine generates calls to the proper
4158         library finalization routine.
4159         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
4160         targets. Set the correct library finalization routine depending on
4161         whether the library has controlled objects or this is a VM compilation.
4162         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
4163         to library-level finalizers of compiled units in reverse order of
4164         elaboration. It also produces exception management code and reraises a
4165         potential exception after all units have been finalized.
4166         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
4167         library-level finalizers of compiled units in reverse order of
4168         elaboration.
4169         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
4170         definitions of all library-level finalizers available to the compilation
4171         (Gen_Main_Ada): Directly call Adafinal which now contails all target
4172         dependent code.
4173         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
4174         System.Standard_Library.Adafinal directly. If the library needs
4175         finalization actions, create the sequence of finalization calls.
4176         (Gen_Output_File_Ada): Alphabetize local variables and constants.
4177         Generate a with clause for System.Soft_Links when compiling for a VM.
4178         Remove the code which imports System.Standard_Library.Adafinal as
4179         Do_Finalize. Generate the library finalization routine.
4180         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
4181         If the library needs finalization actions, create all the definitions
4182         of library- level finalizers.
4183         (Has_Finalizer): New routine. Determines whether at least one compiled
4184         unit has a library-level finalizer.
4185         Add type Qualification_Mode.
4186         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
4187         * einfo.adb: New usage of field 15 as Return_Flag.
4188         Remove Finalization_Chain_Entity from the usages of field 19.
4189         Remove Associated_Final_Chain from the usages of field 23.
4190         New usage of field 23 as Associated_Collection.
4191         New usage of field 24 as Finalizer.
4192         New usage of flag 252 as Is_Processed_Transient.
4193         (Associated_Final_Chain): Removed.
4194         (Associated_Collection): New routine.
4195         (Finalization_Chain_Entity): Removed.
4196         (Finalizer): New routine.
4197         (Is_Finalizer): New routine.
4198         (Is_Processed_Transient): New routine.
4199         (Return_Flag): New routine.
4200         (Set_Associated_Final_Chain): Removed.
4201         (Set_Associated_Collection): New routine.
4202         (Set_Finalization_Chain_Entity): Removed.
4203         (Set_Finalizer): New routine.
4204         (Set_Is_Processed_Transient): New routine.
4205         (Set_Return_Flag): New routine.
4206         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
4207         displayed flags.
4208         (Write_Field8_Name): Alphabetize the output.
4209         (Write_Field11_Name): Alphabetize the output.
4210         (Write_Field12_Name): Alphabetize the output.
4211         (Write_Field13_Name): Alphabetize the output.
4212         (Write_Field14_Name): Alphabetize the output.
4213         (Write_Field15_Name): Alphabetize the output.
4214         (Write_Field16_Name): Alphabetize the output.
4215         (Write_Field17_Name): Alphabetize the output.
4216         (Write_Field18_Name): Alphabetize the output.
4217         (Write_Field19_Name): Alphabetize the output. Remove the output of
4218         Finalization_Chain_Entity.
4219         (Write_Field20_Name): Alphabetize the output.
4220         (Write_Field21_Name): Alphabetize the output.
4221         (Write_Field22_Name): Alphabetize the output.
4222         (Write_Field23_Name): Alphabetize the output. Remove the output of
4223         Associated_Final_Chain. Add output for Associated_Collection.
4224         (Write_Field24_Name): Alphabetize the output.
4225         (Write_Field25_Name): Add output for Finalizer.
4226         (Write_Field26_Name): Alphabetize the output.
4227         (Write_Field27_Name): Alphabetize the output.
4228         (Write_Field28_Name): Alphabetize the output.
4229         * einfo.ads: Add new field description for Associated_Collection and
4230         its uses in nodes.
4231         Remove Associated_Final_Chain and its uses in nodes.
4232         Remove Finalization_Chain_Entity and its uses in nodes.
4233         Add new field description for Finalizer and its uses in nodes.
4234         Add new synthesized attribute Is_Finalizer.
4235         Add new flag description for Is_Processed_Transient and its uses in
4236         nodes.
4237         Add new field description for Return_Flag and its uses in nodes.
4238         (Associated_Final_Chain): Removed along with its pragma Inline.
4239         (Associated_Collection): New routine and pragma Inline.
4240         (Finalization_Chain_Entity): Removed along with its pragma Inline.
4241         (Finalizer): New routine and pragma Inline.
4242         (Is_Finalizer): New routine and pragma Inline.
4243         (Is_Processed_Transient): New routine and pragma Inline.
4244         (Return_Flag): New routine and pragma Inline.
4245         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
4246         (Set_Associated_Collection): New routine and pragma Inline.
4247         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
4248         (Set_Finalizer): New routine and pragma Inline.
4249         (Set_Is_Processed_Transient): New routine and pragma Inline.
4250         (Set_Return_Flag): New routine and pragma Inline.
4251         * exp_aggr.adb: Alphabetize subprograms.
4252         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
4253         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
4254         associated comments. Remove local variables External_Final_List and
4255         Attach.
4256         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
4257         Ancestor. Remove the retrieval of finalization lists. Update the call to
4258         Make_Adjust_Call.
4259         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
4260         lists. Update the call to Late_Expansion.
4261         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
4262         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
4263         (Gen_Assign): Remove the retrieval of the finalization list used to
4264         build the assignment. Update the calls to Make_Init_Call and
4265         Make_Adjust_Call.
4266         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
4267         Remove the mechanism to determine attachment levels and finalization
4268         list retrieval. Remove the processing for coextensions.
4269         (Init_Controller): Removed. Controllers no longer exist.
4270         (Late_Expansion): Remove formals Flist and Obj along with their
4271         associated comments. Update the calls to Build_Record_Aggr_Code and
4272         Build_Array_Aggr_Code.
4273         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
4274         (Expand_N_Freeze_Entity): Add special processing for finalizers which
4275         appear in entry bodies, protected subprograms and task bodies.
4276         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
4277         * exp_ch3.adb (Add_Final_Chain): Removed.
4278         (Build_Array_Init_Proc): Alphabetize local variables.
4279         (Build_Assignment): Alphabetize local variables. Update the call to
4280         Maked_Adjust_Call.
4281         (Build_Class_Wide_Master): Rename local variables to better reflect
4282         their role.
4283         (Build_Discriminant_Assignments): Code reformatting.
4284         (Build_Init_Call_Thru): Code reformatting.
4285         (Build_Init_Procedure): Code reformatting. Generate a special version
4286         of Deep_Finalize which is capable of finalizing all initialized
4287         components and ignore the rest.
4288         (Build_Init_Statements): Rename local variables to better reflect their
4289         role.
4290         Reimplement the mechanism to include the creation and update of an index
4291         variable called a "counter". It is used as a bookmark for tracing
4292         initialized and non-initialized components.
4293         (Build_Initialization_Call): Remove local variable Controller_Typ.
4294         Alphabetize all local variables. Remove the initialization of the
4295         record controller and update the call to Make_Init_Call.
4296         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
4297         New local variable Counter.
4298         (Constrain_Array): Alphabetize.
4299         (Expand_Freeze_Array_Type): Create a collection instead of a
4300         finalization list.
4301         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
4302         Finalize_Address which is used in conjunction with allocated controlled
4303         objects.
4304         (Expand_N_Object_Declaration): Remove the creation of a finalization
4305         list for anonymous access types. Update the calls to Make_Init_Call and
4306         Make_Adjust_Call.
4307         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
4308         retrieval of finalization lists. Remove the expansion of the record
4309         controller. Create TSS primitive Finalize_Address used in conjunction
4310         with controlled objects on the heap. Create finalization collections
4311         for access-to-controlled record components.
4312         (Expand_Record_Controller): Removed.
4313         (Freeze_Type): Remove the freezing of record controllers. Freezing of
4314         class-wide types now requires additional processing. Create
4315         finalization collections for access-to-controlled types.
4316         (Increment_Counter): New routine.
4317         (Make_Counter): New routine.
4318         (Make_Eq_If): Remove the mention of Name_uController.
4319         (Make_Predefined_Primitive_Specs): There is no longer need to skip
4320         types coming from System.Finalization_Root.
4321         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
4322         (Predefined_Primitive_Bodies): There is no longer need to skip types
4323         coming from System.Finalization_Root.
4324         (Stream_Operation_OK): Do not generate stream routines for
4325         type Ada.Finalization.Heap_Management.Finalization_Collection.
4326         * exp_ch3.ads: Alphabetize subprograms.
4327         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
4328         Add with and use clause for Lib.
4329         (Complete_Coextension_Finalization): Removed.
4330         (Complete_Controlled_Allocation): New routine. Create a finalization
4331         collection for anonymous access-to-controlled types. Create a custom
4332         Allocate which interfaces with the back end and the machinery in
4333         Heap_Management.
4334         (Expand_Allocator_Expression): Add necessary calls to
4335         Complete_Controlled_Allocation. Remove the retrieval of finalization
4336         lists. Update the calls to Make_Adjust_Call. Generate a call to
4337         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4338         the associated collection.
4339         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
4340         Code clean up. Remove the retrieval of finalization lists and
4341         attachment levels.
4342         Update the call to Make_Init_Call. Generate a call to
4343         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4344         the associated collection.
4345         (Get_Allocator_Final_List): Removed. Finalization lists are not
4346         available.
4347         (Suitable_Element): Remove the mention of Name_uController.
4348         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
4349         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
4350         the left hand side, carry out the assignment and adjust the left hand
4351         side.
4352         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
4353         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
4354         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
4355         BIP_Collection and BIPcollection.
4356         (Build_Heap_Allocator): New routine used to allocate the return object
4357         of a build-in-place function onto a collection.
4358         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
4359         (Expand_Call): Do not replace direct calls to Deep routines with their
4360         aliases.
4361         (Expand_N_Extended_Return_Statement): Give all variables shorter names
4362         and update their occurrences. Add a special return flag to monitor the
4363         [ab]normal execution of the function. The flag is set right before the
4364         return statement.
4365         Rewrite the mechanism used to allocate a build-in-place return object
4366         on the heap or on a storage pool.
4367         (Is_Direct_Deep_Call): New routine.
4368         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
4369         build-in-place function call instead of a final list. Build a call to
4370         Set_Finalize_Address_Ptr to decorate the associated collection.
4371         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
4372         order to name the build-in-place function call's result for later
4373         finalization. Add a collection to a build-in-place function call
4374         instead of a final list.
4375         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
4376         build-in-place function call instead of a final list. Remove the code
4377         which moves one final list and transforms it into the actual in a
4378         nested build-in-place call.
4379         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
4380         build-in-place function call instead of a final list.
4381         (Move_Final_List): Removed.
4382         (Needs_BIP_Collection): New routine.
4383         (Needs_BIP_Final_List): Removed.
4384         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
4385         enumeration type BIP_Formal_Kind.
4386         Update the related comment.
4387         (Needs_BIP_Collection): New routine.
4388         (Needs_BIP_Final_List): Removed.
4389         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
4390         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
4391         majority of subprograms in this unit. Add Name_Finalize_Address to
4392         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
4393         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
4394         statements for an array type.
4395         (Build_Adjust_Statements): Create the adjust statements for a record
4396         type.
4397         (Build_Cleanup_Statements): New routine. A procedure which given any
4398         construct containing asynchronous calls, references to _master, or is a
4399         task body, a task allocation or a protected body produces the necessary
4400         runtime calls to clean up these constructs.
4401         (Build_Exception_Handler): New routine.
4402         (Build_Final_List): Removed.
4403         (Build_Finalization_Collection): New routine. A core procedure which
4404         creates a collection to service heap allocated controlled objects
4405         associated with an access-to-controlled type.
4406         (Build_Finalize_Statements): Create the finalization statements for a
4407         record types.
4408         (Build_Finalizer): New routine. A core procedure which given any
4409         construct with declarations and/or statements detects all objects which
4410         need any type of clean up (controlled objects, protected objects) and
4411         generates all necessary code to clean up the said objects in the proper
4412         order.
4413         (Build_Finalizer_Call): New routine.
4414         (Build_Initialize_Statements): Create the initialization statements for
4415         an array type. The generated routine contains code to finalize partially
4416         initialized arrays.
4417         (Build_Object_Declarations): New routine.
4418         (Build_Raise_Statement): New routine.
4419         (Clean_Simple_Protected_Objects): Removed.
4420         (Controller_Component): Removed.
4421         (Enclosing_Function): New routine.
4422         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
4423         either declarations or statements or both.
4424         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
4425         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
4426         package.
4427         (Find_Final_List): Removed.
4428         (Global_Flist_Ref): Removed.
4429         (In_Finalization_Root): Removed.
4430         (Insert_Actions_In_Scope_Around): Determine the range of the transient
4431         scope in terms of tree nodes. Process all transient variables within
4432         that range.
4433         (Make_Adjust_Call): Rewritten. There is no longer an attach call
4434         generated after the adjust.
4435         (Make_Attach_Call): Removed.
4436         (Make_Call): New routine.
4437         (Make_Clean): Removed.
4438         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
4439         build routines.
4440         (Make_Deep_Proc): Rewritten to generate the new profile signature used
4441         in Deep routines.
4442         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
4443         build routines.
4444         (Make_Final_Call): Modified to simply create a call to either
4445         Deep_Finalize or Finalize.
4446         (Make_Finalize_Address_Body): New routine.
4447         (Make_Finalize_Address_Stmts): New routine. A function which produces
4448         TSS primitive Finalize_Address used in conjunction with heap allocated
4449         controlled objects.
4450         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
4451         (Make_Init_Call): Rewritten. There is no longer an attach call
4452         generated after initialization.
4453         (Make_Local_Deep_Finalize): New routine.
4454         (Make_Set_Finalize_Address_Ptr_Call): New routine.
4455         (Make_Transient_Block): Remove the finalization list retrieval and
4456         manipulation.
4457         (Needs_Finalization): Moved to Exp_Util.
4458         (Parent_Field_Type): New routine.
4459         (Preprocess_Components): New routine.
4460         (Process_Transient_Objects): New routine.
4461         (Wrap_HSS_In_Block): New routine.
4462         (Wrap_Transient_Declaration): Remove finalization list management and
4463         controller insertion.
4464         (Wrap_Transient_Expression): Code reformatting.
4465         (Wrap_Transient_Statement): Code reformatting.
4466         * exp_ch7.ads (Build_Final_List): Removed.
4467         (Build_Finalization_Collection): New routine.
4468         (Build_Raise_Statement): New routine.
4469         (Controller_Component): Removed.
4470         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
4471         (Find_Final_List): Removed.
4472         (In_Finalization_Root): Removed.
4473         (Is_Simple_Protected_Type): Update related comment.
4474         (Make_Adjust_Call): New parameter profile and associated comments.
4475         (Make_Attach_Call): Removed.
4476         (Make_Final_Call): New parameter profile and associated comments.
4477         (Make_Finalize_Address_Body): New routine.
4478         (Make_Init_Call): New parameter profile and associated comments.
4479         (Make_Local_Deep_Finalize): New routine.
4480         (Make_Set_Finalize_Address_Ptr_Call): New routine.
4481         (Needs_Finalization): Moved to Exp_Util.
4482         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
4483         (Expand_N_Protected_Body): Remove the handling of finalization lists.
4484         (Find_Protection_Type): Moved to Exp_Util.
4485         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
4486         (Make_DT): Update sequence of dispatch table initialization. Remove the
4487         initialization of field RC_Offset. Add initialization of field Needs_
4488         Finalization.
4489         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
4490         Reimplement how an object is first finalized, then deallocated.
4491         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4492         Code reformatting.
4493         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
4494         Register TSS_Finalize_Address with type TSS_Names.
4495         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
4496         procedure provides the interface between an allocation / deallocation
4497         and the support machinery in Ada.Finalization.Heap_Management.
4498         (Find_Init_Call): Code reformatting.
4499         (Find_Init_Call_In_List): Code reformatting.
4500         (Find_Protection_Type): Moved from Exp_Ch9.
4501         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
4502         (Has_Controlled_Coextensions): Removed.
4503         (Has_Controlled_Objects): New routine.
4504         (In_Library_Level_Package_Body): New routine.
4505         (Insert_Action_After): New routine.
4506         (Is_Finalizable_Transient): New routine. This predicate determines
4507         whether an object declaration is one of the many variants of controlled
4508         transients.
4509         (Is_Null_Access_BIP_Func_Call): New routine.
4510         (Is_Non_BIP_Func_Call): New routine.
4511         (Is_Related_To_Func_Return): New routine.
4512         (Needs_Finalization): Moved from Exp_Ch7.
4513         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
4514         (Find_Protection_Type): Moved from Exp_Ch9.
4515         (Has_Controlled_Coextensions): Removed.
4516         (Has_Controlled_Objects): New routine.
4517         (In_Library_Level_Package_Body): New routine.
4518         (Insert_Action_After): New routine.
4519         (Is_Finalizable_Transient): New routine.
4520         (Is_Null_Access_BIP_Func_Call): New routine.
4521         (Is_Non_BIP_Func_Call): New routine.
4522         (Is_Related_To_Func_Return): New routine.
4523         (Needs_Finalization): Moved from Exp_ch7.
4524         * expander.adb (Expand): Add a case for N_Free_Statement.
4525         * freeze.adb (Freeze_All): Replace the generation of a finalization
4526         list with a collection for access-to-controlled types.
4527         (Freeze_Entity): Code reformatting.
4528         (Freeze_Record_Type): Remove the freezing of a record controller
4529         component.
4530         (Freeze_Subprogram): Code reformatting.
4531         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
4532         finalization list.
4533         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
4534         has a library-level finalizer.
4535         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
4536         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
4537         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
4538         files. Add a-fihema to the list of object files.
4539         * par-ch4.adb:
4540         Alphabetize the associations in type Is_Parameterless_Attribute.
4541         * rtsfind.ads: Ada.Finalization_List.Controller and
4542         System.Finalization_Implementation are no longer a GNAT unit.
4543         Update the range of type Ada_Finalization_Child. Remove the following
4544         recoverable entities:
4545
4546            RE_Attach_To_Final_List
4547            RE_Deep_Tag_Attach
4548            RE_Finalize_List
4549            RE_Finalize_One
4550            RE_Finalizable_Ptr_Ptr
4551            RE_Global_Final_List
4552            RE_Limited_Record_Controller
4553            RE_List_Controller
4554            RE_Move_Final_List
4555            RE_Record_Controller
4556            RE_Simple_List_Controller
4557
4558         Add the following recoverable entities:
4559
4560            RE_Add_Offset_To_Address
4561            RE_Allocate
4562            RE_Base_Pool
4563            RE_Deallocate
4564            RE_Exception_Identity
4565            RE_Finalization_Collection
4566            RE_Finalization_Collection_Ptr
4567            RE_Needs_Finalization
4568            RE_Save_Library_Occurrence
4569            RE_Set_Finalize_Address_Ptr
4570            RE_Set_Storage_Pool_Ptr
4571            RE_Storage_Count
4572         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
4573         Name_uController.
4574         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
4575         (First_Stored_Discriminant): Remove the mention of Name_uController.
4576         * sem_aux.ads: Comment reformatting.
4577         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
4578         to redecorate an already existing class-wide type.
4579         (Decorate_Tagged_Type): New parameter profile and associated comment.
4580         Create a "shadow class-wide type" for a shadow entity.
4581         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
4582         of the final chain along with the associated comment.
4583         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
4584         Full_Desig and set it to the full view of the designated type.
4585         Initialize the finalization collection to empty.
4586         (Build_Derived_Record_Type): Alphabetize local variables. Code
4587         reformatting.
4588         (Collect_Fixed_Components): Remove the mention of Name_uController.
4589         (Create_Constrained_Components): Remove the mention of Name_uController.
4590         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
4591         class-wide type of a shadow entity.
4592         (Process_Full_View): Update the machinery which marks type
4593         Limited_Controlled's entity as limited.
4594         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
4595         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
4596         list, instead make a collection build-in-place formal.
4597         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
4598         a designated type in order to establish a match between the renaming
4599         and the renamed entity.
4600         (Find_Selected_Component): Add guard to prevent spurious exceptions
4601         from being raised on .NET/JVM.
4602         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
4603         to the list of primitive that need special processing. Update arrays
4604         C_Names and D_Names.
4605         (Replace_Types): Handle class-wide types.
4606         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
4607         different parameter profile, look at the first formal.
4608         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
4609         use clauses for Exp_Util.
4610         * sem_res.adb: Remove with and use clauses for Elists.
4611         (Propagate_Coextensions): Removed.
4612         (Resolve_Allocator): Do not propagate the list of coextensions from one
4613         allocator to another.
4614         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
4615         Deaccessed_T to Desig_Typ.
4616         (Enter_Name): Remove the mention of Name_uController.
4617         (Gather_Components): Remove the mention of Name_uController.
4618         (Incomplete_Or_Private_View): New routine.
4619         (Is_Coextension_Root): Removed.
4620         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
4621         * sem_util.ads (Incomplete_Or_Private_View): New routine.
4622         (Is_Coextension_Root): Removed.
4623         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
4624         Controlled types are now derived from a null tagged record. Remove
4625         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
4626         * sinfo.adb (Coextensions): Removed.
4627         (Set_Coextensions): Removed.
4628         * sinfo.ads: Remove Coextensions from the explanation of node fields
4629         and its uses in nodes.
4630         Update the field usage of N_Allocator.
4631         (Coextensions): Removed along with its pragma Inline.
4632         (Set_Coextensions): Removed along with its pragma Inline.
4633         * snames.ads-tmpl: Remove names
4634
4635           Name_uClean
4636           Name_uController
4637           Name_uFinal_List
4638           Name_uLocal_Final_List
4639           Name_Finalization_Root
4640           Name_Next
4641           Name_Prev
4642
4643         Add names
4644
4645           Name_uFinalizer
4646           Name_Finalize_Address
4647         * s-pooglo.adb (Allocate): Add overriding indicator.
4648         (Deallocate): Add overriding indicator.
4649         (Storage_Size): Add overriding indicator.
4650         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
4651         than Finalize_Global_List.
4652         (Null_Finalize_Global_List): Removed.
4653         (Save_Library_Occurrence): New routine.
4654         * s-soflin.ads: Remove variable Finalize_Global_List along with its
4655         initialization. Add variable Finalize_Library_Objects along with its
4656         pragma Export. Add variables Library_Exception and
4657         Library_Exception_Set along with their pragma Export.
4658         (Null_Finalize_Global_List): Removed.
4659         (Save_Library_Occurrence): New routine.
4660         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
4661         rather than Finalize_Global_List.
4662         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
4663         of the constructed node.
4664
4665 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4666
4667         * link.c: Include "auto-host.h" before system headers.
4668
4669 2011-08-03  Vincent Celier  <celier@adacore.com>
4670
4671         * make.adb (Gnatmake): Add to table Library_Projs only library projects
4672         that are not extended. Do not check if a library project that is
4673         extended should be regenerated. Do not add to table Library_Paths the
4674         libraries that are in extended projects. Link only with libraries that
4675         are in libray projects that are not extended.
4676         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
4677         for a library project that is extended.
4678
4679 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4680
4681         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
4682         conforming subprogram renamings that appear to be completions if they
4683         are not fully conformant.
4684         Such renamings are homographs but not completions.
4685         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
4686         names in a subprogram renaming that appears in an instance.
4687
4688 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4689
4690         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
4691         not immutably limited, build actual subtype from expression to provide
4692         proper bounds to caller.
4693
4694 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4695
4696         * sem_ch8.adb: Minor comment correction.
4697
4698 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4699
4700         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
4701         returning a limited array, use an extended return statement.
4702
4703 2011-08-03  Vincent Celier  <celier@adacore.com>
4704
4705         * make.adb (Initialize): If --subdirs= is used, but no project file is
4706         specified, attempt to create the specify subdir if it does not already
4707         exist and use it as the object directory as if -D had been specified.
4708
4709 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4710
4711         * s-tpopsp-vms.adb: New file.
4712         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4713         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4714
4715 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4716
4717         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4718         package.
4719
4720 2011-08-03  Yannick Moy  <moy@adacore.com>
4721
4722         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4723         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4724         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4725         detect that an array has static bounds.
4726
4727 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4728
4729         * exp_dist.adb: Minor reformatting.
4730
4731 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4732
4733         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4734         (ATCB_Key): Removed, not always used.
4735
4736 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4737
4738         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4739         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4740         most remaining global variables.
4741
4742 2011-08-03  Robert Dewar  <dewar@adacore.com>
4743
4744         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4745         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4746         reformatting.
4747
4748 2011-08-03  Javier Miranda  <miranda@adacore.com>
4749
4750         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
4751         that must be passed by copy in VM targets.
4752
4753 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4754
4755         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4756         duplicates a similar htable now in the project tree.
4757
4758 2011-08-03  Claire Dross  <dross@adacore.com>
4759
4760         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4761         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4762         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4763         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4764         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4765         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4766         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4767         update.
4768
4769 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4770
4771         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4772         (ATCB_Key): Removed, not always used.
4773         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4774         s-taprop-posix.adb.
4775         * s-tpopsp-tls.adb: New file.
4776         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4777         x86/x64/ia64/powerpc/sparc Linux.
4778
4779 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4780
4781         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4782         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4783
4784 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4785
4786         * rtsfind.ads, exp_dist.adb, exp_dist.ads
4787         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4788         Fix type selection for mapping integer types to PolyORB types.
4789
4790 2011-08-03  Bob Duff  <duff@adacore.com>
4791
4792         * sem_ch7.adb: Minor comment clarification.
4793
4794 2011-08-03  Bob Duff  <duff@adacore.com>
4795
4796         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4797         an error analyzing a choice, skip further processing. Further
4798         processing could cause a crash or cascade errors.
4799
4800 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4801
4802         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4803         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4804         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4805         prj-env.ads (Shared_Project_Tree_Data): new type
4806         An aggregate project and its aggregated trees need to share the common
4807         data structures used for lists of strings, packages,... This makes the
4808         code simpler since otherwise we have to pass the root tree (also used
4809         for the configuration file data) in addition to the current project
4810         tree. This also avoids ambiguities as to which tree should be used.
4811         And finally this saves a bit of memory.
4812         (For_Every_Project_Imported): new parameter Tree.
4813         Since aggregated projects are using a different tree, we need to let
4814         the caller know which tree to use to manipulate the returned project.
4815
4816 2011-08-03  Robert Dewar  <dewar@adacore.com>
4817
4818         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4819         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4820         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4821         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4822
4823 2011-08-03  Javier Miranda  <miranda@adacore.com>
4824
4825         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4826         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4827
4828 2011-08-03  Bob Duff  <duff@adacore.com>
4829
4830         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4831         the Base_Type.
4832
4833 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
4834
4835         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4836         g-sehash.ads: Fix typo. Update header.
4837
4838 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4839
4840         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4841         expansion.
4842
4843 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4844
4845         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4846         prefixes of private types along with records, since the selector may be
4847         a discriminant.
4848         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4849         private types along with records, since the selector may be a
4850         discriminant.
4851
4852 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4853
4854         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4855
4856 2011-08-03  Javier Miranda  <miranda@adacore.com>
4857
4858         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4859         Tagged_Type_Expansion.
4860
4861 2011-08-03  Yannick Moy  <moy@adacore.com>
4862
4863         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4864         violation when the argument of concatenation is the name of a
4865         constant.
4866
4867 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4868
4869         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4870         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4871         (Process_Declarative_Items): new parameter Child_Env.
4872
4873 2011-08-03  Yannick Moy  <moy@adacore.com>
4874
4875         * alfa.ads: Update format of ALFA section in ALI file in order to
4876         add a mapping from bodies to specs when both are present.
4877         (ALFA_Scope_Record): Add components for spec file/scope.
4878         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4879         present.
4880         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4881         collected, fill in the spec information when relevant.
4882         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4883         present.
4884
4885 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4886
4887         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4888         code unit to decide whether to add internally generated subprograms.
4889
4890 2011-08-03  Javier Miranda  <miranda@adacore.com>
4891
4892         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4893         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4894         be handled by copy in VM targets.
4895
4896 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4897
4898         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4899         code with Makeutl.Get_Switches.
4900         * prj-tree.adb: Update comment.
4901
4902 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4903
4904         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4905         subprogram with a limited formal that does not support external
4906         streaming.
4907
4908 2011-08-03  Yannick Moy  <moy@adacore.com>
4909
4910         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4911         continuation line
4912         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4913         not from current unit in two phases, because it is not possible to
4914         change the table while iterating over its content.
4915         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4916
4917 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4918
4919         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4920         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4921
4922 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4923
4924         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4925         and the component type is composite, this is ambiguous for predefined
4926         concatenation, but if the node is not overloaded and the entity is a use
4927         -defined function its profile can be used to resolve that aggregate.
4928
4929 2011-08-03  Robert Dewar  <dewar@adacore.com>
4930
4931         * exp_ch4.adb: Minor code cleanup.
4932
4933 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4934
4935         * exp_dist.adb: Do not generate distribution stubs if serious errors
4936         have been diagnosed.
4937
4938 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4939
4940         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4941         the first formal of a primitive operation, go to the base type to
4942         handle properly an access to a derived type with constrained
4943         discriminants.
4944         * sem_type.adb (Disambiguate): an immediately visible operator hides a
4945         user-defined function that is only use-visible.
4946
4947 2011-08-03  Robert Dewar  <dewar@adacore.com>
4948
4949         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4950         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4951         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4952         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4953         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4954         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4955         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4956         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4957
4958 2011-08-03  Robert Dewar  <dewar@adacore.com>
4959
4960         * repinfo.adb (List_Mechanism): Add handling of
4961         Convention_Ada_Pass_By_XXX.
4962         * sem_mech.adb (Set_Mechanism): Ditto.
4963         * sem_prag.adb (Process_Convention): Add entries for
4964         Convention_Ada_Pass_By_XXX.
4965         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4966
4967 2011-08-03  Pascal Obry  <obry@adacore.com>
4968
4969         * makeutl.adb: Minor reformatting.
4970
4971 2011-08-03  Vincent Celier  <celier@adacore.com>
4972
4973         * fname-uf.adb
4974         (Get_File_Name) If the file cannot be found when there are no config
4975         pragmas file and May_Fail is True, return No_File instead of the file
4976         name, to be consistent.
4977
4978 2011-08-03  Pascal Obry  <obry@adacore.com>
4979
4980         * adaint.c (__gnat_is_executable_file_attr): Avoid access
4981         to null pointer.
4982
4983 2011-08-03  Javier Miranda  <miranda@adacore.com>
4984
4985         * sem_ch13.adb
4986         (Same_Representation): In VM targets the representation of arrays with
4987         aliased components differs from arrays with non-aliased components.
4988
4989 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4990
4991         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4992         not systematically lower case attribute indexes that contain no "."
4993         Fix definition of several Naming attributes, which take
4994         a unit name as index and therefore should be case insensitive.
4995         Minor refactoring (reduce length of variable names).
4996
4997 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4998
4999         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
5000
5001 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5002
5003         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
5004         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
5005         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
5006         prj-tree.ads (Prj.Tree.Environment): new type.
5007
5008 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5009
5010         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
5011         prj-tree.adb, prj-tree.ads (Environment): new type.
5012
5013 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5014
5015         * prj-tree.ads: Remove unused variable.
5016
5017 2011-08-03  Yannick Moy  <moy@adacore.com>
5018
5019         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
5020         issuing messages related to SPARK restriction violation.
5021
5022 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5023
5024         * sem_ch6.adb: guard against error nodes in return statements.
5025
5026 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5027
5028         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
5029         a warning can only appear on a configuration file, so emit warning
5030         without further checks.
5031
5032 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
5033
5034         * s-interr.ads: add overriding keyword.
5035
5036 2011-08-03  Geert Bosch  <bosch@adacore.com>
5037
5038         * exp_attr.adb: Fix minor typo.
5039
5040 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5041
5042         * par-ch4.adb: improve error recovery.
5043
5044 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5045
5046         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
5047         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
5048         to Errout_Handling.
5049
5050 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5051
5052         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
5053         "external" as an attribute name in aggregate projects.
5054
5055 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
5056
5057         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
5058         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
5059         from 0, so we need to adjust.
5060
5061 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5062
5063         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
5064         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
5065
5066 2011-08-03  Yannick Moy  <moy@adacore.com>
5067
5068         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
5069         restriction on overloaded entity if the entity is not an operator.
5070
5071 2011-08-03  Yannick Moy  <moy@adacore.com>
5072
5073         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
5074         restrict.ads: Rename remaining Check_Formal_Restriction* into
5075         Check_SPARK_Restriction*.
5076
5077 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5078
5079         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
5080         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
5081         qualifier.
5082         (Project_Empty): removed
5083         (Empty_Project): new parameter Qualifier
5084         This is used to have fields specific to aggregate projects, cleaner
5085         New field to store the list of aggregated projects.
5086         (Check_Aggregate_Project): removed
5087         (Process_Aggregated_Projects, Free): new subprograms.
5088
5089 2011-08-03  Olivier Hainque  <hainque@adacore.com>
5090
5091         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
5092
5093 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5094
5095         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
5096         explicit dereference of an unconstrained type, create a constrained
5097         subtype for it, as is done for function calls that return an
5098         unconstrained type.
5099
5100 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5101
5102         * g-pehage.adb (Finalize): Avoid possible double-free.
5103
5104 2011-08-03  Steve Baird  <baird@adacore.com>
5105
5106         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
5107         Elab_Spec/Body attrs in CodePeer_Mode.
5108
5109 2011-08-03  Javier Miranda  <miranda@adacore.com>
5110
5111         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
5112         low bound is not known at compile time but they have no others choice.
5113         Done because in this case the bounds can be obtained directly from the
5114         aggregate.
5115
5116 2011-08-03  Ed Falis  <falis@adacore.com>
5117
5118         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
5119         on VxWorks SMP. Remove unusable constant ANY_CPU.
5120
5121 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5122
5123         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
5124         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
5125         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
5126         Prj.Env.Initialize_Empty): new subprograms
5127         (Get_Env, Find_Project): remove parameter Target_Name.
5128
5129 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5130
5131         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
5132         as a condition for the delayed call to Derived_Subprograms done for the
5133         case of the rewriting of a derived type that constrains the
5134         discriminants of its parent type.
5135         Avoids redundant subprogram derivations for private subtype derivations.
5136
5137 2011-08-03  Javier Miranda  <miranda@adacore.com>
5138
5139         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
5140         Build_Record_Aggr_Code.
5141         (Build_Record_Aggr_Code): Add missing support to initialize hidden
5142         discriminants in extension aggregates.
5143
5144 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5145
5146         * prj-pp.adb (Print): also output project qualifiers, since in
5147         particular "aggregate" is mandatory in an aggregate project.
5148
5149 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5150
5151         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
5152         (Debug_Output): new function.
5153
5154 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5155
5156         * gnat_ugn.texi: Document -Wstack-usage.
5157         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
5158
5159 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5160
5161         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
5162         have keyword LIMITED.
5163
5164 2011-08-03  Yannick Moy  <moy@adacore.com>
5165
5166         * alfa.adb, alfa.ads, alfa_test.adb: New files.
5167         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
5168         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
5169         section (does not happen in compiler, only if code directly calls
5170         Scan_ALI).
5171         * get_alfa.adb, get_alfa.ads: New files.
5172         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
5173         needed.
5174         * lib-xref-alfa.adb: New file.
5175         * lib-xref.adb, lib-xref.ads
5176         (Xref_Entry): redefine information needed in cross-references for ALFA.
5177         Push ALFA treatments in separated local package.
5178         (Enclosing_Subpragram_Or_Package): treat specially subprogram
5179         identifiers. Return entity of package body instead of spec. Return
5180         Empty for a scope with no location.
5181         (Generate_Reference): adapt to new components for ALFA information.
5182         Remove the need for D references on definitions.
5183         (Is_Local_Reference): moved to ALFA local package
5184         (Output_References): extract subfunction as Extract_Source_Name
5185         (Output_Local_References): remove procedure, replaced by filtering of
5186         cross-references in package ALFA and printing in Put_ALFA.
5187         (Write_Entity_Name): remove procedure
5188         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
5189         print exact name of entity as it appears in source file
5190         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
5191         * put_alfa.adb, put_alfa.ads: New files.
5192         * xref_lib.adb (Search_Xref): protect read of cross-references against
5193         reading other sections of the ALI file, in gnatxref
5194         (Search): protect read of cross-references against reading other
5195         sections of the ALI file, in gnatfind.
5196         * gcc-interface/Make-lang.in: Update dependencies.
5197
5198 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5199
5200         * sem_ch3.adb: Minor reformatting.
5201
5202 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
5203
5204         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
5205         raising an exception.
5206
5207 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5208
5209         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
5210         type, always use 1 as the lower bound or string, even if lower bound of
5211         context is not static, to handle properly null strings in a non-static
5212         context.
5213
5214 2011-08-03  Bob Duff  <duff@adacore.com>
5215
5216         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
5217         always legal on the right-hand side of an assignment statement; there
5218         is always an applicable index constraint in this case. Therefore, the
5219         check for Pkind = N_Assignment_Statement is now unconditional -- it
5220         doesn't depend on whether Is_Constrained (Typ).
5221
5222 2011-08-03  Robert Dewar  <dewar@adacore.com>
5223
5224         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
5225
5226 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5227
5228         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
5229         for an itype created within a generic unit.
5230
5231 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5232
5233         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
5234         suppresses all inlining.
5235
5236 2011-08-03  Robert Dewar  <dewar@adacore.com>
5237
5238         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
5239         exp_aggr.adb: Minor reformatting.
5240
5241 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5242
5243         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
5244         tagged assignment when discriminant checks are suppressed. This is
5245         useless and extremely costly in terms of static stack usage.
5246
5247 2011-08-03  Bob Duff  <duff@adacore.com>
5248
5249         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
5250         of generics, because this leads to the wrong entity in the wrong scope,
5251         causing (e.g.) pragma Export_Procedure to get an error if the entity is
5252         an instance.
5253         (Process_Interface_Name): Follow Alias for instances of generics, to
5254         correct for the above change.
5255
5256 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5257
5258         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
5259         is an integer literal it is always safe to replace the reference. In
5260         addition, if the reference appears in the generated code for an object
5261         declaration it is necessary to copy because otherwise the reference
5262         might be to the uninitilized value of the discriminant of the object
5263         itself.
5264
5265 2011-08-03  Pascal Obry  <obry@adacore.com>
5266
5267         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
5268         ACL used, in this case we want to check for ending .exe, not .exe
5269         anywhere in the path.
5270
5271 2011-08-03  Sergey Rybin  <rybin@adacore.com>
5272
5273         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5274         the tree structure (semantic decoration of references to record
5275         discriminants).
5276
5277 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5278
5279         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
5280         choices of a named array aggregate, bail out when any choices are
5281         marked as Errors_Posted.
5282
5283 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5284
5285         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
5286         in which entity is frozen, to handle properly loop variables in
5287         iterators.
5288
5289 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5290
5291         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
5292         subtype is not static, compute the upper bound using attributes, to
5293         handle properly index types that are not integer types.
5294
5295 2011-08-03  Bob Duff  <duff@adacore.com>
5296
5297         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
5298         Update copyright notice.
5299
5300 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5301
5302         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
5303         Original_Discriminant if within an instance.
5304         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
5305
5306 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5307
5308         * einfo.ads: Minor reformatting.
5309
5310 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5311
5312         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
5313         composite type with an unfrozen subcomponent, in the profile of a
5314         primitive operation.
5315
5316 2011-08-03  Robert Dewar  <dewar@adacore.com>
5317
5318         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5319
5320 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5321
5322         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
5323         unconstrained type with discriminants is initialized with an aggregate,
5324         use the constrained subtype of the aggregate as the type of the object,
5325         because it is immutable, and this allows the back-end to generate no
5326         code for the object declaration.
5327
5328 2011-08-03  Robert Dewar  <dewar@adacore.com>
5329
5330         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
5331         comparison operand is variable, and turns out to be zero or negative.
5332
5333 2011-08-03  Javier Miranda  <miranda@adacore.com>
5334
5335         * exp_intr.adb
5336         (Expand_Dispatching_Constructor_Call): Disable expansion of
5337         code required for native targets. Done to avoid generating
5338         references to unavailable runtime entities in VM targets.
5339         * exp_ch3.adb
5340         (Expand_N_Object_Declaration): Add missing support to handle
5341         the explicit initialization of class-wide interface objects.
5342         Fix documentation.
5343
5344 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5345
5346         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
5347
5348 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5349
5350         * a-cbdlli.adb (Splice): move source items from first to last
5351
5352 2011-08-03  Yannick Moy  <moy@adacore.com>
5353
5354         * sem_util.ads: comment added.
5355
5356 2011-08-03  Javier Miranda  <miranda@adacore.com>
5357
5358         * exp_aggr.adb
5359         (Expand_Record_Aggregate): In VM targets disable the expansion into
5360         assignments of aggregates whose type is not known at compile time.
5361
5362 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5363
5364         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
5365         protected entries and task entries, to build the proper renaming
5366         declaration for entry formals, used in debugging.
5367         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
5368         parameters in the same way.
5369
5370 2011-08-02  Robert Dewar  <dewar@adacore.com>
5371
5372         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
5373         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
5374         code reorganization.
5375
5376 2011-08-02  Robert Dewar  <dewar@adacore.com>
5377
5378         * debug.adb: Debug flag d.P to suppress length comparison optimization
5379         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
5380         comparison of Length by comparing First/Last instead.
5381
5382 2011-08-02  Matthew Heaney  <heaney@adacore.com>
5383
5384         * a-cobove.ads: Code clean up.
5385
5386 2011-08-02  Vincent Celier  <celier@adacore.com>
5387
5388         * adaint.c (file_names_case_sensitive_cache): New static int.
5389         (__gnat_get_file_names_case_sensitive): Cache the return value in
5390         file_names_case_sensitive_cache at the first invocation, to avoid
5391         multiple calls to getenv.
5392
5393 2011-08-02  Bob Duff  <duff@adacore.com>
5394
5395         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
5396
5397 2011-08-02  Yannick Moy  <moy@adacore.com>
5398
5399         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
5400         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
5401         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
5402         indicate that we are in a precondition or postcondition. This is used in
5403         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
5404         decide whether to flag the spec or body of the current subprogram as
5405         not in ALFA.
5406
5407 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
5408
5409         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
5410         list.
5411         * a-extiin.ads: New file.
5412
5413 2011-08-02  Bob Duff  <duff@adacore.com>
5414
5415         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
5416         now raises Name_Error instead of Use_Error in certain cases. The other
5417         parts of this AI were already implemented properly.
5418
5419 2011-08-02  Vincent Celier  <celier@adacore.com>
5420
5421         * link.c: Only import "auto-host.h" when building the gnattools.
5422
5423 2011-08-02  Yannick Moy  <moy@adacore.com>
5424
5425         * sem_util.adb: Inter-unit inlining does not work for a subprogram
5426         which calls a local subprogram, so extract subprogram
5427         from Mark_Non_ALFA_Subprogram_Body.
5428
5429 2011-08-02  Javier Miranda  <miranda@adacore.com>
5430
5431         * exp_ch9.adb
5432         (Extract_Dispatching_Call): If the type of the dispatching object is an
5433         access type then return an explicit dereference in the Object out-mode
5434         parameter.
5435
5436 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5437
5438         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
5439         compatibility checks for all indexes of an array subtype, not just the
5440         first. Reset Has_Dynamic_Range_Check on the subtype before each
5441         potential check to ensure that Insert_Range_Checks will not elide any
5442         of the dynamic checks.
5443
5444 2011-08-02  Yannick Moy  <moy@adacore.com>
5445
5446         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
5447         SPARK restriction at parsing time.
5448         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
5449         directive only if the SPARK restriction is set for this unit.
5450
5451 2011-08-02  Yannick Moy  <moy@adacore.com>
5452
5453         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
5454         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
5455         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
5456         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
5457         Mark_Non_ALFA_Subprogram_Body.
5458         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
5459         inlined.
5460
5461 2011-08-02  Yannick Moy  <moy@adacore.com>
5462
5463         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
5464         might be costly.
5465
5466 2011-08-02  Robert Dewar  <dewar@adacore.com>
5467
5468         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
5469         exp_ch3.adb: Minor reformatting.
5470
5471 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5472
5473         * adaint.c (__gnat_locate_exec_on_path): only returns executable
5474         files, not any regular file.
5475         (__gnat_locate_file_with_predicate): new subprogram.
5476
5477 2011-08-02  Yannick Moy  <moy@adacore.com>
5478
5479         * sinfo.adb, sinfo.ads: Restrict the use of flags
5480         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
5481         nodes, plus N_Subtype_Declaration for the 2nd one.
5482
5483 2011-08-02  Sergey Rybin  <rybin@adacore.com>
5484
5485         * gnat_rm.texi: Ramification of pragma Eliminate documentation
5486          - fix bugs in the description of Source_Trace;
5487          - get rid of UNIT_NAME;
5488
5489 2011-08-02  Javier Miranda  <miranda@adacore.com>
5490
5491         * exp_ch9.adb
5492         (Build_Dispatching_Requeue): Adding support for VM targets
5493         since we cannot directly reference the Tag entity.
5494         * exp_sel.adb (Build_K): Adding support for VM targets.
5495         (Build_S_Assignment): Adding support for VM targets.
5496         * exp_disp.adb
5497         (Default_Prim_Op_Position): In VM targets do not restrict availability
5498         of predefined interface primitives to compiling in Ada 2005 mode.
5499         (Is_Predefined_Interface_Primitive): In VM targets this service is not
5500         restricted to compiling in Ada 2005 mode.
5501         (Make_VM_TSD): Generate code that declares and initializes the OSD
5502         record. Needed to support dispatching calls through synchronized
5503         interfaces.
5504         * exp_ch3.adb
5505         (Make_Predefined_Primitive_Specs): Enable generation of predefined
5506         primitives associated with synchronized interfaces.
5507         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5508         primitives associated with synchronized interfaces.
5509
5510 2011-08-02  Yannick Moy  <moy@adacore.com>
5511
5512         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5513         statements hidden in SPARK if preceded by the HIDE directive
5514         (Parse_Exception_Handlers): mark each exception handler in a sequence of
5515         exception handlers as hidden in SPARK if preceded by the HIDE directive
5516         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5517         if starting with the HIDE directive
5518         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5519         starting with the HIDE directive; mark the declarations in a private
5520         part as hidden in SPARK if the private part starts with the HIDE
5521         directive
5522         * restrict.adb, restrict.ads
5523         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5524         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5525         argument node belongs to a part which is hidden in SPARK
5526         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5527         parts in SPARK; protect the possibly costly call to
5528         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5529         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5530         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5531         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5532         Tok_SPARK_Hide.
5533         (Scan): recognize special comment starting with '#' and followed by
5534         SPARK keyword "hide" as a HIDE directive.
5535
5536 2011-08-02  Yannick Moy  <moy@adacore.com>
5537
5538         * types.ads, erroutc.ads: Minor reformatting.
5539
5540 2011-08-02  Vincent Celier  <celier@adacore.com>
5541
5542         * link.c: Add response file support for cross platforms.
5543
5544 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5545
5546         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5547         in an association, set parent field of copy before partial analysis.
5548         * sem_res.adb (Resolve_Slice): create reference to itype only when
5549         expansion is enabled.
5550
5551 2011-08-02  Yannick Moy  <moy@adacore.com>
5552
5553         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5554         for new flag denoting which subprogram bodies are in ALFA
5555         * restrict.adb, sem_ch7.adb: Update comment
5556         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5557         sem_ch9.adb, sem_res.adb: Add calls to
5558         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5559         * sem_ch6.adb (Analyze_Function_Return): add calls to
5560         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5561         middle of the body, and extended return.
5562         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5563         False when missing return.
5564         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5565         to True for subprograms whose spec is in ALFA. Remove later on the flag
5566         on the entity used for a subprogram body when there exists a separate
5567         declaration.
5568         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5569         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5570         False, otherwise do nothing.
5571
5572 2011-08-02  Robert Dewar  <dewar@adacore.com>
5573
5574         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5575
5576 2011-08-02  Yannick Moy  <moy@adacore.com>
5577
5578         * sem_ch4.ads: minor formatting.
5579
5580 2011-08-02  Yannick Moy  <moy@adacore.com>
5581
5582         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5583         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5584         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5585         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5586         opt.ads: cleanup of SPARK mode
5587
5588 2011-08-02  Yannick Moy  <moy@adacore.com>
5589
5590         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5591         types.
5592         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5593         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5594         * sem_ch3.adb
5595         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5596         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5597         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5598         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5599         types.
5600         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5601         non-static range.
5602         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5603         functions whose return type is not in ALFA.
5604         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5605         specifications.
5606         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5607         parameter's type is not in ALFA.
5608         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5609         types are in ALFA.
5610
5611 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5612
5613         * sem_ch6 (Analyze_Expression_Function): treat the function as
5614         Inline_Always, and introduce a subprogram declaration for it when it is
5615         not a completion.
5616         * inline.adb (Add_Inlined_Body): recognize bodies that come from
5617         expression functions, so that the back-end can determine whether they
5618         can in fact be inlined.
5619         * sem_util.adb (Is_Expression_Function): predicate to determine whether
5620         a function body comes from an expression function.
5621
5622 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5623
5624         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5625         null exclusions to test Can_Never_Be_Null on the anonymous access types
5626         of the formals rather than testing the formals themselves. Exclude this
5627         check in cases where the Old_Formal is marked as a controlling formal,
5628         to avoid issuing spurious errors for bodies completing dispatching
5629         operations (due to the flag not getting set on controlling access
5630         formals in body specs).
5631         (Find_Corresponding_Spec): When checking full and subtype conformance of
5632         subprogram bodies in instances, pass Designated and E in that order, for
5633         consistency with the expected order of the formals (New_Id followed by
5634         Old_Id).
5635
5636 2011-08-02  Robert Dewar  <dewar@adacore.com>
5637
5638         * sem_ch8.adb: Minor reformatting.
5639
5640 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5641
5642         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5643         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5644         primitive operations of class-wide actuals.
5645
5646 2011-08-02  Javier Miranda  <miranda@adacore.com>
5647
5648         * exp_atag.ads, exp_atag.adb
5649         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5650         since its value is implicitly passed in argument Typ.
5651         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5652         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5653         Build_Common_Dispatching_Select_Statements.
5654
5655 2011-08-02  Robert Dewar  <dewar@adacore.com>
5656
5657         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5658         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5659         Minor reformatting.
5660
5661 2011-08-02  Robert Dewar  <dewar@adacore.com>
5662
5663         * sem_res.adb: Minor reformatting.
5664         * sem_prag.adb: Minor reformatting.
5665
5666 2011-08-02  Javier Miranda  <miranda@adacore.com>
5667
5668         * exp_atag.adb, exp_atags.ads
5669         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5670         by the tagged type Entity. Required to use this routine in the VM
5671         targets since we do not have available the Tag entity in the VM
5672         platforms.
5673         * exp_ch6.adb
5674         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5675         Ada.Tags has not been previously loaded.
5676         * exp_ch7.adb
5677         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5678         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5679         * sem_aux.adb
5680         (Enclosing_Dynamic_Scope): Add missing support to handle the full
5681         view of enclosing scopes. Required to handle enclosing scopes that
5682         are synchronized types whose full view is a task type.
5683         * exp_disp.adb
5684         (Build_VM_TSDs): Minor code improvement to avoid generating and
5685         analyzing lists with empty nodes.
5686         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5687         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5688         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5689         (Make_Disp_Timed_Select_Body): Add support for VM targets.
5690         (Make_Select_Specific_Data_Table): Add support for VM targets.
5691         (Make_VM_TSD): Generate code to initialize the SSD structure of
5692         the TSD.
5693
5694 2011-08-02  Yannick Moy  <moy@adacore.com>
5695
5696         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5697         cross-references section in ALI.
5698         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5699         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5700         Sub).
5701         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5702         subprogram or package entity of a node
5703         (Is_Local_Reference_Type): new function returns True for references
5704         selected in local cross-references.
5705         (Lt): function extracted from Lt in Output_References
5706         (Write_Entity_Name): function extracted from Output_References
5707         (Generate_Definition): generate reference with type 'D' for definition
5708         of objects (object declaration and parameter specification), with
5709         appropriate locations and units, for use in local cross-references.
5710         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5711         references of type 'I' for initialization in object definition.
5712         (Output_References): move part of function Lt and procedure
5713         Write_Entity_Name outside of the body. Ignore references of types 'D'
5714         and 'I' introduced for local cross-references.
5715         (Output_Local_References): new procedure to output the local
5716         cross-references sections.
5717         (Lref_Entity_Status): new array defining whether an entity is a local
5718         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5719         with 'I' type when initialization expression is present.
5720         * get_scos.adb, get_scos.ads: Correct comments and typos
5721
5722 2011-08-02  Javier Miranda  <miranda@adacore.com>
5723
5724         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5725         the JVM target.
5726         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5727         the JVM target.
5728         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5729         TSD support.
5730
5731 2011-08-02  Vincent Celier  <celier@adacore.com>
5732
5733         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5734         (No_Space_Img): New function
5735         (Find_Excluded_Sources): When reading from a file, record the file name
5736         and the line number for each excluded source.
5737         (Mark_Excluded_Sources): When reporting an error, if the excluded
5738         sources were read from a file, include file name and line number in
5739         the error message.
5740
5741 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5742
5743         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5744
5745 2011-08-02  Robert Dewar  <dewar@adacore.com>
5746
5747         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5748
5749 2011-08-02  Javier Miranda  <miranda@adacore.com>
5750
5751         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5752         generation of TSDs to the DOTNET compiler.
5753         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5754         generation of TSDs to the DOTNET compiler.
5755
5756 2011-08-02  Javier Miranda  <miranda@adacore.com>
5757
5758         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5759         record of all the tagged types declared inside library level package
5760         declarations, library level package bodies or library level subprograms.
5761         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5762         associated with a given tagged type.
5763         (Build_VM_TSDs): New subprogram.
5764         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5765         compilation units that are subprograms.
5766         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5767         compilation units that are package bodies.
5768         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5769         units that are a package declaration or a package instantiation.
5770         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5771         reorganization to improve the error generated by the frontend when the
5772         function Ada.Tags.Secondary_Tag is not available.
5773         * rtsfind.ads (RE_Register_TSD): New runtime entity.
5774         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5775
5776 2011-08-02  Javier Miranda  <miranda@adacore.com>
5777
5778         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5779
5780 2011-08-02  Robert Dewar  <dewar@adacore.com>
5781
5782         * s-imenne.ads: Minor reformatting.
5783
5784 2011-08-02  Robert Dewar  <dewar@adacore.com>
5785
5786         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5787         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5788         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5789
5790 2011-08-02  Robert Dewar  <dewar@adacore.com>
5791
5792         * einfo.ads (Materialize_Entity): Document this is only for renamings
5793         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5794         required debug information in the case where we transform the object
5795         declaration into a renaming declaration.
5796         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5797         object
5798         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5799         Materialize_Entity.
5800
5801 2011-08-02  Robert Dewar  <dewar@adacore.com>
5802
5803         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5804         Suppress_Init_Procs.
5805         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5806         Suppress_Initialization/Initialization_Suppressed.
5807         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5808         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5809         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5810         * sem_prag.adb: New processing for pragma Suppress_Initialization.
5811
5812 2011-08-02  Robert Dewar  <dewar@adacore.com>
5813
5814         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5815         Minor reformatting.
5816
5817 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5818
5819         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5820         only have inheritable classwide pre/postconditions.
5821
5822 2011-08-02  Javier Miranda  <miranda@adacore.com>
5823
5824         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5825         * rtsfind.ads (RE_Check_TSD): New runtime entity.
5826         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5827         checks if the external tag of a type is the same as the external tag
5828         of some other declaration.
5829
5830 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5831
5832         * s-taskin.ads: Minor reformatting.
5833
5834 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5835
5836         * g-comlin.adb (Display_Help): swap the order in which it prints the
5837         short help and the general usage.
5838
5839 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5840
5841         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5842         the aspect declarations and attach them to the generic copy for
5843         subsequent analysis.
5844         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5845         declarations of the generic tree to the new subprogram declarations.
5846         * sem_attr.adb (Check_Precondition_Postcondition): recognize
5847         conditions that apply to a subprogram instance.
5848
5849 2011-08-02  Robert Dewar  <dewar@adacore.com>
5850
5851         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5852
5853 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5854
5855         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5856         private type with a tagged full view is not derived in the immediate
5857         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5858
5859 2011-08-02  Robert Dewar  <dewar@adacore.com>
5860
5861         * exp_ch4.adb: Minor reformatting.
5862
5863 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5864
5865         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
5866         Ada2012 iterator, the loop will be rewritten during expansion into a
5867         while loop with a cursor and an element declaration. Do not analyze the
5868         body in this case, because if the container is for indefinite types the
5869         actual subtype of the elements will only be determined when the cursor
5870         declaration is analyzed.
5871
5872 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5873
5874         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5875         size/alignment related attributes in CodePeer_Mode.
5876
5877 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5878
5879         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5880         Prepend_Element, since this can result in the operation getting the
5881         wrong slot in the full type's dispatch table if the full type has
5882         inherited operations. The incomplete type's operation will get added
5883         to the proper position in the full type's primitives
5884         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5885         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5886         dispatching operations, since there are cases where nonprimitive
5887         subprograms can get added to the list of incomplete dependents (such
5888         as subprograms in nested packages).
5889         * sem_ch6.adb (Process_Formals): First, remove test for being in a
5890         private part when determining whether to add a primitive with a
5891         parameter of a tagged incomplete type to the Private_Dependents list.
5892         Such primitives can also occur in the visible part, and should not have
5893         been excluded from being private dependents.
5894         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5895         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5896         list of a Taft-amendment incomplete type is a primitive before issuing
5897         an error that the full type must appear in the same unit. There are
5898         cases where nonprimitives can be in the list (such as subprograms in
5899         nested packages).
5900         * sem_disp.adb (Derives_From): Use correct condition for checking that
5901         a formal's type is derived from the type of the corresponding formal in
5902         the parent subprogram (the condition was completely wrong). Add
5903         checking that was missing for controlling result types being derived
5904         from the result type of the parent operation.
5905
5906 2011-08-02  Yannick Moy  <moy@adacore.com>
5907
5908         * errout.adb (First_Node): minor renaming
5909         * restrict.adb (Check_Formal_Restriction): put restriction warning on
5910         first node.
5911
5912 2011-08-02  Yannick Moy  <moy@adacore.com>
5913
5914         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5915         before accessing operands.
5916         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5917         decide whether an initialization expression respects SPARK rules, as
5918         the plain node is the expanded one. This allows for more valid warnings
5919         to be issued.
5920         * gnat_rm.texi: Minor update.
5921
5922 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5923
5924         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5925         previous change.
5926
5927 2011-08-02  Robert Dewar  <dewar@adacore.com>
5928
5929         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5930
5931 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5932
5933         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5934         loop statements and the element renaming declaration with a block when
5935         the element type is controlled.
5936
5937 2011-08-02  Yannick Moy  <moy@adacore.com>
5938
5939         * sinfo.ads: Minor formatting.
5940
5941 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5942
5943         * sem_aggr.adb (Add_Association): if the association has a box and no
5944         expression, use the Sloc of the aggregate itself for the new
5945         association.
5946         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5947         the Original_Node.
5948
5949 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5950
5951         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5952         When a container is provided via a function call, generate a renaming
5953         of the function result. This avoids the creation of a transient scope
5954         and the premature finalization of the container.
5955         * exp_ch7.adb (Is_Container_Cursor): Removed.
5956         (Wrap_Transient_Declaration): Remove the supression of the finalization
5957         of the list controller when the declaration denotes a container cursor,
5958         it is not needed.
5959
5960 2011-08-02  Yannick Moy  <moy@adacore.com>
5961
5962         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5963         node is from source, instead of the original node being from source.
5964         * sem_aggr.adb
5965         (Resolve_Array_Aggregate): refine the check for a static expression, to
5966         recognize also static ranges
5967         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5968         Array_Type_Declaration): postpone the test for the type being a subtype
5969         mark after the type has been resolved, so that component-selection and
5970         expanded-name are discriminated.
5971         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5972         to distinguish the case of an iteration scheme, so that an error is
5973         issed on a non-static range in SPARK except in an iteration scheme.
5974         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5975         In_Iter_Schm = True.
5976         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5977         user-defined operators so that they are allowed in renaming
5978         * sem_ch8.adb
5979         (Find_Selected_Component): refine the check for prefixing of operators
5980         so that they are allowed in renaming. Move the checks for restrictions
5981         on selector name after analysis discriminated between
5982         component-selection and expanded-name.
5983         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5984         concatenation argument of string type if it is static.
5985         * sem_util.adb, sem_util.ads
5986         (Check_Later_Vs_Basic_Declarations): add a new function
5987         Is_Later_Declarative_Item to decice which declarations are allowed as
5988         later items, in the two different modes Ada 83 and SPARK. In the SPARK
5989         mode, add that renamings are considered as later items.
5990         (Enclosing_Package): new function to return the enclosing package
5991         (Enter_Name): correct the rule for homonyms in SPARK
5992         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5993         from source (result of expansion) to avoid issuing wrong warnings.
5994
5995 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5996
5997         * errout.adb: On anything but an expression First_Node returns its
5998         argument.
5999
6000 2011-08-02  Pascal Obry  <obry@adacore.com>
6001
6002         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6003
6004 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6005
6006         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6007         Set the associated loop as the related expression of internally
6008         generated cursors.
6009         * exp_ch7.adb (Is_Container_Cursor): New routine.
6010         (Wrap_Transient_Declaration): Supress the finalization of the list
6011         controller when the declaration denotes a container cursor.
6012
6013 2011-08-02  Yannick Moy  <moy@adacore.com>
6014
6015         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6016         command line now.
6017         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6018         expression is a simple expression. This check cannot be performed in
6019         the semantics, so just drop it.
6020         (P_Index_Or_Discriminant_Constraint): move check that the index or
6021         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6022         semantics. Other cases were previously checked in the semantics.
6023         * par-ch4.adb (P_Name): move checks that a selector name is not
6024         character literal or an operator symbol to Find_Selected_Component in
6025         the semantics
6026         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6027         declarations are not placed after later declarations in a separate
6028         procedure in Sem_Util (possibly not the best choice?), to be used both
6029         during parsing, for Ada 83 mode, and during semantic analysis, for
6030         SPARK mode.
6031         * par-endh.adb (Check_End): move check that end label is not missing
6032         to Process_End_Label in the semantics
6033         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6034         the special case for SPARK restriction
6035         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6036         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6037         parameter Force to issue the error message even on internal node (used
6038         for generated end label). Call Check_Restriction to check when an error
6039         must be issued. In SPARK mode, issue an error message even if the
6040         restriction is not set.
6041         (Check_Restriction): new procedure with an additional out parameter to
6042         inform the caller that a message has been issued
6043         * sem_aggr.adb: Minor modification of message
6044         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6045         instead of issuing an error message directly
6046         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6047         declarations are not placed after later declarations, by calling
6048         Check_Later_Vs_Basic_Declarations
6049         (Analyze_Subtype_Declaration): move here the check that an index or
6050         discriminant constraint must be a subtype mark. Change the check that
6051         a subtype of String must start at one so that it works on subtype marks.
6052         * sem_ch4.adb (Analyze_Call): move here the check that a named
6053         association cannot follow a positional one in a call
6054         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6055         instead of issuing an error message directly
6056         * sem_ch8.adb (Find_Selected_Component): move here the check that a
6057         selector name is not a character literal or an operator symbol. Move
6058         here the check that the prefix of an expanded name cannot be a
6059         subprogram or a loop statement.
6060         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6061         procedure called from parsing and semantics to check that basic
6062         declarations are not placed after later declarations
6063         (Process_End_Label): move here the check that end label is not missing
6064
6065 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6066
6067         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
6068         representation clause in codepeer mode, since it confuses CodePeer and
6069         does not bring useful info.
6070
6071 2011-08-02  Ed Falis  <falis@adacore.com>
6072
6073         * init.c: initialize fp hw on MILS.
6074
6075 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6076
6077         * errout.adb (First_Node): for bodies, return the node itself (small
6078         optimization). For other nodes, do not check source_unit if the node
6079         comes from Standard.
6080
6081 2011-08-02  Robert Dewar  <dewar@adacore.com>
6082
6083         * exp_ch3.adb: Minor comment additions.
6084         * sem_ch13.adb: Minor reformatting.
6085
6086 2011-08-02  Pascal Obry  <obry@adacore.com>
6087
6088         * make.adb, makeutl.adb: Removes some superfluous directory separator.
6089
6090 2011-08-02  Robert Dewar  <dewar@adacore.com>
6091
6092         * sem_attr.adb: Minor reformatting.
6093
6094 2011-08-02  Robert Dewar  <dewar@adacore.com>
6095
6096         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
6097         (Has_Default_Component_Value): Removed
6098         * einfo.ads Comment updates
6099         (Has_Default_Aspect): Replaces Has_Default_Value
6100         (Has_Default_Component_Value): Removed
6101         * exp_ch13.adb
6102         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
6103         * exp_ch3.adb
6104         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
6105         (Get_Simple_Init_Val): Handle Default_Value aspect
6106         (Needs_Simple_Initialization): Handle Default_Value aspect
6107         * exp_ch3.ads: Needs_Simple_Initialization
6108         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
6109         * par-prag.adb (Pragma_Default[_Component]Value) Removed
6110         * sem_ch13.adb
6111         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
6112         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
6113         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
6114
6115 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6116
6117         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
6118         package containing iteration primitives.
6119         exp_ch5.adb (Expand_Iterator_Loop): ditto.
6120
6121 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6122
6123         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
6124         "of", pre-analyze expression in case it is a function call with
6125         finalization actions that must be placed ahead of the loop.
6126         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
6127         on an Ada2012 iterator, insert them ahead of the rewritten loop.
6128
6129 2011-08-02  Geert Bosch  <bosch@adacore.com>
6130
6131         * cstand.adb (Create_Float_Types): Only consider C's long double for
6132         Long_Long_Float, in addition to double.
6133
6134 2011-08-02  Robert Dewar  <dewar@adacore.com>
6135
6136         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
6137         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
6138         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
6139         Minor reformatting.
6140
6141 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6142
6143         * sem_attr.adb: handle properly 'Result when it is a prefix of an
6144         indexed component.
6145
6146 2011-08-02  Javier Miranda  <miranda@adacore.com>
6147
6148         * einfo.ads, einfo.adb
6149         (Original_Access_Type): Move this attribute to Node26 since there was
6150         an undocumented use of Node21 in E_Access_Subprogram_Type entities
6151         which causes conflicts and breaks the generation of the .NET compiler.
6152         (Interface_Name): Add missing documentation on JGNAT only uses of
6153         this attribute.
6154
6155 2011-08-02  Geert Bosch  <bosch@adacore.com>
6156
6157         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
6158         (Find_Back_End_Float_Type): Likewise
6159         (Create_Back_End_Float_Types): Likewise
6160         (Create_Float_Types): Likewise
6161         (Register_Float_Type): Likewise
6162         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6163         Nlist and split out type selection in new local Find_Base_Type function.
6164         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6165         Nlist
6166         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6167
6168 2011-08-02  Robert Dewar  <dewar@adacore.com>
6169
6170         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6171         alpha order).
6172         * opt.ads: Minor comment change.
6173         * sem_ch12.adb: Minor code reorganization.
6174
6175 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6176
6177         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6178         subtype's list of rep items to the list on the full subtype in the case
6179         where the lists are the same.
6180
6181 2011-08-02  Geert Bosch  <bosch@adacore.com>
6182
6183         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6184         using the one from System.Strings, which also deallocates all strings.
6185
6186 2011-08-02  Geert Bosch  <bosch@adacore.com>
6187
6188         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6189         function.
6190         * gcc-interface/Make-lang.in: Update dependencies.
6191
6192 2011-08-02  Olivier Hainque  <hainque@adacore.com>
6193
6194         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6195         end_locus.
6196
6197 2011-08-02  Javier Miranda  <miranda@adacore.com>
6198
6199         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6200         associated with anonymous access to subprograms.
6201
6202 2011-08-02  Geert Bosch  <bosch@adacore.com>
6203
6204         * opt.ads
6205         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6206         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6207         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6208         (Add_Symbol_Definition): Move to switch-c.adb
6209         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6210         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6211         (Add_Symbol_Definition): Move to switch-c.adb.
6212         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6213         * sem_warn.adb
6214         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6215         Move to warnsw.adb.
6216         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6217         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6218         Move to warnsw.adb.
6219         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6220         (Add_Symbol_Definition): Moved from Prepcomp.
6221         * switch-c.ads: Update copyright notice. Use String_List instead of
6222         Argument_List, removing dependency on System.OS_Lib.
6223
6224 2011-08-02  Yannick Moy  <moy@adacore.com>
6225
6226         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6227         mode on initialization expression which does not respect SPARK
6228         restrictions.
6229         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6230         if the tree referenced by its argument represents an initialization
6231         expression in SPARK, suitable for initializing an object in an object
6232         declaration.
6233
6234 2011-08-02  Javier Miranda  <miranda@adacore.com>
6235
6236         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6237         internally generated access to subprogram with its associated protected
6238         subprogram type.
6239         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6240
6241 2011-08-02  Geert Bosch  <bosch@adacore.com>
6242
6243         * cstand.adb (Register_Float_Type): Print information about type to
6244         register, if the Debug_Flag_Dot_B is set.
6245         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6246         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6247         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6248         with a requested precision of more than Max_Digits digits and no more
6249         than Max_Base_Digits digits, if a range specification is present and the
6250         Predefined_Float_Types list has a suitable type to derive from.
6251         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6252         case of type completion with pragma Import
6253         * sem_prag.adb
6254         (Process_Import_Predefined_Type): Processing to complete a type
6255         with pragma Import. Currently supports floating point types only.
6256         (Set_Convention_From_Pragma): Do nothing without underlying type.
6257         (Process_Convention): Guard against absence of underlying type,
6258         which may happen when importing incomplete types.
6259         (Process_Import_Or_Interface): Handle case of importing predefined
6260         types. Tweak error message.
6261
6262 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6263
6264         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6265         functions to previous change.  Reorganize code slightly.
6266
6267 2011-08-02  Geert Bosch  <bosch@adacore.com>
6268
6269         * back_end.ads (Register_Type_Proc): New call back procedure type for
6270         allowing the back end to provide information about available types.
6271         (Register_Back_End_Types): New procedure to register back end types.
6272         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6273         available types.
6274         * cstand.adb (Back_End_Float_Types): New list for floating point types
6275         supported by the back end.
6276         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6277         (Copy_Float_Type): New procedure to make new copies of predefined types.
6278         (Register_Float_Type): New call back procedure to populate the BEFT list
6279         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6280         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6281         (Create_Float_Types): New procedure to create entities for floating
6282         point types predefined in Standard, and put these and any remaining
6283         BEFTs on the Predefined_Float_Types list.
6284         * stand.ads (Predefined_Float_Types): New list for predefined floating
6285         point types that do not have declarations in package Standard.
6286
6287 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6288
6289         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
6290         entity node for the unit containing the parameter.
6291         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6292         (Add_Inlined_Subprogram): Likewise.
6293         * gcc-interface/Make-lang.in: Update dependencies.
6294
6295 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6296
6297         * s-stusta.adb (Print): Make sure Pos is always initialized to a
6298         suitable value.
6299
6300 2011-08-02  Geert Bosch  <bosch@adacore.com>
6301
6302         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6303
6304 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6305
6306         * sem_type.adb (Covers): Move trivial case to the top and reuse the
6307         computed value of Base_Type.
6308
6309 2011-08-02  Yannick Moy  <moy@adacore.com>
6310
6311         * restrict.adb (Check_Restriction): issue an error for any use of
6312         class-wide, even if the No_Dispatch restriction is not set.
6313         * sem_aggr.adb: Correct typos in comments and messages in formal mode
6314         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6315         when completing a private extension, the type named in the private part
6316         is not the same as that named in the visible part.
6317         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6318         of an inherited primitive operations of a tagged type or type extension
6319         that returns the tagged type.
6320         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6321         function which returns True for an implicit operation inherited by the
6322         derived type declaration for the argument type.
6323         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6324         order.
6325
6326 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6327
6328         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6329         Process_Bounds, to perform analysis with expansion of a range or an
6330         expression that is the iteration scheme for a loop.
6331         (Analyze_Iterator_Specification): If domain of iteration is given by a
6332         function call with a controlled result, as is the case if call returns
6333         a predefined container, ensure that finalization actions are properly
6334         generated.
6335         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6336
6337 2011-08-02  Javier Miranda  <miranda@adacore.com>
6338
6339         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6340         * gcc-interface/Make-lang.in: Update dependencies.
6341
6342 2011-08-02  Javier Miranda  <miranda@adacore.com>
6343
6344         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6345         determine if the analysis is performed using N or Original_Node (N).
6346         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6347         functionality of routine Is_Variable avoids code duplication.
6348         * checks.adb (Determine_Range): Handle temporaries generated by
6349         Remove_Side_Effects.
6350
6351 2011-08-02  Javier Miranda  <miranda@adacore.com>
6352
6353         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6354         expansion of the condition. Required since the previous analysis was
6355         done with expansion disabled (see Resolve_Quantified_Expression) and
6356         hence checks were not inserted and record comparisons have not been
6357         expanded.
6358
6359 2011-08-02  Ed Falis  <falis@adacore.com>
6360
6361         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6362         Update header.
6363
6364 2011-08-02  Bob Duff  <duff@adacore.com>
6365
6366         * opt.ads: Minor comment fix.
6367
6368 2011-08-02  Bob Duff  <duff@adacore.com>
6369
6370         * sem_ch12.adb (Analyze_Package_Instantiation,
6371         Analyze_Subprogram_Instantiation): Turn off style checking while
6372         analyzing an instance. Whatever style checks that apply to the generic
6373         unit should apply, so it makes no sense to apply them in an instance.
6374         This was causing trouble when compiling an instance of a runtime
6375         unit that violates the -gnatyO switch.
6376         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6377         one of the two case statements, causing spurious errors.
6378
6379 2011-08-02  Robert Dewar  <dewar@adacore.com>
6380
6381         * uname.adb: Minor reformatting.
6382         * gnatcmd.adb: Minor reformatting.
6383         * exp_attr.adb: Minor reformatting.
6384
6385 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6386
6387         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6388         No_Dispatching_Calls, do not look for the Assign primitive, because
6389         predefined primitives are not created in this case.
6390
6391 2011-08-02  Bob Duff  <duff@adacore.com>
6392
6393         * stylesw.ads: Minor comment fixes.
6394
6395 2011-08-02  Robert Dewar  <dewar@adacore.com>
6396
6397         * freeze.adb (Add_To_Result): New procedure.
6398
6399 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6400
6401         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6402         time, if the specific run-time routines for handling streams of strings
6403         are not available, use the default mechanism.
6404
6405 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6406
6407         * s-regpat.ads: Fix typo.
6408
6409 2011-08-02  Vincent Celier  <celier@adacore.com>
6410
6411         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6412         not null, call it to create the in memory config project file without
6413         parsing an existing default config project file.
6414
6415 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6416
6417         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6418
6419 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6420
6421         * sem_elim.adb: an abstract subprogram does not need an eliminate
6422         pragma for its descendant to be eliminable.
6423
6424 2011-08-02  Ed Falis  <falis@adacore.com>
6425
6426         * init.c: revert to handling before previous checkin for VxWorks
6427         * s-intman-vxworks.adb: delete unnecessary declarations related to
6428         using Ada interrupt facilities for handling signals.
6429         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6430         * s-intman-vxworks.ads: Import __gnat_install_handler as
6431         Initialize_Interrupts.
6432         * s-taprop-vxworks.adb: Delete Signal_Mask.
6433         (Abort_Handler): change construction of mask to unblock exception
6434         signals.
6435
6436 2011-08-02  Jerome Guitton  <guitton@adacore.com>
6437
6438         * a-except-2005.adb (Raise_From_Signal_Handler): Call
6439         Debug_Raise_Exception before propagation starts.
6440
6441 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6442
6443         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6444         to Restriction_Check_Required.
6445         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6446         * sem_res.adb (Resolve_Call): Likewise.
6447         * sem_attr.adb (Check_Stream_Attribute): Likewise.
6448
6449 2011-08-02  Bob Duff  <duff@adacore.com>
6450
6451         * stylesw.ads: Update comment.
6452         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6453         * errout.ads: Remove obsolete comment.
6454
6455 2011-08-02  Javier Miranda  <miranda@adacore.com>
6456
6457         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6458         (Set_Is_Safe_To_Reevaluate): new procedure.
6459         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6460         assignment is allowed on safe-to-reevaluate variables.
6461         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6462         temporary created to remove side effects in expressions that use
6463         the secondary stack as safe-to-reevaluate.
6464         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6465         variables that are not true constants.
6466
6467 2011-08-02  Robert Dewar  <dewar@adacore.com>
6468
6469         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6470         sem_res.adb, sem_ch6.adb: Minor reformatting.
6471
6472 2011-08-02  Jerome Guitton  <guitton@adacore.com>
6473
6474         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6475
6476 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6477
6478         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6479         not set Overridden_Operation if subprogram is an initialization
6480         procedure.
6481
6482 2011-08-02  Yannick Moy  <moy@adacore.com>
6483
6484         * par-ch6.adb: Correct obsolete name in comments
6485         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6486         which takes two message arguments (existing function takes one), with
6487         second message used for continuation.
6488         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6489         block statements that originate from a source block statement, not
6490         generated block statements
6491         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6492         symmetry with procedure case
6493         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6494         function to issue an error in formal mode if a package specification
6495         contains more than one tagged type or type extension.
6496         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6497         parameters matching formals of tagged types are objects (or ancestor
6498         type conversions of objects), not general expressions. Issue an error
6499         on view conversions that are not involving ancestor conversion of an
6500         extended type.
6501         (Resolve_Type_Conversion): in formal mode, issue an error on the
6502         operand of an ancestor type conversion which is not an object
6503         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6504         procedure so that it works also for actuals of function calls
6505         (Is_Actual_Tagged_Parameter): new function which determines if its
6506         argument is an actual parameter of a formal of tagged type in a
6507         subprogram call
6508         (Is_SPARK_Object_Reference): new function which determines if the tree
6509         referenced by its argument represents an object in SPARK
6510
6511 2011-08-02  Robert Dewar  <dewar@adacore.com>
6512
6513         * sem_ch3.adb: Minor reformatting
6514         Minor comment addition
6515         Minor error msg text change
6516
6517 2011-08-02  Javier Miranda  <miranda@adacore.com>
6518
6519         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6520         function. Used to be more precise when we generate a variable plus one
6521         assignment to remove side effects in the evaluation of the Bound
6522         expressions.
6523         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6524         of the bound expression to force its re-analysis and thus expand the
6525         associated transient scope (if required). Code cleanup replacing the
6526         previous code that declared the constant entity by an invocation to
6527         routine Force_Evaluation which centralizes this work in the frontend.
6528
6529 2011-08-02  Robert Dewar  <dewar@adacore.com>
6530
6531         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6532         (Base_Type): Now uses improved Is_Base_Type function
6533         * einfo.ads (Base_Type): Inline this function
6534
6535 2011-08-02  Robert Dewar  <dewar@adacore.com>
6536
6537         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6538         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6539
6540 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6541
6542         * gcc-interface/Make-lang.in: Update dependencies.
6543         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6544         targets.
6545
6546 2011-08-02  Yannick Moy  <moy@adacore.com>
6547
6548         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6549         non-simple expression used in delta constraint
6550         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6551         index constraint which is not a subtype mark
6552         * par.adb: With and use Restrict
6553         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6554         mode on component type which is not a subtype mark and default
6555         expression on component
6556         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6557         of string which does not have a lower index bound equal to 1
6558         (Array_Type_Declaration): issue an error in formal mode on index or
6559         component type which is not a subtype mark, and on aliased keyword on
6560         component
6561         (Derived_Type_Declaration): issue an error in formal mode on interface,
6562         limited or abstract type
6563         (Record_Type_Declaration): issue an error in formal mode on interface
6564         (Record_Type_Definition): issue an error in formal mode on tagged types
6565         and type extensions not declared in the specification of a library unit
6566         package; on null non-tagged record; on variant part
6567
6568 2011-08-02  Vincent Celier  <celier@adacore.com>
6569
6570         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6571         not declared for qualified library project when Library_Name is not
6572         declared, but Library_Dir is.
6573
6574 2011-08-02  Robert Dewar  <dewar@adacore.com>
6575
6576         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6577         pragmas (affects aspects [Component_]Default_Value
6578         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6579         component type for the resolution
6580
6581 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6582
6583         * einfo.adb (Base_Type): Tune implementation for speed.
6584
6585 2011-08-02  Robert Dewar  <dewar@adacore.com>
6586
6587         * freeze.adb: Minor reformatting.
6588
6589 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6590
6591         * scos.ads: Update comments.
6592
6593 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6594
6595         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6596         base type, because the parent may be a subtype of a private type whose
6597         convention is established in a private part.
6598
6599 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6600
6601         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6602         statement in a block when the expansion of the return expression has
6603         created a finalization chain.
6604         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6605         with the parent node.
6606         Add N_Extended_Return_Statement to handle the case where a transient
6607         object declaration appears in the Return_Object_Declarations list of
6608         an extended return statement.
6609
6610 2011-08-02  Matthew Gingell  <gingell@adacore.com>
6611
6612         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6613         unused parameter 'name'.
6614
6615 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6616
6617         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6618         inherited operation, check whether its alias, which is the source
6619         operastion that it renames, has been marked eliminated.
6620
6621 2011-08-02  Javier Miranda  <miranda@adacore.com>
6622
6623         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6624         in-mode parameter whose type is an access type since it can be used to
6625         modify its designated object. Enforce code that handles as safe an
6626         access type that is not access-to-constant but it is the result of a
6627         previous removal of side-effects.
6628         (Remove_Side_Effects): Minor code reorganization of cases which require
6629         no action. Done to incorporate documentation on new cases uncovered
6630         working in this ticket: no action needed if this routine was invoked
6631         too early and the nodes are not yet decorated.
6632         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6633         to routine Remove_Side_Effects by calls to Force_Evaluation since they
6634         were issued with actuals that are implicitly provided by
6635         Force_Evaluation.
6636
6637 2011-08-02  Robert Dewar  <dewar@adacore.com>
6638
6639         * sem_ch3.adb, sem_res.adb: Minor reformatting.
6640
6641 2011-08-02  Yannick Moy  <moy@adacore.com>
6642
6643         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6644         to issue an error in formal mode on attribute not supported in this mode
6645         (Analyze_Attribute): issue errors on standard attributes not supported
6646         in formal mode.
6647         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6648         comment, and issue error in formal mode on modulus which is not a power
6649         of 2.
6650         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6651         range.
6652         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6653         subtype mark.
6654         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6655         operator on modular type (except 'not').
6656
6657 2011-08-02  Robert Dewar  <dewar@adacore.com>
6658
6659         * gnat_rm.texi: Minor reformatting.
6660
6661 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6662
6663         * s-osinte-linux.ads: Minor comment update and reformatting.
6664         * i-cexten.ads: Make this unit pure, as for its parent.
6665         Will allow its usage in more contexts if needed.
6666
6667 2011-08-02  Robert Dewar  <dewar@adacore.com>
6668
6669         * s-utf_32.ads: Minor comment fix.
6670
6671 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6672
6673         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6674         operation of a tagged synchronized type, handle the case where the
6675         controlling argument is overloaded.
6676
6677 2011-08-02  Yannick Moy  <moy@adacore.com>
6678
6679         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6680         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6681         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6682         SPARK mode and formal verification mode on processing SPARK restriction
6683         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6684         requiring consistency checking.
6685
6686 2011-08-02  Robert Dewar  <dewar@adacore.com>
6687
6688         * sem_res.adb: Minor reformatting.
6689
6690 2011-08-02  Robert Dewar  <dewar@adacore.com>
6691
6692         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6693         a-cforse.ads: Remove unneeded with of Ada.Containers
6694         Remove commented out pragma Inline's
6695         Move specifications of new subprograms to the actual specs
6696
6697 2011-08-02  Yannick Moy  <moy@adacore.com>
6698
6699         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6700         a-cforse.ads: Update comments.
6701
6702 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6703
6704         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6705
6706 2011-08-02  Robert Dewar  <dewar@adacore.com>
6707
6708         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6709         a-cforse.ads, a-cofove.ads: Minor reformatting.
6710
6711 2011-08-02  Claire Dross  <dross@adacore.com>
6712
6713         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6714         a-cofove.ads: Add comments.
6715
6716 2011-08-02  Yannick Moy  <moy@adacore.com>
6717
6718         * gnat_rm.texi: Document formal containers.
6719
6720 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6721
6722         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6723         are empty sections.
6724
6725 2011-08-02  Robert Dewar  <dewar@adacore.com>
6726
6727         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6728         reformatting.
6729
6730 2011-08-02  Robert Dewar  <dewar@adacore.com>
6731
6732         * aspects.adb: New aspects Default_Value and Default_Component_Value
6733         New format of Aspect_Names table checks for omitted entries
6734         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6735         handling of boolean aspects for derived types.
6736         New aspects Default_Value and Default_Component_Value
6737         New format of Aspect_Names table checks for omitted entries
6738         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6739         (Has_Default_Value): New flag
6740         (Has_Default_Component_Value): New flag
6741         (Has_Default_Value): New flag
6742         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6743         table.
6744         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6745         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6746         Default_Value and Default_Component_Value
6747         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6748         New aspects Default_Value and Default_Component_Value
6749         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6750         * sprint.adb: Print N_Aspect_Specification node when called from gdb
6751
6752 2011-08-02  Vincent Celier  <celier@adacore.com>
6753
6754         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6755         inherit library kind.
6756
6757 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6758
6759         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6760         Minor reformatting.
6761
6762 2011-08-02  Robert Dewar  <dewar@adacore.com>
6763
6764         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6765
6766 2011-08-02  Yannick Moy  <moy@adacore.com>
6767
6768         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6769
6770 2011-08-02  Robert Dewar  <dewar@adacore.com>
6771
6772         * impunit.adb: Add comment.
6773
6774 2011-08-02  Yannick Moy  <moy@adacore.com>
6775
6776         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6777         qualification of aggregates in formal mode
6778         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6779         another aggregate
6780         (Resolve_Aggregate): complete the test that an aggregate is adequately
6781         qualified in formal mode
6782
6783 2011-08-02  Pascal Obry  <obry@adacore.com>
6784
6785         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6786         * mlib-prj.adb: Supress warning when compiling binder generated file.
6787         (Build_Library): Supress all warnings when compiling the binder
6788         generated file.
6789
6790 2011-08-02  Yannick Moy  <moy@adacore.com>
6791
6792         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6793         from here...
6794         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6795         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6796         Add with/use clauses to make Check_Formal_Restriction visible
6797
6798 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6799
6800         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6801         in-parameters when type of the generic formal is private in the generic
6802         spec and non-private in the body.
6803
6804 2011-08-02  Claire Dross  <dross@adacore.com>
6805
6806         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6807         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6808         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6809         * impunit.adb, Makefile.rtl: Take new files into account.
6810
6811 2011-08-02  Robert Dewar  <dewar@adacore.com>
6812
6813         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6814         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6815
6816 2011-08-02  Yannick Moy  <moy@adacore.com>
6817
6818         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6819         formal mode
6820         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6821         matching static array bounds, taking into account the special case of
6822         string literals
6823         * sem_ch3.adb: Typo in comment.
6824
6825 2011-08-02  Yannick Moy  <moy@adacore.com>
6826
6827         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6828         which issues an error in formal mode if its argument node is originally
6829         from source
6830         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6831         has a discriminant specification so that it does not include the case
6832         of derived types
6833         (Derived_Type_Declaration): move here the test that a derived type has a
6834         discriminant specification
6835         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6836         first element of a component association before accessing its choices
6837         (presence of component association is not enough)
6838         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6839         declaration is a library item before accessing the next element in a
6840         list, as library items are not member of lists
6841         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6842         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6843         Check_Formal_Restriction whenever possible.
6844
6845 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6846
6847         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6848         reference when needed.
6849
6850 2011-08-02  Bob Duff  <duff@adacore.com>
6851
6852         * gnat_ugn.texi: Fix typo.
6853
6854 2011-08-02  Vincent Celier  <celier@adacore.com>
6855
6856         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6857         archive file name. Do not use the full path name of archives for Open
6858         VMS.
6859
6860 2011-08-02  Robert Dewar  <dewar@adacore.com>
6861
6862         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6863         Analyze_Aspect_Specifications
6864         * sem_ch13.adb
6865         (Analyze_Aspect_Specifications): New handling for boolean aspects
6866         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6867         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6868         sequence for Analyze_Aspect_Specifications
6869         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6870         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6871
6872 2011-08-02  Robert Dewar  <dewar@adacore.com>
6873
6874         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6875         aspects, since these no longer exist.
6876
6877 2011-08-02  Robert Dewar  <dewar@adacore.com>
6878
6879         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6880         semicolon, do not try to see if there are aspects following it.
6881         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6882         aspect spec.
6883
6884 2011-08-02  Robert Dewar  <dewar@adacore.com>
6885
6886         * sem_ch8.adb, aspects.ads: Minor reformatting.
6887
6888 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6889
6890         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6891         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6892         extracted from...
6893         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
6894
6895 2011-08-02  Yannick Moy  <moy@adacore.com>
6896
6897         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6898         mode on subprogram declaration outside of package specification, unless
6899         it is followed by a pragma Import
6900         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6901         Access_Type_Declaration): issue error in formal mode on access type
6902         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6903         incomplete type
6904         (Analyze_Object_Declaration): issue error in formal mode on object
6905         declaration which does not respect SPARK restrictions
6906         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6907         declaration which does not respect SPARK restrictions
6908         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6909         error in formal mode on digits or delta constraint
6910         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6911         decimal fixed point type
6912         (Derived_Type_Declaration): issue error in formal mode on derived type
6913         other than type extensions of tagged record types
6914         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6915         with check on access definition
6916         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6917         mode on protected definition.
6918         (Analyze_Task_Definition): issue error in formal mode on task definition
6919
6920 2011-08-02  Robert Dewar  <dewar@adacore.com>
6921
6922         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6923
6924 2011-08-02  Javier Miranda  <miranda@adacore.com>
6925
6926         * sem_ch6.adb (Can_Override_Operator): New function.
6927         (Verify_Overriding_Indicator): Add missing code to check overriding
6928         indicator in operators. Fixes regression.
6929         (Check_Overriding_Indicator): Minor reformating after replacing the
6930         code that evaluates if the subprogram can override an operator by
6931         invocations to the above new function.
6932         * einfo.adb
6933         (Write_Field26_Name): Add missing code to ensure that, following
6934         the documentation in einfo.ads, this field is not shown as attribute
6935         "Static_Initialization" on non-dispatching functions.
6936
6937 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6938
6939         * sem_res.adb (Resolve_Call): A call to
6940         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6941         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6942         i.e., when the second parameter is of type Time_Span.
6943
6944 2011-08-02  Vincent Celier  <celier@adacore.com>
6945
6946         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6947         with an archive instead of -L<library dir> -l<library name>.
6948
6949 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6950
6951         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6952         mark the base types In_Use in addition to making the operations
6953         use_visible.
6954
6955 2011-08-02  Ed Falis  <falis@adacore.com>
6956
6957         * init.c: add and setup __gnat_signal_mask for the exception signals
6958         * s-inmaop-vxworks.adb: new file.
6959         * s-intman-vxworks.adb: remove unnecessary initializations and
6960         simplify remaining
6961         * s-intman-vxworks.ads: remove unnecessary variable
6962         * s-taprop-vxworks.adb: simplify signal initialization
6963
6964 2011-08-02  Robert Dewar  <dewar@adacore.com>
6965
6966         * sem_ch8.adb: Minor code reorganization, comment updates.
6967
6968 2011-08-02  Robert Dewar  <dewar@adacore.com>
6969
6970         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6971         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6972         here from Sem_Res.
6973         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6974         (Matching_Static_Array_Bounds): Moved here from Sem_Res
6975
6976 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6977
6978         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6979         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6980         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6981         use_type_clauses, to handle more efficiently use_type and use_all_type
6982         constructs.
6983         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6984         Ada2012 Use_All_Type clause.
6985         (Use_Class_Wide_Operations): new procedure.
6986
6987 2011-08-02  Robert Dewar  <dewar@adacore.com>
6988
6989         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6990         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6991         expression to expression function.
6992
6993 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6994
6995         * sem_ch4.adb: transform simple Ada2012 membership into equality only
6996         if types are compatible.
6997
6998 2011-08-02  Yannick Moy  <moy@adacore.com>
6999
7000         * sem_res.adb (Matching_Static_Array_Bounds): new function which
7001         returns True if its argument array types have same dimension and same
7002         static bounds at each index.
7003         (Resolve_Actuals): issue an error in formal mode on actuals passed as
7004         OUT or IN OUT paramaters which are not view conversions in SPARK.
7005         (Resolve_Arithmetic_Op): issue an error in formal mode on
7006         multiplication or division with operands of fixed point types which are
7007         not qualified or explicitly converted.
7008         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7009         Boolean or array type (except String) operands.
7010         (Resolve_Equality_Op): issue an error in formal mode on equality
7011         operators for array types other than String with non-matching static
7012         bounds.
7013         (Resolve_Logical_Op): issue an error in formal mode on logical operators
7014         for array types with non-matching static bounds. Factorize the code in
7015         Matching_Static_Array_Bounds.
7016         (Resolve_Qualified_Expression): issue an error in formal mode on
7017         qualified expressions for array types with non-matching static bounds.
7018         (Resolve_Type_Conversion): issue an error in formal mode on type
7019         conversion for array types with non-matching static bounds
7020
7021 2011-08-02  Robert Dewar  <dewar@adacore.com>
7022
7023         * par-ch10.adb: Minor code reorganization (use Nkind_In).
7024
7025 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7026
7027         * par-ch9.adb: save location of entry for proper error message.
7028
7029 2011-08-02  Javier Miranda  <miranda@adacore.com>
7030
7031         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7032         (Use_Full_View) which permits this routine to climb through the
7033         ancestors using the full-view of private parents.
7034         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7035         Use_Full_View to true in calls to Is_Ancestor.
7036         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7037         true in call to Is_Ancestor.
7038         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7039         Use_Full_View to true in call to Is_Ancestor.
7040         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7041         call to Is_Ancestor.
7042         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7043         Use_Full_View to true in calls to Is_Ancestor.
7044         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7045         Make_Select_Specific_Data_Table, Register_Primitive,
7046         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7047         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7048         to true in call to Is_Ancestor.
7049         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7050         Use_Full_View to true in calls to Is_Ancestor.
7051         * exp_cg.adb
7052         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7053         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7054
7055 2011-08-02  Robert Dewar  <dewar@adacore.com>
7056
7057         * gnat_rm.texi: Minor reformatting.
7058         * sem_prag.adb: Minor reformatting.
7059
7060 2011-08-02  Tristan Gingold  <gingold@adacore.com>
7061
7062         * vms_data.ads: Add VMS qualifier for -gnateP.
7063
7064 2011-08-02  Robert Dewar  <dewar@adacore.com>
7065
7066         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7067         * par-ch7.adb (P_Package): Proper placement of aspects for package
7068         decl/instantiation.
7069         * par-endh.adb (Check_End): Ad Is_Sloc parameter
7070         (End_Statements): Add Is_Sloc parameterr
7071         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
7072         (Check_End): Ad Is_Sloc parameter
7073         (End_Statements): Add Is_Sloc parameterr
7074
7075 2011-08-02  Vincent Celier  <celier@adacore.com>
7076
7077         * ug_words: Add VMS qualifier equivalent to -gnateP:
7078         /SYMBOL_PREPROCESSING.
7079
7080 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
7081
7082         * gnat-style.texi: For hexadecimal numeric literals the typical
7083         grouping of digits is 4 to represent 2 bytes.
7084         A procedure spec which is split into several lines is indented two
7085         characters.
7086
7087 2011-08-02  Yannick Moy  <moy@adacore.com>
7088
7089         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
7090         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
7091         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
7092         properly qualified
7093         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
7094         choice in array aggregate
7095         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
7096         mark as ancestor
7097         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
7098         positional and named aggregate for record, or others in record
7099         aggregate, or multiple choice in record aggregate
7100         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
7101         array operands to logical operations AND, OR and XOR do not have the
7102         same static lower and higher bounds
7103         * sem_ch5.adb, sinfo.ads: Correct typos in comments
7104
7105 2011-08-01  Robert Dewar  <dewar@adacore.com>
7106
7107         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
7108         Replaces Last_Source_Node_In_Sequence.
7109         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
7110         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
7111         parens and blank in string (this was inconsistently implemented).
7112         * errout.ads
7113         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
7114         blank in string (this was inconsistently implemented).
7115         * gnat1drv.adb
7116         (Set_Global_Switches): Set formal mode switches appropriately
7117         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
7118         * par-prag.adb
7119         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
7120         call Set_Error_Msg_Lang to set "spark" as language name.
7121         * par.adb: Remove unnecessary call to set formal language for errout
7122         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
7123         appropriately and call Set_Error_Msg_Lang to set "spark" as language
7124         name.
7125         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
7126         calls to it, moved after resolution so that types are known
7127         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
7128         result of concatenation is not of type String
7129         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
7130         concatenation is not properly restricted
7131         * gnat_rm.texi: Add doc on pragma Spark_95.
7132         * gcc-interface/Makefile.in: Remove obsolete target pairs for
7133         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
7134         * gcc-interface/Make-lang.in: Update dependencies.
7135
7136 2011-08-01  Javier Miranda  <miranda@adacore.com>
7137
7138         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
7139         condition that detects if the overridden operation must replace an
7140         existing entity.
7141
7142 2011-08-01  Javier Miranda  <miranda@adacore.com>
7143
7144         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
7145         code declarations inserted by Insert_Actions in each alternative of the
7146         N_Case_Expression node.
7147
7148 2011-08-01  Robert Dewar  <dewar@adacore.com>
7149
7150         * sem_ch6.adb: Minor code reorganization.
7151         * sem_util.adb: Minor reformatting.
7152
7153 2011-08-01  Pascal Obry  <obry@adacore.com>
7154
7155         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
7156         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
7157
7158 2011-08-01  Yannick Moy  <moy@adacore.com>
7159
7160         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7161         literal or operator symbol which is prefixed
7162         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7163         mode on access attributes.
7164         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7165         that concatenation operands are properly restricted in formal mode
7166         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7167         Analyze_Concatenation_Operand. Issue an error in formal mode if the
7168         result of the concatenation has a type different from String.
7169         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7170         Analyze_Quantified_Expression, Analyze_Slice,
7171         Analyze_Null): issue an error in formal mode on unsupported constructs
7172         * sem_ch5.adb
7173         (Analyze_Block_Statement): only issue error on source block statement
7174         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7175         function which returns the last node in a list of nodes for which
7176         Comes_From_Source returns True, if any
7177         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7178         Last_Source_Node_In_Sequence
7179         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7180         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7181         mode on unsupported constructs
7182         * sem_ch9.adb Do not return after issuing error in formal mode, as the
7183         rest of the actions may be needed later on since the error is marked as
7184         not serious.
7185         * sinfo.ads: Typos in comments.
7186
7187 2011-08-01  Pascal Obry  <obry@adacore.com>
7188
7189         * projects.texi: Minor editing.
7190
7191 2011-08-01  Yannick Moy  <moy@adacore.com>
7192
7193         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7194         insertion character ~~
7195         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7196         (Set_Error_Msg_Lang): new procedure which fixes the language for use
7197         with insertion character ~~
7198         (Set_Msg_Text): treat insertion character ~~
7199         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7200         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7201         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7202         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7203         errors related to the formal language restriction not serious
7204         (insertion character |).
7205         * par.adb (Par): set formal language for error messages if needed
7206         * sem_ch6.adb (Check_Missing_Return): take into account possible
7207         generated statements at the end of the function
7208         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7209         enumeration value to define a new pragma SPARK_95
7210         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7211         SPARK_Version): new type and variables to store the SPARK version
7212         (none by default).
7213         (SPARK_Mode): return True when SPARK_Version is set
7214         * par-prag.adb: Correct indentation
7215         (Prag): take Pragma_SPARK_95 into account
7216         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7217         into account.
7218
7219 2011-08-01  Robert Dewar  <dewar@adacore.com>
7220
7221         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7222         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7223         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7224
7225 2011-08-01  Pascal Obry  <obry@adacore.com>
7226
7227         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7228         Target_Name to Get_Path call.
7229         (Parse_Single_Project): Likewise.
7230         (Post_Parse_Context_Clause): Likewise.
7231         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7232         Call Initialise_Project_Path with the proper Target_Name.
7233         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7234         search path.
7235         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7236         with the proper Target_Name.
7237         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7238         Part.Parse routine.
7239         (Parse_Project_And_Apply_Config): Likewise.
7240         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7241         This is fine as this part of the code is supporting only native
7242         compilation.
7243         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7244         is fine as this part of the code is supporting only native compilation.
7245
7246 2011-08-01  Yannick Moy  <moy@adacore.com>
7247
7248         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7249         of homonym, unless the homonym is one of the cases allowed in SPARK
7250         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7251         package declaration occurring after a body.
7252
7253 2011-08-01  Robert Dewar  <dewar@adacore.com>
7254
7255         * checks.adb, exp_ch4.adb: Minor reformatting.
7256
7257 2011-08-01  Javier Miranda  <miranda@adacore.com>
7258
7259         * einfo.ads (Access_Disp_Table): Fix documentation.
7260         (Dispatch_Table_Wrappers): Fix documentation.
7261
7262 2011-08-01  Pascal Obry  <obry@adacore.com>
7263
7264         * prj-env.adb, prj-env.ads: Minor reformatting.
7265
7266 2011-08-01  Yannick Moy  <moy@adacore.com>
7267
7268         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7269         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7270         procedures out of these packages.
7271         * errout.ads, errout.adb
7272         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7273         procedures in of this package
7274         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7275         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7276         on misplaced later vs initial declarations, like in Ada 83
7277         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7278         formal mode on attribute of private type whose full type declaration
7279         is not visible
7280         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7281         package declaration inside a package specification
7282         (Analyze_Full_Type_Declaration): issue error in formal mode on
7283         controlled type or discriminant type
7284         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7285         user-defined operator means that it should come from the source
7286         (New_Overloaded_Entity): issue error in formal mode on overloaded
7287         entity.
7288         * sem_ch6.ads, sem_ch13.ads: typos in comments.
7289
7290 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7291
7292         * atree.adb: Minor reformatting.
7293         * checks.adb: Minor reformatting.
7294
7295 2011-08-01  Vincent Celier  <celier@adacore.com>
7296
7297         * s-parame-vms-ia64.ads: Fix typo in comment
7298         Minor reformatting
7299         * s-parame-vms-restrict.ads: Removed, unused.
7300
7301 2011-08-01  Javier Miranda  <miranda@adacore.com>
7302
7303         * exp_ch3.adb
7304         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7305         * sem_ch3.adb
7306         (Constrain_Index): Remove side effects in the evaluation of the bounds.
7307         * sem_ch3.ads, sem_ch3.adb
7308         (Is_Constant_Bound): New extended version of the subprogram that was
7309         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7310         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7311         * sem_aux.ads (Constant_Value): Fix typo in comment.
7312         * checks.adb (Generate_Index_Checks): New implementation which, for
7313         array objects with constant bounds, generates the runtime check
7314         referencing the bounds of the array type. For other cases this routine
7315         provides its previous behavior obtaining such values from the array
7316         object.
7317         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7318         parent type.
7319         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7320         we cannot have semantic interpretations of the new node.
7321
7322 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7323
7324         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7325         expressions.
7326
7327 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7328
7329         * sem_ch8.adb: Minor code editing.
7330         * s-vxwext.adb: Remove trailing space.
7331         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7332         consistency with other files.
7333
7334 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7335
7336         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7337
7338 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7339
7340         * par-ch10.adb: reject parameterized expressions as compilation unit.
7341         * sem_ch4.adb: handle properly conditional expression with overloaded
7342         then_clause and no else_clause.
7343
7344 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7345
7346         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7347         like done by System.Aux_DEC.
7348         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7349
7350 2011-08-01  Yannick Moy  <moy@adacore.com>
7351
7352         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7353         missing label at end of declaration (subprogram or package)
7354         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7355         of positional and named parameter association
7356         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7357         Error_Msg_SP which adds a prefix to the error message giving the name
7358         of the formal language analyzed
7359         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7360         access result type in subprogram, unconstrained array as result type,.
7361         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7362         procedure
7363         * sem_ch8.adb: Code clean up.
7364
7365 2011-08-01  Javier Miranda  <miranda@adacore.com>
7366
7367         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7368         * einfo.ads (Access_Disp_Table): Fix documentation.
7369         (Dispatch_Table_Wrappers): Fix documentation.
7370         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7371         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7372         to enforce the documentation of this attribute.
7373         (Set_Is_Interface): Cleanup the assertion.
7374         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7375         the Underlying_Type entity before reading attribute Access_Disp_Table.
7376         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7377         Locate the Underlying_Type before reading attribute Access_Disp_Table.
7378         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7379         the Underlying_Type entity before reading attribute Access_Disp_Table.
7380         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7381         Locate the Underlying_Type entity before reading attribute
7382         Access_Disp_Table.
7383
7384 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7385
7386         * s-poosiz.ads: Additional overriding indicators.
7387
7388 2011-08-01  Yannick Moy  <moy@adacore.com>
7389
7390         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7391         formal mode.
7392         (Analyze_Iteration_Scheme): issue error in formal mode when loop
7393         parameter specification does not include a subtype mark.
7394         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7395         formal mode on abstract subprogram.
7396         (Analyze_Subprogram_Specification): issue error in formal mode on
7397         user-defined operator.
7398         (Process_Formals): issue error in formal mode on access parameter and
7399         default expression.
7400         * sem_ch9.adb (Analyze_Abort_Statement,
7401         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7402         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7403         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7404         Analyze_Requeue, Analyze_Selective_Accept,
7405         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7406         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7407         issue error in formal mode on user-defined raise statement.
7408
7409 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7410
7411         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7412         declaration being hidden when overriding an implicit inherited
7413         subprogram.
7414         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7415         (-gnats), do not complain about a source file that contains only a
7416         pragma No_Body.
7417
7418 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7419
7420         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7421         variable if already set.
7422
7423 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7424
7425         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7426         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7427         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7428         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7429         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7430         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7431         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7432         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7433         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7434         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7435         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7436         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7437         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7438         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7439         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7440         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7441         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7442         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7443         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7444         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7445         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7446         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7447         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7448         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7449         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7450         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7451         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7452         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7453         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7454         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7455         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7456         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7457         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7458         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7459         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7460         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7461         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7462         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7463         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7464         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7465         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7466         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7467         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7468         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7469         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7470         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7471         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7472         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7473         s-osinte-mingw.ads: Update to GPLv3 run-time license.
7474         Use GNAT instead of GNARL.
7475
7476 2011-08-01  Bob Duff  <duff@adacore.com>
7477
7478         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7479         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7480         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7481         reformatting.
7482
7483 2011-08-01  Yannick Moy  <moy@adacore.com>
7484
7485         * debug.adb (d.D) reverve flag for the SPARK mode
7486         (d.E) reverve flag for SPARK generation mode
7487         (d.F) reverve flag for Why generation mode
7488         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7489         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
7490         functions which return True when the corresponding modes are set
7491         (Formal_Language): return "spark" or "alfa" when in formal verification
7492         mode.
7493         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7494         Error_Msg to prefix the error message with a tag giving the formal
7495         language
7496         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7497         message with a tag giving the formal language
7498         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7499         block statement
7500         (Analyze_Case_Statement): issue error in formal mode on case statement
7501         with a single "others" case alternative
7502         (Analyze_Exit_Statement): issue errors in formal mode on exit
7503         statements which do not respect SPARK restrictions
7504         (Analyze_Goto_Statement): issue error in formal mode on goto statement
7505         (Check_Unreachable_Code): always issue an error (not a warning) in
7506         formal mode on unreachable code (concerns both code after an infinite
7507         loop and after an unconditional jump, both not allowed in SPARK)
7508         * sem_ch6.adb (Analyze_Return_Statement): add call to
7509         Set_Return_Present for a procedure containing a return statement
7510         (already done for functions in Analyze_Function_Return)
7511         (Analyze_Function_Return): issue error in formal mode on extended
7512         return or if return is not last statement in function
7513         (Check_Missing_Return): issue error in formal mode if function does
7514         not end with return or if procedure contains a return
7515         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7516         function to detect if there is an inner scope of its parameter S which
7517         is a loop.
7518
7519 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7520
7521         * sem_ch6.ads: Minor reformatting.
7522
7523 2011-08-01  Javier Miranda  <miranda@adacore.com>
7524
7525         * sem_util.adb (Abstract_Interface_List): Complete condition when
7526         processing private type declarations to avoid reading unavailable
7527         attribute.
7528         (Is_Synchronized_Tagged_Type): Complete condition when processing
7529         private extension declaration nodes to avoid reading unavailable
7530         attribute.
7531
7532 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7533
7534         * sem_ch3.adb: Minor reformatting.
7535
7536 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7537
7538         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7539         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7540         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7541         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7542         for VMS, instead parametrize the common implementation with
7543         System.Parameters declarations.
7544
7545 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
7546
7547         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7548
7549 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7550
7551         * seh_init.c: Fix SEH handler installation on win64.
7552
7553 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7554
7555         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7556         double analysis of an anonymous access to subprogram, because it can
7557         lead to improper sharing of profiles and a back-end crash.
7558
7559 2011-08-01  Robert Dewar  <dewar@adacore.com>
7560
7561         * make.adb, sem_ch4.adb: Minor reformatting.
7562         * gcc-interface/Make-lang.in: Update dependencies.
7563         * sem_util.adb, exp_ch5.adb: Minor reformatting.
7564
7565 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7566
7567         * gnat_rm.texi: Fix definition of Long_Integer.
7568
7569 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7570
7571         * exp_aggr.adb: check limit size of static aggregate unconditionally,
7572         to prevent storage exhaustion.
7573         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7574         finalized is a function body, insert the cleanup code before the final
7575         return statement, to prevent spurious warnings.
7576         * s-pooglo.ads: add overriding indicator.
7577
7578 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7579
7580         * sem_ch4.adb (Operator_Check): improve error message when both a
7581         with_clause and a use_clause are needed to make operator usage legal.
7582         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7583         determine whether a compilation unit is visible within an other,
7584         either through a with_clause in the current unit, or a with_clause in
7585         its library unit or one one of its parents.
7586
7587 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7588
7589         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7590         over an arbitrary expression of an array or container type.
7591         * lib-xref.adb: clarify comment.
7592
7593 2011-08-01  Bob Duff  <duff@adacore.com>
7594
7595         * einfo.ads: Minor reformatting.
7596         * debug.adb: Minor comment improvement.
7597
7598 2011-08-01  Javier Miranda  <miranda@adacore.com>
7599
7600         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7601         consider hidden subprograms as valid candidates.
7602
7603 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7604
7605         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7606
7607 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
7608
7609         * gnat_ugn.texi: Fix typo.
7610
7611 2011-08-01  Robert Dewar  <dewar@adacore.com>
7612
7613         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7614         lib-xref.adb: Minor reformatting
7615
7616 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7617
7618         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7619         when to generate a call to Move_Final_List.
7620         (Has_Controlled_Parts): Remove this function.
7621
7622 2011-08-01  Geert Bosch  <bosch@adacore.com>
7623
7624         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7625         "," in choice list.
7626
7627 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7628
7629         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7630         explicit raise of a predefined exception as Comes_From_Source if the
7631         original N_Raise_Statement comes from source.
7632
7633 2011-08-01  Robert Dewar  <dewar@adacore.com>
7634
7635         * sinfo.ads: Add comment.
7636         * sem_ch6.adb: Minor reformatting.
7637
7638 2011-08-01  Robert Dewar  <dewar@adacore.com>
7639
7640         * freeze.adb (Freeze_Entity): Refine check for bad component size
7641         clause to avoid rejecting confirming clause when atomic/aliased present.
7642
7643 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7644
7645         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7646         better determine whether an entity reference is a write.
7647         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7648         subcomponent.
7649         * lib-xref.adb (Output_References): Do no suppress a read reference at
7650         the same location as an immediately preceeding modify-reference, to
7651         handle properly in-out actuals.
7652
7653 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7654
7655         * env.c (__gnat_setenv) [VMS]: Refine previous change.
7656
7657 2011-08-01  Quentin Ochem  <ochem@adacore.com>
7658
7659         * i-cstrin.adb (New_String): Changed implementation, now uses only the
7660         heap to compute the result.
7661
7662 2011-08-01  Robert Dewar  <dewar@adacore.com>
7663
7664         * atree.ads: Minor reformatting.
7665
7666 2011-08-01  Emmanuel Briot  <briot@adacore.com>
7667
7668         * g-expect.adb (Get_Command_Output): Fix memory leak.
7669
7670 2011-08-01  Geert Bosch  <bosch@adacore.com>
7671
7672         * cstand.adb (P_Float_Type): New procedure to print the definition of
7673         predefined fpt types.
7674         (P_Mixed_Name): New procedure to print a name using mixed case
7675         (Print_Standard): Use P_Float_Type for printing floating point types
7676         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7677         precision IEEE float.
7678
7679 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7680
7681         * sem_ch3.adb: Minor reformatting.
7682
7683 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7684
7685         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7686         the completion of a generic function, insert the new body rather than
7687         rewriting the original.
7688
7689 2011-08-01  Yannick Moy  <moy@adacore.com>
7690
7691         * sinfo.ads, errout.ads: Typos in comments.
7692
7693 2011-08-01  Robert Dewar  <dewar@adacore.com>
7694
7695         * par-endh.adb: Minor reformatting.
7696
7697 2011-08-01  Robert Dewar  <dewar@adacore.com>
7698
7699         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7700         (Pre_Post_Aspects): New subtype.
7701         * par-ch12.adb (P_Generic): New syntax for aspects in packages
7702         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7703         * par-ch7.adb (P_Package): Remove Decl parameter
7704         (P_Package): Handle new syntax for aspects (before IS)
7705         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7706         new aspect syntax
7707         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7708         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7709         (P_Package): Remove Decl parameter
7710         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7711         aspects
7712         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7713         specs
7714         * sem_util.ads, sem_util.adb (Static_Boolean): New function
7715         * sinfo.ads: Document new syntax for aspects in packages etc.
7716         * sprint.adb: Handle new syntax of aspects before IS in package
7717
7718 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7719
7720         * atree.ads: Minor reformatting.
7721         * sem_prag.adb: Minor reformatting.
7722
7723 2011-08-01  Robert Dewar  <dewar@adacore.com>
7724
7725         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7726         case expr alternative.
7727
7728 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7729
7730         * sem_ch12.adb: Fix typo.
7731
7732 2011-08-01  Geert Bosch  <bosch@adacore.com>
7733
7734         * sem_prag.adb (Check_No_Link_Name): New procedure.
7735         (Process_Import_Or_Interface): Use Check_No_Link_Name.
7736         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7737         instead of Standard_Long_Long_Float_Size global. Preparation for
7738         eventual removal of per type constants.
7739         * exp_util.ads (Get_Stream_Size): New function returning the stream
7740         size value of subtype E.
7741         * exp_util.adb (Get_Stream_Size): Implement new function.
7742         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7743         function.
7744         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7745         * einfo.adb:
7746         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7747
7748 2011-08-01  Geert Bosch  <bosch@adacore.com>
7749
7750         * cstand.adb: Fix comments.
7751         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7752         count of arguments.
7753
7754 2011-08-01  Robert Dewar  <dewar@adacore.com>
7755
7756         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7757
7758 2011-08-01  Geert Bosch  <bosch@adacore.com>
7759
7760         * atree.ads: Fix comment.
7761
7762 2011-08-01  Robert Dewar  <dewar@adacore.com>
7763
7764         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7765         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7766         * par.adb: Add with for Namet.Sp.
7767         * par-tchk.adb: Minor reformatting.
7768
7769 2011-08-01  Vincent Celier  <celier@adacore.com>
7770
7771         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7772         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7773         of the init procedure of a SAL.
7774         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7775         New procedure.
7776
7777 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7778
7779         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7780         reformatting.
7781
7782 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7783
7784         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7785
7786 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7787
7788         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7789         conformant with its spec (return True only for types that have
7790         an overriding Initialize primitive operation that prevents them from
7791         having preelaborable initialization).
7792         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7793         initialization for controlled types in Ada 2005 or later mode.
7794
7795 2011-08-01  Robert Dewar  <dewar@adacore.com>
7796
7797         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7798         Postcondition.
7799         (Same_Aspect): New function.
7800         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7801         Type_Invariant, Precondition, Postcondition.
7802         * snames.ads-tmpl: Add Name_Type_Invariant.
7803
7804 2011-08-01  Robert Dewar  <dewar@adacore.com>
7805
7806         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7807         here.
7808         (Freeze_All_Ent): Fix error in handling inherited aspects.
7809         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7810         already analyzed, but don't skip entire processing of a declaration,
7811         that's wrong in some cases of declarations being rewritten.
7812         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7813         Don't delay for integer, string literals
7814         Treat predicates in usual manner for delay, remove special case code,
7815         not needed.
7816         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7817         (Build_Predicate_Function): Update saved expression in aspect
7818         (Build_Invariant_Procedure): Update saved expression in aspect
7819         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7820         of replacement of discriminant references if the reference is simple.
7821
7822 2011-08-01  Robert Dewar  <dewar@adacore.com>
7823
7824         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7825         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7826         Static_Predicate and Dynamic_Predicate.
7827         (Build_Predicate_Function): Add processing for Static_Predicate
7828         and Dynamic_Predicate.
7829         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7830         (From_Static_Predicate): New flag
7831         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7832
7833 2011-08-01  Robert Dewar  <dewar@adacore.com>
7834
7835         * usage.adb: Documentation cleanup for Ada version modes in usage.
7836         * expander.adb: Minor reformatting.
7837
7838 2011-08-01  Robert Dewar  <dewar@adacore.com>
7839
7840         * atree.ads: Minor comment fix.
7841         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7842         a-witeio.ads, sem_prag.adb: Minor reformatting.
7843
7844 2011-08-01  Doug Rupp  <rupp@adacore.com>
7845
7846         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7847         pointers. Use descrip.h header file for convenience. Add some
7848         comments.
7849
7850 2011-08-01  Robert Dewar  <dewar@adacore.com>
7851
7852         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7853         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7854         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7855         New procedure.
7856         (Check_Aspect_At_End_Of_Declarations): New procedure
7857         (Analye_Aspect_Specification): Minor changes for above procedures
7858         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7859         specification node as well.
7860
7861 2011-08-01  Pascal Obry  <obry@adacore.com>
7862
7863         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7864         Windows files. Use GetFilesAttributes() in this case to check for file
7865         existence instead of returning with an error code.
7866
7867 2011-08-01  Vincent Celier  <celier@adacore.com>
7868
7869         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7870         High is above Source length.
7871
7872 2011-08-01  Robert Dewar  <dewar@adacore.com>
7873
7874         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7875
7876 2011-08-01  Robert Dewar  <dewar@adacore.com>
7877
7878         * aspects.ads (Boolean_Aspects): New subtype.
7879         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7880         for derived types in cases where the parent type and derived type have
7881         aspects.
7882         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7883         with aspects when parent type also has aspects.
7884         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7885         boolean expression at this point).
7886         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7887         accordance with final decision on the Ada 2012 feature.
7888         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7889
7890 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7891
7892         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7893
7894 2011-08-01  Pascal Obry  <obry@adacore.com>
7895
7896         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7897         Fix Replace_Slice when High is above current string size.
7898         (Replace_Slice): Fix DL computation when High is above current
7899         string length.
7900
7901 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7902
7903         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7904
7905 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7906
7907         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7908         of node.
7909
7910 2011-08-01  Pascal Obry  <obry@adacore.com>
7911
7912         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7913         reformatting.
7914
7915 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7916
7917         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7918         access to protected subprograms in generic bodies.
7919         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7920         protected type, indicate that the convention of the subprogram is
7921         Convention_Protected, because it may be used in subsequent declarations
7922         within the protected declaration.
7923
7924 2011-08-01  Vincent Celier  <celier@adacore.com>
7925
7926         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7927         and "final" procedures when the name of the library is "ada", to avoid
7928         duplicate symbols "adainit" and "adafinal" in executables.
7929
7930 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7931
7932         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7933         quantified expression that appears within a postcondition and uses the
7934         Ada2012 'Result attribute.
7935
7936 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7937
7938         * init.c (__gnat_error_handler): Cast reason to int.
7939         (__gnat_install_handler): Explain sa_sigaction use.
7940
7941 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7942
7943         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7944         subprogram has copy-in copy-out parameters, try to promote the mode of
7945         the return type if it is passed in registers.
7946
7947 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7948
7949         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7950         left operand as addressable.
7951
7952 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7953
7954         * gcc-interface/gigi.h (build_function_stub): Remove.
7955         (build_return_expr): Likewise.
7956         (convert_vms_descriptor): Declare.
7957         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7958         (build_function_stub): Move to...
7959         * gcc-interface/utils2.c (build_return_expr): Move to...
7960         * gcc-interface/trans.c (build_function_stub): ...here.
7961         (build_return_expr): ...here.
7962         (Subprogram_Body_to_gnu): Add local variable for language_function.
7963         Disconnect the parameter attributes cache, if any, once done with it.
7964         Call end_subprog_body only after setting the end_locus.
7965         Build the stub associated with the function, if any, at the very end.
7966         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7967         variables and streamline control flow.
7968
7969 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
7970
7971         PR ada/49819
7972         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7973         g-trasym-dwarf.adb.
7974
7975 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7976
7977         PR bootstrap/49794
7978         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7979         Assign to act.sa_sigaction.
7980         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7981         current->return_address to char * before arithmetic.
7982
7983 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7984
7985         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7986         Correct argument types.
7987         Extract code from reason.
7988         (__gnat_install_handler): Assign to act.sa_sigaction.
7989
7990 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
7991
7992         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7993         (GNAT1_OBJS): ...here.
7994
7995 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
7996
7997         PR ada/48711
7998         * g-socthi-mingw.adb (Fill): Fix formatting.
7999
8000         * gcc-interface/gigi.h: Move around comment.
8001
8002 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
8003
8004         PR ada/46350
8005         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8006
8007 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
8008
8009         PR ada/48711
8010         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8011
8012 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
8013
8014         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8015         range comparison if Pmode is SImode.
8016
8017 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
8018             Eric Botcazou  <ebotcazou@adacore.com>
8019
8020         * adadecode.c: Wrap up in extern "C" block.
8021         * adadecode.h: Likewise.
8022         * adaint.c: Likewise.  Remove 'const' keyword.
8023         * adaint.h: Likewise.
8024         * argv.c: Likewise.
8025         * atree.h: Likewise.
8026         * cio.c: Likewise.
8027         * cstreams.c: Likewise.
8028         * env.c: Likewise.
8029         * exit.c: Likewise.
8030         * fe.h: Likewise.
8031         * final.c: Likewise.
8032         * init.c: Likewise.
8033         * initialize.c: Likewise.
8034         * link.c: Likewise.
8035         * namet.h: Likewise.
8036         * nlists.h: Likewise.
8037         * raise.c: Likewise.
8038         * raise.h: Likewise.
8039         * repinfo.h: Likewise.
8040         * seh_init.c: Likewise.
8041         * targext.c: Likewise.
8042         * tracebak.c: Likewise.
8043         * uintp.h: Likewise.
8044         * urealp.h: Likewise.
8045         * xeinfo.adb: Wrap up generated C code in extern "C" block.
8046         * xsinfo.adb: Likewise.
8047         * xsnamest.adb: Likewise.
8048         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8049         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8050         * gcc-interface/misc.c: Likewise.
8051         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8052         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
8053         ada/targext.o here...
8054         (GNAT_ADA_OBJS): ...and not here.
8055         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8056         (GNATBIND_OBJS): Reorder.
8057
8058 2011-07-07  Richard Henderson  <rth@redhat.com>
8059
8060         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8061         dwarf2out_frame_init.
8062
8063 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
8064
8065         * gcc-interface/misc.c (gnat_init): Tweak previous change.
8066
8067 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8068
8069         PR target/39150
8070         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
8071
8072 2011-07-06  Richard Guenther  <rguenther@suse.de>
8073
8074         * gcc-interface/misc.c (gnat_init): Merge calls to
8075         build_common_tree_nodes and build_common_tree_nodes_2.
8076         Re-initialize boolean_false_node.
8077
8078 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
8079             Olivier Hainque  <hainque@adacore.com>
8080             Nicolas Setton  <setton@adacore.com>
8081
8082         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
8083         the type according to the ARTIFICIAL_P parameter.
8084         (create_type_decl): Likewise.
8085         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
8086
8087 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
8088
8089         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
8090         (gnatbind): Likewise.
8091
8092 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8093
8094         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
8095
8096 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8097
8098         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
8099         local variable throughout.  Remove useless call to Base_Type.
8100         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
8101         Take it also into account for the volatileness of the field.  Set the
8102         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
8103
8104 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8105
8106         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
8107         on a dereference built for a by-ref object if it has an address clause.
8108
8109 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8110
8111         * einfo.ads (Address_Taken): Document use for the second argument of
8112         Asm_Input and Asm_Output attributes.
8113         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
8114         argument is an entity name, then set Address_Taken on it.
8115         <Attribute_Asm_Output>: Likewise.
8116         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
8117         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
8118         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
8119         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
8120
8121 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
8122
8123         PR middle-end/46500
8124         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
8125
8126 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
8127
8128         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
8129         (ada/utils.o): Update dependencies.
8130         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
8131         ../../../libcpp/libcpp.a.
8132         * gcc-interface/utils.c: Include common/common-target.h.
8133         (process_attributes): Use targetm_common.have_named_sections.
8134
8135 2011-06-07  Richard Guenther  <rguenther@suse.de>
8136
8137         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
8138         set_sizetype.
8139
8140 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8141
8142         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
8143         TREE_THIS_NOTRAP flag.
8144
8145 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8146
8147         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
8148         Fix thinko.
8149
8150 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8151
8152         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
8153         constants whose full view has discriminants specially.
8154
8155 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8156
8157         * gcc-interface/utils.c: Include diagnostic.h.
8158         (gnat_write_global_declarations): Output debug information for all
8159         global type declarations before finalizing the compilation unit.
8160         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8161
8162 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
8163
8164         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8165
8166 2011-05-25  Kai Tietz  <ktietz@redhat.com>
8167
8168         * adaint.c (__gnat_to_canonical_file_list_next): Use array
8169         initialization instead of const/none-const pointer assignment.
8170
8171 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
8172
8173         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8174         $(EXTRA_GNAT1_OBJS).
8175         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8176         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8177         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8178         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8179         libcommon-target.a instead of prefix.o.
8180
8181 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
8182
8183         PR ada/49097
8184         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8185
8186 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
8187
8188         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8189         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8190         instead of version.o.
8191
8192 2011-05-18  Kai Tietz <ktietz@redhat.com>
8193
8194         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8195         boolean_false_node instead of integer_zero_node.
8196         (convert_with_check): Likewise.
8197         * gcc-interface/decl.c (choices_to_gnu): Likewise.
8198
8199 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
8200
8201         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8202         type of the parameter is an unconstrained array, convert the actual to
8203         the type of the formal in the In Out and Out cases as well.
8204
8205 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
8206
8207         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8208         call build_function_type_array or build_varargs_function_type_array
8209         instead.
8210         (create_subprog_type): Don't call build_function_type; call
8211         build_function_type_vec instead.
8212
8213 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
8214
8215         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8216         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8217         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8218
8219 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
8220
8221         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8222
8223         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8224         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8225
8226 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
8227
8228         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8229
8230 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
8231
8232         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8233         instead of accessing TYPE_ARG_TYPES directly.
8234         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8235
8236 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8237
8238         PR ada/48844
8239         * gcc-interface/gigi.h (get_variant_part): Declare.
8240         * gcc-interface/decl.c (get_variant_part): Make global.
8241         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8242         types have the same constant size, are record types and T1 has a
8243         variant part while T2 doesn't.
8244
8245 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8246
8247         * gcc-interface/utils.c (begin_subprog_body): Do not call
8248         get_pending_sizes.
8249         (end_subprog_body): Likewise.
8250
8251 2011-05-04  Richard Guenther  <rguenther@suse.de>
8252
8253         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8254         int_const_binop.
8255         (pos_to_constructor): Likewise.
8256
8257 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
8258             Eric Botcazou  <ebotcazou@adacore.com>
8259
8260         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8261         of build_function_type.  Adjust calls to...
8262         (build_raise_check): ...this.  Do not take a void_tree parameter.
8263         Call build_function_type_list instead of build_function_type.
8264         Fix head comment and swap couple of conditional blocks.
8265
8266 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
8267
8268         * gnatvsn.ads (Library_Version): Bump to 4.7.
8269         (Current_Year): Bump to 2011.
8270
8271 2011-04-29  Michael Matz  <matz@suse.de>
8272
8273         * gcc-interface/misc.c (gnat_handle_option): Set
8274         warn_maybe_uninitialized.
8275
8276 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
8277
8278         * gnat_ugn.texi (Complexity Metrics Control): Update link to
8279         the Watson/McCabe paper.
8280
8281 2011-04-23  Jim Meyering  <meyering@redhat.com>
8282
8283         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8284
8285 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8286
8287         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8288         onto the new type.
8289
8290 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8291
8292         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8293         parameter.
8294         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
8295         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8296         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8297         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8298         <all>: Do not set flags on the reused DECL node coming from an alias.
8299         Set DECL_IGNORED_P on the DECL node built for subprograms if they
8300         don't need debug info here...
8301         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8302         (gigi): Adjust calls to create_subprog_decl.
8303         (build_raise_check): Likewise.
8304         (establish_gnat_vms_condition_handler): Likewise.
8305         (Compilation_Unit_to_gnu): Likewise.
8306         (gnat_to_gnu): Likewise.
8307
8308 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
8309
8310         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8311         (NO_REORDER_ADAFLAGS): New variable.
8312         (EXTRA_GNATTOOLS): Always define.
8313         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8314         Clean up and adjust list of files compiled with special options.
8315         * gcc-interface/Make-lang.in: Likewise.
8316         (ada/decl.o): Cosmetical change.
8317         (ada/misc.o): Remove dependency on $(PLUGIN_H).
8318
8319 2011-04-20  Jim Meyering  <meyering@redhat.com>
8320
8321         * initialize.c (__gnat_initialize): Remove useless if-before-free.
8322
8323 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8324
8325         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8326         $(CFLAGS) on the link line.
8327
8328 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8329
8330         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8331         padded type built for the return type if it is unconstrained.
8332
8333 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
8334
8335         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8336
8337 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
8338
8339         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8340         before calling TREE_CHAIN.
8341         * gcc-interface/misc.c (gnat_init_ts): New function.
8342         (LANG_HOOKS_INIT_TS): Define.
8343
8344 2011-04-12  Martin Jambor  <mjambor@suse.cz>
8345
8346         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8347         instead of cgraph_node.
8348
8349 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8350
8351         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8352         alignment on fields of the RETURN type built for the Copy-In Copy-Out
8353         mechanism.
8354
8355 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8356
8357         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8358         of aggregate types that contain a placeholder.
8359
8360 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
8361
8362         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8363         TYPE_ARG_TYPES.
8364         (handle_type_generic_attribute): Likewise.
8365
8366 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
8367
8368         PR ada/47163
8369         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8370
8371 2011-04-04  Kai Tietz  <ktietz@redhat.com>
8372
8373         PR ada/47163
8374         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8375         to flag value.
8376
8377 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8378
8379         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8380         type case, do not strip a padding type around the array type.
8381
8382 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8383
8384         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8385         types.
8386
8387 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8388
8389         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8390         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8391         code for -feliminate-unused-debug-types.
8392         (gnat_post_options): Likewise.
8393
8394 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8395
8396         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8397         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8398         distinct copy.
8399
8400 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8401
8402         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8403         DECL_ARTIFICIAL flag on enumeration types.
8404
8405 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8406
8407         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8408         fat pointer types artificial unconditionally.
8409         <E_Array_Subtype>: Attach the base array type as a parallel type if it
8410         isn't artificial.
8411
8412 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8413
8414         * gcc-interface/gigi.h (get_dummy_type): Declare.
8415         (build_dummy_unc_pointer_types): Likewise.
8416         (finish_fat_pointer_type): Likewise.
8417         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8418         fat pointer type has been built, complete it in place.
8419         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8420         and thin pointers.  Remove useless variable.
8421         (finish_fat_pointer_type): Make global and move to...
8422         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8423         (get_dummy_type): New function.
8424         (build_dummy_unc_pointer_types): Likewise.
8425         (gnat_pushdecl): Propage the name to the anonymous variants only.
8426         (update_pointer_to): Only adjust the pointer types in the unconstrained
8427         array case.
8428
8429 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8430
8431         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8432         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8433         if this is a Taft amendment type and the full declaration is available.
8434         * gcc-interface/trans.c (process_type): Likewise.
8435         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8436         (process_freeze_entity): Likewise.
8437         * gcc-interface/utils.c (dummy_global): New static variable.
8438         (gnat_write_global_declarations): If there are types declared as used
8439         at the global level, insert them in the global hash table.
8440
8441 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8442
8443         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8444         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8445         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8446         copy.
8447         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
8448         flag of the type accordingly.
8449         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8450
8451 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8452
8453         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8454         finalizing types when updating the pointers to the designated type.
8455         <all>: Finalize the deferred types even if we didn't defer processing
8456         of incomplete types in this invocation.
8457
8458 2011-04-01  Olivier Hainque  <hainque@adacore.com>
8459             Nicolas Setton  <setton@adacore.com>
8460             Eric Botcazou  <ebotcazou@adacore.com>
8461
8462         * gcc-interface/misc.c (gnat_descriptive_type): New function.
8463         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8464
8465 2011-03-28  Kai Tietz  <ktietz@redhat.com>
8466
8467         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8468         Windows targets.
8469         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8470         * system-mingw.ads (System): Change ZCX_By_Default default to True.
8471
8472         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8473
8474 2011-03-28  Tristan Gingold  <gingold@adacore.com>
8475
8476         PR ada/44431
8477         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8478         Use ada output of gnatbind.
8479         (ada/b_gnatb.adb): Ditto.
8480         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8481         (ada.mostlyclean, ada.stage1)
8482         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8483         (ada.stagefeedback): Adjust.
8484         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8485         Use ada output of gnatbind.
8486         (b_gnatm.adb): Ditto.
8487         (b_gnatl.o, b_gnatm.o): New rules.
8488
8489 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8490
8491         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8492         for the padded type built to support a specified size or alignment.
8493
8494 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8495
8496         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8497         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8498         unconditionally to the end of the unit when the designated type is
8499         limited_with'ed.
8500         <all>: Rename local variable.  Attempt to un-defer types only and do it
8501         for limited_with'ed types as well.
8502         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
8503         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8504         consistently and remove redundant call to finalize_from_with_types.
8505
8506 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8507
8508         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8509         subprograms without a previous spec declared in the same unit.
8510         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8511         subprograms at the end of the unit instead of at the beginning.
8512         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8513         isn't public for the special handling of non-inline functions nested
8514         inside inline external functions.
8515
8516 2011-03-25  Jeff Law  <law@redhat.com>
8517
8518         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8519
8520 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
8521
8522         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8523         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8524         to compute Set_Size_Depends_On_Discriminant.
8525         (Layout_Type): Call it on array types in back-end layout mode.
8526         * sem_util.adb (Requires_Transient_Scope): Return true for array
8527         types only if the size depends on the value of discriminants.
8528         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8529         type if the RHS is a call to a function that returns an unconstrained
8530         type with default discriminant.
8531
8532 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
8533
8534         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8535         non-conversion to the nominal result type at the end.
8536
8537 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8538
8539         * gcc-interface/trans.c (create_temporary): New function taken from...
8540         (create_init_temporary): ...here.  Call it.
8541         (call_to_gnu): Create the temporary for the return value early, if any.
8542         Create it for a function with copy-in/copy-out parameters if there is
8543         no target; in other cases of copy-in/copy-out, use another temporary.
8544         Push the new binding level lazily.  Add and rename local variables.
8545
8546 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8547
8548         * gcc-interface/decl.c (validate_size): Improve comments and tweak
8549         error message.
8550         (set_rm_size): Likewise.
8551
8552 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8553
8554         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8555         for the padded type built in order to support a specified alignment.
8556         Fix incorrect formatting.
8557
8558 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8559
8560         PR bootstrap/48216
8561         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8562
8563 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8564
8565         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8566         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8567         to the end of the list.  Adjust recursive call.  Rename local variable.
8568         If REORDER is true, reorder components of the record type.
8569         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8570         components_to_record and adjust the parameter list.
8571
8572 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8573
8574         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8575         disabled, use the variable for bounds of loop iteration scheme.
8576
8577 2011-03-21  Kai Tietz  <ktietz@redhat.com>
8578
8579         PR target/12171
8580         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8581
8582 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8583
8584         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8585         out whether the expression is read-only.  Short-circuit placeholder
8586         case and rename a couple of local variables.
8587
8588 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8589
8590         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8591         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8592         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8593         (convert): Deal with conversions from a smaller form type specially.
8594
8595 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
8596
8597         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8598         its argument, except for the special -I- switch.
8599
8600 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
8601
8602         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8603         "Ada Issues".
8604
8605 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
8606
8607         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8608
8609 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
8610
8611         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8612         GNAT_FORMAL.
8613         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8614         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
8615         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
8616         Do not generate the check directly, instead instantiate the template
8617         check present in the descriptor.
8618         (make_descriptor_field): Move around.
8619         (build_vms_descriptor32): Build a template check in the POINTER field.
8620         (build_vms_descriptor): Remove useless suffixes.
8621         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8622
8623 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
8624
8625         PR bootstrap/47467
8626         * targext.c: Include target files if IN_RTS is defined.
8627
8628 2011-01-26  Richard Guenther  <rguenther@suse.de>
8629
8630         PR bootstrap/47467
8631         * targext.c: Include config.h.
8632         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8633         dependency.
8634
8635 2011-01-04  Pascal Obry  <obry@adacore.com>
8636             Eric Botcazou  <ebotcazou@adacore.com>
8637
8638         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8639
8640 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8641
8642         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8643         end-of-case on the end label and its associated gotos, if any.
8644
8645 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8646
8647         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8648         expressions of the parameter cache within the statement group of
8649         the CICO mechanism.
8650
8651 2011-01-04  Olivier Hainque  <hainque@adacore.com>
8652             Eric Botcazou  <ebotcazou@adacore.com>
8653
8654         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8655         (set_end_locus_from_node): New function.
8656         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8657         make and the function end_locus.
8658         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8659         for the elaboration subprogram.
8660         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8661         set the end_locus of the expression as well.
8662
8663 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8664
8665         PR ada/47131
8666         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8667         variables that are referenced in exception handlers volatile.
8668
8669
8670 \f
8671 Copyright (C) 2011 Free Software Foundation, Inc.
8672
8673 Copying and distribution of this file, with or without modification,
8674 are permitted in any medium without royalty provided the copyright
8675 notice and this notice are preserved.
8676
8677         * gnat_rm.texi: Ramification of pragma Eliminate documentation
8678          - fix bugs in the description of Source_Trace;
8679          - get rid of UNIT_NAME;
8680
8681 2011-08-02  Javier Miranda  <miranda@adacore.com>
8682
8683         * exp_ch9.adb
8684         (Build_Dispatching_Requeue): Adding support for VM targets
8685         since we cannot directly reference the Tag entity.
8686         * exp_sel.adb (Build_K): Adding support for VM targets.
8687         (Build_S_Assignment): Adding support for VM targets.
8688         * exp_disp.adb
8689         (Default_Prim_Op_Position): In VM targets do not restrict availability
8690         of predefined interface primitives to compiling in Ada 2005 mode.
8691         (Is_Predefined_Interface_Primitive): In VM targets this service is not
8692         restricted to compiling in Ada 2005 mode.
8693         (Make_VM_TSD): Generate code that declares and initializes the OSD
8694         record. Needed to support dispatching calls through synchronized
8695         interfaces.
8696         * exp_ch3.adb
8697         (Make_Predefined_Primitive_Specs): Enable generation of predefined
8698         primitives associated with synchronized interfaces.
8699         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8700         primitives associated with synchronized interfaces.
8701
8702 2011-08-02  Yannick Moy  <moy@adacore.com>
8703
8704         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8705         statements hidden in SPARK if preceded by the HIDE directive
8706         (Parse_Exception_Handlers): mark each exception handler in a sequence of
8707         exception handlers as hidden in SPARK if preceded by the HIDE directive
8708         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8709         if starting with the HIDE directive
8710         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8711         starting with the HIDE directive; mark the declarations in a private
8712         part as hidden in SPARK if the private part starts with the HIDE
8713         directive
8714         * restrict.adb, restrict.ads
8715         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8716         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8717         argument node belongs to a part which is hidden in SPARK
8718         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8719         parts in SPARK; protect the possibly costly call to
8720         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8721         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8722         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8723         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8724         Tok_SPARK_Hide.
8725         (Scan): recognize special comment starting with '#' and followed by
8726         SPARK keyword "hide" as a HIDE directive.
8727
8728 2011-08-02  Yannick Moy  <moy@adacore.com>
8729
8730         * types.ads, erroutc.ads: Minor reformatting.
8731
8732 2011-08-02  Vincent Celier  <celier@adacore.com>
8733
8734         * link.c: Add response file support for cross platforms.
8735
8736 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8737
8738         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8739         in an association, set parent field of copy before partial analysis.
8740         * sem_res.adb (Resolve_Slice): create reference to itype only when
8741         expansion is enabled.
8742
8743 2011-08-02  Yannick Moy  <moy@adacore.com>
8744
8745         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8746         for new flag denoting which subprogram bodies are in ALFA
8747         * restrict.adb, sem_ch7.adb: Update comment
8748         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8749         sem_ch9.adb, sem_res.adb: Add calls to
8750         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8751         * sem_ch6.adb (Analyze_Function_Return): add calls to
8752         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8753         middle of the body, and extended return.
8754         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8755         False when missing return.
8756         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8757         to True for subprograms whose spec is in ALFA. Remove later on the flag
8758         on the entity used for a subprogram body when there exists a separate
8759         declaration.
8760         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8761         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8762         False, otherwise do nothing.
8763
8764 2011-08-02  Robert Dewar  <dewar@adacore.com>
8765
8766         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8767
8768 2011-08-02  Yannick Moy  <moy@adacore.com>
8769
8770         * sem_ch4.ads: minor formatting.
8771
8772 2011-08-02  Yannick Moy  <moy@adacore.com>
8773
8774         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8775         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8776         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8777         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8778         opt.ads: cleanup of SPARK mode
8779
8780 2011-08-02  Yannick Moy  <moy@adacore.com>
8781
8782         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8783         types.
8784         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8785         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8786         * sem_ch3.adb
8787         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8788         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8789         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8790         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8791         types.
8792         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8793         non-static range.
8794         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8795         functions whose return type is not in ALFA.
8796         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8797         specifications.
8798         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8799         parameter's type is not in ALFA.
8800         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8801         types are in ALFA.
8802
8803 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8804
8805         * sem_ch6 (Analyze_Expression_Function): treat the function as
8806         Inline_Always, and introduce a subprogram declaration for it when it is
8807         not a completion.
8808         * inline.adb (Add_Inlined_Body): recognize bodies that come from
8809         expression functions, so that the back-end can determine whether they
8810         can in fact be inlined.
8811         * sem_util.adb (Is_Expression_Function): predicate to determine whether
8812         a function body comes from an expression function.
8813
8814 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8815
8816         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8817         null exclusions to test Can_Never_Be_Null on the anonymous access types
8818         of the formals rather than testing the formals themselves. Exclude this
8819         check in cases where the Old_Formal is marked as a controlling formal,
8820         to avoid issuing spurious errors for bodies completing dispatching
8821         operations (due to the flag not getting set on controlling access
8822         formals in body specs).
8823         (Find_Corresponding_Spec): When checking full and subtype conformance of
8824         subprogram bodies in instances, pass Designated and E in that order, for
8825         consistency with the expected order of the formals (New_Id followed by
8826         Old_Id).
8827
8828 2011-08-02  Robert Dewar  <dewar@adacore.com>
8829
8830         * sem_ch8.adb: Minor reformatting.
8831
8832 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8833
8834         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8835         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8836         primitive operations of class-wide actuals.
8837
8838 2011-08-02  Javier Miranda  <miranda@adacore.com>
8839
8840         * exp_atag.ads, exp_atag.adb
8841         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8842         since its value is implicitly passed in argument Typ.
8843         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8844         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8845         Build_Common_Dispatching_Select_Statements.
8846
8847 2011-08-02  Robert Dewar  <dewar@adacore.com>
8848
8849         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8850         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8851         Minor reformatting.
8852
8853 2011-08-02  Robert Dewar  <dewar@adacore.com>
8854
8855         * sem_res.adb: Minor reformatting.
8856         * sem_prag.adb: Minor reformatting.
8857
8858 2011-08-02  Javier Miranda  <miranda@adacore.com>
8859
8860         * exp_atag.adb, exp_atags.ads
8861         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8862         by the tagged type Entity. Required to use this routine in the VM
8863         targets since we do not have available the Tag entity in the VM
8864         platforms.
8865         * exp_ch6.adb
8866         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8867         Ada.Tags has not been previously loaded.
8868         * exp_ch7.adb
8869         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8870         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8871         * sem_aux.adb
8872         (Enclosing_Dynamic_Scope): Add missing support to handle the full
8873         view of enclosing scopes. Required to handle enclosing scopes that
8874         are synchronized types whose full view is a task type.
8875         * exp_disp.adb
8876         (Build_VM_TSDs): Minor code improvement to avoid generating and
8877         analyzing lists with empty nodes.
8878         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8879         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8880         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8881         (Make_Disp_Timed_Select_Body): Add support for VM targets.
8882         (Make_Select_Specific_Data_Table): Add support for VM targets.
8883         (Make_VM_TSD): Generate code to initialize the SSD structure of
8884         the TSD.
8885
8886 2011-08-02  Yannick Moy  <moy@adacore.com>
8887
8888         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8889         cross-references section in ALI.
8890         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8891         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8892         Sub).
8893         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8894         subprogram or package entity of a node
8895         (Is_Local_Reference_Type): new function returns True for references
8896         selected in local cross-references.
8897         (Lt): function extracted from Lt in Output_References
8898         (Write_Entity_Name): function extracted from Output_References
8899         (Generate_Definition): generate reference with type 'D' for definition
8900         of objects (object declaration and parameter specification), with
8901         appropriate locations and units, for use in local cross-references.
8902         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8903         references of type 'I' for initialization in object definition.
8904         (Output_References): move part of function Lt and procedure
8905         Write_Entity_Name outside of the body. Ignore references of types 'D'
8906         and 'I' introduced for local cross-references.
8907         (Output_Local_References): new procedure to output the local
8908         cross-references sections.
8909         (Lref_Entity_Status): new array defining whether an entity is a local
8910         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8911         with 'I' type when initialization expression is present.
8912         * get_scos.adb, get_scos.ads: Correct comments and typos
8913
8914 2011-08-02  Javier Miranda  <miranda@adacore.com>
8915
8916         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8917         the JVM target.
8918         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8919         the JVM target.
8920         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8921         TSD support.
8922
8923 2011-08-02  Vincent Celier  <celier@adacore.com>
8924
8925         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8926         (No_Space_Img): New function
8927         (Find_Excluded_Sources): When reading from a file, record the file name
8928         and the line number for each excluded source.
8929         (Mark_Excluded_Sources): When reporting an error, if the excluded
8930         sources were read from a file, include file name and line number in
8931         the error message.
8932
8933 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8934
8935         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8936
8937 2011-08-02  Robert Dewar  <dewar@adacore.com>
8938
8939         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8940
8941 2011-08-02  Javier Miranda  <miranda@adacore.com>
8942
8943         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8944         generation of TSDs to the DOTNET compiler.
8945         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8946         generation of TSDs to the DOTNET compiler.
8947
8948 2011-08-02  Javier Miranda  <miranda@adacore.com>
8949
8950         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8951         record of all the tagged types declared inside library level package
8952         declarations, library level package bodies or library level subprograms.
8953         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8954         associated with a given tagged type.
8955         (Build_VM_TSDs): New subprogram.
8956         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8957         compilation units that are subprograms.
8958         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8959         compilation units that are package bodies.
8960         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8961         units that are a package declaration or a package instantiation.
8962         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8963         reorganization to improve the error generated by the frontend when the
8964         function Ada.Tags.Secondary_Tag is not available.
8965         * rtsfind.ads (RE_Register_TSD): New runtime entity.
8966         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8967
8968 2011-08-02  Javier Miranda  <miranda@adacore.com>
8969
8970         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8971
8972 2011-08-02  Robert Dewar  <dewar@adacore.com>
8973
8974         * s-imenne.ads: Minor reformatting.
8975
8976 2011-08-02  Robert Dewar  <dewar@adacore.com>
8977
8978         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8979         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8980         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8981
8982 2011-08-02  Robert Dewar  <dewar@adacore.com>
8983
8984         * einfo.ads (Materialize_Entity): Document this is only for renamings
8985         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8986         required debug information in the case where we transform the object
8987         declaration into a renaming declaration.
8988         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8989         object
8990         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8991         Materialize_Entity.
8992
8993 2011-08-02  Robert Dewar  <dewar@adacore.com>
8994
8995         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8996         Suppress_Init_Procs.
8997         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8998         Suppress_Initialization/Initialization_Suppressed.
8999         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9000         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9001         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9002         * sem_prag.adb: New processing for pragma Suppress_Initialization.
9003
9004 2011-08-02  Robert Dewar  <dewar@adacore.com>
9005
9006         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9007         Minor reformatting.
9008
9009 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9010
9011         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9012         only have inheritable classwide pre/postconditions.
9013
9014 2011-08-02  Javier Miranda  <miranda@adacore.com>
9015
9016         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9017         * rtsfind.ads (RE_Check_TSD): New runtime entity.
9018         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9019         checks if the external tag of a type is the same as the external tag
9020         of some other declaration.
9021
9022 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9023
9024         * s-taskin.ads: Minor reformatting.
9025
9026 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9027
9028         * g-comlin.adb (Display_Help): swap the order in which it prints the
9029         short help and the general usage.
9030
9031 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9032
9033         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9034         the aspect declarations and attach them to the generic copy for
9035         subsequent analysis.
9036         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9037         declarations of the generic tree to the new subprogram declarations.
9038         * sem_attr.adb (Check_Precondition_Postcondition): recognize
9039         conditions that apply to a subprogram instance.
9040
9041 2011-08-02  Robert Dewar  <dewar@adacore.com>
9042
9043         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9044
9045 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9046
9047         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9048         private type with a tagged full view is not derived in the immediate
9049         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9050
9051 2011-08-02  Robert Dewar  <dewar@adacore.com>
9052
9053         * exp_ch4.adb: Minor reformatting.
9054
9055 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9056
9057         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
9058         Ada2012 iterator, the loop will be rewritten during expansion into a
9059         while loop with a cursor and an element declaration. Do not analyze the
9060         body in this case, because if the container is for indefinite types the
9061         actual subtype of the elements will only be determined when the cursor
9062         declaration is analyzed.
9063
9064 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9065
9066         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9067         size/alignment related attributes in CodePeer_Mode.
9068
9069 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9070
9071         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9072         Prepend_Element, since this can result in the operation getting the
9073         wrong slot in the full type's dispatch table if the full type has
9074         inherited operations. The incomplete type's operation will get added
9075         to the proper position in the full type's primitives
9076         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9077         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9078         dispatching operations, since there are cases where nonprimitive
9079         subprograms can get added to the list of incomplete dependents (such
9080         as subprograms in nested packages).
9081         * sem_ch6.adb (Process_Formals): First, remove test for being in a
9082         private part when determining whether to add a primitive with a
9083         parameter of a tagged incomplete type to the Private_Dependents list.
9084         Such primitives can also occur in the visible part, and should not have
9085         been excluded from being private dependents.
9086         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9087         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9088         list of a Taft-amendment incomplete type is a primitive before issuing
9089         an error that the full type must appear in the same unit. There are
9090         cases where nonprimitives can be in the list (such as subprograms in
9091         nested packages).
9092         * sem_disp.adb (Derives_From): Use correct condition for checking that
9093         a formal's type is derived from the type of the corresponding formal in
9094         the parent subprogram (the condition was completely wrong). Add
9095         checking that was missing for controlling result types being derived
9096         from the result type of the parent operation.
9097
9098 2011-08-02  Yannick Moy  <moy@adacore.com>
9099
9100         * errout.adb (First_Node): minor renaming
9101         * restrict.adb (Check_Formal_Restriction): put restriction warning on
9102         first node.
9103
9104 2011-08-02  Yannick Moy  <moy@adacore.com>
9105
9106         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9107         before accessing operands.
9108         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9109         decide whether an initialization expression respects SPARK rules, as
9110         the plain node is the expanded one. This allows for more valid warnings
9111         to be issued.
9112         * gnat_rm.texi: Minor update.
9113
9114 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9115
9116         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9117         previous change.
9118
9119 2011-08-02  Robert Dewar  <dewar@adacore.com>
9120
9121         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9122
9123 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9124
9125         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9126         loop statements and the element renaming declaration with a block when
9127         the element type is controlled.
9128
9129 2011-08-02  Yannick Moy  <moy@adacore.com>
9130
9131         * sinfo.ads: Minor formatting.
9132
9133 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9134
9135         * sem_aggr.adb (Add_Association): if the association has a box and no
9136         expression, use the Sloc of the aggregate itself for the new
9137         association.
9138         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9139         the Original_Node.
9140
9141 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9142
9143         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9144         When a container is provided via a function call, generate a renaming
9145         of the function result. This avoids the creation of a transient scope
9146         and the premature finalization of the container.
9147         * exp_ch7.adb (Is_Container_Cursor): Removed.
9148         (Wrap_Transient_Declaration): Remove the supression of the finalization
9149         of the list controller when the declaration denotes a container cursor,
9150         it is not needed.
9151
9152 2011-08-02  Yannick Moy  <moy@adacore.com>
9153
9154         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9155         node is from source, instead of the original node being from source.
9156         * sem_aggr.adb
9157         (Resolve_Array_Aggregate): refine the check for a static expression, to
9158         recognize also static ranges
9159         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9160         Array_Type_Declaration): postpone the test for the type being a subtype
9161         mark after the type has been resolved, so that component-selection and
9162         expanded-name are discriminated.
9163         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9164         to distinguish the case of an iteration scheme, so that an error is
9165         issed on a non-static range in SPARK except in an iteration scheme.
9166         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9167         In_Iter_Schm = True.
9168         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9169         user-defined operators so that they are allowed in renaming
9170         * sem_ch8.adb
9171         (Find_Selected_Component): refine the check for prefixing of operators
9172         so that they are allowed in renaming. Move the checks for restrictions
9173         on selector name after analysis discriminated between
9174         component-selection and expanded-name.
9175         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9176         concatenation argument of string type if it is static.
9177         * sem_util.adb, sem_util.ads
9178         (Check_Later_Vs_Basic_Declarations): add a new function
9179         Is_Later_Declarative_Item to decice which declarations are allowed as
9180         later items, in the two different modes Ada 83 and SPARK. In the SPARK
9181         mode, add that renamings are considered as later items.
9182         (Enclosing_Package): new function to return the enclosing package
9183         (Enter_Name): correct the rule for homonyms in SPARK
9184         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9185         from source (result of expansion) to avoid issuing wrong warnings.
9186
9187 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9188
9189         * errout.adb: On anything but an expression First_Node returns its
9190         argument.
9191
9192 2011-08-02  Pascal Obry  <obry@adacore.com>
9193
9194         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9195
9196 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9197
9198         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9199         Set the associated loop as the related expression of internally
9200         generated cursors.
9201         * exp_ch7.adb (Is_Container_Cursor): New routine.
9202         (Wrap_Transient_Declaration): Supress the finalization of the list
9203         controller when the declaration denotes a container cursor.
9204
9205 2011-08-02  Yannick Moy  <moy@adacore.com>
9206
9207         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9208         command line now.
9209         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9210         expression is a simple expression. This check cannot be performed in
9211         the semantics, so just drop it.
9212         (P_Index_Or_Discriminant_Constraint): move check that the index or
9213         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9214         semantics. Other cases were previously checked in the semantics.
9215         * par-ch4.adb (P_Name): move checks that a selector name is not
9216         character literal or an operator symbol to Find_Selected_Component in
9217         the semantics
9218         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9219         declarations are not placed after later declarations in a separate
9220         procedure in Sem_Util (possibly not the best choice?), to be used both
9221         during parsing, for Ada 83 mode, and during semantic analysis, for
9222         SPARK mode.
9223         * par-endh.adb (Check_End): move check that end label is not missing
9224         to Process_End_Label in the semantics
9225         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9226         the special case for SPARK restriction
9227         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9228         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9229         parameter Force to issue the error message even on internal node (used
9230         for generated end label). Call Check_Restriction to check when an error
9231         must be issued. In SPARK mode, issue an error message even if the
9232         restriction is not set.
9233         (Check_Restriction): new procedure with an additional out parameter to
9234         inform the caller that a message has been issued
9235         * sem_aggr.adb: Minor modification of message
9236         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9237         instead of issuing an error message directly
9238         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9239         declarations are not placed after later declarations, by calling
9240         Check_Later_Vs_Basic_Declarations
9241         (Analyze_Subtype_Declaration): move here the check that an index or
9242         discriminant constraint must be a subtype mark. Change the check that
9243         a subtype of String must start at one so that it works on subtype marks.
9244         * sem_ch4.adb (Analyze_Call): move here the check that a named
9245         association cannot follow a positional one in a call
9246         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9247         instead of issuing an error message directly
9248         * sem_ch8.adb (Find_Selected_Component): move here the check that a
9249         selector name is not a character literal or an operator symbol. Move
9250         here the check that the prefix of an expanded name cannot be a
9251         subprogram or a loop statement.
9252         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9253         procedure called from parsing and semantics to check that basic
9254         declarations are not placed after later declarations
9255         (Process_End_Label): move here the check that end label is not missing
9256
9257 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9258
9259         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9260         representation clause in codepeer mode, since it confuses CodePeer and
9261         does not bring useful info.
9262
9263 2011-08-02  Ed Falis  <falis@adacore.com>
9264
9265         * init.c: initialize fp hw on MILS.
9266
9267 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9268
9269         * errout.adb (First_Node): for bodies, return the node itself (small
9270         optimization). For other nodes, do not check source_unit if the node
9271         comes from Standard.
9272
9273 2011-08-02  Robert Dewar  <dewar@adacore.com>
9274
9275         * exp_ch3.adb: Minor comment additions.
9276         * sem_ch13.adb: Minor reformatting.
9277
9278 2011-08-02  Pascal Obry  <obry@adacore.com>
9279
9280         * make.adb, makeutl.adb: Removes some superfluous directory separator.
9281
9282 2011-08-02  Robert Dewar  <dewar@adacore.com>
9283
9284         * sem_attr.adb: Minor reformatting.
9285
9286 2011-08-02  Robert Dewar  <dewar@adacore.com>
9287
9288         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9289         (Has_Default_Component_Value): Removed
9290         * einfo.ads Comment updates
9291         (Has_Default_Aspect): Replaces Has_Default_Value
9292         (Has_Default_Component_Value): Removed
9293         * exp_ch13.adb
9294         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9295         * exp_ch3.adb
9296         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9297         (Get_Simple_Init_Val): Handle Default_Value aspect
9298         (Needs_Simple_Initialization): Handle Default_Value aspect
9299         * exp_ch3.ads: Needs_Simple_Initialization
9300         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9301         * par-prag.adb (Pragma_Default[_Component]Value) Removed
9302         * sem_ch13.adb
9303         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9304         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9305         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9306
9307 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9308
9309         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9310         package containing iteration primitives.
9311         exp_ch5.adb (Expand_Iterator_Loop): ditto.
9312
9313 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9314
9315         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9316         "of", pre-analyze expression in case it is a function call with
9317         finalization actions that must be placed ahead of the loop.
9318         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9319         on an Ada2012 iterator, insert them ahead of the rewritten loop.
9320
9321 2011-08-02  Geert Bosch  <bosch@adacore.com>
9322
9323         * cstand.adb (Create_Float_Types): Only consider C's long double for
9324         Long_Long_Float, in addition to double.
9325
9326 2011-08-02  Robert Dewar  <dewar@adacore.com>
9327
9328         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9329         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9330         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9331         Minor reformatting.
9332
9333 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9334
9335         * sem_attr.adb: handle properly 'Result when it is a prefix of an
9336         indexed component.
9337
9338 2011-08-02  Javier Miranda  <miranda@adacore.com>
9339
9340         * einfo.ads, einfo.adb
9341         (Original_Access_Type): Move this attribute to Node26 since there was
9342         an undocumented use of Node21 in E_Access_Subprogram_Type entities
9343         which causes conflicts and breaks the generation of the .NET compiler.
9344         (Interface_Name): Add missing documentation on JGNAT only uses of
9345         this attribute.
9346
9347 2011-08-02  Geert Bosch  <bosch@adacore.com>
9348
9349         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9350         (Find_Back_End_Float_Type): Likewise
9351         (Create_Back_End_Float_Types): Likewise
9352         (Create_Float_Types): Likewise
9353         (Register_Float_Type): Likewise
9354         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9355         Nlist and split out type selection in new local Find_Base_Type function.
9356         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9357         Nlist
9358         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9359
9360 2011-08-02  Robert Dewar  <dewar@adacore.com>
9361
9362         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9363         alpha order).
9364         * opt.ads: Minor comment change.
9365         * sem_ch12.adb: Minor code reorganization.
9366
9367 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9368
9369         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9370         subtype's list of rep items to the list on the full subtype in the case
9371         where the lists are the same.
9372
9373 2011-08-02  Geert Bosch  <bosch@adacore.com>
9374
9375         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9376         using the one from System.Strings, which also deallocates all strings.
9377
9378 2011-08-02  Geert Bosch  <bosch@adacore.com>
9379
9380         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9381         function.
9382         * gcc-interface/Make-lang.in: Update dependencies.
9383
9384 2011-08-02  Olivier Hainque  <hainque@adacore.com>
9385
9386         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9387         end_locus.
9388
9389 2011-08-02  Javier Miranda  <miranda@adacore.com>
9390
9391         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9392         associated with anonymous access to subprograms.
9393
9394 2011-08-02  Geert Bosch  <bosch@adacore.com>
9395
9396         * opt.ads
9397         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9398         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9399         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9400         (Add_Symbol_Definition): Move to switch-c.adb
9401         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9402         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9403         (Add_Symbol_Definition): Move to switch-c.adb.
9404         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9405         * sem_warn.adb
9406         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9407         Move to warnsw.adb.
9408         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9409         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9410         Move to warnsw.adb.
9411         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
9412         (Add_Symbol_Definition): Moved from Prepcomp.
9413         * switch-c.ads: Update copyright notice. Use String_List instead of
9414         Argument_List, removing dependency on System.OS_Lib.
9415
9416 2011-08-02  Yannick Moy  <moy@adacore.com>
9417
9418         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9419         mode on initialization expression which does not respect SPARK
9420         restrictions.
9421         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9422         if the tree referenced by its argument represents an initialization
9423         expression in SPARK, suitable for initializing an object in an object
9424         declaration.
9425
9426 2011-08-02  Javier Miranda  <miranda@adacore.com>
9427
9428         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9429         internally generated access to subprogram with its associated protected
9430         subprogram type.
9431         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9432
9433 2011-08-02  Geert Bosch  <bosch@adacore.com>
9434
9435         * cstand.adb (Register_Float_Type): Print information about type to
9436         register, if the Debug_Flag_Dot_B is set.
9437         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9438         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9439         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9440         with a requested precision of more than Max_Digits digits and no more
9441         than Max_Base_Digits digits, if a range specification is present and the
9442         Predefined_Float_Types list has a suitable type to derive from.
9443         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9444         case of type completion with pragma Import
9445         * sem_prag.adb
9446         (Process_Import_Predefined_Type): Processing to complete a type
9447         with pragma Import. Currently supports floating point types only.
9448         (Set_Convention_From_Pragma): Do nothing without underlying type.
9449         (Process_Convention): Guard against absence of underlying type,
9450         which may happen when importing incomplete types.
9451         (Process_Import_Or_Interface): Handle case of importing predefined
9452         types. Tweak error message.
9453
9454 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9455
9456         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9457         functions to previous change.  Reorganize code slightly.
9458
9459 2011-08-02  Geert Bosch  <bosch@adacore.com>
9460
9461         * back_end.ads (Register_Type_Proc): New call back procedure type for
9462         allowing the back end to provide information about available types.
9463         (Register_Back_End_Types): New procedure to register back end types.
9464         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9465         available types.
9466         * cstand.adb (Back_End_Float_Types): New list for floating point types
9467         supported by the back end.
9468         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9469         (Copy_Float_Type): New procedure to make new copies of predefined types.
9470         (Register_Float_Type): New call back procedure to populate the BEFT list
9471         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9472         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9473         (Create_Float_Types): New procedure to create entities for floating
9474         point types predefined in Standard, and put these and any remaining
9475         BEFTs on the Predefined_Float_Types list.
9476         * stand.ads (Predefined_Float_Types): New list for predefined floating
9477         point types that do not have declarations in package Standard.
9478
9479 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9480
9481         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
9482         entity node for the unit containing the parameter.
9483         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
9484         (Add_Inlined_Subprogram): Likewise.
9485         * gcc-interface/Make-lang.in: Update dependencies.
9486
9487 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9488
9489         * s-stusta.adb (Print): Make sure Pos is always initialized to a
9490         suitable value.
9491
9492 2011-08-02  Geert Bosch  <bosch@adacore.com>
9493
9494         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
9495
9496 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9497
9498         * sem_type.adb (Covers): Move trivial case to the top and reuse the
9499         computed value of Base_Type.
9500
9501 2011-08-02  Yannick Moy  <moy@adacore.com>
9502
9503         * restrict.adb (Check_Restriction): issue an error for any use of
9504         class-wide, even if the No_Dispatch restriction is not set.
9505         * sem_aggr.adb: Correct typos in comments and messages in formal mode
9506         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
9507         when completing a private extension, the type named in the private part
9508         is not the same as that named in the visible part.
9509         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
9510         of an inherited primitive operations of a tagged type or type extension
9511         that returns the tagged type.
9512         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
9513         function which returns True for an implicit operation inherited by the
9514         derived type declaration for the argument type.
9515         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
9516         order.
9517
9518 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9519
9520         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
9521         Process_Bounds, to perform analysis with expansion of a range or an
9522         expression that is the iteration scheme for a loop.
9523         (Analyze_Iterator_Specification): If domain of iteration is given by a
9524         function call with a controlled result, as is the case if call returns
9525         a predefined container, ensure that finalization actions are properly
9526         generated.
9527         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
9528
9529 2011-08-02  Javier Miranda  <miranda@adacore.com>
9530
9531         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9532         * gcc-interface/Make-lang.in: Update dependencies.
9533
9534 2011-08-02  Javier Miranda  <miranda@adacore.com>
9535
9536         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9537         determine if the analysis is performed using N or Original_Node (N).
9538         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9539         functionality of routine Is_Variable avoids code duplication.
9540         * checks.adb (Determine_Range): Handle temporaries generated by
9541         Remove_Side_Effects.
9542
9543 2011-08-02  Javier Miranda  <miranda@adacore.com>
9544
9545         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9546         expansion of the condition. Required since the previous analysis was
9547         done with expansion disabled (see Resolve_Quantified_Expression) and
9548         hence checks were not inserted and record comparisons have not been
9549         expanded.
9550
9551 2011-08-02  Ed Falis  <falis@adacore.com>
9552
9553         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9554         Update header.
9555
9556 2011-08-02  Bob Duff  <duff@adacore.com>
9557
9558         * opt.ads: Minor comment fix.
9559
9560 2011-08-02  Bob Duff  <duff@adacore.com>
9561
9562         * sem_ch12.adb (Analyze_Package_Instantiation,
9563         Analyze_Subprogram_Instantiation): Turn off style checking while
9564         analyzing an instance. Whatever style checks that apply to the generic
9565         unit should apply, so it makes no sense to apply them in an instance.
9566         This was causing trouble when compiling an instance of a runtime
9567         unit that violates the -gnatyO switch.
9568         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9569         one of the two case statements, causing spurious errors.
9570
9571 2011-08-02  Robert Dewar  <dewar@adacore.com>
9572
9573         * uname.adb: Minor reformatting.
9574         * gnatcmd.adb: Minor reformatting.
9575         * exp_attr.adb: Minor reformatting.
9576
9577 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9578
9579         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9580         No_Dispatching_Calls, do not look for the Assign primitive, because
9581         predefined primitives are not created in this case.
9582
9583 2011-08-02  Bob Duff  <duff@adacore.com>
9584
9585         * stylesw.ads: Minor comment fixes.
9586
9587 2011-08-02  Robert Dewar  <dewar@adacore.com>
9588
9589         * freeze.adb (Add_To_Result): New procedure.
9590
9591 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9592
9593         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9594         time, if the specific run-time routines for handling streams of strings
9595         are not available, use the default mechanism.
9596
9597 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9598
9599         * s-regpat.ads: Fix typo.
9600
9601 2011-08-02  Vincent Celier  <celier@adacore.com>
9602
9603         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9604         not null, call it to create the in memory config project file without
9605         parsing an existing default config project file.
9606
9607 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9608
9609         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9610
9611 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9612
9613         * sem_elim.adb: an abstract subprogram does not need an eliminate
9614         pragma for its descendant to be eliminable.
9615
9616 2011-08-02  Ed Falis  <falis@adacore.com>
9617
9618         * init.c: revert to handling before previous checkin for VxWorks
9619         * s-intman-vxworks.adb: delete unnecessary declarations related to
9620         using Ada interrupt facilities for handling signals.
9621         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9622         * s-intman-vxworks.ads: Import __gnat_install_handler as
9623         Initialize_Interrupts.
9624         * s-taprop-vxworks.adb: Delete Signal_Mask.
9625         (Abort_Handler): change construction of mask to unblock exception
9626         signals.
9627
9628 2011-08-02  Jerome Guitton  <guitton@adacore.com>
9629
9630         * a-except-2005.adb (Raise_From_Signal_Handler): Call
9631         Debug_Raise_Exception before propagation starts.
9632
9633 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9634
9635         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9636         to Restriction_Check_Required.
9637         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9638         * sem_res.adb (Resolve_Call): Likewise.
9639         * sem_attr.adb (Check_Stream_Attribute): Likewise.
9640
9641 2011-08-02  Bob Duff  <duff@adacore.com>
9642
9643         * stylesw.ads: Update comment.
9644         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9645         * errout.ads: Remove obsolete comment.
9646
9647 2011-08-02  Javier Miranda  <miranda@adacore.com>
9648
9649         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9650         (Set_Is_Safe_To_Reevaluate): new procedure.
9651         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9652         assignment is allowed on safe-to-reevaluate variables.
9653         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9654         temporary created to remove side effects in expressions that use
9655         the secondary stack as safe-to-reevaluate.
9656         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9657         variables that are not true constants.
9658
9659 2011-08-02  Robert Dewar  <dewar@adacore.com>
9660
9661         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9662         sem_res.adb, sem_ch6.adb: Minor reformatting.
9663
9664 2011-08-02  Jerome Guitton  <guitton@adacore.com>
9665
9666         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9667
9668 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9669
9670         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9671         not set Overridden_Operation if subprogram is an initialization
9672         procedure.
9673
9674 2011-08-02  Yannick Moy  <moy@adacore.com>
9675
9676         * par-ch6.adb: Correct obsolete name in comments
9677         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9678         which takes two message arguments (existing function takes one), with
9679         second message used for continuation.
9680         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9681         block statements that originate from a source block statement, not
9682         generated block statements
9683         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9684         symmetry with procedure case
9685         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9686         function to issue an error in formal mode if a package specification
9687         contains more than one tagged type or type extension.
9688         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9689         parameters matching formals of tagged types are objects (or ancestor
9690         type conversions of objects), not general expressions. Issue an error
9691         on view conversions that are not involving ancestor conversion of an
9692         extended type.
9693         (Resolve_Type_Conversion): in formal mode, issue an error on the
9694         operand of an ancestor type conversion which is not an object
9695         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9696         procedure so that it works also for actuals of function calls
9697         (Is_Actual_Tagged_Parameter): new function which determines if its
9698         argument is an actual parameter of a formal of tagged type in a
9699         subprogram call
9700         (Is_SPARK_Object_Reference): new function which determines if the tree
9701         referenced by its argument represents an object in SPARK
9702
9703 2011-08-02  Robert Dewar  <dewar@adacore.com>
9704
9705         * sem_ch3.adb: Minor reformatting
9706         Minor comment addition
9707         Minor error msg text change
9708
9709 2011-08-02  Javier Miranda  <miranda@adacore.com>
9710
9711         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9712         function. Used to be more precise when we generate a variable plus one
9713         assignment to remove side effects in the evaluation of the Bound
9714         expressions.
9715         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9716         of the bound expression to force its re-analysis and thus expand the
9717         associated transient scope (if required). Code cleanup replacing the
9718         previous code that declared the constant entity by an invocation to
9719         routine Force_Evaluation which centralizes this work in the frontend.
9720
9721 2011-08-02  Robert Dewar  <dewar@adacore.com>
9722
9723         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9724         (Base_Type): Now uses improved Is_Base_Type function
9725         * einfo.ads (Base_Type): Inline this function
9726
9727 2011-08-02  Robert Dewar  <dewar@adacore.com>
9728
9729         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9730         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9731
9732 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9733
9734         * gcc-interface/Make-lang.in: Update dependencies.
9735         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9736         targets.
9737
9738 2011-08-02  Yannick Moy  <moy@adacore.com>
9739
9740         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9741         non-simple expression used in delta constraint
9742         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9743         index constraint which is not a subtype mark
9744         * par.adb: With and use Restrict
9745         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9746         mode on component type which is not a subtype mark and default
9747         expression on component
9748         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9749         of string which does not have a lower index bound equal to 1
9750         (Array_Type_Declaration): issue an error in formal mode on index or
9751         component type which is not a subtype mark, and on aliased keyword on
9752         component
9753         (Derived_Type_Declaration): issue an error in formal mode on interface,
9754         limited or abstract type
9755         (Record_Type_Declaration): issue an error in formal mode on interface
9756         (Record_Type_Definition): issue an error in formal mode on tagged types
9757         and type extensions not declared in the specification of a library unit
9758         package; on null non-tagged record; on variant part
9759
9760 2011-08-02  Vincent Celier  <celier@adacore.com>
9761
9762         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9763         not declared for qualified library project when Library_Name is not
9764         declared, but Library_Dir is.
9765
9766 2011-08-02  Robert Dewar  <dewar@adacore.com>
9767
9768         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9769         pragmas (affects aspects [Component_]Default_Value
9770         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9771         component type for the resolution
9772
9773 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9774
9775         * einfo.adb (Base_Type): Tune implementation for speed.
9776
9777 2011-08-02  Robert Dewar  <dewar@adacore.com>
9778
9779         * freeze.adb: Minor reformatting.
9780
9781 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9782
9783         * scos.ads: Update comments.
9784
9785 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9786
9787         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9788         base type, because the parent may be a subtype of a private type whose
9789         convention is established in a private part.
9790
9791 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9792
9793         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9794         statement in a block when the expansion of the return expression has
9795         created a finalization chain.
9796         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9797         with the parent node.
9798         Add N_Extended_Return_Statement to handle the case where a transient
9799         object declaration appears in the Return_Object_Declarations list of
9800         an extended return statement.
9801
9802 2011-08-02  Matthew Gingell  <gingell@adacore.com>
9803
9804         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9805         unused parameter 'name'.
9806
9807 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9808
9809         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9810         inherited operation, check whether its alias, which is the source
9811         operastion that it renames, has been marked eliminated.
9812
9813 2011-08-02  Javier Miranda  <miranda@adacore.com>
9814
9815         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9816         in-mode parameter whose type is an access type since it can be used to
9817         modify its designated object. Enforce code that handles as safe an
9818         access type that is not access-to-constant but it is the result of a
9819         previous removal of side-effects.
9820         (Remove_Side_Effects): Minor code reorganization of cases which require
9821         no action. Done to incorporate documentation on new cases uncovered
9822         working in this ticket: no action needed if this routine was invoked
9823         too early and the nodes are not yet decorated.
9824         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9825         to routine Remove_Side_Effects by calls to Force_Evaluation since they
9826         were issued with actuals that are implicitly provided by
9827         Force_Evaluation.
9828
9829 2011-08-02  Robert Dewar  <dewar@adacore.com>
9830
9831         * sem_ch3.adb, sem_res.adb: Minor reformatting.
9832
9833 2011-08-02  Yannick Moy  <moy@adacore.com>
9834
9835         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9836         to issue an error in formal mode on attribute not supported in this mode
9837         (Analyze_Attribute): issue errors on standard attributes not supported
9838         in formal mode.
9839         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9840         comment, and issue error in formal mode on modulus which is not a power
9841         of 2.
9842         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9843         range.
9844         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9845         subtype mark.
9846         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9847         operator on modular type (except 'not').
9848
9849 2011-08-02  Robert Dewar  <dewar@adacore.com>
9850
9851         * gnat_rm.texi: Minor reformatting.
9852
9853 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9854
9855         * s-osinte-linux.ads: Minor comment update and reformatting.
9856         * i-cexten.ads: Make this unit pure, as for its parent.
9857         Will allow its usage in more contexts if needed.
9858
9859 2011-08-02  Robert Dewar  <dewar@adacore.com>
9860
9861         * s-utf_32.ads: Minor comment fix.
9862
9863 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9864
9865         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9866         operation of a tagged synchronized type, handle the case where the
9867         controlling argument is overloaded.
9868
9869 2011-08-02  Yannick Moy  <moy@adacore.com>
9870
9871         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9872         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9873         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9874         SPARK mode and formal verification mode on processing SPARK restriction
9875         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9876         requiring consistency checking.
9877
9878 2011-08-02  Robert Dewar  <dewar@adacore.com>
9879
9880         * sem_res.adb: Minor reformatting.
9881
9882 2011-08-02  Robert Dewar  <dewar@adacore.com>
9883
9884         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9885         a-cforse.ads: Remove unneeded with of Ada.Containers
9886         Remove commented out pragma Inline's
9887         Move specifications of new subprograms to the actual specs
9888
9889 2011-08-02  Yannick Moy  <moy@adacore.com>
9890
9891         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9892         a-cforse.ads: Update comments.
9893
9894 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9895
9896         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9897
9898 2011-08-02  Robert Dewar  <dewar@adacore.com>
9899
9900         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9901         a-cforse.ads, a-cofove.ads: Minor reformatting.
9902
9903 2011-08-02  Claire Dross  <dross@adacore.com>
9904
9905         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9906         a-cofove.ads: Add comments.
9907
9908 2011-08-02  Yannick Moy  <moy@adacore.com>
9909
9910         * gnat_rm.texi: Document formal containers.
9911
9912 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9913
9914         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9915         are empty sections.
9916
9917 2011-08-02  Robert Dewar  <dewar@adacore.com>
9918
9919         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9920         reformatting.
9921
9922 2011-08-02  Robert Dewar  <dewar@adacore.com>
9923
9924         * aspects.adb: New aspects Default_Value and Default_Component_Value
9925         New format of Aspect_Names table checks for omitted entries
9926         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9927         handling of boolean aspects for derived types.
9928         New aspects Default_Value and Default_Component_Value
9929         New format of Aspect_Names table checks for omitted entries
9930         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9931         (Has_Default_Value): New flag
9932         (Has_Default_Component_Value): New flag
9933         (Has_Default_Value): New flag
9934         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9935         table.
9936         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9937         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9938         Default_Value and Default_Component_Value
9939         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9940         New aspects Default_Value and Default_Component_Value
9941         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9942         * sprint.adb: Print N_Aspect_Specification node when called from gdb
9943
9944 2011-08-02  Vincent Celier  <celier@adacore.com>
9945
9946         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9947         inherit library kind.
9948
9949 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9950
9951         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9952         Minor reformatting.
9953
9954 2011-08-02  Robert Dewar  <dewar@adacore.com>
9955
9956         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9957
9958 2011-08-02  Yannick Moy  <moy@adacore.com>
9959
9960         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9961
9962 2011-08-02  Robert Dewar  <dewar@adacore.com>
9963
9964         * impunit.adb: Add comment.
9965
9966 2011-08-02  Yannick Moy  <moy@adacore.com>
9967
9968         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9969         qualification of aggregates in formal mode
9970         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9971         another aggregate
9972         (Resolve_Aggregate): complete the test that an aggregate is adequately
9973         qualified in formal mode
9974
9975 2011-08-02  Pascal Obry  <obry@adacore.com>
9976
9977         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9978         * mlib-prj.adb: Supress warning when compiling binder generated file.
9979         (Build_Library): Supress all warnings when compiling the binder
9980         generated file.
9981
9982 2011-08-02  Yannick Moy  <moy@adacore.com>
9983
9984         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9985         from here...
9986         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9987         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9988         Add with/use clauses to make Check_Formal_Restriction visible
9989
9990 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9991
9992         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9993         in-parameters when type of the generic formal is private in the generic
9994         spec and non-private in the body.
9995
9996 2011-08-02  Claire Dross  <dross@adacore.com>
9997
9998         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9999         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10000         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10001         * impunit.adb, Makefile.rtl: Take new files into account.
10002
10003 2011-08-02  Robert Dewar  <dewar@adacore.com>
10004
10005         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10006         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10007
10008 2011-08-02  Yannick Moy  <moy@adacore.com>
10009
10010         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10011         formal mode
10012         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10013         matching static array bounds, taking into account the special case of
10014         string literals
10015         * sem_ch3.adb: Typo in comment.
10016
10017 2011-08-02  Yannick Moy  <moy@adacore.com>
10018
10019         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10020         which issues an error in formal mode if its argument node is originally
10021         from source
10022         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10023         has a discriminant specification so that it does not include the case
10024         of derived types
10025         (Derived_Type_Declaration): move here the test that a derived type has a
10026         discriminant specification
10027         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10028         first element of a component association before accessing its choices
10029         (presence of component association is not enough)
10030         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10031         declaration is a library item before accessing the next element in a
10032         list, as library items are not member of lists
10033         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10034         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10035         Check_Formal_Restriction whenever possible.
10036
10037 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10038
10039         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10040         reference when needed.
10041
10042 2011-08-02  Bob Duff  <duff@adacore.com>
10043
10044         * gnat_ugn.texi: Fix typo.
10045
10046 2011-08-02  Vincent Celier  <celier@adacore.com>
10047
10048         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10049         archive file name. Do not use the full path name of archives for Open
10050         VMS.
10051
10052 2011-08-02  Robert Dewar  <dewar@adacore.com>
10053
10054         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10055         Analyze_Aspect_Specifications
10056         * sem_ch13.adb
10057         (Analyze_Aspect_Specifications): New handling for boolean aspects
10058         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10059         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10060         sequence for Analyze_Aspect_Specifications
10061         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10062         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10063
10064 2011-08-02  Robert Dewar  <dewar@adacore.com>
10065
10066         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10067         aspects, since these no longer exist.
10068
10069 2011-08-02  Robert Dewar  <dewar@adacore.com>
10070
10071         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10072         semicolon, do not try to see if there are aspects following it.
10073         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10074         aspect spec.
10075
10076 2011-08-02  Robert Dewar  <dewar@adacore.com>
10077
10078         * sem_ch8.adb, aspects.ads: Minor reformatting.
10079
10080 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10081
10082         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10083         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10084         extracted from...
10085         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
10086
10087 2011-08-02  Yannick Moy  <moy@adacore.com>
10088
10089         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10090         mode on subprogram declaration outside of package specification, unless
10091         it is followed by a pragma Import
10092         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10093         Access_Type_Declaration): issue error in formal mode on access type
10094         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10095         incomplete type
10096         (Analyze_Object_Declaration): issue error in formal mode on object
10097         declaration which does not respect SPARK restrictions
10098         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10099         declaration which does not respect SPARK restrictions
10100         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10101         error in formal mode on digits or delta constraint
10102         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10103         decimal fixed point type
10104         (Derived_Type_Declaration): issue error in formal mode on derived type
10105         other than type extensions of tagged record types
10106         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10107         with check on access definition
10108         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10109         mode on protected definition.
10110         (Analyze_Task_Definition): issue error in formal mode on task definition
10111
10112 2011-08-02  Robert Dewar  <dewar@adacore.com>
10113
10114         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10115
10116 2011-08-02  Javier Miranda  <miranda@adacore.com>
10117
10118         * sem_ch6.adb (Can_Override_Operator): New function.
10119         (Verify_Overriding_Indicator): Add missing code to check overriding
10120         indicator in operators. Fixes regression.
10121         (Check_Overriding_Indicator): Minor reformating after replacing the
10122         code that evaluates if the subprogram can override an operator by
10123         invocations to the above new function.
10124         * einfo.adb
10125         (Write_Field26_Name): Add missing code to ensure that, following
10126         the documentation in einfo.ads, this field is not shown as attribute
10127         "Static_Initialization" on non-dispatching functions.
10128
10129 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10130
10131         * sem_res.adb (Resolve_Call): A call to
10132         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10133         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10134         i.e., when the second parameter is of type Time_Span.
10135
10136 2011-08-02  Vincent Celier  <celier@adacore.com>
10137
10138         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10139         with an archive instead of -L<library dir> -l<library name>.
10140
10141 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10142
10143         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10144         mark the base types In_Use in addition to making the operations
10145         use_visible.
10146
10147 2011-08-02  Ed Falis  <falis@adacore.com>
10148
10149         * init.c: add and setup __gnat_signal_mask for the exception signals
10150         * s-inmaop-vxworks.adb: new file.
10151         * s-intman-vxworks.adb: remove unnecessary initializations and
10152         simplify remaining
10153         * s-intman-vxworks.ads: remove unnecessary variable
10154         * s-taprop-vxworks.adb: simplify signal initialization
10155
10156 2011-08-02  Robert Dewar  <dewar@adacore.com>
10157
10158         * sem_ch8.adb: Minor code reorganization, comment updates.
10159
10160 2011-08-02  Robert Dewar  <dewar@adacore.com>
10161
10162         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10163         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10164         here from Sem_Res.
10165         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10166         (Matching_Static_Array_Bounds): Moved here from Sem_Res
10167
10168 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10169
10170         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10171         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10172         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10173         use_type_clauses, to handle more efficiently use_type and use_all_type
10174         constructs.
10175         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10176         Ada2012 Use_All_Type clause.
10177         (Use_Class_Wide_Operations): new procedure.
10178
10179 2011-08-02  Robert Dewar  <dewar@adacore.com>
10180
10181         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10182         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10183         expression to expression function.
10184
10185 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10186
10187         * sem_ch4.adb: transform simple Ada2012 membership into equality only
10188         if types are compatible.
10189
10190 2011-08-02  Yannick Moy  <moy@adacore.com>
10191
10192         * sem_res.adb (Matching_Static_Array_Bounds): new function which
10193         returns True if its argument array types have same dimension and same
10194         static bounds at each index.
10195         (Resolve_Actuals): issue an error in formal mode on actuals passed as
10196         OUT or IN OUT paramaters which are not view conversions in SPARK.
10197         (Resolve_Arithmetic_Op): issue an error in formal mode on
10198         multiplication or division with operands of fixed point types which are
10199         not qualified or explicitly converted.
10200         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10201         Boolean or array type (except String) operands.
10202         (Resolve_Equality_Op): issue an error in formal mode on equality
10203         operators for array types other than String with non-matching static
10204         bounds.
10205         (Resolve_Logical_Op): issue an error in formal mode on logical operators
10206         for array types with non-matching static bounds. Factorize the code in
10207         Matching_Static_Array_Bounds.
10208         (Resolve_Qualified_Expression): issue an error in formal mode on
10209         qualified expressions for array types with non-matching static bounds.
10210         (Resolve_Type_Conversion): issue an error in formal mode on type
10211         conversion for array types with non-matching static bounds
10212
10213 2011-08-02  Robert Dewar  <dewar@adacore.com>
10214
10215         * par-ch10.adb: Minor code reorganization (use Nkind_In).
10216
10217 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10218
10219         * par-ch9.adb: save location of entry for proper error message.
10220
10221 2011-08-02  Javier Miranda  <miranda@adacore.com>
10222
10223         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10224         (Use_Full_View) which permits this routine to climb through the
10225         ancestors using the full-view of private parents.
10226         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10227         Use_Full_View to true in calls to Is_Ancestor.
10228         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10229         true in call to Is_Ancestor.
10230         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10231         Use_Full_View to true in call to Is_Ancestor.
10232         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10233         call to Is_Ancestor.
10234         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10235         Use_Full_View to true in calls to Is_Ancestor.
10236         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10237         Make_Select_Specific_Data_Table, Register_Primitive,
10238         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10239         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10240         to true in call to Is_Ancestor.
10241         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10242         Use_Full_View to true in calls to Is_Ancestor.
10243         * exp_cg.adb
10244         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10245         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10246
10247 2011-08-02  Robert Dewar  <dewar@adacore.com>
10248
10249         * gnat_rm.texi: Minor reformatting.
10250         * sem_prag.adb: Minor reformatting.
10251
10252 2011-08-02  Tristan Gingold  <gingold@adacore.com>
10253
10254         * vms_data.ads: Add VMS qualifier for -gnateP.
10255
10256 2011-08-02  Robert Dewar  <dewar@adacore.com>
10257
10258         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10259         * par-ch7.adb (P_Package): Proper placement of aspects for package
10260         decl/instantiation.
10261         * par-endh.adb (Check_End): Ad Is_Sloc parameter
10262         (End_Statements): Add Is_Sloc parameterr
10263         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10264         (Check_End): Ad Is_Sloc parameter
10265         (End_Statements): Add Is_Sloc parameterr
10266
10267 2011-08-02  Vincent Celier  <celier@adacore.com>
10268
10269         * ug_words: Add VMS qualifier equivalent to -gnateP:
10270         /SYMBOL_PREPROCESSING.
10271
10272 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10273
10274         * gnat-style.texi: For hexadecimal numeric literals the typical
10275         grouping of digits is 4 to represent 2 bytes.
10276         A procedure spec which is split into several lines is indented two
10277         characters.
10278
10279 2011-08-02  Yannick Moy  <moy@adacore.com>
10280
10281         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10282         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10283         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10284         properly qualified
10285         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10286         choice in array aggregate
10287         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10288         mark as ancestor
10289         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10290         positional and named aggregate for record, or others in record
10291         aggregate, or multiple choice in record aggregate
10292         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10293         array operands to logical operations AND, OR and XOR do not have the
10294         same static lower and higher bounds
10295         * sem_ch5.adb, sinfo.ads: Correct typos in comments
10296
10297 2011-08-01  Robert Dewar  <dewar@adacore.com>
10298
10299         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10300         Replaces Last_Source_Node_In_Sequence.
10301         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10302         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10303         parens and blank in string (this was inconsistently implemented).
10304         * errout.ads
10305         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10306         blank in string (this was inconsistently implemented).
10307         * gnat1drv.adb
10308         (Set_Global_Switches): Set formal mode switches appropriately
10309         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10310         * par-prag.adb
10311         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10312         call Set_Error_Msg_Lang to set "spark" as language name.
10313         * par.adb: Remove unnecessary call to set formal language for errout
10314         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10315         appropriately and call Set_Error_Msg_Lang to set "spark" as language
10316         name.
10317         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10318         calls to it, moved after resolution so that types are known
10319         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10320         result of concatenation is not of type String
10321         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10322         concatenation is not properly restricted
10323         * gnat_rm.texi: Add doc on pragma Spark_95.
10324         * gcc-interface/Makefile.in: Remove obsolete target pairs for
10325         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10326         * gcc-interface/Make-lang.in: Update dependencies.
10327
10328 2011-08-01  Javier Miranda  <miranda@adacore.com>
10329
10330         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10331         condition that detects if the overridden operation must replace an
10332         existing entity.
10333
10334 2011-08-01  Javier Miranda  <miranda@adacore.com>
10335
10336         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10337         code declarations inserted by Insert_Actions in each alternative of the
10338         N_Case_Expression node.
10339
10340 2011-08-01  Robert Dewar  <dewar@adacore.com>
10341
10342         * sem_ch6.adb: Minor code reorganization.
10343         * sem_util.adb: Minor reformatting.
10344
10345 2011-08-01  Pascal Obry  <obry@adacore.com>
10346
10347         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10348         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10349
10350 2011-08-01  Yannick Moy  <moy@adacore.com>
10351
10352         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10353         literal or operator symbol which is prefixed
10354         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10355         mode on access attributes.
10356         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10357         that concatenation operands are properly restricted in formal mode
10358         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10359         Analyze_Concatenation_Operand. Issue an error in formal mode if the
10360         result of the concatenation has a type different from String.
10361         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10362         Analyze_Quantified_Expression, Analyze_Slice,
10363         Analyze_Null): issue an error in formal mode on unsupported constructs
10364         * sem_ch5.adb
10365         (Analyze_Block_Statement): only issue error on source block statement
10366         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10367         function which returns the last node in a list of nodes for which
10368         Comes_From_Source returns True, if any
10369         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10370         Last_Source_Node_In_Sequence
10371         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10372         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10373         mode on unsupported constructs
10374         * sem_ch9.adb Do not return after issuing error in formal mode, as the
10375         rest of the actions may be needed later on since the error is marked as
10376         not serious.
10377         * sinfo.ads: Typos in comments.
10378
10379 2011-08-01  Pascal Obry  <obry@adacore.com>
10380
10381         * projects.texi: Minor editing.
10382
10383 2011-08-01  Yannick Moy  <moy@adacore.com>
10384
10385         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10386         insertion character ~~
10387         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10388         (Set_Error_Msg_Lang): new procedure which fixes the language for use
10389         with insertion character ~~
10390         (Set_Msg_Text): treat insertion character ~~
10391         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10392         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10393         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10394         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10395         errors related to the formal language restriction not serious
10396         (insertion character |).
10397         * par.adb (Par): set formal language for error messages if needed
10398         * sem_ch6.adb (Check_Missing_Return): take into account possible
10399         generated statements at the end of the function
10400         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10401         enumeration value to define a new pragma SPARK_95
10402         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10403         SPARK_Version): new type and variables to store the SPARK version
10404         (none by default).
10405         (SPARK_Mode): return True when SPARK_Version is set
10406         * par-prag.adb: Correct indentation
10407         (Prag): take Pragma_SPARK_95 into account
10408         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
10409         into account.
10410
10411 2011-08-01  Robert Dewar  <dewar@adacore.com>
10412
10413         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
10414         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
10415         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10416
10417 2011-08-01  Pascal Obry  <obry@adacore.com>
10418
10419         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10420         Target_Name to Get_Path call.
10421         (Parse_Single_Project): Likewise.
10422         (Post_Parse_Context_Clause): Likewise.
10423         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10424         Call Initialise_Project_Path with the proper Target_Name.
10425         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10426         search path.
10427         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10428         with the proper Target_Name.
10429         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10430         Part.Parse routine.
10431         (Parse_Project_And_Apply_Config): Likewise.
10432         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10433         This is fine as this part of the code is supporting only native
10434         compilation.
10435         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10436         is fine as this part of the code is supporting only native compilation.
10437
10438 2011-08-01  Yannick Moy  <moy@adacore.com>
10439
10440         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10441         of homonym, unless the homonym is one of the cases allowed in SPARK
10442         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10443         package declaration occurring after a body.
10444
10445 2011-08-01  Robert Dewar  <dewar@adacore.com>
10446
10447         * checks.adb, exp_ch4.adb: Minor reformatting.
10448
10449 2011-08-01  Javier Miranda  <miranda@adacore.com>
10450
10451         * einfo.ads (Access_Disp_Table): Fix documentation.
10452         (Dispatch_Table_Wrappers): Fix documentation.
10453
10454 2011-08-01  Pascal Obry  <obry@adacore.com>
10455
10456         * prj-env.adb, prj-env.ads: Minor reformatting.
10457
10458 2011-08-01  Yannick Moy  <moy@adacore.com>
10459
10460         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10461         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10462         procedures out of these packages.
10463         * errout.ads, errout.adb
10464         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10465         procedures in of this package
10466         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10467         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10468         on misplaced later vs initial declarations, like in Ada 83
10469         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10470         formal mode on attribute of private type whose full type declaration
10471         is not visible
10472         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10473         package declaration inside a package specification
10474         (Analyze_Full_Type_Declaration): issue error in formal mode on
10475         controlled type or discriminant type
10476         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10477         user-defined operator means that it should come from the source
10478         (New_Overloaded_Entity): issue error in formal mode on overloaded
10479         entity.
10480         * sem_ch6.ads, sem_ch13.ads: typos in comments.
10481
10482 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10483
10484         * atree.adb: Minor reformatting.
10485         * checks.adb: Minor reformatting.
10486
10487 2011-08-01  Vincent Celier  <celier@adacore.com>
10488
10489         * s-parame-vms-ia64.ads: Fix typo in comment
10490         Minor reformatting
10491         * s-parame-vms-restrict.ads: Removed, unused.
10492
10493 2011-08-01  Javier Miranda  <miranda@adacore.com>
10494
10495         * exp_ch3.adb
10496         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
10497         * sem_ch3.adb
10498         (Constrain_Index): Remove side effects in the evaluation of the bounds.
10499         * sem_ch3.ads, sem_ch3.adb
10500         (Is_Constant_Bound): New extended version of the subprogram that was
10501         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
10502         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
10503         * sem_aux.ads (Constant_Value): Fix typo in comment.
10504         * checks.adb (Generate_Index_Checks): New implementation which, for
10505         array objects with constant bounds, generates the runtime check
10506         referencing the bounds of the array type. For other cases this routine
10507         provides its previous behavior obtaining such values from the array
10508         object.
10509         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
10510         parent type.
10511         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
10512         we cannot have semantic interpretations of the new node.
10513
10514 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10515
10516         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
10517         expressions.
10518
10519 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10520
10521         * sem_ch8.adb: Minor code editing.
10522         * s-vxwext.adb: Remove trailing space.
10523         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
10524         consistency with other files.
10525
10526 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10527
10528         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
10529
10530 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10531
10532         * par-ch10.adb: reject parameterized expressions as compilation unit.
10533         * sem_ch4.adb: handle properly conditional expression with overloaded
10534         then_clause and no else_clause.
10535
10536 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10537
10538         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10539         like done by System.Aux_DEC.
10540         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10541
10542 2011-08-01  Yannick Moy  <moy@adacore.com>
10543
10544         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10545         missing label at end of declaration (subprogram or package)
10546         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10547         of positional and named parameter association
10548         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10549         Error_Msg_SP which adds a prefix to the error message giving the name
10550         of the formal language analyzed
10551         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10552         access result type in subprogram, unconstrained array as result type,.
10553         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10554         procedure
10555         * sem_ch8.adb: Code clean up.
10556
10557 2011-08-01  Javier Miranda  <miranda@adacore.com>
10558
10559         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10560         * einfo.ads (Access_Disp_Table): Fix documentation.
10561         (Dispatch_Table_Wrappers): Fix documentation.
10562         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10563         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10564         to enforce the documentation of this attribute.
10565         (Set_Is_Interface): Cleanup the assertion.
10566         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10567         the Underlying_Type entity before reading attribute Access_Disp_Table.
10568         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10569         Locate the Underlying_Type before reading attribute Access_Disp_Table.
10570         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10571         the Underlying_Type entity before reading attribute Access_Disp_Table.
10572         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10573         Locate the Underlying_Type entity before reading attribute
10574         Access_Disp_Table.
10575
10576 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10577
10578         * s-poosiz.ads: Additional overriding indicators.
10579
10580 2011-08-01  Yannick Moy  <moy@adacore.com>
10581
10582         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10583         formal mode.
10584         (Analyze_Iteration_Scheme): issue error in formal mode when loop
10585         parameter specification does not include a subtype mark.
10586         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10587         formal mode on abstract subprogram.
10588         (Analyze_Subprogram_Specification): issue error in formal mode on
10589         user-defined operator.
10590         (Process_Formals): issue error in formal mode on access parameter and
10591         default expression.
10592         * sem_ch9.adb (Analyze_Abort_Statement,
10593         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10594         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10595         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10596         Analyze_Requeue, Analyze_Selective_Accept,
10597         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10598         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10599         issue error in formal mode on user-defined raise statement.
10600
10601 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10602
10603         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10604         declaration being hidden when overriding an implicit inherited
10605         subprogram.
10606         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10607         (-gnats), do not complain about a source file that contains only a
10608         pragma No_Body.
10609
10610 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10611
10612         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10613         variable if already set.
10614
10615 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10616
10617         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10618         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10619         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10620         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10621         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10622         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10623         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10624         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10625         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10626         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10627         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10628         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10629         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10630         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10631         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10632         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10633         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10634         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10635         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10636         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10637         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10638         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10639         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10640         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10641         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10642         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10643         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10644         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10645         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10646         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10647         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10648         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10649         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10650         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10651         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10652         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10653         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10654         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10655         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10656         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10657         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10658         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10659         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10660         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10661         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10662         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10663         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10664         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10665         s-osinte-mingw.ads: Update to GPLv3 run-time license.
10666         Use GNAT instead of GNARL.
10667
10668 2011-08-01  Bob Duff  <duff@adacore.com>
10669
10670         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10671         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10672         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10673         reformatting.
10674
10675 2011-08-01  Yannick Moy  <moy@adacore.com>
10676
10677         * debug.adb (d.D) reverve flag for the SPARK mode
10678         (d.E) reverve flag for SPARK generation mode
10679         (d.F) reverve flag for Why generation mode
10680         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10681         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
10682         functions which return True when the corresponding modes are set
10683         (Formal_Language): return "spark" or "alfa" when in formal verification
10684         mode.
10685         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10686         Error_Msg to prefix the error message with a tag giving the formal
10687         language
10688         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10689         message with a tag giving the formal language
10690         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10691         block statement
10692         (Analyze_Case_Statement): issue error in formal mode on case statement
10693         with a single "others" case alternative
10694         (Analyze_Exit_Statement): issue errors in formal mode on exit
10695         statements which do not respect SPARK restrictions
10696         (Analyze_Goto_Statement): issue error in formal mode on goto statement
10697         (Check_Unreachable_Code): always issue an error (not a warning) in
10698         formal mode on unreachable code (concerns both code after an infinite
10699         loop and after an unconditional jump, both not allowed in SPARK)
10700         * sem_ch6.adb (Analyze_Return_Statement): add call to
10701         Set_Return_Present for a procedure containing a return statement
10702         (already done for functions in Analyze_Function_Return)
10703         (Analyze_Function_Return): issue error in formal mode on extended
10704         return or if return is not last statement in function
10705         (Check_Missing_Return): issue error in formal mode if function does
10706         not end with return or if procedure contains a return
10707         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10708         function to detect if there is an inner scope of its parameter S which
10709         is a loop.
10710
10711 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10712
10713         * sem_ch6.ads: Minor reformatting.
10714
10715 2011-08-01  Javier Miranda  <miranda@adacore.com>
10716
10717         * sem_util.adb (Abstract_Interface_List): Complete condition when
10718         processing private type declarations to avoid reading unavailable
10719         attribute.
10720         (Is_Synchronized_Tagged_Type): Complete condition when processing
10721         private extension declaration nodes to avoid reading unavailable
10722         attribute.
10723
10724 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10725
10726         * sem_ch3.adb: Minor reformatting.
10727
10728 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10729
10730         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10731         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10732         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10733         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10734         for VMS, instead parametrize the common implementation with
10735         System.Parameters declarations.
10736
10737 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
10738
10739         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10740
10741 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10742
10743         * seh_init.c: Fix SEH handler installation on win64.
10744
10745 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10746
10747         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10748         double analysis of an anonymous access to subprogram, because it can
10749         lead to improper sharing of profiles and a back-end crash.
10750
10751 2011-08-01  Robert Dewar  <dewar@adacore.com>
10752
10753         * make.adb, sem_ch4.adb: Minor reformatting.
10754         * gcc-interface/Make-lang.in: Update dependencies.
10755         * sem_util.adb, exp_ch5.adb: Minor reformatting.
10756
10757 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10758
10759         * gnat_rm.texi: Fix definition of Long_Integer.
10760
10761 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10762
10763         * exp_aggr.adb: check limit size of static aggregate unconditionally,
10764         to prevent storage exhaustion.
10765         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10766         finalized is a function body, insert the cleanup code before the final
10767         return statement, to prevent spurious warnings.
10768         * s-pooglo.ads: add overriding indicator.
10769
10770 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10771
10772         * sem_ch4.adb (Operator_Check): improve error message when both a
10773         with_clause and a use_clause are needed to make operator usage legal.
10774         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10775         determine whether a compilation unit is visible within an other,
10776         either through a with_clause in the current unit, or a with_clause in
10777         its library unit or one one of its parents.
10778
10779 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10780
10781         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10782         over an arbitrary expression of an array or container type.
10783         * lib-xref.adb: clarify comment.
10784
10785 2011-08-01  Bob Duff  <duff@adacore.com>
10786
10787         * einfo.ads: Minor reformatting.
10788         * debug.adb: Minor comment improvement.
10789
10790 2011-08-01  Javier Miranda  <miranda@adacore.com>
10791
10792         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10793         consider hidden subprograms as valid candidates.
10794
10795 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10796
10797         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10798
10799 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
10800
10801         * gnat_ugn.texi: Fix typo.
10802
10803 2011-08-01  Robert Dewar  <dewar@adacore.com>
10804
10805         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10806         lib-xref.adb: Minor reformatting
10807
10808 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
10809
10810         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10811         when to generate a call to Move_Final_List.
10812         (Has_Controlled_Parts): Remove this function.
10813
10814 2011-08-01  Geert Bosch  <bosch@adacore.com>
10815
10816         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10817         "," in choice list.
10818
10819 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10820
10821         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10822         explicit raise of a predefined exception as Comes_From_Source if the
10823         original N_Raise_Statement comes from source.
10824
10825 2011-08-01  Robert Dewar  <dewar@adacore.com>
10826
10827         * sinfo.ads: Add comment.
10828         * sem_ch6.adb: Minor reformatting.
10829
10830 2011-08-01  Robert Dewar  <dewar@adacore.com>
10831
10832         * freeze.adb (Freeze_Entity): Refine check for bad component size
10833         clause to avoid rejecting confirming clause when atomic/aliased present.
10834
10835 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10836
10837         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10838         better determine whether an entity reference is a write.
10839         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10840         subcomponent.
10841         * lib-xref.adb (Output_References): Do no suppress a read reference at
10842         the same location as an immediately preceeding modify-reference, to
10843         handle properly in-out actuals.
10844
10845 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10846
10847         * env.c (__gnat_setenv) [VMS]: Refine previous change.
10848
10849 2011-08-01  Quentin Ochem  <ochem@adacore.com>
10850
10851         * i-cstrin.adb (New_String): Changed implementation, now uses only the
10852         heap to compute the result.
10853
10854 2011-08-01  Robert Dewar  <dewar@adacore.com>
10855
10856         * atree.ads: Minor reformatting.
10857
10858 2011-08-01  Emmanuel Briot  <briot@adacore.com>
10859
10860         * g-expect.adb (Get_Command_Output): Fix memory leak.
10861
10862 2011-08-01  Geert Bosch  <bosch@adacore.com>
10863
10864         * cstand.adb (P_Float_Type): New procedure to print the definition of
10865         predefined fpt types.
10866         (P_Mixed_Name): New procedure to print a name using mixed case
10867         (Print_Standard): Use P_Float_Type for printing floating point types
10868         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10869         precision IEEE float.
10870
10871 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10872
10873         * sem_ch3.adb: Minor reformatting.
10874
10875 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10876
10877         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10878         the completion of a generic function, insert the new body rather than
10879         rewriting the original.
10880
10881 2011-08-01  Yannick Moy  <moy@adacore.com>
10882
10883         * sinfo.ads, errout.ads: Typos in comments.
10884
10885 2011-08-01  Robert Dewar  <dewar@adacore.com>
10886
10887         * par-endh.adb: Minor reformatting.
10888
10889 2011-08-01  Robert Dewar  <dewar@adacore.com>
10890
10891         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10892         (Pre_Post_Aspects): New subtype.
10893         * par-ch12.adb (P_Generic): New syntax for aspects in packages
10894         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10895         * par-ch7.adb (P_Package): Remove Decl parameter
10896         (P_Package): Handle new syntax for aspects (before IS)
10897         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10898         new aspect syntax
10899         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10900         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10901         (P_Package): Remove Decl parameter
10902         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10903         aspects
10904         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10905         specs
10906         * sem_util.ads, sem_util.adb (Static_Boolean): New function
10907         * sinfo.ads: Document new syntax for aspects in packages etc.
10908         * sprint.adb: Handle new syntax of aspects before IS in package
10909
10910 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10911
10912         * atree.ads: Minor reformatting.
10913         * sem_prag.adb: Minor reformatting.
10914
10915 2011-08-01  Robert Dewar  <dewar@adacore.com>
10916
10917         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10918         case expr alternative.
10919
10920 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10921
10922         * sem_ch12.adb: Fix typo.
10923
10924 2011-08-01  Geert Bosch  <bosch@adacore.com>
10925
10926         * sem_prag.adb (Check_No_Link_Name): New procedure.
10927         (Process_Import_Or_Interface): Use Check_No_Link_Name.
10928         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10929         instead of Standard_Long_Long_Float_Size global. Preparation for
10930         eventual removal of per type constants.
10931         * exp_util.ads (Get_Stream_Size): New function returning the stream
10932         size value of subtype E.
10933         * exp_util.adb (Get_Stream_Size): Implement new function.
10934         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10935         function.
10936         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10937         * einfo.adb:
10938         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10939
10940 2011-08-01  Geert Bosch  <bosch@adacore.com>
10941
10942         * cstand.adb: Fix comments.
10943         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10944         count of arguments.
10945
10946 2011-08-01  Robert Dewar  <dewar@adacore.com>
10947
10948         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10949
10950 2011-08-01  Geert Bosch  <bosch@adacore.com>
10951
10952         * atree.ads: Fix comment.
10953
10954 2011-08-01  Robert Dewar  <dewar@adacore.com>
10955
10956         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10957         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10958         * par.adb: Add with for Namet.Sp.
10959         * par-tchk.adb: Minor reformatting.
10960
10961 2011-08-01  Vincent Celier  <celier@adacore.com>
10962
10963         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10964         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10965         of the init procedure of a SAL.
10966         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10967         New procedure.
10968
10969 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10970
10971         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10972         reformatting.
10973
10974 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10975
10976         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10977
10978 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10979
10980         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10981         conformant with its spec (return True only for types that have
10982         an overriding Initialize primitive operation that prevents them from
10983         having preelaborable initialization).
10984         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10985         initialization for controlled types in Ada 2005 or later mode.
10986
10987 2011-08-01  Robert Dewar  <dewar@adacore.com>
10988
10989         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10990         Postcondition.
10991         (Same_Aspect): New function.
10992         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10993         Type_Invariant, Precondition, Postcondition.
10994         * snames.ads-tmpl: Add Name_Type_Invariant.
10995
10996 2011-08-01  Robert Dewar  <dewar@adacore.com>
10997
10998         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10999         here.
11000         (Freeze_All_Ent): Fix error in handling inherited aspects.
11001         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11002         already analyzed, but don't skip entire processing of a declaration,
11003         that's wrong in some cases of declarations being rewritten.
11004         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11005         Don't delay for integer, string literals
11006         Treat predicates in usual manner for delay, remove special case code,
11007         not needed.
11008         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11009         (Build_Predicate_Function): Update saved expression in aspect
11010         (Build_Invariant_Procedure): Update saved expression in aspect
11011         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11012         of replacement of discriminant references if the reference is simple.
11013
11014 2011-08-01  Robert Dewar  <dewar@adacore.com>
11015
11016         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11017         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11018         Static_Predicate and Dynamic_Predicate.
11019         (Build_Predicate_Function): Add processing for Static_Predicate
11020         and Dynamic_Predicate.
11021         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11022         (From_Static_Predicate): New flag
11023         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11024
11025 2011-08-01  Robert Dewar  <dewar@adacore.com>
11026
11027         * usage.adb: Documentation cleanup for Ada version modes in usage.
11028         * expander.adb: Minor reformatting.
11029
11030 2011-08-01  Robert Dewar  <dewar@adacore.com>
11031
11032         * atree.ads: Minor comment fix.
11033         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11034         a-witeio.ads, sem_prag.adb: Minor reformatting.
11035
11036 2011-08-01  Doug Rupp  <rupp@adacore.com>
11037
11038         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11039         pointers. Use descrip.h header file for convenience. Add some
11040         comments.
11041
11042 2011-08-01  Robert Dewar  <dewar@adacore.com>
11043
11044         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11045         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11046         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11047         New procedure.
11048         (Check_Aspect_At_End_Of_Declarations): New procedure
11049         (Analye_Aspect_Specification): Minor changes for above procedures
11050         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11051         specification node as well.
11052
11053 2011-08-01  Pascal Obry  <obry@adacore.com>
11054
11055         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11056         Windows files. Use GetFilesAttributes() in this case to check for file
11057         existence instead of returning with an error code.
11058
11059 2011-08-01  Vincent Celier  <celier@adacore.com>
11060
11061         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11062         High is above Source length.
11063
11064 2011-08-01  Robert Dewar  <dewar@adacore.com>
11065
11066         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11067
11068 2011-08-01  Robert Dewar  <dewar@adacore.com>
11069
11070         * aspects.ads (Boolean_Aspects): New subtype.
11071         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11072         for derived types in cases where the parent type and derived type have
11073         aspects.
11074         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11075         with aspects when parent type also has aspects.
11076         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11077         boolean expression at this point).
11078         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11079         accordance with final decision on the Ada 2012 feature.
11080         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11081
11082 2011-08-01  Matthew Heaney  <heaney@adacore.com>
11083
11084         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11085
11086 2011-08-01  Pascal Obry  <obry@adacore.com>
11087
11088         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11089         Fix Replace_Slice when High is above current string size.
11090         (Replace_Slice): Fix DL computation when High is above current
11091         string length.
11092
11093 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
11094
11095         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11096
11097 2011-08-01  Matthew Heaney  <heaney@adacore.com>
11098
11099         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11100         of node.
11101
11102 2011-08-01  Pascal Obry  <obry@adacore.com>
11103
11104         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11105         reformatting.
11106
11107 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11108
11109         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11110         access to protected subprograms in generic bodies.
11111         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11112         protected type, indicate that the convention of the subprogram is
11113         Convention_Protected, because it may be used in subsequent declarations
11114         within the protected declaration.
11115
11116 2011-08-01  Vincent Celier  <celier@adacore.com>
11117
11118         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11119         and "final" procedures when the name of the library is "ada", to avoid
11120         duplicate symbols "adainit" and "adafinal" in executables.
11121
11122 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11123
11124         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11125         quantified expression that appears within a postcondition and uses the
11126         Ada2012 'Result attribute.
11127
11128 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11129
11130         * init.c (__gnat_error_handler): Cast reason to int.
11131         (__gnat_install_handler): Explain sa_sigaction use.
11132
11133 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11134
11135         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11136         subprogram has copy-in copy-out parameters, try to promote the mode of
11137         the return type if it is passed in registers.
11138
11139 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11140
11141         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11142         left operand as addressable.
11143
11144 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
11145
11146         * gcc-interface/gigi.h (build_function_stub): Remove.
11147         (build_return_expr): Likewise.
11148         (convert_vms_descriptor): Declare.
11149         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11150         (build_function_stub): Move to...
11151         * gcc-interface/utils2.c (build_return_expr): Move to...
11152         * gcc-interface/trans.c (build_function_stub): ...here.
11153         (build_return_expr): ...here.
11154         (Subprogram_Body_to_gnu): Add local variable for language_function.
11155         Disconnect the parameter attributes cache, if any, once done with it.
11156         Call end_subprog_body only after setting the end_locus.
11157         Build the stub associated with the function, if any, at the very end.
11158         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11159         variables and streamline control flow.
11160
11161 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
11162
11163         PR ada/49819
11164         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11165         g-trasym-dwarf.adb.
11166
11167 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11168
11169         PR bootstrap/49794
11170         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11171         Assign to act.sa_sigaction.
11172         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11173         current->return_address to char * before arithmetic.
11174
11175 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11176
11177         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11178         Correct argument types.
11179         Extract code from reason.
11180         (__gnat_install_handler): Assign to act.sa_sigaction.
11181
11182 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
11183
11184         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11185         (GNAT1_OBJS): ...here.
11186
11187 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
11188
11189         PR ada/48711
11190         * g-socthi-mingw.adb (Fill): Fix formatting.
11191
11192         * gcc-interface/gigi.h: Move around comment.
11193
11194 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
11195
11196         PR ada/46350
11197         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11198
11199 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
11200
11201         PR ada/48711
11202         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11203
11204 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
11205
11206         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11207         range comparison if Pmode is SImode.
11208
11209 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
11210             Eric Botcazou  <ebotcazou@adacore.com>
11211
11212         * adadecode.c: Wrap up in extern "C" block.
11213         * adadecode.h: Likewise.
11214         * adaint.c: Likewise.  Remove 'const' keyword.
11215         * adaint.h: Likewise.
11216         * argv.c: Likewise.
11217         * atree.h: Likewise.
11218         * cio.c: Likewise.
11219         * cstreams.c: Likewise.
11220         * env.c: Likewise.
11221         * exit.c: Likewise.
11222         * fe.h: Likewise.
11223         * final.c: Likewise.
11224         * init.c: Likewise.
11225         * initialize.c: Likewise.
11226         * link.c: Likewise.
11227         * namet.h: Likewise.
11228         * nlists.h: Likewise.
11229         * raise.c: Likewise.
11230         * raise.h: Likewise.
11231         * repinfo.h: Likewise.
11232         * seh_init.c: Likewise.
11233         * targext.c: Likewise.
11234         * tracebak.c: Likewise.
11235         * uintp.h: Likewise.
11236         * urealp.h: Likewise.
11237         * xeinfo.adb: Wrap up generated C code in extern "C" block.
11238         * xsinfo.adb: Likewise.
11239         * xsnamest.adb: Likewise.
11240         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11241         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11242         * gcc-interface/misc.c: Likewise.
11243         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11244         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
11245         ada/targext.o here...
11246         (GNAT_ADA_OBJS): ...and not here.
11247         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11248         (GNATBIND_OBJS): Reorder.
11249
11250 2011-07-07  Richard Henderson  <rth@redhat.com>
11251
11252         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11253         dwarf2out_frame_init.
11254
11255 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
11256
11257         * gcc-interface/misc.c (gnat_init): Tweak previous change.
11258
11259 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11260
11261         PR target/39150
11262         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11263
11264 2011-07-06  Richard Guenther  <rguenther@suse.de>
11265
11266         * gcc-interface/misc.c (gnat_init): Merge calls to
11267         build_common_tree_nodes and build_common_tree_nodes_2.
11268         Re-initialize boolean_false_node.
11269
11270 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
11271             Olivier Hainque  <hainque@adacore.com>
11272             Nicolas Setton  <setton@adacore.com>
11273
11274         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11275         the type according to the ARTIFICIAL_P parameter.
11276         (create_type_decl): Likewise.
11277         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11278
11279 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
11280
11281         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11282         (gnatbind): Likewise.
11283
11284 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11285
11286         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11287
11288 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11289
11290         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11291         local variable throughout.  Remove useless call to Base_Type.
11292         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11293         Take it also into account for the volatileness of the field.  Set the
11294         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
11295
11296 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11297
11298         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11299         on a dereference built for a by-ref object if it has an address clause.
11300
11301 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11302
11303         * einfo.ads (Address_Taken): Document use for the second argument of
11304         Asm_Input and Asm_Output attributes.
11305         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11306         argument is an entity name, then set Address_Taken on it.
11307         <Attribute_Asm_Output>: Likewise.
11308         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11309         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11310         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11311         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11312
11313 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
11314
11315         PR middle-end/46500
11316         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11317
11318 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
11319
11320         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11321         (ada/utils.o): Update dependencies.
11322         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11323         ../../../libcpp/libcpp.a.
11324         * gcc-interface/utils.c: Include common/common-target.h.
11325         (process_attributes): Use targetm_common.have_named_sections.
11326
11327 2011-06-07  Richard Guenther  <rguenther@suse.de>
11328
11329         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11330         set_sizetype.
11331
11332 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11333
11334         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11335         TREE_THIS_NOTRAP flag.
11336
11337 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11338
11339         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11340         Fix thinko.
11341
11342 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11343
11344         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11345         constants whose full view has discriminants specially.
11346
11347 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11348
11349         * gcc-interface/utils.c: Include diagnostic.h.
11350         (gnat_write_global_declarations): Output debug information for all
11351         global type declarations before finalizing the compilation unit.
11352         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11353
11354 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
11355
11356         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11357
11358 2011-05-25  Kai Tietz  <ktietz@redhat.com>
11359
11360         * adaint.c (__gnat_to_canonical_file_list_next): Use array
11361         initialization instead of const/none-const pointer assignment.
11362
11363 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
11364
11365         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11366         $(EXTRA_GNAT1_OBJS).
11367         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11368         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11369         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11370         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11371         libcommon-target.a instead of prefix.o.
11372
11373 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
11374
11375         PR ada/49097
11376         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11377
11378 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
11379
11380         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11381         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11382         instead of version.o.
11383
11384 2011-05-18  Kai Tietz <ktietz@redhat.com>
11385
11386         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11387         boolean_false_node instead of integer_zero_node.
11388         (convert_with_check): Likewise.
11389         * gcc-interface/decl.c (choices_to_gnu): Likewise.
11390
11391 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
11392
11393         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11394         type of the parameter is an unconstrained array, convert the actual to
11395         the type of the formal in the In Out and Out cases as well.
11396
11397 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
11398
11399         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11400         call build_function_type_array or build_varargs_function_type_array
11401         instead.
11402         (create_subprog_type): Don't call build_function_type; call
11403         build_function_type_vec instead.
11404
11405 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
11406
11407         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11408         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11409         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
11410
11411 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
11412
11413         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
11414
11415         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11416         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11417
11418 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
11419
11420         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11421
11422 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
11423
11424         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11425         instead of accessing TYPE_ARG_TYPES directly.
11426         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11427
11428 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
11429
11430         PR ada/48844
11431         * gcc-interface/gigi.h (get_variant_part): Declare.
11432         * gcc-interface/decl.c (get_variant_part): Make global.
11433         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11434         types have the same constant size, are record types and T1 has a
11435         variant part while T2 doesn't.
11436
11437 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
11438
11439         * gcc-interface/utils.c (begin_subprog_body): Do not call
11440         get_pending_sizes.
11441         (end_subprog_body): Likewise.
11442
11443 2011-05-04  Richard Guenther  <rguenther@suse.de>
11444
11445         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11446         int_const_binop.
11447         (pos_to_constructor): Likewise.
11448
11449 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
11450             Eric Botcazou  <ebotcazou@adacore.com>
11451
11452         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11453         of build_function_type.  Adjust calls to...
11454         (build_raise_check): ...this.  Do not take a void_tree parameter.
11455         Call build_function_type_list instead of build_function_type.
11456         Fix head comment and swap couple of conditional blocks.
11457
11458 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
11459
11460         * gnatvsn.ads (Library_Version): Bump to 4.7.
11461         (Current_Year): Bump to 2011.
11462
11463 2011-04-29  Michael Matz  <matz@suse.de>
11464
11465         * gcc-interface/misc.c (gnat_handle_option): Set
11466         warn_maybe_uninitialized.
11467
11468 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
11469
11470         * gnat_ugn.texi (Complexity Metrics Control): Update link to
11471         the Watson/McCabe paper.
11472
11473 2011-04-23  Jim Meyering  <meyering@redhat.com>
11474
11475         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11476
11477 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
11478
11479         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11480         onto the new type.
11481
11482 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
11483
11484         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
11485         parameter.
11486         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
11487         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
11488         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
11489         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
11490         <all>: Do not set flags on the reused DECL node coming from an alias.
11491         Set DECL_IGNORED_P on the DECL node built for subprograms if they
11492         don't need debug info here...
11493         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
11494         (gigi): Adjust calls to create_subprog_decl.
11495         (build_raise_check): Likewise.
11496         (establish_gnat_vms_condition_handler): Likewise.
11497         (Compilation_Unit_to_gnu): Likewise.
11498         (gnat_to_gnu): Likewise.
11499
11500 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
11501
11502         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
11503         (NO_REORDER_ADAFLAGS): New variable.
11504         (EXTRA_GNATTOOLS): Always define.
11505         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
11506         Clean up and adjust list of files compiled with special options.
11507         * gcc-interface/Make-lang.in: Likewise.
11508         (ada/decl.o): Cosmetical change.
11509         (ada/misc.o): Remove dependency on $(PLUGIN_H).
11510
11511 2011-04-20  Jim Meyering  <meyering@redhat.com>
11512
11513         * initialize.c (__gnat_initialize): Remove useless if-before-free.
11514
11515 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
11516
11517         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
11518         $(CFLAGS) on the link line.
11519
11520 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
11521
11522         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
11523         padded type built for the return type if it is unconstrained.
11524
11525 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
11526
11527         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
11528
11529 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
11530
11531         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11532         before calling TREE_CHAIN.
11533         * gcc-interface/misc.c (gnat_init_ts): New function.
11534         (LANG_HOOKS_INIT_TS): Define.
11535
11536 2011-04-12  Martin Jambor  <mjambor@suse.cz>
11537
11538         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11539         instead of cgraph_node.
11540
11541 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
11542
11543         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11544         alignment on fields of the RETURN type built for the Copy-In Copy-Out
11545         mechanism.
11546
11547 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
11548
11549         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11550         of aggregate types that contain a placeholder.
11551
11552 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
11553
11554         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11555         TYPE_ARG_TYPES.
11556         (handle_type_generic_attribute): Likewise.
11557
11558 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
11559
11560         PR ada/47163
11561         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11562
11563 2011-04-04  Kai Tietz  <ktietz@redhat.com>
11564
11565         PR ada/47163
11566         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11567         to flag value.
11568
11569 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11570
11571         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11572         type case, do not strip a padding type around the array type.
11573
11574 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11575
11576         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11577         types.
11578
11579 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11580
11581         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11582         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11583         code for -feliminate-unused-debug-types.
11584         (gnat_post_options): Likewise.
11585
11586 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11587
11588         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11589         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11590         distinct copy.
11591
11592 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11593
11594         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11595         DECL_ARTIFICIAL flag on enumeration types.
11596
11597 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11598
11599         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11600         fat pointer types artificial unconditionally.
11601         <E_Array_Subtype>: Attach the base array type as a parallel type if it
11602         isn't artificial.
11603
11604 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11605
11606         * gcc-interface/gigi.h (get_dummy_type): Declare.
11607         (build_dummy_unc_pointer_types): Likewise.
11608         (finish_fat_pointer_type): Likewise.
11609         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11610         fat pointer type has been built, complete it in place.
11611         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11612         and thin pointers.  Remove useless variable.
11613         (finish_fat_pointer_type): Make global and move to...
11614         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11615         (get_dummy_type): New function.
11616         (build_dummy_unc_pointer_types): Likewise.
11617         (gnat_pushdecl): Propage the name to the anonymous variants only.
11618         (update_pointer_to): Only adjust the pointer types in the unconstrained
11619         array case.
11620
11621 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11622
11623         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11624         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11625         if this is a Taft amendment type and the full declaration is available.
11626         * gcc-interface/trans.c (process_type): Likewise.
11627         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11628         (process_freeze_entity): Likewise.
11629         * gcc-interface/utils.c (dummy_global): New static variable.
11630         (gnat_write_global_declarations): If there are types declared as used
11631         at the global level, insert them in the global hash table.
11632
11633 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11634
11635         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11636         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11637         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11638         copy.
11639         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
11640         flag of the type accordingly.
11641         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11642
11643 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11644
11645         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11646         finalizing types when updating the pointers to the designated type.
11647         <all>: Finalize the deferred types even if we didn't defer processing
11648         of incomplete types in this invocation.
11649
11650 2011-04-01  Olivier Hainque  <hainque@adacore.com>
11651             Nicolas Setton  <setton@adacore.com>
11652             Eric Botcazou  <ebotcazou@adacore.com>
11653
11654         * gcc-interface/misc.c (gnat_descriptive_type): New function.
11655         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11656
11657 2011-03-28  Kai Tietz  <ktietz@redhat.com>
11658
11659         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11660         Windows targets.
11661         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11662         * system-mingw.ads (System): Change ZCX_By_Default default to True.
11663
11664         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11665
11666 2011-03-28  Tristan Gingold  <gingold@adacore.com>
11667
11668         PR ada/44431
11669         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11670         Use ada output of gnatbind.
11671         (ada/b_gnatb.adb): Ditto.
11672         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11673         (ada.mostlyclean, ada.stage1)
11674         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11675         (ada.stagefeedback): Adjust.
11676         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11677         Use ada output of gnatbind.
11678         (b_gnatm.adb): Ditto.
11679         (b_gnatl.o, b_gnatm.o): New rules.
11680
11681 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11682
11683         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11684         for the padded type built to support a specified size or alignment.
11685
11686 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11687
11688         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11689         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11690         unconditionally to the end of the unit when the designated type is
11691         limited_with'ed.
11692         <all>: Rename local variable.  Attempt to un-defer types only and do it
11693         for limited_with'ed types as well.
11694         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
11695         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11696         consistently and remove redundant call to finalize_from_with_types.
11697
11698 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11699
11700         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11701         subprograms without a previous spec declared in the same unit.
11702         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11703         subprograms at the end of the unit instead of at the beginning.
11704         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11705         isn't public for the special handling of non-inline functions nested
11706         inside inline external functions.
11707
11708 2011-03-25  Jeff Law  <law@redhat.com>
11709
11710         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11711
11712 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11713
11714         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11715         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11716         to compute Set_Size_Depends_On_Discriminant.
11717         (Layout_Type): Call it on array types in back-end layout mode.
11718         * sem_util.adb (Requires_Transient_Scope): Return true for array
11719         types only if the size depends on the value of discriminants.
11720         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11721         type if the RHS is a call to a function that returns an unconstrained
11722         type with default discriminant.
11723
11724 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11725
11726         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11727         non-conversion to the nominal result type at the end.
11728
11729 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11730
11731         * gcc-interface/trans.c (create_temporary): New function taken from...
11732         (create_init_temporary): ...here.  Call it.
11733         (call_to_gnu): Create the temporary for the return value early, if any.
11734         Create it for a function with copy-in/copy-out parameters if there is
11735         no target; in other cases of copy-in/copy-out, use another temporary.
11736         Push the new binding level lazily.  Add and rename local variables.
11737
11738 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11739
11740         * gcc-interface/decl.c (validate_size): Improve comments and tweak
11741         error message.
11742         (set_rm_size): Likewise.
11743
11744 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11745
11746         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11747         for the padded type built in order to support a specified alignment.
11748         Fix incorrect formatting.
11749
11750 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11751
11752         PR bootstrap/48216
11753         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11754
11755 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11756
11757         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11758         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11759         to the end of the list.  Adjust recursive call.  Rename local variable.
11760         If REORDER is true, reorder components of the record type.
11761         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11762         components_to_record and adjust the parameter list.
11763
11764 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11765
11766         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11767         disabled, use the variable for bounds of loop iteration scheme.
11768
11769 2011-03-21  Kai Tietz  <ktietz@redhat.com>
11770
11771         PR target/12171
11772         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11773
11774 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
11775
11776         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11777         out whether the expression is read-only.  Short-circuit placeholder
11778         case and rename a couple of local variables.
11779
11780 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
11781
11782         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11783         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11784         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11785         (convert): Deal with conversions from a smaller form type specially.
11786
11787 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
11788
11789         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11790         its argument, except for the special -I- switch.
11791
11792 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
11793
11794         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11795         "Ada Issues".
11796
11797 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
11798
11799         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11800
11801 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
11802
11803         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11804         GNAT_FORMAL.
11805         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11806         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
11807         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
11808         Do not generate the check directly, instead instantiate the template
11809         check present in the descriptor.
11810         (make_descriptor_field): Move around.
11811         (build_vms_descriptor32): Build a template check in the POINTER field.
11812         (build_vms_descriptor): Remove useless suffixes.
11813         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11814
11815 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
11816
11817         PR bootstrap/47467
11818         * targext.c: Include target files if IN_RTS is defined.
11819
11820 2011-01-26  Richard Guenther  <rguenther@suse.de>
11821
11822         PR bootstrap/47467
11823         * targext.c: Include config.h.
11824         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11825         dependency.
11826
11827 2011-01-04  Pascal Obry  <obry@adacore.com>
11828             Eric Botcazou  <ebotcazou@adacore.com>
11829
11830         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11831
11832 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11833
11834         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11835         end-of-case on the end label and its associated gotos, if any.
11836
11837 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11838
11839         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11840         expressions of the parameter cache within the statement group of
11841         the CICO mechanism.
11842
11843 2011-01-04  Olivier Hainque  <hainque@adacore.com>
11844             Eric Botcazou  <ebotcazou@adacore.com>
11845
11846         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11847         (set_end_locus_from_node): New function.
11848         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11849         make and the function end_locus.
11850         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11851         for the elaboration subprogram.
11852         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11853         set the end_locus of the expression as well.
11854
11855 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11856
11857         PR ada/47131
11858         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11859         variables that are referenced in exception handlers volatile.
11860
11861
11862 \f
11863 Copyright (C) 2011 Free Software Foundation, Inc.
11864
11865 Copying and distribution of this file, with or without modification,
11866 are permitted in any medium without royalty provided the copyright
11867 notice and this notice are preserved.