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         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4         Requires/Ensures.
5         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
6         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
7         Requires/Ensures.
8
9 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
10
11         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
12         Add comment.
13
14 2011-08-29  Thomas Quinot  <quinot@adacore.com>
15
16         * sem_res.adb: Minor reformatting.
17
18 2011-08-29  Johannes Kanig  <kanig@adacore.com>
19
20         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
21         mode.
22         * gnat1drv.adb (Adjust_Global_Switches): Set
23         Use_Expressions_With_Actions to False in ALFA mode.
24         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
25         ALFA mode.
26
27 2011-08-29  Yannick Moy  <moy@adacore.com>
28
29         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
30         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
31         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
32         tagged types and dispatching calls in Alfa mode.
33
34 2011-08-29  Javier Miranda  <miranda@adacore.com>
35
36         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
37         we do not report an error on an Empty node.
38
39 2011-08-29  Geert Bosch  <bosch@adacore.com>
40
41         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
42         a-nlrear.o and a-nurear.o.
43
44 2011-08-29  Robert Dewar  <dewar@adacore.com>
45
46         * freeze.adb: Minor code reorganization.
47         Minor reformatting.
48         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
49         sem_ch6.adb: Minor reformatting
50
51 2011-08-29  Tristan Gingold  <gingold@adacore.com>
52
53         * s-except.ads, s-except.adb: Provide dummy body.
54
55 2011-08-29  Yannick Moy  <moy@adacore.com>
56
57         * sem_warn.adb (Within_Postcondition): Take into account the case of
58         an Ensures component in a Test_Case.
59
60 2011-08-29  Tristan Gingold  <gingold@adacore.com>
61
62         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
63         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
64         System_Exceptions_Debug
65         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
66         * a-except.adb: With and use System.Exceptions_Debug instead of
67         System.Exceptions.
68         * a-except-2005.adb: Likewise.
69         * s-assert.adb: Likewise.
70         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
71         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
72         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
73         s-excdeb. Update dependencies.
74         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
75         as these no longer need external libraries.
76
77 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
78
79         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
80         exponentiation operator on universal values in a context that requires
81         a fixed-point type.
82
83 2011-08-29  Tristan Gingold  <gingold@adacore.com>
84
85         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
86         before calling notify_handled_exception.
87         * a-exextr.adb: Fix comment.
88
89 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
90
91         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
92         Finalize_Address of the access type's finalization master.
93         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
94         access type's finalization master. Add a guard to prevent
95         Associated_Storage_Pool from being set on .NET/JVM.
96         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
97         attribute Finalize_Address of the access type's finalization master.
98         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
99         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
100         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
101         RE_Unit_Table.
102         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
103         use clause for System.IO
104         (Detach): Relax the assertion, to be reinstated later.
105         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
106         Relax the assertion on Finalize_Address, to be reinstated later.
107         (Is_Empty_List): New routine.
108         (pm): New debug routine.
109         (Set_Finalize_Address): New routine.
110         * s-finmas.ads (pm): New debug routine.
111         (Set_Finalize_Address): New routine.
112         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
113
114 2011-08-29  Tristan Gingold  <gingold@adacore.com>
115
116         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
117         Remove convention C.
118
119 2011-08-29  Tristan Gingold  <gingold@adacore.com>
120
121         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
122         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
123         (Finalize_TCB): Remove its finalization.
124         (Initialize): Remove assignment of GET_Exc_Stack_Addr
125         * s-soflin.adb (NT_Exc_Stack): Remove
126         (Get_Exc_Stack_Addr_NT): Likewise.
127         (Get_Exc_Stack_Addr_Soft): Likewise.
128         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
129         (Get_Exc_Stack_Addr): Likewise.
130         (Get_Exc_Stack_Addr_Soft): Likewise
131         * s-taspri-vms.ads (Exc_Stack_T): Remove.
132         (Exc_Stack_Ptr_T): Likewise.
133         (Private_Data): Remove Exc_Stack_Ptr component.
134
135 2011-08-29  Tristan Gingold  <gingold@adacore.com>
136
137         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
138
139 2011-08-29  Tristan Gingold  <gingold@adacore.com>
140
141         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
142
143 2011-08-29  Geert Bosch  <bosch@adacore.com>
144
145         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
146         L2_Norm, Swap_Column): New generic subprograms
147         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
148         L2_Norm, Swap_Column): Implement new subprograms in order to
149         eliminate dependency on BLAS and LAPACK libraries in
150         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
151         version. Forward_Eliminate/Back_Substitute can be used to put a
152         matrix in row echelon or reduced row echelon form using partial
153         pivoting.
154         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
155         Swap_Column): Instantiate from System.Generic_Array_Operations.
156         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
157         (Sqrt): Local function for simple computation of square root without
158         adding dependencies on Generic_Elementary_Functions.
159         (Swap): New subprogram to exchange floating point numbers.
160         (Inverse): Reimplement using Jordan-Gauss elimination.
161         (Jacobi): New procedure implementing Jacobi's method for computation
162         of eigensystems, based on Rutishauser's implementation.
163         (L2_Norm): Implement directly using the inner product.
164         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
165         decreasing eigenvalue as required by the Ada RM.
166         (Swap_Column): New helper procedure for Sort_Eigensystem.
167         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
168         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
169         Sort_Eigensystems.
170
171 2011-08-29  Thomas Quinot  <quinot@adacore.com>
172
173         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
174         statements line.
175
176 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
177
178         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
179         than the current node.
180         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
181         Finalization_Master. The list headers have two fields instead of three.
182         This should fix alignment issue but subpool allocations are now
183         unusable. Alphabetize subprograms.
184         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
185         the size of the header when converting the beginning of the object to
186         a FM_Node. Set the master's Finalize_Address attribute if not already
187         set.
188         (Deallocate_Any_Controlled): Use the offset rather than the size of the
189         header when converting the beginning of the object to a FM_Node.
190
191 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
192
193         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
194         reraise when compiling for CodePeer.
195
196 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
197
198         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
199         now needed by a-convec.adb. Fix warning.
200
201 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
202
203         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
204         processing of TSS routine Finalize_Address when compiling in
205         CodePeer_Mode.
206
207 2011-08-29  Thomas Quinot  <quinot@adacore.com>
208
209         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
210         sem_warn.adb: Minor reformatting.
211
212 2011-08-29  Emmanuel Briot  <briot@adacore.com>
213
214         * prj-conf.adb (Get_Config_Switches): Also collect the list of
215         languages from aggregated projects.
216
217 2011-08-29  Yannick Moy  <moy@adacore.com>
218
219         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
220         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
221         Traverse_Package_Declaration, Traverse_Subprogram_Body,
222         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
223         for stubs are traversed too when parameter is set
224         (Traverse_All_Compilation_Units): Traverse without going inside stubs
225         (Traverse_Declarations_Or_Statements): Do the special traversing for
226         stubs when required.
227         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
228         return subprogram or package body from stub.
229         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
230         stubs without prior subprogram decl.
231
232 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
233
234         * gnat_ugn.texi: Fix typo.
235
236 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
237
238         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
239         which accounts for size vs alignment issues and calculates the size of
240         the list header.
241         (Deallocate_Any_Controlled): Ditto.
242         (Nearest_Multiple_Rounded_Up): New routine.
243
244 2011-08-29  Tristan Gingold  <gingold@adacore.com>
245
246         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
247         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
248         (Set_Exception_Msg): Ditto.
249         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
250         Private_Data.
251         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
252         Use Save_Occurrence instead of Save_Occurrence_No_Private.
253         (Raise_With_Msg): Remove Cleanup_Flag.
254         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
255         Clean_Flag and Private_Data components.
256
257 2011-08-29  Yannick Moy  <moy@adacore.com>
258
259         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
260         in CodePeer mode.
261         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
262         of an explicitly declared type, so that the base types of the original
263         type and this generated type are the same, and a "type" (not a subtype
264         like previously).
265         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
266         small" in Alfa mode, like in CodePeer mode.
267         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
268         clauses in Alfa mode.
269
270 2011-08-29  Javier Miranda  <miranda@adacore.com>
271
272         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
273         function to the package spec.
274         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
275         internally generated bodies of null procedures locate the internally
276         generated spec enforcing mode conformance.
277         (Is_Interface_Conformant): Ensure that the controlling formal of the
278         primitives match.
279
280 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
281
282         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
283         reject the pragma if it appears to apply to a formal subprogram.
284
285 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
286
287         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
288         inner expression, to prevent double evaluation.
289
290 2011-08-29  Tristan Gingold  <gingold@adacore.com>
291
292         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
293         they were unused.
294         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
295         * a-except-2005.adb (Propagate_Exception): Adjust spec.
296         (Raise_Current_Excep): Adjust call.
297         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
298
299 2011-08-29  Thomas Quinot  <quinot@adacore.com>
300
301         * exp_disp.adb: Minor reformatting.
302
303 2011-08-29  Tristan Gingold  <gingold@adacore.com>
304
305         * a-exexpr.adb (Setup_Exception): Removed.
306         * a-exexpr-gcc.adb (Setup_Exception): Removed.
307         * a-except.adb (Exception_Propagation): Removed.
308         * a-except-2005.adb (Setup_Exception): Removed.
309         (Reraise): Remove call to Setup_Exception.
310         (Reraise_Occurrence): Ditto.
311         (Reraise_Occurrence_Always): Ditto.
312         (Reraise_Occurrence_No_Defer): Ditto.
313         (Transfer_Occurrence): Ditto.
314         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
315         (Set_Exception_Msg): Ditto.
316
317 2011-08-29  Robert Dewar  <dewar@adacore.com>
318
319         * a-convec.adb, exp_disp.adb: Minor reformatting.
320
321 2011-08-29  Tristan Gingold  <gingold@adacore.com>
322
323         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
324
325 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
326
327         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
328         Exception_Handlers to No_List instead of Empty_List in the case where
329         there are no handlers.
330
331 2011-08-29  Tristan Gingold  <gingold@adacore.com>
332
333         * gcc-interface/gigi.h (enum standard_datatypes): Add
334         ADT_reraise_zcx_decl
335         (reraise_zcx_decl): New macro.
336         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
337         (gigi): Set reraise_zcx_decl.
338         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
339         (gnat_to_gnu): Handle N_Raise_Statement.
340
341 2011-08-29  Robert Dewar  <dewar@adacore.com>
342
343         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
344         a-undesu.adb: Minor reformatting.
345
346 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
347
348         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
349         table, accept an unfrozen untagged component if it is an actual for a
350         formal incomplete type.
351         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
352         provide new iterator forms over vectors.
353         Introduce type Iterator in package body to implement operations of
354         Reversible_Iterator interface.
355         * a-iteint.ads: Make package pure so it is usable with new container
356         packages, that are categorized Remote_Types.
357
358 2011-08-29  Robert Dewar  <dewar@adacore.com>
359
360         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
361
362 2011-08-29  Bob Duff  <duff@adacore.com>
363
364         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
365         of <>, because this is the routine that checks for dimensionality
366         errors (for example, for a two-dimensional array, (others => <>) should
367         be (others => (others => <>)).
368
369 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
370
371         * impunit.adb: Add new run-time units.
372         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
373         s-stposu.ads, s-stposu.adb: Code clean up.
374         Handle protected class-wide or task class-wide types
375         Handle C/C++/CIL/Java types.
376         * s-spsufi.adb, s-spsufi.ads: New files.
377
378 2011-08-29  Yannick Moy  <moy@adacore.com>
379
380         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
381         library-level subprogram.
382         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
383         placement.
384         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
385         component.
386         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
387         component.
388         * gnat_rm.texi: Update doc for Test_Case pragma.
389
390 2011-08-29  Tristan Gingold  <gingold@adacore.com>
391
392         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
393         convention C.
394         (GCC_Exception_Access): New type.
395         (Unwind_DeleteException): New imported procedure
396         (Foreign_Exception): Import it.
397         (GNAT_GCC_Exception): Simply have the occurrence inside.
398         (To_GCC_Exception): New function.
399         (To_GNAT_GCC_Exception): New function.
400         (GNAT_GCC_Exception_Cleanup): New procedure..
401         (Propagate_GCC_Exception): New procedure.
402         (Reraise_GCC_Exception): New procedure.
403         (Setup_Current_Excep): New procedure.
404         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
405         (Unwind_RaiseException): Ditto.
406         (Unwind_ForcedUnwind): Ditto.
407         (Remove): Removed.
408         (Begin_Handler): Change type of parameter.
409         (End_Handler): Ditto. Now delete the exception if still present.
410         (Setup_Key): Removed.
411         (Is_Setup_And_Not_Propagated): Removed.
412         (Set_Setup_And_Not_Propagated): Ditto.
413         (Clear_Setup_And_Not_Propagated): Ditto.
414         (Save_Occurrence_And_Private): Ditto.
415         (EID_For): Add 'not null' constraint on parameter.
416         (Setup_Exception): Does nothing.
417         (Propagate_Exception): Simplified.
418         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
419         re-raise is not expanded anymore.
420         * s-except.ads (Foreign_Exception): New exception - placeholder for
421         non Ada exceptions.
422         * raise-gcc.c (__gnat_setup_current_excep): Declare
423         (CXX_EXCEPTION_CLASS): Define (not yet used)
424         (GNAT_EXCEPTION_CLASS): Define.
425         (is_handled_by): Handle foreign exceptions.
426         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
427
428 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
429
430         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
431
432 2011-08-29  Thomas Quinot  <quinot@adacore.com>
433
434         * a-synbar-posix.adb: Minor reformatting.
435
436 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
437
438         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
439         a-exetim-default.ads (Interrupt_Clocks_Supported,
440         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
441         definitions to be compliant with AI-0171. The target systems do not
442         support separate account for the execution time of interrupt handlers.
443
444 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
445
446         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
447         in the barrier to put first the easiest to evaluate (and the one which
448         will be True more often). More efficient.
449
450 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
451
452         * s-atocou-x86.adb: Fix constraint in machine code insertion.
453
454 2011-08-29  Bob Duff  <duff@adacore.com>
455
456         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
457         attributes that are now aspects, as specified by AI05-0229-1.
458         * sem_ch13.adb (Analyze_Aspect_Specifications,
459         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
460         pragmas or attribute references, as appropriate.
461
462 2011-08-29  Robert Dewar  <dewar@adacore.com>
463
464         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
465         a-synbar-posix.ads: Minor reformatting.
466
467 2011-08-29  Yannick Moy  <moy@adacore.com>
468
469         * snames.ads-tmpl: Add name Force.
470
471 2011-08-29  Pascal Obry  <obry@adacore.com>
472
473         * prj-nmsc.adb: Minor reformatting.
474
475 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
476
477         * a-exetim.ads (Interrupt_Clocks_Supported,
478         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
479         definitions to be compliant with AI-0171.
480
481 2011-08-29  Robert Dewar  <dewar@adacore.com>
482
483         * a-ngelfu.adb: Add comments.
484
485 2011-08-29  Geert Bosch  <bosch@adacore.com>
486
487         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
488         the closest machine number to Pi / 2.0.
489
490 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
491
492         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
493         package Ada.Synchronous_Barriers.
494         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
495         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
496         default implementation using protected objects and another one
497         a-synbar-posix using POSIX barriers as the underlying support.
498         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
499         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
500         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
501         Clean up dependencies.
502         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
503
504 2011-08-29  Robert Dewar  <dewar@adacore.com>
505
506         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
507         exp_dist.adb: Minor code reorganization.
508         Minor reformatting.
509
510 2011-08-29  Thomas Quinot  <quinot@adacore.com>
511
512         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
513         primitive operation must support external streaming if it is not a
514         controlling access result.
515
516 2011-08-29  Thomas Quinot  <quinot@adacore.com>
517
518         * sinfo.ads, sem_ch7.adb: Minor reformatting.
519
520 2011-08-29  Bob Duff  <duff@adacore.com>
521
522         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
523         restriction on allocators, as required by AI05-0013-1.
524         * restrict.ads: Minor comment fix.
525
526 2011-08-29  Tristan Gingold  <gingold@adacore.com>
527
528         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
529         (To_Jmpbuf_Address): Ditto
530         (builtin_longjmp): Ditto
531
532 2011-08-29  Thomas Quinot  <quinot@adacore.com>
533
534         * sem_res.adb: Minor reformatting.
535
536 2011-08-29  Vincent Celier  <celier@adacore.com>
537
538         * make.adb (Gnatmake): Move special processing for VM targets after the
539         call to Get_Target_Parameters.
540
541 2011-08-29  Thomas Quinot  <quinot@adacore.com>
542
543         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
544
545 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
546
547         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
548         where an anonymous access discriminant of a limited designated type
549         appears in a non-immutably limited discriminated type and issue an
550         error message. Add local variable Desig_T and replace all occurrences
551         of Designated_Type.
552
553 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
554
555         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
556         implementation is compliant to RM D.15(15/2) after the modification
557         imposed by AI05-0094-1 (binding interpretation).
558
559 2011-08-29  Robert Dewar  <dewar@adacore.com>
560
561         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
562         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
563
564 2011-08-29  Thomas Quinot  <quinot@adacore.com>
565
566         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
567         the scope name, do not report a missing label as a style violation (it
568         will be diagnosed as an illegality).
569         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
570         variant records: Get_Enum_Lit_From_Pos already returns a usage
571         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
572         on Expr in Integer_Literal case so that it can be used by
573         Build_To_Any_Call.
574
575 2011-08-29  Tristan Gingold  <gingold@adacore.com>
576
577         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
578         Adjust comment.
579         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
580         (Build_Abort_Block_Handler): New function to build an Abort_Signal
581         exception handler.
582         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
583         Build_Abort_Block_Handler to build the exception handler. Do not
584         undefer aborts for the Abort_Signal exception handler if back-end
585         exception mechanism.
586         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
587         back_end exceptions for all others and abort_signal.
588         * s-except.ads (ZCX_By_Default): New constant.
589         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
590         (Raise_Exception_Always): Ditto.
591         (Raise_From_Signal_Handler): Ditto.
592         (Raise_With_Location_And_Msg): Ditto.
593         (Raise_With_Msg): Ditto.
594         (Reraise): Ditto.
595         (Reraise_Occurence): Ditto.
596         (Reraise_Occurrence_Always): Ditto.
597         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
598         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
599
600 2011-08-29  Thomas Quinot  <quinot@adacore.com>
601
602         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
603
604 2011-08-29  Robert Dewar  <dewar@adacore.com>
605
606         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
607         Minor code reorganization.
608
609 2011-08-29  Bob Duff  <duff@adacore.com>
610
611         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
612         2012, not just Ada 2005.
613
614 2011-08-29  Vincent Celier  <celier@adacore.com>
615
616         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
617         with a project file or with gprbuid, if -gnatep= is specified, the
618         builder may need to be invoked with -x.
619
620 2011-08-29  Tristan Gingold  <gingold@adacore.com>
621
622         * a-exexpr-gcc.adb: Minor comment fix.
623
624 2011-08-29  Robert Dewar  <dewar@adacore.com>
625
626         * sem_ch8.adb: Minor reformatting.
627
628 2011-08-29  Bob Duff  <duff@adacore.com>
629
630         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
631         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
632         treating "some" as unreserved in earlier Ada versions. This is now
633         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
634         rather than Name_Some, since Tok_Some is now recognized as reserved.
635         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
636         reserved word.
637         * scans.ads: Minor comment fixes.
638         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
639         for other language versions.
640         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
641         treating "some" as unreserved in earlier Ada versions. This is now
642         handled in Snames.Is_Keyword_Name.
643         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
644         Ada 2012.
645         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
646         unreserved in earlier Ada versions. This is now handled in
647         Snames.Is_Keyword_Name.
648         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
649         words as for other language versions.
650         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
651         Ada 2012, not just Ada 2005.
652
653 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
654
655         * sem_ch13.adb: Additional semantic checks for aspects involved in
656         iterators.
657
658 2011-08-29  Matthew Heaney  <heaney@adacore.com>
659
660         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
661         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
662         Container parameter.
663         (Ancestor_Find): ditto.
664
665 2011-08-29  Thomas Quinot  <quinot@adacore.com>
666
667         * par-endh.adb: Minor reformatting.
668
669 2011-08-29  Tristan Gingold  <gingold@adacore.com>
670
671         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
672         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
673         (Adjust_N_CLeanups_For): Remove.
674         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
675         stack is reached.
676         (Propgate_Exception): Adjust.
677         * raise-gcc.c: Add a few static/const.
678         (Adjust_N_Cleanups_For): Remove declaration.
679         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
680
681 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
682
683         * sem_ch8.adb: Use type of function return when rewriting as object
684         declaration.
685
686 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
687
688         * sem_type.adb: Minor reformatting.
689
690 2011-08-29  Robert Dewar  <dewar@adacore.com>
691
692         * makeutl.adb: Minor reformatting.
693
694 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
695
696         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
697         function call of a limited type, the expansion of the renaming is
698         complicated by the presence of various temporaries and subtypes that
699         capture constraints of the renamed object.
700         Rewrite node as an object declaration, whose expansion is simpler.
701         Given that the object is limited there is no copy involved and no
702         performance hit.
703
704 2011-08-29  Robert Dewar  <dewar@adacore.com>
705
706         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
707         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
708
709 2011-08-29  Tristan Gingold  <gingold@adacore.com>
710
711         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
712         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
713         system-linux-hppa.ads, system-linux-s390.ads,
714         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
715         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
716         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
717         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
718         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
719         system-solaris-sparc.ads, system-lynxos-x86.ads,
720         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
721         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
722         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
723         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
724         system-vxworks-x86.ads: Remove GCC_ZCX_Support
725         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
726         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
727         * opt.ads: Adjust comment.
728         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
729         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
730         * system.ads: Move GCC_ZCX_Support to obsolete entries.
731
732 2011-08-29  Emmanuel Briot  <briot@adacore.com>
733
734         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
735         file name is specified on the gnatmake or gprbuild command line, and
736         before we search for that file in the project.
737
738 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
739
740         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
741         used to determine whether a possible interpretation for an overloadable
742         entity is declared within the current instantiation and should be
743         included in the candidate set.
744
745 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
746
747         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
748
749 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
750
751         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
752         access subtype is access_to_subprogram, when applying checks for
753         RM 3.10.2 (27).
754
755 2011-08-29  Matthew Heaney  <heaney@adacore.com>
756
757         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
758         for sibling when common parent.
759
760 2011-08-29  Thomas Quinot  <quinot@adacore.com>
761
762         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
763         "pragma_".
764
765 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
766
767         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
768         for the return type when in ASIS mode.
769
770 2011-08-29  Vincent Celier  <celier@adacore.com>
771
772         * make.adb (Gnatmake): Get the default search dirs, then the target
773         parameters after getting the Builder switches, as the Builder switches
774         may include --RTS= and that could change the default search dirs.
775
776 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
777
778         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
779         Make_Final_Call. Move the processing for class-wide types before the
780         processing for derivations from [Limited_]Controlled.
781         (Make_Final_Call): Move the processing for class-wide types before the
782         processing for derivations from [Limited_]Controlled.
783         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
784         Add code to account for alignments larger than the list header. Add a
785         comment illustrating the structure of the allocated object + padding +
786         header.
787         (Deallocate_Any_Controlled): Add code to account for alignments larger
788         than the list header.
789
790 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
791
792         * sinfo.ads, sinfo.adb: New node kind
793         N_Formal_Incomplete_Type_Definition, related flags.
794         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
795         Parse formal incomplete types.
796         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
797         sem_ch12.
798         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
799         Formal incomplete types do not need completion.
800         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
801         Validate_Incomplete_Type_Instance): New procedures to handle formal
802         incomplete types.
803         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
804         that corresponds to a formal incomplete type.
805         * sprint.adb: Handle formal incomplete type declarations.
806         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
807         an insertion point.
808
809 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
810
811         * a-fihema.ads, a-fihema.adb: Unit removed.
812         * a-undesu.ads, a-undesu.adb: New unit implementing
813         Ada.Unchecked_Deallocate_Subpool.
814         * einfo.adb: Remove Associated_Collection from the node usage.
815         Add Finalization_Master to the node usage.
816         (Associated_Collection): Removed.
817         (Finalization_Master): New routine.
818         (Set_Associated_Collection): Removed.
819         (Set_Finalization_Master): New routine.
820         (Write_Field23_Name): Remove Associated_Collection from the output. Add
821         Finalization_Master to the output.
822         * einfo.ads: Remove attribute Associated_Collection and its uses in
823         entities.
824         Add new attribute Finalization_Master along with its uses in entitites.
825         (Associated_Collection): Removed along with its pragma import.
826         (Finalization_Master): New routine along with a pragma import.
827         (Set_Associated_Collection): Removed along with its pragma import.
828         (Set_Finalization_Master): New routine along with a pragma import.
829         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
830         Build_Finalization_Collection with Build_Finalization_Master.
831         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
832         before the bodies of the predefined routines. Add comment explaining
833         this. Replace call to Build_Finalization_Collection with
834         Build_Finalization_Master.
835         (Freeze_Type): Replace call to Build_Finalization_Collection with
836         Build_Finalization_Master.
837         (Make_Finalize_Address_Body): Comment reformatting.
838         (Make_Predefined_Primitive_Specs): Code reformatting.
839         (Stream_Operation_OK): Update comment mentioning finalization
840         collections. Replace RE_Finalization_Collection with
841         RE_Finalization_Master.
842         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
843         Associated_Collection with Finalization_Master. Replace call to
844         Build_Finalization_Collection with Build_Finalization_Master.
845         (Expand_Allocator_Expression): Replace call to Associated_Collection
846         with Finalization_Master. Replace call to Set_Associated_Collection with
847         Set_Finalization_Master. Remove the generation of
848         Set_Finalize_Address_Ptr.
849         (Expand_N_Allocator): Replace call to Associated_Collection with
850         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
851         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
852         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
853         comment on usage. Replace call to Needs_BIP_Collection with
854         Needs_BIP_Finalization_Master Remplace BIP_Collection with
855         BIP_Finalization_Master. Update all comments which mention finalization
856         collections. Replace Associated_Collection with
857         Finalization_Master. Replace Build_Finalization_Collection with
858         Build_Finalization_Master.
859         (BIP_Formal_Suffix): Update BIP_Collection's case.
860         (Build_Heap_Allocator): Update the related comment. Rename local
861         variable Collect to Fin_Mas_Id and update its occurrences. Update
862         comments which mention finalization collections. Replace
863         Set_Associated_Collection with Set_Finalization_Master.
864         (Expand_Call): Update the code which detects a special piece of library
865         code for .NET/JVM.
866         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
867         Add_Collection_Actual_To_Build_In_Place_Call with
868         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
869         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
870         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
871         Add_Collection_Actual_To_Build_In_Place_Call with
872         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
873         (Make_Build_In_Place_Call_In_Assignment): Replace call to
874         Add_Collection_Actual_To_Build_In_Place_Call with
875         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
876         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
877         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
878         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
879         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
880         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
881         Replace call to Set_Associated_Collection with Set_Finalization_Master.
882         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
883         Replace the call to Associated_Collection with Finalization_Master.
884         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
885         Update the way finalization master names are generated. Update the
886         retrieval of the correct access type which will carry the pool and
887         master attributes.
888         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
889         (Make_Finalize_Address_Body): Abstract types do not need
890         Finalize_Address. Code reformatting.
891         (Make_Finalize_Address_Stmts): Update comment on usage.
892         (Make_Set_Finalize_Address_Ptr_Call): Removed.
893         (Process_Declarations): Update comments.
894         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
895         Build_Finalization_Master. Update associated comment.
896         (Make_Set_Finalize_Address_Ptr_Call): Removed.
897         * exp_ch13.adb: Update comments which mention finalization collections.
898         (Expand_N_Free_Statement): Replace the call to Associated_Collection
899         with Finalization_Master.
900         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
901         create calls to routines Allocate_Any_Controlled and
902         Deallocate_Any_Controlled.
903         (Find_Finalize_Address): New routine.
904         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
905         comparison.
906         (Requires_Cleanup_Actions): Update the comment on freeze node
907         inspection.
908         * exp_util.ads: Remove comment on generated code for
909         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
910         is better to simply look in the body.
911         * freeze.adb (Freeze_All): Update the comment of finalization
912         collections. Replace the call to Associated_Collection with
913         Finalization_Master. Replace the call to Build_Finalization_Collection
914         with Build_Finalization_Master.
915         * impunit.adb: Add a-undesu and s-stposu to the list of units.
916         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
917         a-fihema.
918         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
919         Ada.Finalization. Add processing for children of System.Storage_Pools.
920         * rtsfind.ads: Remove the naming of second level children of
921         Ada.Finalization.
922         Remove Ada_Finalization_Heap_Management from the list of units.
923         Remove subtype Ada_Finalization_Child.
924         Remove the following subprogram entities:
925         
926            RE_Allocate
927            RE_Deallocate
928            RE_Finalization_Collection
929            RE_Finalization_Collection_Ptr
930            RE_Set_Finalize_Address_Ptr
931         
932         Add the naming of second level children of System.Storage_Pools.
933         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
934         the list of units.
935         Add subtype System_Storage_Pools_Child.
936         Add the following subprogram entities to System.Finalization_Masters:
937         
938            RE_Finalization_Master
939            RE_Finalization_Master_Ptr
940         
941         Add the following subprogram entities to System.Storage_Pools.Subpools:
942         
943            RE_Allocate_Any_Controlled
944            RE_Deallocate_Any_Controlled
945            RE_Root_Storage_Pool_With_Subpools
946            RE_Root_Subpool
947            RE_Subpool_Handle
948         
949         Move the following subprogram entities from
950         Ada.Finalization.Heap_Management to System.Finalization_Masters:
951         
952            RE_Add_Offset_To_Address
953            RE_Attach
954            RE_Base_Pool
955            RE_Detach
956         
957         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
958         Set_Associated_Collection with Set_Finalization_Master.
959         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
960         BIP_Finalization_Master is created.
961         * s-finmas.adb: New unit System.Finalization_Masters.
962         * s-finmas.ads: New unit System.Finalization_Masters.
963         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
964         * s-stposu.ads, s-stposu.adb: New unit implementing
965         System.Storage_Pools.Subpools.
966
967 2011-08-29  Bob Duff  <duff@adacore.com>
968
969         * tbuild.adb: Add assertion.
970
971 2011-08-29  Thomas Quinot  <quinot@adacore.com>
972
973         * s-pooglo.adb: Minor reformatting.
974
975 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
976
977         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
978         an indexed component of a packed array whose element type is a record
979         with a representation clause different from that of the right-hand
980         side, generate a temporary to minimuze the number of bit-field
981         operations generated.
982
983 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
984
985         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
986         declarations, and thus are likely insertion points for actions.
987
988 2011-08-29  Bob Duff  <duff@adacore.com>
989
990         * einfo.ads: Minor comment fix.
991
992 2011-08-29  Robert Dewar  <dewar@adacore.com>
993
994         * frontend.adb, gnat1drv.adb: Minor reformatting.
995
996 2011-08-29  Tristan Gingold  <gingold@adacore.com>
997
998         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
999         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
1000         space in front of the header.
1001
1002 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1003
1004         * frontend.adb (Frontend): Exit after creating Standard package when
1005         -gnatd.H is present.
1006         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
1007         present.
1008
1009 2011-08-29  Robert Dewar  <dewar@adacore.com>
1010
1011         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
1012         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
1013         snames.ads-tmpl: Minor reformatting.
1014
1015 2011-08-29  Philippe Gil  <gil@adacore.com>
1016
1017         * prj.adb (Reset_Units_In_Table): New procedure.
1018         Reset units to avoid access to freed memory.
1019
1020 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1021
1022         * get_scos.adb: When reading a P statement SCO without a pragma name
1023         (from an older ALI file), ensure that the Pragma_Name component is set
1024         to Unknown_Pragma (not left uninitialized).
1025
1026 2011-08-29  Vincent Celier  <celier@adacore.com>
1027
1028         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
1029         modified to compute correctly the object path of a SAL project that is
1030         extending another library project.
1031         (Write_Path_File): New procedure.
1032         * makeutl.ads (Directories): New table moved from Buildgpr
1033         (Get_Directories): New procedure moved from Buildgpr
1034         (Write_Path_File): New procedure
1035         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
1036         paths before binding SALs, instead of Set_Ada_Paths.
1037         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
1038         Prj.
1039         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
1040         (Current_Source_Path_File_Of): New function
1041         (Set_Current_Object_Path_File_Of): New procedure
1042         (Current_Source_Object_File_Of): New function
1043         (Set_Current_Object_Path_File_Of): New procedure
1044         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
1045         (Current_Source_Path_File_Of): New function
1046         (Set_Current_Object_Path_File_Of): New procedure
1047         (Current_Source_Object_File_Of): New function
1048         (Set_Current_Object_Path_File_Of): New procedure
1049
1050 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1051
1052         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
1053         packed entity, use a bit-field assignment only if there is no change of
1054         representation.
1055
1056 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1057
1058         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
1059         Is_RTU instead of using Chars comparisons.
1060
1061 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1062
1063         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
1064         temporary object if the actual is constrained, and the discriminants
1065         read from the stream don't match.
1066
1067 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1068
1069         * sem_attr.adb, exp_attr.adb: Add handling of
1070         Attribute_System_Allocator_Alignment
1071         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
1072         Attribute_System_Allocator_Alignment.
1073         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
1074         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
1075         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
1076         get_target_system_allocator_alignment.
1077
1078 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1079
1080         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1081         dependencies.
1082
1083 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1084
1085         * exp_ch3.adb (In_Runtime): Fix typo.
1086
1087 2011-08-29  Bob Duff  <duff@adacore.com>
1088
1089         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
1090
1091 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1092
1093         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
1094         and a separate tag assignment is generated, ensure that the tag
1095         assignment is analyzed.
1096
1097 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1098
1099         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
1100         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
1101         of statement lists that may contain local declarations.
1102         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
1103         duplicate the triggering statements needed for the expansion of this
1104         construct, when the trigger is a dispatching call to a synchronized
1105         primitive.
1106
1107 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1108
1109         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
1110         * bindgen.adb: Add comments.
1111         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
1112         in CodePeer mode.
1113
1114 2011-08-29  Robert Dewar  <dewar@adacore.com>
1115
1116         * exp_attr.adb: Minor reformatting.
1117         Minor code reorganization and commenting.
1118         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
1119         reformatting.
1120
1121 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1122
1123         * get_scos.adb: Ignore chaining indicators not currently supported
1124         by Ada.
1125
1126 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1127
1128         * system.ads: Minor editing.
1129
1130 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1131
1132         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
1133         CodePeer mode.
1134         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
1135         Attribute_Elab_Subp_Body.
1136         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
1137         * sem_util.adb: Update comments.
1138
1139 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1140
1141         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
1142         pragma name for each SCO statement corresponding to a pragma.
1143
1144 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1145
1146         * opt.ads: Minor editing.
1147
1148 2011-08-29  Yannick Moy  <moy@adacore.com>
1149
1150         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
1151         that only made sense for CodePeer mode.
1152
1153 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
1154
1155         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
1156         which is no longer used.
1157         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
1158         handling of the 64-bit division check.
1159         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
1160         division available.
1161         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
1162         longer used.
1163
1164 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1165
1166         * get_scos.adb: Minor reformatting.
1167
1168 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1169
1170         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
1171         statement list is wrapped in a block, the block is explicitly analyzed
1172         in order to properly redecorate the entities and create a servicing
1173         finalizer.
1174
1175 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1176
1177         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
1178         (Set_Zero_Cost_Handling): Remove.
1179
1180 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1181
1182         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
1183
1184 2011-08-29  Geert Bosch  <bosch@adacore.com>
1185
1186         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
1187         instruction, as the latter may produce -0.0, which is not a valid VAX
1188         F float number.
1189         (Neg_G): Likewise for VAX F float.
1190
1191 2011-08-29  Robert Dewar  <dewar@adacore.com>
1192
1193         * exp_util.adb: Minor reformatting.
1194
1195 2011-08-29  Yannick Moy  <moy@adacore.com>
1196
1197         * sem_ch3.adb: Minor comment update.
1198
1199 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1200
1201         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
1202         the operand type.
1203
1204 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1205
1206         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
1207         current statement sequence on a generic instantiation or a subprogram
1208         declaration.
1209
1210 2011-08-29  Robert Dewar  <dewar@adacore.com>
1211
1212         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
1213         Minor reformatting.
1214
1215 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1216
1217         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1218         Correct the check which involves the freeze node of a controlled or
1219         access-to-controlled type.
1220
1221 2011-08-29  Geert Bosch  <bosch@adacore.com>
1222
1223         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
1224         statements.
1225         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
1226         Asm statements.
1227
1228 2011-08-29  Yannick Moy  <moy@adacore.com>
1229
1230         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
1231         for every index type and component type that is not a subtype_mark.
1232         (Process_Subtype): Set Etype of subtype.
1233
1234 2011-08-29  Robert Dewar  <dewar@adacore.com>
1235
1236         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
1237         reorganization.  Minor reformatting.
1238
1239 2011-08-29  Steve Baird  <baird@adacore.com>
1240
1241         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
1242         for CodePeer and ALFA modes.
1243
1244 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1245
1246         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
1247         that comes from an enclosing scope if it is not the renaming of an
1248         actual, to handle properly a spurious ambiguity in an instance.
1249
1250 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
1251
1252         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
1253         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
1254         use it instead of the Esize of the first parameter.
1255         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
1256         above change.
1257         <Size>: Likewise.  Call it for composite types on the RM size.
1258
1259 2011-08-29  Yannick Moy  <moy@adacore.com>
1260
1261         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
1262         * sem_util.adb (Unique_Name): Correct behaviour for names of
1263         compilation units.
1264
1265 2011-08-29  Yannick Moy  <moy@adacore.com>
1266
1267         * sem_prag.adb (Check_Precondition_Postcondition): In formal
1268         verification mode, analyze pragma expression for correctness, for
1269         pre/post on library-level subprogram, as it is not expanded later.
1270
1271 2011-08-29  Yannick Moy  <moy@adacore.com>
1272
1273         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
1274         in formal verification.
1275
1276 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1277
1278         * sem_util.adb: Minor reformatting.
1279         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
1280         there's no pragma.
1281         * par_sco.ads, par_sco.adb: Update comments.
1282
1283 2011-08-29  Yannick Moy  <moy@adacore.com>
1284
1285         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
1286         associated getter/setter.
1287         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
1288
1289 2011-08-29  Vincent Celier  <celier@adacore.com>
1290
1291         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
1292         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
1293         with declarations for Language_Kind and Dependency_Kind for Ada.
1294         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
1295         (Process_Compiler): Take into account the new attributes Dependency_Kind
1296         and Language_Kind.
1297         (Check_Configuration): Check if language kind is unit based, not if the
1298         language name is Ada.
1299         (Process_Exceptions_Unit_Based): Ditto
1300         (Add_Language): Remove default additions of language and dependency kind
1301         * prj.ads: Minor comment change
1302         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
1303
1304 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1305
1306         * debug.adb: Update comments.
1307
1308 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
1309
1310         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
1311         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
1312         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
1313         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
1314         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
1315
1316 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1317
1318         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
1319         (GNATLIBCFLAGS_FOR_C): Replace
1320         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
1321         (gnatlib-shared-default, gnatlib-shared-dual-win32)
1322         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
1323         (gnatlib-sjlj, gnatlib-zcx): Likewise.
1324
1325 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
1326
1327         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
1328
1329         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
1330
1331         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
1332
1333 2011-08-05  Nicolas Roche  <roche@adacore.com>
1334
1335         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
1336         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
1337         canadian cross.
1338         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
1339
1340 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1341
1342         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
1343         subprogram bodies declared out-of-order.
1344
1345 2011-08-05  Yannick Moy  <moy@adacore.com>
1346
1347         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
1348         entities directly in package Standard, otherwise skip the standard
1349         prefix.
1350
1351 2011-08-05  Robert Dewar  <dewar@adacore.com>
1352
1353         * a-cbmutr.adb: Minor reformatting
1354         (Allocate_Node): refactor node allocation algorithm
1355
1356 2011-08-05  Robert Dewar  <dewar@adacore.com>
1357
1358         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
1359         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
1360         mode.
1361         (Analyze_Pragma, case Check_Policy): Ditto.
1362         * sem_prag.ads (Check_Disabled): New function
1363         * snames.ads-tmpl: Add Name_Disable.
1364
1365 2011-08-05  Robert Dewar  <dewar@adacore.com>
1366
1367         * gnat_rm.texi: Document implementation-defined policy DISABLE for
1368         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
1369
1370 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1371
1372         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
1373         that appears in a generic formal part and applies to a formal
1374         subprogram.
1375
1376 2011-08-05  Robert Dewar  <dewar@adacore.com>
1377
1378         * a-cbmutr.ads: Minor reformatting.
1379
1380 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1381
1382         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
1383         to check count, check sign of value instead.
1384         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
1385         (Copy_Subtree): allocate copy of source element
1386         (Equal_Subtree): compare elements, not access objects
1387
1388 2011-08-05  Vincent Celier  <celier@adacore.com>
1389
1390         * gnat_ugn.texi: Fix VMS alternative.
1391
1392 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1393
1394         * sem_ch11.adb: Add comment.
1395
1396 2011-08-05  Robert Dewar  <dewar@adacore.com>
1397
1398         * exp_util.adb: Minor comment fix.
1399
1400 2011-08-05  Robert Dewar  <dewar@adacore.com>
1401
1402         * scng.adb (Error_Unterminated_String): Improve flag position when
1403         comma present.
1404
1405 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1406
1407         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
1408         tree containers).
1409         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
1410         multiway tree containers.
1411
1412 2011-08-05  Robert Dewar  <dewar@adacore.com>
1413
1414         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
1415         * stylesw.adb: Implement -gnatyC to control comment spacing
1416         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
1417         -gnatyc/C).
1418         * usage.adb: Add line for -gnatyC.
1419
1420 2011-08-05  Robert Dewar  <dewar@adacore.com>
1421
1422         * gnat_ugn.texi: Document -gnatyC.
1423         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
1424         synonym for COMMENTS2).
1425
1426 2011-08-05  Robert Dewar  <dewar@adacore.com>
1427
1428         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
1429         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
1430         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
1431         a-comutr.ads, lib-xref.adb: Minor reformatting.
1432
1433 2011-08-05  Robert Dewar  <dewar@adacore.com>
1434
1435         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
1436         warning if there is an exception handler present.
1437
1438 2011-08-05  Pascal Obry  <obry@adacore.com>
1439
1440         * a-iteint.ads: Fix copyright year.
1441
1442 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1443
1444         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
1445         statement SCO for a USE clause or a representation clause.
1446
1447 2011-08-05  Yannick Moy  <moy@adacore.com>
1448
1449         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
1450         between body and spec for stub.
1451         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
1452         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
1453         pragma precondition or postcondition, for which the enclosing
1454         subprogram or package in the AST is not the desired one, return empty.
1455
1456 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1457
1458         * g-expect.adb: Minor reformatting.
1459
1460 2011-08-05  Bob Duff  <duff@adacore.com>
1461
1462         * a-fihema.adb: Comment out OS_Lib.
1463
1464 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1465
1466         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
1467         (unbounded multiway tree containers) and a-iteint.ads.
1468         * a-comutr.ads, a-comutr.adb:
1469         This is the new Ada 2012 unit for unbounded multiway tree containers
1470         * a-cimutr.ads, a-cimutr.adb
1471         This is the new Ada 2012 unit for indefinite multiway tree containers
1472         * a-iteint.ads: New file.
1473
1474 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1475
1476         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1477
1478 2011-08-05  Bob Duff  <duff@adacore.com>
1479
1480         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1481         subpools.
1482         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1483
1484 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1485
1486         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1487         general indexing aspects of Ada2012. Called when analyzing indexed
1488         components when other interpretations fail.
1489         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1490         in an expression context where overloading is meaningful. This excludes
1491         the occurrence in an aspect specification (efficiency only).
1492         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1493         related to iterators can be set by an attribute specification, but
1494         cannot be queried.
1495         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1496         Constant_Indexing and Variable_Indexing.
1497         (Check_Indexing_Functions): New procedure to perform legality checks.
1498         Additional semantic checks at end of declarations.
1499
1500 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1501
1502         * tree_io.ads: Update ASIS_Version_Number because of the change of the
1503         order of calling Tree_Write/Tree_Read routines made for aspects.
1504
1505 2011-08-05  Bob Duff  <duff@adacore.com>
1506
1507         * a-fihema.adb (Finalize): Fix race condition.
1508
1509 2011-08-05  Yannick Moy  <moy@adacore.com>
1510
1511         * sem_ch12.adb (Analyze_Package_Instantiation,
1512         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1513         mode.
1514
1515 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1516
1517         * sem_type.adb (Specific_Type): in an instance, the type-specific
1518         operand of an equality check that involves null may have a private
1519         type. Use full view to determine legality of construct.
1520
1521 2011-08-05  Vincent Celier  <celier@adacore.com>
1522
1523         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1524         delete or close the file when the call to gnatmake was successful.
1525
1526 2011-08-05  Yannick Moy  <moy@adacore.com>
1527
1528         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1529         Global_Discard_Names.
1530
1531 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1532
1533         * sinfo.ads: comments on use of entity field for aspect specifications.
1534
1535 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1536
1537         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1538         node is not itself an entity but a selected component, it is a
1539         rewritten parameterless call to an en enclosing synchronized operation,
1540         and this expansion will be performed again in the instance, so there is
1541         no global information to preserve.
1542
1543 2011-08-05  Javier Miranda  <miranda@adacore.com>
1544
1545         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1546         for renamings of predefined primitives.
1547         (In_Predef_Prims_DT): New subprogram.
1548
1549 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1550
1551         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1552         possible interpretation of name is a reference type, add an
1553         interpretation that is the designated type of the reference
1554         discriminant of that type.
1555         * sem_res.adb (resolve): If the interpretation imposed by context is an
1556         implicit dereference, rewrite the node as the deference of the
1557         reference discriminant.
1558         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1559         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1560         parent type or base type.
1561         * sem_ch4.adb (Process_Indexed_Component,
1562         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1563         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1564         Check for implicit dereference.
1565         (List_Operand_Interps): Indicate when an implicit dereference is
1566         ambiguous.
1567         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1568
1569 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1570
1571         * scos.ads: Update documentation of SCO table. Pragma statements can now
1572         be marked as disabled (using 'p' instead of 'P' as the statement kind).
1573         * par_sco.ads, par_sco.adb: Implement the above change.
1574         (Process_Decisions_Defer): Generate a P decision for the first parameter
1575         of a dyadic pragma Debug.
1576         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1577         necessary.
1578         * put_scos.adb: Code simplification based on above change.
1579
1580 2011-08-05  Robert Dewar  <dewar@adacore.com>
1581
1582         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1583         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1584         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1585         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1586
1587 2011-08-05  Bob Duff  <duff@adacore.com>
1588
1589         * a-stunau.ads, g-spipat.adb: Update comments.
1590
1591 2011-08-05  Bob Duff  <duff@adacore.com>
1592
1593         * a-fihema.ads: Minor comment fix.
1594         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1595         correct.
1596         (Attach, Detach): Remove some unnecessary code.
1597         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1598
1599 2011-08-05  Bob Duff  <duff@adacore.com>
1600
1601         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1602         allocation for Objects component. This simplifies the code somewhat. It
1603         is also a little more efficient in the not-so-unusual case where there
1604         are no controlled objects allocated.
1605         Make Finalization_Started flag atomic.
1606         (Finalize): Avoid unnecessary detachment of items from the list.
1607         (pcol): Minor cleanup.
1608
1609 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1610
1611         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1612         package whose name is the same as that of the generic unit, or its
1613         ultimate prefix.
1614
1615 2011-08-05  Bob Duff  <duff@adacore.com>
1616
1617         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1618         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1619         Minor comment fixes.
1620
1621 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
1622
1623         * make.adb (Linking_Phase): No longer need to set source search path
1624         before calling gnatlink in CodePeer mode.
1625         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1626         gcc in CodePeer mode, since the binder generated file no longer has a
1627         'with Main'.
1628         * switch.ads, switch.adb (Is_Language_Switch): Removed.
1629         * switch-c.adb: Update comment.
1630
1631 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1632
1633         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1634
1635 2011-08-05  Nicolas Roche  <roche@adacore.com>
1636
1637         * gnat_ugn.texi: Fix minor syntax error issue.
1638
1639 2011-08-05  Vincent Celier  <celier@adacore.com>
1640
1641         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1642         delete or close the file when the call to gnatmake returns a non
1643         successful return code.
1644
1645 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1646
1647         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1648         check, indicate that the copy of the original node does not come from
1649         source, to prevent an infinite recursion of the expansion.
1650
1651 2011-08-05  Johannes Kanig  <kanig@adacore.com>
1652
1653         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1654         VC generation for subprogram bodies.
1655
1656 2011-08-05  Yannick Moy  <moy@adacore.com>
1657
1658         * einfo.ads: Typo.
1659         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1660         the base type with the smallest allowed base type.
1661
1662 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1663
1664         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1665         aspects.
1666
1667 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1668
1669         * sem_ch12.ads: minor comment updates.
1670
1671 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1672
1673         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1674         instantiation and a formal package the compiler generates a package
1675         renaming declaration so that the generic name within the declaration
1676         is interpreted as a renaming of the instance. At the end of a formal
1677         package declaration, this renaming must become invisible.
1678
1679 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1680
1681         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1682         comparison and rely on concrete entities instead.
1683
1684 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1685
1686         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1687         and discriminants, to indicate that the type has an access discriminant
1688         that supports implicit dereference.
1689         * snames.ads-tmpl: Add names of aspects and attributes related to
1690         Ada2012 iterators: constant_indexing, default_iterator,
1691         iterator_element, implicit_dereference, variable_indexing.
1692         * aspects.ads, aspects.adb: entries for iterator-related aspects.
1693         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1694         iterator-related aspects.
1695         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1696
1697 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1698
1699         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1700         metrics in gnatmetric to cover new kinds of coupling mentrics.
1701
1702 2011-08-05  Steve Baird  <baird@adacore.com>
1703
1704         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1705         of calling the user-defined main subprogram.
1706         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
1707         is set) Call_Main_Subprogram ahead of, as opposed to
1708         inside of, Main.
1709         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1710         generation of a "with" of the user-defined main subprogram.
1711         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1712         (which is now called from Gen_Main instead).
1713
1714 2011-08-05  Emmanuel Briot  <briot@adacore.com>
1715
1716         * projects.texi: Added reference to the Makefile package.
1717
1718 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1719
1720         * exp_ch7.adb: Minor comment rewording.
1721
1722 2011-08-05  Ed Falis  <falis@adacore.com>
1723
1724         * env.c: Fix comment.
1725
1726 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1727
1728         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1729         character comparison and rely on concrete entities instead.
1730
1731 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1732
1733         * sem_ch3.adb: (Check_Private_Overriding): better error message,
1734         suggested by AI95-0068.
1735
1736 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1737
1738         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1739         the two potential initialization calls. This accounts for any
1740         access-before-elaboration checks which may precede the initialization
1741         calls.
1742         (Next_Suitable_Statement): New routine. Returns the next real statement
1743         after the input node while skipping generated checks.
1744         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1745         with comment on usage.
1746         Do not generate Elaborate_All when the trigger is a finalization call
1747         coming from a type init proc.
1748         (Check_Elab_Call): Propagate the initialization procedure context to
1749         subsequent calls to Check_A_Call.
1750         (Check_Internal_Call_Continue): Propagate the initialization procedure
1751         context to subsequent calls to Check_Elab_Call.
1752         (Is_Finalization_Procedure): New routine. Returns True if the input
1753         entity denotes a [Deep_]Finalize routine.
1754         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1755         along with comment on usage.
1756
1757 2011-08-05  Vadim Godunko  <godunko@adacore.com>
1758
1759         * s-atocou.ads: Add list of supported platforms.
1760
1761 2011-08-05  Yannick Moy  <moy@adacore.com>
1762
1763         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
1764
1765         * opt.ads (Disable_ALI_File): new Boolean flag
1766         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
1767
1768 2011-08-05  Ed Falis  <falis@adacore.com>
1769
1770         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
1771         environ is properly defined.
1772
1773 2011-08-05  Vincent Celier  <celier@adacore.com>
1774
1775         * make.adb (Compilation_Phase): Exit immediately when all objects have
1776         been found up to date, to avoid multiple exit messages.
1777         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
1778         same project for languages with no compiler.
1779         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
1780         -eI.
1781 2011-08-05  Robert Dewar  <dewar@adacore.com>
1782
1783         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
1784         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
1785         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
1786         s-atocou-builtin.adb: Minor reformatting.
1787
1788 2011-08-05  Yannick Moy  <moy@adacore.com>
1789
1790         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
1791         if the node to wrap is a pragma check, this node and enclosed
1792         expression are not expanded, so do not apply any transformations here.
1793         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
1794         introducing transient scopes.
1795
1796 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
1797
1798         * adaint.c (__gnat_set_writable, __gnat_set_readable,
1799         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
1800         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
1801         routine is available, so we use the default implementation of these
1802         functions.
1803         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
1804         support for copying attributes on VxWorks 6.
1805
1806 2011-08-05  Yannick Moy  <moy@adacore.com>
1807
1808         * debug.adb: Remove use of -gnatd.D.
1809         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
1810         * opt.ads: Simplify variables for ALFA mode, to keep one only
1811         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
1812         to ALFA mode.
1813
1814 2011-08-05  Vincent Celier  <celier@adacore.com>
1815
1816         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
1817         Builder'Default_Switches.
1818
1819 2011-08-05  Vincent Celier  <celier@adacore.com>
1820
1821         * makeusg.adb: Add lines for --create-map-file switches.
1822
1823 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1824
1825         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
1826         profile is incomplete and the full view is available, replace it with
1827         the full view.
1828         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
1829         incomplete, freezing the subprogram is delayed until the full view is
1830         frozen.
1831         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
1832         fixed-point multiplication operator and the predefined operator is
1833         resolved in favor of the user-defined one.
1834
1835 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1836
1837         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
1838         CONST_CAST.
1839
1840 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1841
1842         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
1843         whether a type lacks user-defined Read or Write operations, or has a
1844         component that lacks them.
1845         * sem_attr.adb (Check_Stream_Attribute): if restriction
1846         No_Default_Stream_Attributes is active, verify that all subcomponent
1847         types of the target have user-defined stream operations, and report
1848         error otherwise.
1849         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
1850         * exp_strm.adb: Build_Elementary_Input_Call,
1851         Build_Elementary_Write_Call): remove checks for restriction
1852         No_Default_Stream_Attributes, now checked in semantics.
1853
1854 2011-08-04  Vincent Celier  <celier@adacore.com>
1855
1856         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
1857         switches on the command line, look for all valid --RTS switches in the
1858         Builder switches and for each language use the first runtime name found
1859         to invoke gprconfig.
1860         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
1861         command line and there is no auto-configuration.
1862         (Runtime_Name_Set_For): New function.
1863
1864 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1865
1866         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
1867         elaborate initialization expression for variable Abort when processing
1868         a package body or a declaration.
1869         (Create_Finalizer): Propagate the package context when creating the
1870         exception-related variables.
1871         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
1872         For_Package along with usage comment.
1873
1874 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1875
1876         * gcc-interface/Makefile.in: Clean up targets.
1877         Enable new package for atomic counters and copy-on-write implementation
1878         of unbounded strings on x86 platforms.
1879         * gcc-interface/Make-lang.in: Update dependencies.
1880
1881 2011-08-04  Robert Dewar  <dewar@adacore.com>
1882
1883         * exp_ch7.adb: Minor reformatting.
1884
1885 2011-08-04  Robert Dewar  <dewar@adacore.com>
1886
1887         * exp_strm.adb: Minor reformatting.
1888
1889 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1890
1891         * s-atocou.adb: Replace by dummy version and use on targets where atomic
1892         operations are not supported.
1893         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
1894         * s-atocou-x86.adb: New file.
1895         * Makefile.rtl: Add s-atocou.o file
1896
1897 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1898
1899         * make.adb (Compile): Move setting of CodePeer_Mode to ...
1900         (Compilation_Phase): ... here.
1901         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
1902
1903 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1904
1905         * Make-generated.in: Fix minor typo in comment.
1906
1907 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1908
1909         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
1910         the project path.
1911
1912 2011-08-04  Robert Dewar  <dewar@adacore.com>
1913
1914         * a-coinho.adb: Minor reformatting.
1915
1916 2011-08-04  Robert Dewar  <dewar@adacore.com>
1917
1918         * a-coinho.ads: Minor reformatting.
1919
1920 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1921
1922         * s-atocou.ads, s-atocou.adb: New files.
1923         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
1924         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
1925         direct use of GCC's atomic builtins and replace them by use of new
1926         atomic counter package.
1927
1928 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1929
1930         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
1931
1932 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1933
1934         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
1935         with a call to Get_External_Tag.
1936         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
1937         subprogram usage. Remove the guard against package declarations and
1938         bodies since Build_Cleanup_Statements is no longer invoked in that
1939         context.
1940         (Build_Components): Initialize Tagged_Type_Stmts when the context
1941         contains at least one library-level tagged type.
1942         (Build_Finalizer): New local variables Has_Tagged_Types and
1943         Tagged_Type_Stmts along with associated comments on usage. Update the
1944         logic to include tagged type processing.
1945         (Create_Finalizer): Insert all library-level tagged type unregistration
1946         code before the jump block circuitry.
1947         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
1948         (Expand_N_Package_Declaration): Remove the call to
1949         Build_Cleanup_Statements.
1950         (Process_Tagged_Type_Declaration): New routine. Generate a call to
1951         unregister the external tag of a tagged type.
1952         (Processing_Actions): Reimplemented to handle tagged types.
1953         (Process_Declarations): Detect the declaration of a library-level
1954         tagged type and carry out the appropriate actions.
1955         (Unregister_Tagged_Types): Removed. The machinery has been directly
1956         merged with Build_Finalizer.
1957
1958 2011-08-04  Robert Dewar  <dewar@adacore.com>
1959
1960         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
1961         gnatls.adb, exp_ch3.adb: Minor reformatting.
1962
1963 2011-08-04  Marc Sango  <sango@adacore.com>
1964
1965         * sem_attr.adb (Analyze_Attribute): Replace the message
1966         "invisible attribute of}" of the spark restriction violation in
1967         attribute reference by the simple message "invisible attribute of type".
1968         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
1969         two insertion characters: '&' and '}'.
1970
1971 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1972
1973         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
1974         * a-coinho.ads, a-coinho.adb: New file.
1975         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
1976
1977 2011-08-04  Nicolas Roche  <roche@adacore.com>
1978
1979         * alfa_test.adb: Not all ali files are containing alfa information even
1980         if compiled with -gnatd.F. So suppress warning about missing ALFA
1981         information.
1982
1983 2011-08-04  Yannick Moy  <moy@adacore.com>
1984
1985         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
1986         scope.
1987         * put_alfa.adb: Check that scope name is not empty.
1988
1989 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1990
1991         * exp_ch3.adb (Stream_Operation_Ok): new predicate
1992         Needs_Elementary_Stream_Operation, to determine whether user-defined
1993         Read and Write attributes are available for the elementary components
1994         of the given type. If only the predefined attributes are available,
1995         then when restriction No_Default_Stream_Attributes is active the
1996         predefined stream attributes for the composite type cannot be created.
1997
1998 2011-08-04  Robert Dewar  <dewar@adacore.com>
1999
2000         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
2001         Put routines in alpha order
2002
2003 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
2004
2005         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
2006         * gcc-interface/Make-lang.in: Update dependencies.
2007
2008 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2009
2010         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
2011         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
2012         gnat1why).
2013
2014 2011-08-04  Robert Dewar  <dewar@adacore.com>
2015
2016         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
2017         lib-xref-alfa.adb: Minor reformatting.
2018
2019 2011-08-04  Marc Sango  <sango@adacore.com>
2020
2021         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
2022         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
2023         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
2024         mode.
2025
2026 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2027
2028         * bindgen.adb (Gen_Adainit_C): Remove.
2029         (Gen_Adafinal_C): Ditto.
2030         (Gen_Elab_Externals_C): Ditto.
2031         (Gen_Elab_Calls_C): Ditto.
2032         (Gen_Elab_Order_C): Ditto.
2033         (Gen_Elab_Defs_C): Ditto.
2034         (Gen_Finalize_Library_C): Ditto.
2035         (Gen_Finalize_Library_Defs_C): Ditto.
2036         (Gen_Main_C): Ditto.
2037         (Gen_Output_File_C): Ditto.
2038         (Gen_Restrictions_C): Ditto.
2039         (Gen_Versions_C): Ditto.
2040         (Write_Info_Ada_C): Ditto.
2041         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
2042         (Gen_Output_File): Do not force Ada_Bind_File anymore.
2043         Always call Gen_Output_File_Ada.
2044         * gnatlink.adb (Begin_Info): Now a constant.
2045         (End_Info): Ditto.
2046         (Ada_Bind_File): Remove
2047         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
2048         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
2049         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
2050         * opt.ads (Ada_Bind_File): Remove.
2051
2052 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2053
2054         * projects.texi: Document target-specific directory in default project
2055         path for gnatmake.
2056
2057 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2058
2059         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
2060         path in all cases .
2061
2062 2011-08-04  Yannick Moy  <moy@adacore.com>
2063
2064         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
2065         opt.ads, lib-xref.ads: Code clean up.
2066
2067 2011-08-04  Yannick Moy  <moy@adacore.com>
2068
2069         * gnat_rm.texi: Update description of Test_Case
2070         * gnat_ugn.texi: Typo.
2071
2072 2011-08-04  Ed Falis  <falis@adacore.com>
2073
2074         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
2075
2076 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2077
2078         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
2079         it is of type Root_Controlled. This action eliminates fields Prev and
2080         Next from type equality.
2081
2082 2011-08-04  Yannick Moy  <moy@adacore.com>
2083
2084         * lib-xref-alfa.adb: Correct typo.
2085
2086 2011-08-04  Matthew Heaney  <heaney@adacore.com>
2087
2088         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
2089         component.
2090
2091 2011-08-04  Yannick Moy  <moy@adacore.com>
2092
2093         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
2094         (Analyze_Pragma): allow static string expression for name of Test_Case,
2095         instead of simply string literals.
2096         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
2097         expressions.
2098
2099 2011-08-04  Vincent Celier  <celier@adacore.com>
2100
2101         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
2102         case suffixes to find truncated main sources.
2103
2104 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2105
2106         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
2107         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
2108         (Compute_Current_Task): Ditto.
2109
2110 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2111
2112         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
2113
2114 2011-08-04  Yannick Moy  <moy@adacore.com>
2115
2116         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
2117         library-level constant.
2118         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
2119         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
2120         used as selector of parameter association, in ALFA mode.
2121
2122 2011-08-04  Robert Dewar  <dewar@adacore.com>
2123
2124         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
2125         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
2126         reformatting.
2127
2128 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2129
2130         * make.adb (Linking_Phase): Set source search path before calling
2131         gnatlink in CodePeer mode.
2132
2133 2011-08-04  Javier Miranda  <miranda@adacore.com>
2134
2135         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
2136         Remove code which takes care of building TSDs.
2137         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
2138         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
2139         the accessibility check in VM targets.
2140         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
2141         (Building_Static_DT): Now returns false for VM targets.
2142         (Build_VM_TSDs): Removed.
2143         (Expand_Interface_Conversion): Generate missing runtime check for
2144         conversions to interface types whose target type is unknown at compile
2145         time.
2146         (Make_VM_TSD): Add missing code to disable the generation of calls to
2147         Check_TSD if the tagged type is not defined at library level, or not
2148         has a representation clause specifying its external tag, or -gnatdQ is
2149         active.
2150         * exp_disp.ads (Build_VM_TSDs): Removed.
2151         (Make_VM_TSDs): Spec relocated from exp_disp.adb
2152         * sem_disp.adb (Check_Dispatching_Operation): No code required to
2153         register primitives in the dispatch tables in VM targets.
2154         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
2155         initialization of class-wide interface objects in VM targets.
2156         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
2157         of Make_DT).
2158
2159 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2160
2161         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
2162         when dotnet-ld cannot be found.
2163
2164 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2165
2166         * bindgen.adb: Simplify significantly generation of binder body file in
2167         CodePeer mode.
2168         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
2169         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
2170         not expanded).
2171
2172 2011-08-04  Yannick Moy  <moy@adacore.com>
2173
2174         * sem_prag.adb, sem.ads: Code cleanup.
2175
2176 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2177
2178         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
2179         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
2180         results if possible.
2181         * s-stusta.adb (Print): Adjust after changes in s-stausa.
2182         * gnat_ugn.texi: Update dynamic stack usage section.
2183
2184 2011-08-04  Steve Baird  <baird@adacore.com>
2185
2186         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
2187         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
2188         contains only a call to the user-defined main subprogram.
2189         (Gen_Main_Ada) - If CodePeer_Mode is set, then
2190         call the "wrapper" subprogram instead of directly
2191         calling the user-defined main subprogram.
2192
2193 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2194
2195         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
2196         alternatives of a case statement for controlled objects. Rename local
2197         variable A to Dead_Alt.
2198         (Expand_N_If_Statement): Check the then and else statements of an if
2199         statement for controlled objects. Check the then statements of all
2200         elsif parts of an if statement for controlled objects.
2201         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
2202         objects.
2203         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
2204         detects a loop associated with the expansion of an array object.
2205         Augment the processing of the loop statements to account for a possible
2206         wrap done by Process_Statements_For_Controlled_Objects.
2207         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
2208         statements and abortable part of an asynchronous select for controlled
2209         objects.
2210         (Expand_N_Conditional_Entry_Call): Check the else statements of a
2211         conditional entry call for controlled objects.
2212         (Expand_N_Selective_Accept): Check the alternatives of a selective
2213         accept for controlled objects.
2214         (Expand_N_Timed_Entry_Call): Check the entry call and delay
2215         alternatives of a timed entry call for controlled objects.
2216         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
2217         exception handler for controlled objects.
2218         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2219         Add formal parameter Nested_Constructs along with its associated
2220         comment.
2221         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
2222         Requires_Cleanup_Actions.
2223         (Process_Statements_For_Controlled_Objects): New routine.
2224         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
2225         routine. Inspect a node which contains a non-handled sequence of
2226         statements for controlled objects. If such an object is found, the
2227         statements are wrapped in a block.
2228
2229 2011-08-04  Bob Duff  <duff@adacore.com>
2230
2231         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
2232         need to compare with Class_Wide_Type (T2), in order to get at the
2233         original class-wide type node.
2234         * sem_type.ads (Covers): Improve the comment.
2235         * einfo.ads (Class_Wide_Type): Improve the comment.
2236         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
2237         the type of the Deref.
2238
2239 2011-08-04  Yannick Moy  <moy@adacore.com>
2240
2241         * gnat_rm.texi: Document that Test_Case pragma can only appear on
2242         separate declarations.
2243         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
2244         check identifier of pragma argument.
2245         (Chain_TC): check that no other test case associated to the same entity
2246         share the same name.
2247         (Check_Test_Case): disallow test case inside subprogram body
2248         (Analyze_Pragma): correct call to check identifier and not argument
2249         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
2250         function gets name from test case pragma.
2251
2252 2011-08-04  Yannick Moy  <moy@adacore.com>
2253
2254         * gnat_rm.texi: Document new pragma and aspect.
2255         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
2256         (No_Duplicates_Allowed): new constant array defining whether duplicates
2257         aspects of each kind can appear on the same declaration.
2258         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
2259         field, which points to a node holding the previous Spec_PPC_List.
2260         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
2261         through the indirection with Contract.
2262         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
2263         * par-prag.adb (Prag): do nothing on Test_Case pragma
2264         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
2265         be called directly.
2266         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
2267         component Ensures of Test_Case.
2268         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
2269         (Analyze_Generic_Subprogram_Declaration,
2270         Analyze_Subprogram_Instantiation,
2271         Analyze_Abstract_Subprogram_Declaration,
2272         Analyze_Subprogram_Body_Helper,
2273         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
2274         insert contract in subprogram node at point of definition
2275         * sem_ch13.adb
2276         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
2277         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
2278         corresponding pragma
2279         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
2280         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
2281         similar to the analysis of pre/post
2282         (Derive_Subprogram): insert contract in subprogram node at point of
2283         derivation.
2284         * sem_prag.adb, sem_prag.ads
2285         (Check_Arg_Is_String_Literal, Check_Identifier):
2286         new checking procedures to be called in treatment of pragmas
2287         (Check_Test_Case): new procedure to check that a Test_Case aspect or
2288         pragma is well-formed. This does not check currently that 'Result is
2289         used only in the Ensures component of a Test_Case.
2290         (Analyze_Pragma): add case for Test_Case
2291         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
2292         components of a Test_Case.
2293         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
2294         expressions in the 3rd (and 4th if present) arguments of a Test_Case
2295         pragma, treated as spec expressions.
2296         (Sig_Flags): add value -1 for Test_Case.
2297         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
2298         Get_Requires_From_Test_Case_Pragma): getters for both expression
2299         components of a Test_Case.
2300         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
2301         indirection between an entry or [generic] subprogram entity and its
2302         pre/post + test-cases.
2303         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
2304         get/set for fields of an N_Contract node.
2305         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
2306         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
2307         names and pragma for Test_Case.
2308         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
2309
2310 2011-08-04  Vincent Celier  <celier@adacore.com>
2311
2312         * gnat_ugn.texi: Improve documentation of gnatmake switch
2313         --source-info-file=.
2314
2315 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2316
2317         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
2318         type). Initialize Atyp to the appropriate type which is later checked
2319         for completion. Rewrite the assertion associated with private type
2320         completion.
2321
2322 2011-08-04  Ed Falis  <falis@adacore.com>
2323
2324         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
2325         initialize the number of CPUs.
2326
2327 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2328
2329         * sem_type.adb (Disambiguate): New subsidiary routine
2330         In_Same_Declaration_List, to implement AI05-0020: a user-defined
2331         equality on an anonymous access type whose designated type is private
2332         does not lead to an ambiguity with the universal access equality
2333         operator in the body or child units of the defining package. The same
2334         is true for a multiplication operator on a private type completed with
2335         a fixed-point-type.
2336
2337 2011-08-04  Javier Miranda  <miranda@adacore.com>
2338
2339         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
2340         (Normalize_Scalars_Config): Removed.
2341         * opt.adb
2342         (Register_Opt_Config_Switches): Remove registering config values of
2343         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
2344         (Restore_Opt_Config_Switches): Remove code which restores the values of
2345         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2346         Init_Or_Norm_Scalars.
2347         (Save_Opt_Config_Switches): Remove code which saves values of
2348         Init_Or_Norm_Scalars and Normalize_Scalars.
2349         (Set_Opt_Config_Switches): Remove code which restores config values of
2350         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2351         Init_Or_Norm_Scalars.
2352
2353 2011-08-04  Yannick Moy  <moy@adacore.com>
2354
2355         * frontend.adb (Frontend): remove previous patch to avoid full
2356         qualification in ALFA mode.
2357         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
2358         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
2359         unique name for an entity, which could be used to identify the entity
2360         across compilation units.
2361
2362 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2363
2364         * prj-env.adb
2365         (Initialize_Default_Project_Path): Add target specific directory
2366         ($prefix/$target/lib/gnat) in front of project path in all cases
2367         (making gnatmake's behaviour consistent with gprbuild).
2368         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
2369         Pass target name from Sdefault to project subsystem.
2370         * gnatls.adb: Show new target specific default project directory.
2371
2372 2011-08-04  Johannes Kanig  <kanig@adacore.com>
2373
2374         * cstand.adb: Add Information to Identifier in Standard
2375         (Identifer_For): Set Entity to the corresponding entity
2376
2377 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2378
2379         * gnat_ugn.texi: Update doc on gnatcheck.
2380
2381 2011-08-04  Yannick Moy  <moy@adacore.com>
2382
2383         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
2384         xrefs in a scope.
2385
2386 2011-08-04  Yannick Moy  <moy@adacore.com>
2387
2388         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
2389         performing expansion.
2390         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
2391         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
2392         it is not called in ALFA mode.
2393
2394 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2395
2396         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
2397         after all, so removed.
2398
2399 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2400
2401         * vms_data.ads: Add missing VMS qualifiers.
2402
2403 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2404
2405         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
2406         the list of files on the command line after processing it through
2407         Complete_Mains.
2408
2409 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2410
2411         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
2412         processing for .NET/JVM. These targets can now benefit from
2413         Raise_From_Controlled_Operation and they share the same processing with
2414         standard targets.
2415         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
2416         These targets need transient scopes in order to properly finalize short
2417         lived controlled objects.
2418         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
2419          NET/JVM. These targets can now benefit from
2420         Raise_From_Controlled_Operation and they share the same processing with
2421         standard targets.
2422
2423 2011-08-04  Geert Bosch  <bosch@adacore.com>
2424
2425         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
2426
2427 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2428
2429         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
2430         Expand_Record_Aggregate, to determine whether aggregate must be
2431         expanded into assignments. This is the case if the ancestor part is
2432         private, regarless of the setting of the flag Has_Private_Ancestor.
2433
2434 2011-08-04  Ed Falis  <falis@adacore.com>
2435
2436         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
2437
2438 2011-08-04  Bob Duff  <duff@adacore.com>
2439
2440         * sinfo.ads: Fix comment.
2441
2442 2011-08-04  Steve Baird  <baird@adacore.com>
2443
2444         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
2445         choose a package name in much the same way as is
2446         done for JGNAT when VM_Target /= No_VM, except that
2447         a slightly more distinctive prefix string is used.
2448
2449 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2450
2451         * makeutl.adb (Complete_Mains): no longer accept unit names on the
2452         gnatmake command line.
2453         This behavior was never documented (and was supported only because of
2454         an early bug in the code). This case might lead to ambiguous cases
2455         (between unit names and truncated base names without suffixes).
2456
2457 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2458
2459         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
2460         Remove the external tag of a tagged type from the internal hash table.
2461         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
2462         expanded usage of the routine. Strenghten the check for Is_Master. Add
2463         processing for tagged types.
2464         (Build_Finalizer): Create all the necessary lists used in finalizer
2465         creation when the processed context is a package that may contain
2466         tagged types.
2467         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
2468         Requires_Cleanup_Actions.
2469         (Expand_N_Package_Body): Package bodies may need clean up code
2470         depending on whether they contain tagged types.
2471         (Expand_N_Package_Declaration): Package declarations may need clean up
2472         code depending on whether they contain tagged types.
2473         (Unregister_Tagged_Types): New routine. Search through a list of
2474         declarations or statements, looking for non-abstract Ada tagged types.
2475         For each such type, generate code to unregister the external tag.
2476         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2477         Requires_Cleanup_Actions.
2478         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2479         through a list of declarations or statements looking for non-abstract
2480         Ada tagged types or controlled objects.
2481         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2482         Requires_Cleanup_Actions.
2483         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2484         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2485         RE_Unit_Table.
2486
2487 2011-08-04  Vincent Celier  <celier@adacore.com>
2488
2489         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2490         has Ada sources, not project Project, because if the root project
2491         Project has no sources of its own, all projects will be deemed without
2492         sources.
2493
2494 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2495
2496         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2497         of the No_Param_Proc acc-to-subp type used for initialization of
2498         __gnat_finalize_library_objects so that it's declared at library level
2499         rather than nested inside of the adainit routine.
2500
2501 2011-08-04  Javier Miranda  <miranda@adacore.com>
2502
2503         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2504         if the tagged type has a representation clause which specifies its
2505         external tag.
2506
2507 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2508
2509         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
2510         Remove previous procedure with that name.
2511         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
2512         when appropriate.
2513         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2514         subtype mark, the ancestor cannot have unknown discriminants.
2515         (Resolve_Record_Aggregate): if the type has invisible components
2516         because of a private ancestor, the aggregate is illegal.
2517
2518 2011-08-04  Vincent Celier  <celier@adacore.com>
2519
2520         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2521         account switches -gnat2005, -gnat12 and -gnat2012.
2522
2523 2011-08-04  Bob Duff  <duff@adacore.com>
2524
2525         * s-tasdeb.ads: Minor comment fix.
2526
2527 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2528
2529         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2530         CodePeer mode.
2531         * switch.ads, switch.adb (Is_Language_Switch): New function.
2532
2533 2011-08-04  Vincent Celier  <celier@adacore.com>
2534
2535         * switch-c.adb: Minor comment addition.
2536
2537 2011-08-04  Vincent Celier  <celier@adacore.com>
2538
2539         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2540         ending with '=' is followed by a space (missing file name).
2541
2542 2011-08-04  Pascal Obry  <obry@adacore.com>
2543
2544         * g-regist.ads: Fix size of HKEY on x86_64-windows.
2545
2546 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2547
2548         * sem_ch12.adb (Analyze_Associations): New routine
2549         Check_Overloaded_Formal_Subprogram to reject a formal package when
2550         there is a named association or a box initialisation for an overloaded
2551         formal subprogram of the corresponding generic.
2552
2553 2011-08-04  Yannick Moy  <moy@adacore.com>
2554
2555         * alfa.ads (ALFA_Xref_Record): add component for type of entity
2556         * get_alfa.adb, put_alfa.adb: Read and write new component of
2557         cross-reference.
2558         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2559
2560 2011-08-04  Pascal Obry  <obry@adacore.com>
2561
2562         * urealp.adb: Minor reformatting.
2563
2564 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2565
2566         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2567         Handle the case when Cleanup_Protected_Object returns Empty.
2568
2569 2011-08-04  Yannick Moy  <moy@adacore.com>
2570
2571         * frontend.adb (Frontend): only qualify names in non-ALFA mode
2572
2573 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2574
2575         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2576         call, ignore functions.
2577
2578 2011-08-04  Geert Bosch  <bosch@adacore.com>
2579
2580         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2581         point.
2582
2583 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2584
2585         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2586         as an index for Builder'Switches. This conforms to the documentation.
2587         * make.adb (Insert_Project_Sources): avoid duplicate code
2588
2589 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2590
2591         * makeutl.adb (Complete_Mains): if the user has passed a relative file
2592         name on the command line (for instance "../dummy"), never assume it can
2593         be a unit name.
2594
2595 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2596
2597         * bindgen.adb: Remove code the reference or create the
2598         Break_Start/__gnat_break_start procedure.
2599         * s-stalib.adb (Break_Start): Removed.
2600
2601 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2602
2603         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2604         shared with gprbuild.
2605
2606 2011-08-04  Yannick Moy  <moy@adacore.com>
2607
2608         * par-ch4.adb (P_Primary): preferentially issue an error message about
2609         a missing parenthesis arount a conditional or case expression in Ada
2610         2012 mode, if we detect that the alignment is not correct for a
2611         statement.
2612
2613 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2614
2615         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2616         tag-to-class-wide conversion as needing finalization actions.
2617         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2618         a tag-to-class-wide conversion as needing finalization actions.
2619         (Is_Finalizable_Transient): The result of a tag-to-class-wide
2620         conversion does not need finalization actions.
2621         (Is_Tag_To_CW_Conversion): New routine.
2622         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2623         whether an object is the result of a tag-to-class-wide conversion.
2624
2625 2011-08-04  Yannick Moy  <moy@adacore.com>
2626
2627         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2628         the left-hand-side and right-hand-side of a conjunct are inserted when
2629         translating a pre- or postcondition
2630         * sem_ch6.adb: Correct typo in comment
2631
2632 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2633
2634         * gnat_rm.texi: Ravenscar does not prohibit dependence on
2635         Unchecked_Conversion and Unchecked_Deallocation.
2636
2637 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2638
2639         * make.adb: Minor reformatting.
2640
2641 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2642
2643         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2644         sources in the project and its imported projects, but not in the whole
2645         tree.
2646
2647 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2648
2649         * make.adb: Remove debug trace.
2650
2651 2011-08-04  Vincent Celier  <celier@adacore.com>
2652
2653         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2654         path in canonical form, to be able to compare path names on platforms
2655         such as Windows or Darwin.
2656
2657 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2658
2659         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2660         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2661         * scos.ads: Update documentation accordingly.
2662         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2663         pragmas.
2664
2665 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2666
2667         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2668         attribute only if prefix type is scalar.
2669
2670 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2671
2672         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2673         in gnatmake for specifying mains on the command line that do not belong
2674         to the main project. These mains must currently all belong to the same
2675         project, though.
2676         (Ultimate_Extension_Of): removed, since duplicated
2677         Ultimate_Extending_Project.
2678
2679 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2680
2681         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2682         instead.
2683         (CodePeer_Mode_String): New.
2684         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2685         CodePeer mode.
2686         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2687         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2688         mode, since no useful elaboration subprogram is needed by CodePeer.
2689         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2690         In this mode, compile binder file with -gnatC and do stop after this
2691         step.
2692
2693 2011-08-04  Vincent Celier  <celier@adacore.com>
2694
2695         * exp_ch7.adb: Minor comment fix.
2696
2697 2011-08-04  Robert Dewar  <dewar@adacore.com>
2698
2699         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2700         exp_ch4.adb, makeutl.adb: Minor reformatting.
2701
2702 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2703
2704         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2705         Create several new subprograms to move code out of Make. This makes the
2706         code more readable, removes code duplication, and is a preparation work
2707         for adding support for aggregate projects.
2708
2709 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2710
2711         * s-po32gl.ads, s-po32gl.adb: New files.
2712         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2713         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2714         (Build_Finalization_Collection): Use it.
2715         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2716         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2717         literals.
2718         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2719         * gcc-interface/Make-lang.in: Update dependencies.
2720
2721 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2722
2723         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2724         the command line.
2725
2726 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2727
2728         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2729         command line is not a file name, also check whether it could be a unit
2730         name.
2731
2732 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2733
2734         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2735         the header of the finalization routine.
2736         If the unit has no finalizer but is a body whose spec has one, then
2737         generate the decrement of the elaboration entity only.
2738         If the unit has a finalizer and is a spec, then do not generate the
2739         decrement of the elaboration entity.
2740         (Gen_Finalize_Library_C): Likewise.
2741
2742 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2743
2744         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2745         (Bounds_Size_Expression): Removed.
2746         (Double_Alignment_Of): New subsidiary routine.
2747         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2748         for a hole in the dope vector of unconstrained arrays due to different
2749         index and element alignments.
2750
2751 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2752
2753         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2754         raise program_error because body has not been seen yet.
2755
2756 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2757
2758         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
2759         an unresolved name.
2760
2761 2011-08-04  Vincent Celier  <celier@adacore.com>
2762
2763         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
2764
2765 2011-08-04  Yannick Moy  <moy@adacore.com>
2766
2767         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
2768         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
2769
2770 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2771
2772         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
2773         instantiation in RCI.
2774
2775 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2776
2777         * make.adb: Share more code with gprbuild
2778
2779 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2780
2781         * projects.texi: Added documentation for the IDE'Gnat project file
2782         attribute.
2783
2784 2011-08-04  Nicolas Roche  <roche@adacore.com>
2785
2786         * gnat_rm.texi: Minor editing.
2787
2788 2011-08-04  Javier Miranda  <miranda@adacore.com>
2789
2790         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
2791         and the library case for VM targets.
2792         (Gen_Adainit_Ada): Likewise.
2793
2794 2011-08-04  Robert Dewar  <dewar@adacore.com>
2795
2796         * g-altive.ads: Minor comment updates.
2797         * prj-nmsc.adb: Minor reformatting.
2798
2799 2011-08-04  Javier Miranda  <miranda@adacore.com>
2800
2801         * opt.ads
2802         (Normalize_Scalars_Config): Value of the configuration switch set by
2803         pragma Normalize_Scalars when it appears in the gnat.adc file.
2804         (Normalize_Scalars): New field for record Config_Switches_Type. Used
2805         to save and restore settings of this pragma.
2806         * opt.adb
2807         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
2808         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
2809
2810 2011-08-04  Vincent Celier  <celier@adacore.com>
2811
2812         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
2813
2814 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2815
2816         * makeutl.adb: Minor reformatting.
2817
2818 2011-08-04  Olivier Hainque  <hainque@adacore.com>
2819
2820         * g-altive.ads: Update comments to reflect that only the soft
2821         binding is available today.
2822
2823 2011-08-04  Robert Dewar  <dewar@adacore.com>
2824
2825         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
2826         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
2827         * gcc-interface/Make-lang.in: Update dependencies.
2828
2829 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2830
2831         * prj-env.adb: Remove local debug traces.
2832
2833 2011-08-04  Yannick Moy  <moy@adacore.com>
2834
2835         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
2836         was used instead of Hi_OK, which could cause a read of an uninitialized
2837         value later on. Detected while working on the new warning.
2838         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
2839         to local variable.
2840         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
2841         in more cases, in order to detect more unreferenced values.
2842         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
2843         object for expression, if any.
2844
2845 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2846
2847         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
2848         the operand types instead of the Esize.
2849
2850 2011-08-04  Steve Baird  <baird@adacore.com>
2851
2852         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
2853         enable CodePeer_Mode.
2854         * bindusg.adb (Display): Add help message describing -P binder switch.
2855         * gnat_ugn.texi: Document -P binder switch.
2856         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
2857         user-defined main program directly.
2858         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
2859         user-defined main program in the context clause of the package body.
2860
2861 2011-08-04  Yannick Moy  <moy@adacore.com>
2862
2863         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
2864         duplicate of Defining_Entity
2865         (Get_Unique_Entity_For_Decl): rename function into
2866         Unique_Defining_Entity
2867         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
2868         (Formal_Proof_On): remove synthesized flag
2869         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2870         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
2871         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
2872         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
2873         Annotate (Formal_Proof)
2874
2875 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2876
2877         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
2878         source files with non-standard naming schemes, in imported projects
2879
2880 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2881
2882         * makeutl.adb (Complete_Mains): when a multi-unit source file is
2883         specified on the gprbuild command line, we need to compile all units
2884         within that file, not just the first one we find
2885         Fix error message for mains that are not found.
2886
2887 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2888
2889         * sem_ch6.adb: Update comment.
2890         * sem_ch12.adb: Minor reformatting.
2891
2892 2011-08-04  Bob Duff  <duff@adacore.com>
2893
2894         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
2895         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
2896         race condition whose symptom is to fail to lock Parent. That, in turn,
2897         causes Parent.Awake_Count to be accessed without locking Parent, which
2898         causes another race condition whose symptom is that Parent.Awake_Count
2899         can be off by 1 (either too high or too low). The solution is to lock
2900         Parent unconditionally, and then lock Acceptor, before reading
2901         Acceptor.Terminate_Alternative.
2902
2903 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2904
2905         * debug.adb: Update comment.
2906
2907 2011-08-04  Robert Dewar  <dewar@adacore.com>
2908
2909         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
2910         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
2911         exp_ch6.adb: Minor reformatting.
2912
2913 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2914
2915         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
2916         checks for -gnateE.
2917
2918 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2919
2920         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
2921
2922 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2923
2924         * sinfo.ads: Minor reformatting.
2925
2926 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2927
2928         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
2929         even if there is no location.
2930
2931 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2932
2933         * sem_res.adb, sem_ch4.adb: move check for restriction
2934         No_Task_Hierarchy to resolve_allocator.
2935
2936 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2937
2938         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
2939         This flag of N_Pragma nodes is not used, remove it as well as all of
2940         the associated circuitry.
2941
2942 2011-08-04  Javier Miranda  <miranda@adacore.com>
2943
2944         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
2945         runtime check on duplicated externa tags
2946         * debug.adb Document switch -gnatdQ.
2947
2948 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2949
2950         * a-fihema.ads: Minor typo fix.
2951
2952 2011-08-04  Yannick Moy  <moy@adacore.com>
2953
2954         * sem_ch10.adb: Minor comment update.
2955
2956 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2957
2958         * einfo.adb: Update the node field usage to reflect the renaming of
2959         Return_Flag to Return_ Flag_Or_Transient_Decl.
2960         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
2961         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
2962         (Write_Field15_Name): Change Return_Flag to
2963         Return_Flag_Or_Transient_Decl.
2964         * einfo.ads: Rename node field Return_Flag to
2965         Return_Flag_Or_Transient_Decl. Update the associated comment and all
2966         occurrences in entities.
2967         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
2968         associated Inline pragma.
2969         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
2970         associated Inline pragma.
2971         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
2972         routine.
2973         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
2974         Return_Flag and Set_Return_Flag.
2975         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
2976         objects generated for controlled transients declared inside an
2977         Exception_With_Actions. Update the calls to Return_Flag.
2978         (Process_Object_Declaration): Add code to add a null guard for hook
2979         objects generated for controlled transients declared inside an
2980         Exception_With_Actions. Update related comment.
2981         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
2982         objects generated for controlled transients declared inside an
2983         Exception_With_Actions. Update the calls to Return_Flag.
2984         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
2985
2986 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2987
2988         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
2989         positional aggregate.
2990
2991 2011-08-04  Vincent Celier  <celier@adacore.com>
2992
2993         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
2994         SLOC only for pragmas.
2995
2996 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2997
2998         * projects.texi: Minor typo fix.
2999
3000 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3001
3002         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
3003         on case-sensitive file systems.
3004
3005 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3006
3007         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
3008         nested in a disabled pragma.
3009         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
3010         enclosing pragma, if any, for X decisions.
3011
3012 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3013
3014         * sem_prag.adb: Minor reformatting.
3015
3016 2011-08-04  Vincent Celier  <celier@adacore.com>
3017
3018         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
3019         allowed in no run time mode.
3020
3021 2011-08-04  Vincent Celier  <celier@adacore.com>
3022
3023         * make.adb (Check): When -gnatc is used, check for the source file
3024         inside the ALI file with a canonical case file name.
3025
3026 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3027
3028         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
3029         overriding the separator.
3030
3031 2011-08-04  Robert Dewar  <dewar@adacore.com>
3032
3033         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
3034         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
3035
3036 2011-08-04  Robert Dewar  <dewar@adacore.com>
3037
3038         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
3039
3040 2011-08-04  Yannick Moy  <moy@adacore.com>
3041
3042         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
3043         'Result only appears in postcondition of function.
3044
3045 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3046
3047         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
3048         external tag, include the value of the external tag in the exception
3049         message.
3050
3051 2011-08-04  Yannick Moy  <moy@adacore.com>
3052
3053         * sem_attr.adb (Result): modify error message for misplaced 'Result
3054
3055 2011-08-04  Sergey Rybin  <rybin@adacore.com>
3056
3057         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
3058         clear that the second argument must be an identifier.
3059
3060 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3061
3062         * exp_ch9.adb (Build_Barrier_Function): When compiling with
3063         -fpreserve-control-flow, insert an IF statement on the barrier
3064         condition to ensure that a conditional branch instruction is generated.
3065
3066 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3067
3068         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
3069         (Processing_Flags.Ignore_Missing_With): new flag.
3070
3071 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3072
3073         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
3074         Source_List_File on case-insensitive systems where the file is actually
3075         on a case-sensitive file system (NFS,...).
3076
3077 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3078
3079         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
3080         function return contains a controlled [extension] aggregate and the
3081         return statement is not part of a handled sequence of statements, wrap
3082         the return in a block. This ensures that all controlled temporaries
3083         generated during aggregate resolution will be picked up by the
3084         finalization machinery.
3085
3086 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3087
3088         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
3089         components, freeze type before resolution, to ensure that default
3090         initializations are present for all components.
3091         * sem_res.adb (Resolve_Actuals): the designated object of an
3092         accces-to-constant type is a legal actual in a call to an
3093         initialization procedure.
3094
3095 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3096
3097         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
3098         N_Unchecked_Type_Conversion to the possible containers of a renamed
3099         transient variable.
3100
3101 2011-08-04  Yannick Moy  <moy@adacore.com>
3102
3103         * par-ch13.adb (Aspect_Specifications_Present): recognize
3104         "with Identifier'Class =>" as an aspect, so that a meaningful warning
3105         is issued in Strict mode.
3106         * par.adb: Fix typos in comments.
3107
3108 2011-08-04  Yannick Moy  <moy@adacore.com>
3109
3110         * sem_attr.adb (Result): modify error message to take into account Post
3111         aspect when compiling Ada 2012 (or newer) code.
3112
3113 2011-08-04  Nicolas Roche  <roche@adacore.com>
3114
3115         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
3116         remove need for GCC exceptions.
3117
3118 2011-08-04  Vincent Celier  <celier@adacore.com>
3119
3120         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
3121         project, not the source file name.
3122         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
3123         excluded, continue looking. This excluded source will only be returned
3124         if there is no other source with the same base name that is not locally
3125         removed.
3126
3127 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3128
3129         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
3130         private and one of the operands is a real literal, use a qualified
3131         expression rather than a conversion which is not meaningful to the
3132         back-end.
3133
3134 2011-08-04  Yannick Moy  <moy@adacore.com>
3135
3136         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
3137         corresponding aspect X'Class are allowed, proceed with analysis of the
3138         aspect instead of skipping it.
3139
3140 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3141
3142         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
3143         This will allow to have an Ada implementation for the subprogram.
3144
3145 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3146
3147         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
3148         completion and aspects are present, apply them to the entity for the
3149         type which is currently the partial view, but which is the one that
3150         will be frozen.
3151         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
3152         applies to a partial view, indicate that the full view has predicates
3153         and delayed aspects.
3154         (Replace_Type_Reference): Handle properly predicates that apply to the
3155         full view of a private completion.
3156
3157 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3158
3159         * layout.adb (Layout_Type): For composite types, do not set Esize.
3160         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
3161         set Esize.
3162         (Size_Known): Look at the RM size of components instead of the Esize.
3163         (Freeze_Record_Type): Look at the RM size instead of the Esize to
3164         issue warning and activate Implicit_Packing.
3165         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
3166         if the Esize is not known.
3167         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
3168         for elementary types only.
3169         (Analyze_Record_Representation_Clause): Look at the RM size instead
3170         of the Esize to issue errors.
3171         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
3172         is not known.
3173         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
3174         obsolete block.
3175         Look at the RM size instead of the Esize for types if the latter is
3176         not known.
3177         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
3178
3179 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3180
3181         * sem_type.adb: proper handling of equality not involving anonymous
3182         access types.
3183
3184 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3185
3186         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
3187         Vis_Decls. When creating a library-level finalizer for a package spec,
3188         both the declaration and body of the finalizer are inserted either in
3189         the visible or private declarations of the package spec.
3190
3191 2011-08-04  Javier Miranda  <miranda@adacore.com>
3192
3193         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
3194         use of the full-view of a type when invoking Is_Ancestor.
3195         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
3196         the full-view of private parents is requested, then use also the
3197         full-view of the parent of the first derivation.
3198
3199 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3200
3201         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
3202         instead of the locally imported procedure.
3203         * s-taprop-mingw.adb (Enter_Task): Ditto.
3204         * s-valrea.adb (Scan_Real): Ditto.
3205         * s-imgrea.adb (Set_Image_Real): Ditto.
3206         * s-flocon.ads: Make the package pure.
3207
3208 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3209
3210         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
3211         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
3212         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
3213         New subprogram, moved here from...
3214         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
3215         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
3216         rewriting of the last argument into a procedure call statement here...
3217         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
3218         instead.
3219
3220 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3221
3222         * par_sco.adb: Minor reformatting.
3223
3224 2011-08-04  Robert Dewar  <dewar@adacore.com>
3225
3226         * erroutc.adb: Minor reformatting.
3227
3228 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3229
3230         * par_sco.adb: Comment update.
3231
3232 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3233
3234         * s-flocon.ads: New file.
3235         * g-flocon.ads: Now a renaming of s-flocon.
3236         * Makefile.rtl: Add s-flocon.o
3237
3238 2011-08-04  Javier Miranda  <miranda@adacore.com>
3239
3240         * exp_strm.adb (Build_Array_Input_Function): if the array type is
3241         constrained, do not attempt to build a subtype of it.
3242
3243 2011-08-04  Yannick Moy  <moy@adacore.com>
3244
3245         * errout.ads Change comments: remove 'R'M as an example where quotes
3246         are needed; add ALFA as another case where quotes are not needed
3247         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
3248         case where quotes are not needed.
3249         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3250         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
3251         Remove all occurrences of 'A'L'F'A
3252
3253 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3254
3255         * sem_ch13.adb: check legality of invariant pragma.
3256
3257 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3258
3259         * bindgen.adb: Add comments.
3260
3261 2011-08-04  Yannick Moy  <moy@adacore.com>
3262
3263         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
3264         synthesized flag.
3265         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
3266         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
3267
3268 2011-08-04  Robert Dewar  <dewar@adacore.com>
3269
3270         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
3271         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
3272         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
3273
3274 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3275
3276         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
3277
3278 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3279
3280         PR ada/47880
3281         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
3282         allocated object.
3283
3284 2011-08-04  Robert Dewar  <dewar@adacore.com>
3285
3286         * einfo.ads, exp_ch4.adb: Minor reformatting.
3287
3288 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3289
3290         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
3291
3292 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3293
3294         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
3295         type in all cases to compute list of primitive operations, because full
3296         view may be an itype that is not attached to the list of declarations.
3297
3298 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3299
3300         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
3301         library has already been finalized.
3302         (Gen_Adafinal_C): Likewise.
3303         (Gen_Adainit_Ada): Generate an early return if the library has
3304         already been elaborated.
3305         (Gen_Adainit_C): Likewise.
3306         (Gen_Output_File_Ada): Generate an elaboration flag.
3307         (Gen_Output_File_C): Likewise.
3308
3309 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3310
3311         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
3312         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
3313         built in the first place.
3314         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
3315         for CodePeer because Finalize_Address was not built to begin with.
3316         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
3317
3318 2011-08-04  Pascal Obry  <obry@adacore.com>
3319
3320         * adaint.c (__gnat_tmp_name): Use current process id to create temp
3321         filenames, this ensures unicity of filenames across processes.
3322
3323 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3324
3325         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
3326         Raise_Controlled to Raise_From_Controlled_Operation. Update the
3327         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
3328         Add False as the actual to From_Abort in the generated call to
3329         Raise_From_Controlled_Operation.
3330
3331 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3332
3333         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
3334         so that the ali file name can be retrieved from outside of this package.
3335         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
3336         doing nothing in the general case, but used to update the object file
3337         timestamp if directly generated by the backend.
3338         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
3339         to a later time than the ali file one.
3340
3341 2011-08-04  Yannick Moy  <moy@adacore.com>
3342
3343         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
3344         entities whose body contains an Annotate pragma which forces formal
3345         proof on this body.
3346         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3347         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
3348         Mark_Non_ALFA_Subprogram to pass in a message and node.
3349         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
3350         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
3351         surrounding subprogram.
3352         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
3353         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
3354         as not in ALFA is annotated with Formal_Proof being On, then an error
3355         is issued based on the additional parameters for message and node.
3356         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
3357         * gcc-interface/Make-lang.in: Update dependencies.
3358
3359 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3360
3361         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
3362         Finalize_Address when CodePeer is enabled.
3363
3364 2011-08-04  Pascal Obry  <obry@adacore.com>
3365
3366         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
3367         the latter returns a pointer to a static buffer which is deallocated
3368         at the end of the routine.
3369
3370 2011-08-04  Yannick Moy  <moy@adacore.com>
3371
3372         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
3373         after index creation; mark unconstrained base array type generated as
3374         being in/not in ALFA as well
3375         (Make_Index): mark subtype created as in/not in ALFA
3376         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
3377         over a loop as in/not in ALFA, depending on its type and form of loop
3378         iteration.
3379
3380 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3381
3382         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
3383         directly to False on .NET and JVM.
3384
3385 2011-08-04  Yannick Moy  <moy@adacore.com>
3386
3387         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
3388         constraint that subtype must come from source code to be in ALFA, so
3389         that anonymous subtypes can be in ALFA too.
3390
3391 2011-08-04  Yannick Moy  <moy@adacore.com>
3392
3393         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
3394         reference for ALFA mode.
3395         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
3396         procedure public so as to use it from formal verification back-end.
3397
3398 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3399
3400         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
3401         invalid checks of the Parameter, making Remove_Switch not working
3402         correctly.
3403
3404 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3405
3406         * targparm.ads: Update header: no run-time exception is needed on this
3407         file.
3408
3409 2011-08-04  Vincent Celier  <celier@adacore.com>
3410
3411         * a-fihema.adb: Use System.IO instead of GNAT.IO
3412
3413 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3414
3415         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
3416         are forbidden in Compiler_Unit mode.
3417
3418 2011-08-04  Robert Dewar  <dewar@adacore.com>
3419
3420         * sem_util.adb: Minor reformatting.
3421
3422 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3423
3424         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
3425         library-level finalizers.
3426         (Gen_Finalize_Library_C): Update the import string for library-level
3427         finalizers.
3428         (Gen_Finalize_Library_Defs_C): Update the definition name of a
3429         library-level finalizer.
3430         * exp_ch7.adb: Remove with and use clauses for Stringt.
3431         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
3432         Spec_Decl. Add local variable Body_Id. The names of library-level
3433         finalizers are now manually fully qualified and are no longer external.
3434         A single name is now capable of servicing .NET, JVM and non-VM targets.
3435         Pragma Export is no longer required to provide visibility for the name.
3436         (Create_Finalizer_String): Removed.
3437         (New_Finalizer_Name): New routine which mimics New_..._Name.
3438
3439 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3440
3441         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
3442         elaboration counter to Standard_Short_Integer.
3443         * sem_util.adb (Build_Elaboration_Entity): Likewise.
3444         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
3445         (Gen_Elab_Externals_C): Likewise.
3446
3447 2011-08-04  Ed Falis  <falis@adacore.com>
3448
3449         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
3450         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
3451         system-vxworks-mips.ads, system-vxworks-x86.ads
3452         (Always_Compatible_Rep): set to False for all VxWorks targets.
3453
3454 2011-08-04  Robert Dewar  <dewar@adacore.com>
3455
3456         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
3457         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
3458         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
3459         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
3460         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
3461         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
3462         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
3463         Minor reformatting and code reorganization.
3464
3465 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3466
3467         * projects.texi: Added doc for aggregate projects.
3468
3469 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3470
3471         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3472         Add support for overriding the Project_Path in aggregate projects.
3473
3474 2011-08-04  Robert Dewar  <dewar@adacore.com>
3475
3476         * a-cofove.ads: Minor reformatting.
3477
3478 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3479
3480         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3481         on the generated code.
3482         (Build_Finalize_Statements): Update the comment on the generated code.
3483         (Build_Initialize_Statements): Update the comment on the generated code.
3484         (Build_Object_Declarations): Add local variable Result. The object
3485         declarations are now built in sequence.
3486         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3487         RE_Unit_Table.
3488
3489 2011-08-04  Robert Dewar  <dewar@adacore.com>
3490
3491         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3492
3493 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3494
3495         * einfo.ads (Elaboration_Entity): Document new definition and use.
3496         (Elaboration_Entity_Required): Adjust to above change.
3497         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3498         * exp_ch12.adb: And with and use for Snames.
3499         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3500         * exp_util.adb (Set_Elaboration_Flag): Likewise.
3501         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3502         <Check_Unit_Name>: Deal with N_Expanded_Name.
3503         <Attribute_Elaborated>: Extend to all unit names.
3504         * sem_elab.adb: And with and use for Uintp.
3505         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
3506         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
3507         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
3508         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
3509         from Gen_Adainit_Ada.
3510         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
3511         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
3512         case, do not call System.Standard_Library.Adafinal; instead call
3513         finalize_library if needed.
3514         (Gen_Adafinal_C): Likewise.
3515         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3516         non-main program case.
3517         (Gen_Adainit_C): Generate a couple of external declarations here.
3518         In the main program case, set SSL.Finalize_Library_Objects.
3519         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3520         (Gen_Elab_Calls_C): Likewise.
3521         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
3522         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
3523         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3524         objects here.
3525         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3526         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
3527         Gen_Adafinal_Ada.
3528         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3529         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
3530         of external declarations.  Call Gen_Finalize_Library_C.
3531
3532 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3533
3534         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3535         Compute_Compilation_Phases): new subprogram.
3536         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3537         The number of mains as well as the various compilation phases that
3538         need to be run are now project tree specific, since various
3539         aggregated trees might have different requirements. In particular,
3540         they do not all require bind or link phases.
3541
3542 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3543
3544         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3545         (Project_Tree_Appdata): New type.
3546         It is now possible to associate application-specific data to a project
3547         tree. In particular, this is used in the gprbuild builder to avoid a
3548         number of global tables and htables, especially now that there can be
3549         several project trees loaded at once because of aggregate projects.
3550         (Debug_Name): new procedure.
3551         * projects.texi: Clarify syntax of "**" for Source_Dirs
3552
3553 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3554
3555         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3556         the "roots" for a main.
3557         (Fill_From_Project): add support for aggregate projects. Main units
3558         in aggregated projects are now automatically added in the list of
3559         files to build (although this fails later on in gprbuild, because
3560         these files are not using the root proejct tree, so this needs
3561         further cleanup)
3562         * gcc-interface/Make-lang.in: Update dependencies.
3563
3564 2011-08-03  Yannick Moy  <moy@adacore.com>
3565
3566         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3567         conditional expression in ALFA.
3568         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3569         expressions as not in ALFA.
3570
3571 2011-08-03  Robert Dewar  <dewar@adacore.com>
3572
3573         * a-cofove.adb: Minor reformatting.
3574
3575 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3576
3577         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3578         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3579         gprbuild sources.
3580         These packages are more logically placed in the Queue package, since
3581         they manipulate the queue. It is also likely that they can be adapted
3582         for gnatmake, thus sharing more code.
3583         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3584         that we could move the above.
3585
3586 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3587
3588         * errutil.adb (Finalize): clean up the list of error messages on exit.
3589         Calling this subprogram multiple times will no longer show duplicate
3590         error messages on stderr.
3591
3592 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3593
3594         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3595         Getopt_Switches when we have already define a command line
3596         configuration.
3597
3598 2011-08-03  Yannick Moy  <moy@adacore.com>
3599
3600         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3601         in ALFA. Instead, they are considered as assertions to prove.
3602         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3603         nodes as not in ALFA. Instead, include conditional expressions in ALFA
3604         if they have no ELSE part, or if they occur in pre- and postconditions,
3605         where the Condition cannot have side-effects in ALFA
3606         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3607         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3608         Instead, include type conversion between scalar types in ALFA.
3609         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3610         if-and-only-if its type is in ALFA.
3611
3612 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3613
3614         * scos.adb, get_scos.adb, put_scos.adb
3615         New code letter for decisions: G (entry guard)
3616         * par_sco.adb
3617         (Traverse_Subprogram_Body): Rename to...
3618         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3619         (Traverse_Protected_Body): New subprogram
3620         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3621         protected bodies and entry bodies.
3622
3623 2011-08-03  Yannick Moy  <moy@adacore.com>
3624
3625         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3626         entities with get/set subprograms, which is set on procedure entities
3627         generated by the compiler for a postcondition.
3628         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3629         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3630         entity for a declaration
3631         (Get_Unique_Entity_For_Decl): new function returning an entity which
3632         represents a declaration, so that matching spec and body have the same
3633         entity.
3634
3635 2011-08-03  Robert Dewar  <dewar@adacore.com>
3636
3637         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3638         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3639
3640 2011-08-03  Yannick Moy  <moy@adacore.com>
3641
3642         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3643         library-level because retriction No_Implicit_Dynamic_Code in the
3644         front-end prevents its definition as a local subprogram
3645         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3646         for reuse in other contexts
3647         (Traverse_Declarations_Or_Statements,
3648         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3649         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3650         procedures take a callback parameter to be called on all declarations
3651         * lib-xref.ads
3652         (Traverse_All_Compilation_Units): new generic function to traverse a
3653         compilation unit and call a callback parameter on all declarations
3654
3655 2011-08-03  Javier Miranda  <miranda@adacore.com>
3656
3657         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3658         in Java since they are always enclosed in a namespace that
3659         differentiates them, and overloaded entities are supported by the VM.
3660
3661 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3662
3663         * checks.adb (Determine_Range): If a computed bound of an operation is
3664         outside the range of the base type of the expression, and overflow
3665         checks are enabled, the result is unknown and cannot be used for any
3666         subsequent constant folding.
3667         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3668         unknown, so is the result of the comparison.
3669
3670 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3671
3672         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3673         From_Abort. When finalization was triggered by an abort, propagate
3674         Standard'Abort_Signal rather than Program_Error.
3675         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3676         From_Abort.
3677         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3678         From_Abort. When finalization was triggered by an abort, propagate
3679         Standard'Abort_Signal rather than Program_Error.
3680         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3681         From_Abort.
3682         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3683         Abort_Id. Update the calls to Build_Object_Declarations and
3684         Build_Raise_Statement to include Abort_Id.
3685         (Build_Adjust_Statements): New local variable Abort_Id. Update the
3686         calls to Build_Object_Declarations and Build_Raise_Statement to include
3687         Abort_Id.
3688         (Build_Finalize_Statements): New local variable Abort_Id. Update the
3689         calls to Build_Object_Declarations and Build_Raise_Statement to include
3690         Abort_Id.
3691         (Build_Components): Create an entity for Abort_Id when exceptions are
3692         allowed on the target.
3693         (Build_Finalizer): New local variable Abort_Id.
3694         (Build_Initialize_Statements): New local variable Abort_Id. Update the
3695         calls to Build_Object_Declarations and Build_Raise_Statement to include
3696         Abort_Id.
3697         (Build_Object_Declarations): Add new formal Abort_Id. Create the
3698         declaration of flag Abort_Id to preserve the original abort status
3699         before finalization code is executed.
3700         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3701         runtime routine Raise_From_Controlled_Operation.
3702         (Create_Finalizer): Update the call to Build_Raise_Statement to include
3703         Abort_Id. Update the call to Build_Object_Declarations to include
3704         Abort_Id. Update the layout of the finalizer body.
3705         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3706         (Process_Transient_Objects): New local variable Abort_Id. Remove the
3707         clunky code to create all flags and objects related to
3708         exception propagation and replace it with a call to
3709         Build_Object_Declarations. Update the call to Build_Raise_Statement to
3710         include Abort_Id.
3711         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3712         Add new formal Abort_Id and associated comment on its use.
3713         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3714         on its use.
3715         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3716         Remove the clunky code to create all flags and objects related to
3717         exception propagation and replace it with a call to
3718         Build_Object_Declarations. Update the call to Build_Raise_Statement.
3719
3720 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3721
3722         * s-tassta.adb: Fix minor typos.
3723
3724 2011-08-03  Robert Dewar  <dewar@adacore.com>
3725
3726         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3727         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3728
3729 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3730
3731         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3732         to packages. This ensures that the finalizer body will not end up
3733         inside the freeze node.
3734         (Process_Declarations): Add code to detect whether a freeze node has a
3735         nested finalization collection.
3736
3737 2011-08-03  Pascal Obry  <obry@adacore.com>
3738
3739         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3740         (Current_Session): Return a not null access to Session_Type.
3741         (Default_Session): Likewise.
3742
3743 2011-08-03  Robert Dewar  <dewar@adacore.com>
3744
3745         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3746         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3747
3748 2011-08-03  Pascal Obry  <obry@adacore.com>
3749
3750         * g-awk.ads: Minor comment fix.
3751
3752 2011-08-03  Sergey Rybin  <rybin@adacore.com>
3753
3754         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3755         the tree structure related to discriminant constraints.
3756         Original_Discriminant cannot be used any more for computing the
3757         defining name for the reference to a discriminant.
3758
3759 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3760
3761         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
3762         function is not visibly tagged, this is not a dispatching call and
3763         therfore is not Tag_Indeterminate, even if the function is marked as
3764         dispatching on result.
3765
3766 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3767
3768         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
3769         (Expand_N_Free_Statement): Add a guard to protect against run-times
3770         which do not support controlled types.
3771         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
3772         against run-times which do not support controlled types.
3773         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
3774         against run-times which do not support controlled types.
3775         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
3776         against run-times which do not support controlled types.
3777         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
3778         protect against run-times which do not support controlled types.
3779
3780 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3781
3782         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
3783         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
3784
3785 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3786
3787         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
3788         modified in the source, to prevent spurious warnings when compiling
3789         with -gnatg.
3790
3791 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3792
3793         * a-except-2005.adb: Minor reformatting.
3794
3795 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3796
3797         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
3798         is a renaming declaration in the private part of a package, do not emit
3799         a warning that the with_clause could be moved because the renaming may
3800         be used in the body or in a child unit.
3801
3802 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3803
3804         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3805         Propagate the Comes_From_Source attribute from the original return
3806         object to the renaming.
3807
3808 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
3809
3810         * exp_ch7.adb (Build_Raise_Statement): Do not call
3811         Raise_From_Controlled_Operation when this routine is not present in
3812         the run-time library.
3813         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
3814         libraries (Ravenscar), tasks are non-terminating, and protected objects
3815         and tasks can only appear at library level, so we do not want
3816         finalization of protected objects nor tasks.
3817         * exp_intr.adb: Minor clarification in comment.
3818         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
3819         Gen_Output_File_C): Remove references to finalization of library-level
3820         objects when using restricted run-time libraries.
3821
3822 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3823
3824         * sem_ch3.adb (Build_Discriminant_Constraints): Set
3825         Original_Discriminant only if the parent type is a generic formal.
3826
3827 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3828
3829         * exp_ch13.adb: Add with and use clause for Targparm;
3830         (Expand_N_Free_Statement): Prevent the generation of a custom
3831         Deallocate on .NET/JVM targets since this requires pools and address
3832         arithmetic.
3833         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
3834         .NET/JVM targets, attach the newly allocated object to the access
3835         type's finalization collection. Do not generate a call to
3836         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
3837         exist in the runtime.
3838         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
3839         create a custom Allocate for object that do not require initialization.
3840         Attach a newly allocated object to the access type's finalization
3841         collection on .NET/JVM.
3842         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
3843         assignment of controlled types on .NET/JVM. The two hidden pointers
3844         Prev and Next and stored and later restored after the assignment takes
3845         place.
3846         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
3847         kludge for .NET/JVM to recognize a particular piece of code coming from
3848         Heap_Management and change the call to Finalize into Deep_Finalize.
3849         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
3850         finalization collections on .NET/JVM only for types derived from
3851         Controlled. Separate the association of storage pools with a collection
3852         and only allow it on non-.NET/JVM targets.
3853         (Make_Attach_Call): New routine.
3854         (Make_Detach_Call): New routine.
3855         (Process_Object_Declarations): Suppress the generation of
3856         build-in-place return object clean up code on .NET/JVM since it uses
3857         pools.
3858         * exp_ch7.ads (Make_Attach_Call): New routine.
3859         (Make_Detach_Call): New routine.
3860         * exp_intr.adb Add with and use clause for Targparm.
3861         (Expand_Unc_Deallocation): Detach a controlled object from a collection
3862         on .NET/JVM targets.
3863         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
3864         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
3865         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
3866         names used in finalization.
3867
3868 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3869
3870         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
3871         (Attach, Detach): Lock the current task when chaining an object onto a
3872         collection.
3873
3874 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3875
3876         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
3877         Rewritten to create the message strings when the exception is not
3878         raised by an abort during finalization.
3879         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
3880         Raise_From_Controlled_Operation and update its associated comment.
3881         * a-fihema.ads, a-fihema.adb: New GNAT unit.
3882         Ada.Finalization.Heap_Management provides key functionality
3883         associated with controlled objects on the heap, their creation,
3884         finalization and reclamation. Type Finalization_Collection is
3885         effectively a wrapper which sits ontop of a storage pool and performs
3886         all necessary bookkeeping for all the objects it contains. Each
3887         access-to-controlled or access-to-class-wide type receives a collection
3888         as part of its expansion. The compiler generates buffer code and
3889         invokes Allocate / Deallocate to create and destroy allocated
3890         controlled objects.
3891         * a-finali.adb ("="): Removed.
3892         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
3893         fields Prev and Next.
3894         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
3895         A library unit with at least one controlled object on the library level
3896         has a special finalizer which is invoked by the binder. To signal this,
3897         ali files carry field PF.
3898         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
3899         associated comment on field usage.
3900         * a-tags.adb (Get_RC_Offset): Removed.
3901         (Needs_Finalization): New routine.
3902         * a-tags.ads: Update the structure of the GNAT dispatch tables.
3903         Dispatch tables now carry field Needs_Finalization which provides
3904         runtime indication whether a type is controlled or has controlled
3905         components or both. Remove field RC_Offset.
3906         (Get_RC_Offset): Removed along with its associated pragma Export.
3907         Since tagged types with controlled components no longer carry hidden
3908         field _controller, the special mechanism to retrieve its location is no
3909         longer needed.
3910         (Needs_Finalization): New routine.
3911         * atree.ads, atree.adb (Elist24): New routine.
3912         (Set_Elist24): New routine.
3913         * atree.h: Add a define clause for Elist24.
3914         * bindgen.adb New library-level variable Lib_Final_Built.
3915         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
3916         presence of a VM target, the routine generates calls to the proper
3917         library finalization routine.
3918         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
3919         targets. Set the correct library finalization routine depending on
3920         whether the library has controlled objects or this is a VM compilation.
3921         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
3922         to library-level finalizers of compiled units in reverse order of
3923         elaboration. It also produces exception management code and reraises a
3924         potential exception after all units have been finalized.
3925         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
3926         library-level finalizers of compiled units in reverse order of
3927         elaboration.
3928         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
3929         definitions of all library-level finalizers available to the compilation
3930         (Gen_Main_Ada): Directly call Adafinal which now contails all target
3931         dependent code.
3932         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
3933         System.Standard_Library.Adafinal directly. If the library needs
3934         finalization actions, create the sequence of finalization calls.
3935         (Gen_Output_File_Ada): Alphabetize local variables and constants.
3936         Generate a with clause for System.Soft_Links when compiling for a VM.
3937         Remove the code which imports System.Standard_Library.Adafinal as
3938         Do_Finalize. Generate the library finalization routine.
3939         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
3940         If the library needs finalization actions, create all the definitions
3941         of library- level finalizers.
3942         (Has_Finalizer): New routine. Determines whether at least one compiled
3943         unit has a library-level finalizer.
3944         Add type Qualification_Mode.
3945         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
3946         * einfo.adb: New usage of field 15 as Return_Flag.
3947         Remove Finalization_Chain_Entity from the usages of field 19.
3948         Remove Associated_Final_Chain from the usages of field 23.
3949         New usage of field 23 as Associated_Collection.
3950         New usage of field 24 as Finalizer.
3951         New usage of flag 252 as Is_Processed_Transient.
3952         (Associated_Final_Chain): Removed.
3953         (Associated_Collection): New routine.
3954         (Finalization_Chain_Entity): Removed.
3955         (Finalizer): New routine.
3956         (Is_Finalizer): New routine.
3957         (Is_Processed_Transient): New routine.
3958         (Return_Flag): New routine.
3959         (Set_Associated_Final_Chain): Removed.
3960         (Set_Associated_Collection): New routine.
3961         (Set_Finalization_Chain_Entity): Removed.
3962         (Set_Finalizer): New routine.
3963         (Set_Is_Processed_Transient): New routine.
3964         (Set_Return_Flag): New routine.
3965         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
3966         displayed flags.
3967         (Write_Field8_Name): Alphabetize the output.
3968         (Write_Field11_Name): Alphabetize the output.
3969         (Write_Field12_Name): Alphabetize the output.
3970         (Write_Field13_Name): Alphabetize the output.
3971         (Write_Field14_Name): Alphabetize the output.
3972         (Write_Field15_Name): Alphabetize the output.
3973         (Write_Field16_Name): Alphabetize the output.
3974         (Write_Field17_Name): Alphabetize the output.
3975         (Write_Field18_Name): Alphabetize the output.
3976         (Write_Field19_Name): Alphabetize the output. Remove the output of
3977         Finalization_Chain_Entity.
3978         (Write_Field20_Name): Alphabetize the output.
3979         (Write_Field21_Name): Alphabetize the output.
3980         (Write_Field22_Name): Alphabetize the output.
3981         (Write_Field23_Name): Alphabetize the output. Remove the output of
3982         Associated_Final_Chain. Add output for Associated_Collection.
3983         (Write_Field24_Name): Alphabetize the output.
3984         (Write_Field25_Name): Add output for Finalizer.
3985         (Write_Field26_Name): Alphabetize the output.
3986         (Write_Field27_Name): Alphabetize the output.
3987         (Write_Field28_Name): Alphabetize the output.
3988         * einfo.ads: Add new field description for Associated_Collection and
3989         its uses in nodes.
3990         Remove Associated_Final_Chain and its uses in nodes.
3991         Remove Finalization_Chain_Entity and its uses in nodes.
3992         Add new field description for Finalizer and its uses in nodes.
3993         Add new synthesized attribute Is_Finalizer.
3994         Add new flag description for Is_Processed_Transient and its uses in
3995         nodes.
3996         Add new field description for Return_Flag and its uses in nodes.
3997         (Associated_Final_Chain): Removed along with its pragma Inline.
3998         (Associated_Collection): New routine and pragma Inline.
3999         (Finalization_Chain_Entity): Removed along with its pragma Inline.
4000         (Finalizer): New routine and pragma Inline.
4001         (Is_Finalizer): New routine and pragma Inline.
4002         (Is_Processed_Transient): New routine and pragma Inline.
4003         (Return_Flag): New routine and pragma Inline.
4004         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
4005         (Set_Associated_Collection): New routine and pragma Inline.
4006         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
4007         (Set_Finalizer): New routine and pragma Inline.
4008         (Set_Is_Processed_Transient): New routine and pragma Inline.
4009         (Set_Return_Flag): New routine and pragma Inline.
4010         * exp_aggr.adb: Alphabetize subprograms.
4011         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
4012         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
4013         associated comments. Remove local variables External_Final_List and
4014         Attach.
4015         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
4016         Ancestor. Remove the retrieval of finalization lists. Update the call to
4017         Make_Adjust_Call.
4018         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
4019         lists. Update the call to Late_Expansion.
4020         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
4021         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
4022         (Gen_Assign): Remove the retrieval of the finalization list used to
4023         build the assignment. Update the calls to Make_Init_Call and
4024         Make_Adjust_Call.
4025         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
4026         Remove the mechanism to determine attachment levels and finalization
4027         list retrieval. Remove the processing for coextensions.
4028         (Init_Controller): Removed. Controllers no longer exist.
4029         (Late_Expansion): Remove formals Flist and Obj along with their
4030         associated comments. Update the calls to Build_Record_Aggr_Code and
4031         Build_Array_Aggr_Code.
4032         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
4033         (Expand_N_Freeze_Entity): Add special processing for finalizers which
4034         appear in entry bodies, protected subprograms and task bodies.
4035         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
4036         * exp_ch3.adb (Add_Final_Chain): Removed.
4037         (Build_Array_Init_Proc): Alphabetize local variables.
4038         (Build_Assignment): Alphabetize local variables. Update the call to
4039         Maked_Adjust_Call.
4040         (Build_Class_Wide_Master): Rename local variables to better reflect
4041         their role.
4042         (Build_Discriminant_Assignments): Code reformatting.
4043         (Build_Init_Call_Thru): Code reformatting.
4044         (Build_Init_Procedure): Code reformatting. Generate a special version
4045         of Deep_Finalize which is capable of finalizing all initialized
4046         components and ignore the rest.
4047         (Build_Init_Statements): Rename local variables to better reflect their
4048         role.
4049         Reimplement the mechanism to include the creation and update of an index
4050         variable called a "counter". It is used as a bookmark for tracing
4051         initialized and non-initialized components.
4052         (Build_Initialization_Call): Remove local variable Controller_Typ.
4053         Alphabetize all local variables. Remove the initialization of the
4054         record controller and update the call to Make_Init_Call.
4055         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
4056         New local variable Counter.
4057         (Constrain_Array): Alphabetize.
4058         (Expand_Freeze_Array_Type): Create a collection instead of a
4059         finalization list.
4060         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
4061         Finalize_Address which is used in conjunction with allocated controlled
4062         objects.
4063         (Expand_N_Object_Declaration): Remove the creation of a finalization
4064         list for anonymous access types. Update the calls to Make_Init_Call and
4065         Make_Adjust_Call.
4066         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
4067         retrieval of finalization lists. Remove the expansion of the record
4068         controller. Create TSS primitive Finalize_Address used in conjunction
4069         with controlled objects on the heap. Create finalization collections
4070         for access-to-controlled record components.
4071         (Expand_Record_Controller): Removed.
4072         (Freeze_Type): Remove the freezing of record controllers. Freezing of
4073         class-wide types now requires additional processing. Create
4074         finalization collections for access-to-controlled types.
4075         (Increment_Counter): New routine.
4076         (Make_Counter): New routine.
4077         (Make_Eq_If): Remove the mention of Name_uController.
4078         (Make_Predefined_Primitive_Specs): There is no longer need to skip
4079         types coming from System.Finalization_Root.
4080         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
4081         (Predefined_Primitive_Bodies): There is no longer need to skip types
4082         coming from System.Finalization_Root.
4083         (Stream_Operation_OK): Do not generate stream routines for
4084         type Ada.Finalization.Heap_Management.Finalization_Collection.
4085         * exp_ch3.ads: Alphabetize subprograms.
4086         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
4087         Add with and use clause for Lib.
4088         (Complete_Coextension_Finalization): Removed.
4089         (Complete_Controlled_Allocation): New routine. Create a finalization
4090         collection for anonymous access-to-controlled types. Create a custom
4091         Allocate which interfaces with the back end and the machinery in
4092         Heap_Management.
4093         (Expand_Allocator_Expression): Add necessary calls to
4094         Complete_Controlled_Allocation. Remove the retrieval of finalization
4095         lists. Update the calls to Make_Adjust_Call. Generate a call to
4096         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4097         the associated collection.
4098         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
4099         Code clean up. Remove the retrieval of finalization lists and
4100         attachment levels.
4101         Update the call to Make_Init_Call. Generate a call to
4102         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4103         the associated collection.
4104         (Get_Allocator_Final_List): Removed. Finalization lists are not
4105         available.
4106         (Suitable_Element): Remove the mention of Name_uController.
4107         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
4108         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
4109         the left hand side, carry out the assignment and adjust the left hand
4110         side.
4111         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
4112         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
4113         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
4114         BIP_Collection and BIPcollection.
4115         (Build_Heap_Allocator): New routine used to allocate the return object
4116         of a build-in-place function onto a collection.
4117         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
4118         (Expand_Call): Do not replace direct calls to Deep routines with their
4119         aliases.
4120         (Expand_N_Extended_Return_Statement): Give all variables shorter names
4121         and update their occurrences. Add a special return flag to monitor the
4122         [ab]normal execution of the function. The flag is set right before the
4123         return statement.
4124         Rewrite the mechanism used to allocate a build-in-place return object
4125         on the heap or on a storage pool.
4126         (Is_Direct_Deep_Call): New routine.
4127         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
4128         build-in-place function call instead of a final list. Build a call to
4129         Set_Finalize_Address_Ptr to decorate the associated collection.
4130         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
4131         order to name the build-in-place function call's result for later
4132         finalization. Add a collection to a build-in-place function call
4133         instead of a final list.
4134         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
4135         build-in-place function call instead of a final list. Remove the code
4136         which moves one final list and transforms it into the actual in a
4137         nested build-in-place call.
4138         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
4139         build-in-place function call instead of a final list.
4140         (Move_Final_List): Removed.
4141         (Needs_BIP_Collection): New routine.
4142         (Needs_BIP_Final_List): Removed.
4143         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
4144         enumeration type BIP_Formal_Kind.
4145         Update the related comment.
4146         (Needs_BIP_Collection): New routine.
4147         (Needs_BIP_Final_List): Removed.
4148         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
4149         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
4150         majority of subprograms in this unit. Add Name_Finalize_Address to
4151         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
4152         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
4153         statements for an array type.
4154         (Build_Adjust_Statements): Create the adjust statements for a record
4155         type.
4156         (Build_Cleanup_Statements): New routine. A procedure which given any
4157         construct containing asynchronous calls, references to _master, or is a
4158         task body, a task allocation or a protected body produces the necessary
4159         runtime calls to clean up these constructs.
4160         (Build_Exception_Handler): New routine.
4161         (Build_Final_List): Removed.
4162         (Build_Finalization_Collection): New routine. A core procedure which
4163         creates a collection to service heap allocated controlled objects
4164         associated with an access-to-controlled type.
4165         (Build_Finalize_Statements): Create the finalization statements for a
4166         record types.
4167         (Build_Finalizer): New routine. A core procedure which given any
4168         construct with declarations and/or statements detects all objects which
4169         need any type of clean up (controlled objects, protected objects) and
4170         generates all necessary code to clean up the said objects in the proper
4171         order.
4172         (Build_Finalizer_Call): New routine.
4173         (Build_Initialize_Statements): Create the initialization statements for
4174         an array type. The generated routine contains code to finalize partially
4175         initialized arrays.
4176         (Build_Object_Declarations): New routine.
4177         (Build_Raise_Statement): New routine.
4178         (Clean_Simple_Protected_Objects): Removed.
4179         (Controller_Component): Removed.
4180         (Enclosing_Function): New routine.
4181         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
4182         either declarations or statements or both.
4183         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
4184         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
4185         package.
4186         (Find_Final_List): Removed.
4187         (Global_Flist_Ref): Removed.
4188         (In_Finalization_Root): Removed.
4189         (Insert_Actions_In_Scope_Around): Determine the range of the transient
4190         scope in terms of tree nodes. Process all transient variables within
4191         that range.
4192         (Make_Adjust_Call): Rewritten. There is no longer an attach call
4193         generated after the adjust.
4194         (Make_Attach_Call): Removed.
4195         (Make_Call): New routine.
4196         (Make_Clean): Removed.
4197         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
4198         build routines.
4199         (Make_Deep_Proc): Rewritten to generate the new profile signature used
4200         in Deep routines.
4201         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
4202         build routines.
4203         (Make_Final_Call): Modified to simply create a call to either
4204         Deep_Finalize or Finalize.
4205         (Make_Finalize_Address_Body): New routine.
4206         (Make_Finalize_Address_Stmts): New routine. A function which produces
4207         TSS primitive Finalize_Address used in conjunction with heap allocated
4208         controlled objects.
4209         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
4210         (Make_Init_Call): Rewritten. There is no longer an attach call
4211         generated after initialization.
4212         (Make_Local_Deep_Finalize): New routine.
4213         (Make_Set_Finalize_Address_Ptr_Call): New routine.
4214         (Make_Transient_Block): Remove the finalization list retrieval and
4215         manipulation.
4216         (Needs_Finalization): Moved to Exp_Util.
4217         (Parent_Field_Type): New routine.
4218         (Preprocess_Components): New routine.
4219         (Process_Transient_Objects): New routine.
4220         (Wrap_HSS_In_Block): New routine.
4221         (Wrap_Transient_Declaration): Remove finalization list management and
4222         controller insertion.
4223         (Wrap_Transient_Expression): Code reformatting.
4224         (Wrap_Transient_Statement): Code reformatting.
4225         * exp_ch7.ads (Build_Final_List): Removed.
4226         (Build_Finalization_Collection): New routine.
4227         (Build_Raise_Statement): New routine.
4228         (Controller_Component): Removed.
4229         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
4230         (Find_Final_List): Removed.
4231         (In_Finalization_Root): Removed.
4232         (Is_Simple_Protected_Type): Update related comment.
4233         (Make_Adjust_Call): New parameter profile and associated comments.
4234         (Make_Attach_Call): Removed.
4235         (Make_Final_Call): New parameter profile and associated comments.
4236         (Make_Finalize_Address_Body): New routine.
4237         (Make_Init_Call): New parameter profile and associated comments.
4238         (Make_Local_Deep_Finalize): New routine.
4239         (Make_Set_Finalize_Address_Ptr_Call): New routine.
4240         (Needs_Finalization): Moved to Exp_Util.
4241         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
4242         (Expand_N_Protected_Body): Remove the handling of finalization lists.
4243         (Find_Protection_Type): Moved to Exp_Util.
4244         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
4245         (Make_DT): Update sequence of dispatch table initialization. Remove the
4246         initialization of field RC_Offset. Add initialization of field Needs_
4247         Finalization.
4248         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
4249         Reimplement how an object is first finalized, then deallocated.
4250         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4251         Code reformatting.
4252         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
4253         Register TSS_Finalize_Address with type TSS_Names.
4254         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
4255         procedure provides the interface between an allocation / deallocation
4256         and the support machinery in Ada.Finalization.Heap_Management.
4257         (Find_Init_Call): Code reformatting.
4258         (Find_Init_Call_In_List): Code reformatting.
4259         (Find_Protection_Type): Moved from Exp_Ch9.
4260         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
4261         (Has_Controlled_Coextensions): Removed.
4262         (Has_Controlled_Objects): New routine.
4263         (In_Library_Level_Package_Body): New routine.
4264         (Insert_Action_After): New routine.
4265         (Is_Finalizable_Transient): New routine. This predicate determines
4266         whether an object declaration is one of the many variants of controlled
4267         transients.
4268         (Is_Null_Access_BIP_Func_Call): New routine.
4269         (Is_Non_BIP_Func_Call): New routine.
4270         (Is_Related_To_Func_Return): New routine.
4271         (Needs_Finalization): Moved from Exp_Ch7.
4272         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
4273         (Find_Protection_Type): Moved from Exp_Ch9.
4274         (Has_Controlled_Coextensions): Removed.
4275         (Has_Controlled_Objects): New routine.
4276         (In_Library_Level_Package_Body): New routine.
4277         (Insert_Action_After): New routine.
4278         (Is_Finalizable_Transient): New routine.
4279         (Is_Null_Access_BIP_Func_Call): New routine.
4280         (Is_Non_BIP_Func_Call): New routine.
4281         (Is_Related_To_Func_Return): New routine.
4282         (Needs_Finalization): Moved from Exp_ch7.
4283         * expander.adb (Expand): Add a case for N_Free_Statement.
4284         * freeze.adb (Freeze_All): Replace the generation of a finalization
4285         list with a collection for access-to-controlled types.
4286         (Freeze_Entity): Code reformatting.
4287         (Freeze_Record_Type): Remove the freezing of a record controller
4288         component.
4289         (Freeze_Subprogram): Code reformatting.
4290         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
4291         finalization list.
4292         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
4293         has a library-level finalizer.
4294         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
4295         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
4296         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
4297         files. Add a-fihema to the list of object files.
4298         * par-ch4.adb:
4299         Alphabetize the associations in type Is_Parameterless_Attribute.
4300         * rtsfind.ads: Ada.Finalization_List.Controller and
4301         System.Finalization_Implementation are no longer a GNAT unit.
4302         Update the range of type Ada_Finalization_Child. Remove the following
4303         recoverable entities:
4304
4305            RE_Attach_To_Final_List
4306            RE_Deep_Tag_Attach
4307            RE_Finalize_List
4308            RE_Finalize_One
4309            RE_Finalizable_Ptr_Ptr
4310            RE_Global_Final_List
4311            RE_Limited_Record_Controller
4312            RE_List_Controller
4313            RE_Move_Final_List
4314            RE_Record_Controller
4315            RE_Simple_List_Controller
4316
4317         Add the following recoverable entities:
4318
4319            RE_Add_Offset_To_Address
4320            RE_Allocate
4321            RE_Base_Pool
4322            RE_Deallocate
4323            RE_Exception_Identity
4324            RE_Finalization_Collection
4325            RE_Finalization_Collection_Ptr
4326            RE_Needs_Finalization
4327            RE_Save_Library_Occurrence
4328            RE_Set_Finalize_Address_Ptr
4329            RE_Set_Storage_Pool_Ptr
4330            RE_Storage_Count
4331         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
4332         Name_uController.
4333         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
4334         (First_Stored_Discriminant): Remove the mention of Name_uController.
4335         * sem_aux.ads: Comment reformatting.
4336         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
4337         to redecorate an already existing class-wide type.
4338         (Decorate_Tagged_Type): New parameter profile and associated comment.
4339         Create a "shadow class-wide type" for a shadow entity.
4340         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
4341         of the final chain along with the associated comment.
4342         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
4343         Full_Desig and set it to the full view of the designated type.
4344         Initialize the finalization collection to empty.
4345         (Build_Derived_Record_Type): Alphabetize local variables. Code
4346         reformatting.
4347         (Collect_Fixed_Components): Remove the mention of Name_uController.
4348         (Create_Constrained_Components): Remove the mention of Name_uController.
4349         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
4350         class-wide type of a shadow entity.
4351         (Process_Full_View): Update the machinery which marks type
4352         Limited_Controlled's entity as limited.
4353         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
4354         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
4355         list, instead make a collection build-in-place formal.
4356         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
4357         a designated type in order to establish a match between the renaming
4358         and the renamed entity.
4359         (Find_Selected_Component): Add guard to prevent spurious exceptions
4360         from being raised on .NET/JVM.
4361         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
4362         to the list of primitive that need special processing. Update arrays
4363         C_Names and D_Names.
4364         (Replace_Types): Handle class-wide types.
4365         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
4366         different parameter profile, look at the first formal.
4367         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
4368         use clauses for Exp_Util.
4369         * sem_res.adb: Remove with and use clauses for Elists.
4370         (Propagate_Coextensions): Removed.
4371         (Resolve_Allocator): Do not propagate the list of coextensions from one
4372         allocator to another.
4373         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
4374         Deaccessed_T to Desig_Typ.
4375         (Enter_Name): Remove the mention of Name_uController.
4376         (Gather_Components): Remove the mention of Name_uController.
4377         (Incomplete_Or_Private_View): New routine.
4378         (Is_Coextension_Root): Removed.
4379         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
4380         * sem_util.ads (Incomplete_Or_Private_View): New routine.
4381         (Is_Coextension_Root): Removed.
4382         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
4383         Controlled types are now derived from a null tagged record. Remove
4384         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
4385         * sinfo.adb (Coextensions): Removed.
4386         (Set_Coextensions): Removed.
4387         * sinfo.ads: Remove Coextensions from the explanation of node fields
4388         and its uses in nodes.
4389         Update the field usage of N_Allocator.
4390         (Coextensions): Removed along with its pragma Inline.
4391         (Set_Coextensions): Removed along with its pragma Inline.
4392         * snames.ads-tmpl: Remove names
4393
4394           Name_uClean
4395           Name_uController
4396           Name_uFinal_List
4397           Name_uLocal_Final_List
4398           Name_Finalization_Root
4399           Name_Next
4400           Name_Prev
4401
4402         Add names
4403
4404           Name_uFinalizer
4405           Name_Finalize_Address
4406         * s-pooglo.adb (Allocate): Add overriding indicator.
4407         (Deallocate): Add overriding indicator.
4408         (Storage_Size): Add overriding indicator.
4409         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
4410         than Finalize_Global_List.
4411         (Null_Finalize_Global_List): Removed.
4412         (Save_Library_Occurrence): New routine.
4413         * s-soflin.ads: Remove variable Finalize_Global_List along with its
4414         initialization. Add variable Finalize_Library_Objects along with its
4415         pragma Export. Add variables Library_Exception and
4416         Library_Exception_Set along with their pragma Export.
4417         (Null_Finalize_Global_List): Removed.
4418         (Save_Library_Occurrence): New routine.
4419         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
4420         rather than Finalize_Global_List.
4421         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
4422         of the constructed node.
4423
4424 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4425
4426         * link.c: Include "auto-host.h" before system headers.
4427
4428 2011-08-03  Vincent Celier  <celier@adacore.com>
4429
4430         * make.adb (Gnatmake): Add to table Library_Projs only library projects
4431         that are not extended. Do not check if a library project that is
4432         extended should be regenerated. Do not add to table Library_Paths the
4433         libraries that are in extended projects. Link only with libraries that
4434         are in libray projects that are not extended.
4435         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
4436         for a library project that is extended.
4437
4438 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4439
4440         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
4441         conforming subprogram renamings that appear to be completions if they
4442         are not fully conformant.
4443         Such renamings are homographs but not completions.
4444         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
4445         names in a subprogram renaming that appears in an instance.
4446
4447 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4448
4449         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
4450         not immutably limited, build actual subtype from expression to provide
4451         proper bounds to caller.
4452
4453 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4454
4455         * sem_ch8.adb: Minor comment correction.
4456
4457 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4458
4459         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
4460         returning a limited array, use an extended return statement.
4461
4462 2011-08-03  Vincent Celier  <celier@adacore.com>
4463
4464         * make.adb (Initialize): If --subdirs= is used, but no project file is
4465         specified, attempt to create the specify subdir if it does not already
4466         exist and use it as the object directory as if -D had been specified.
4467
4468 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4469
4470         * s-tpopsp-vms.adb: New file.
4471         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4472         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4473
4474 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4475
4476         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4477         package.
4478
4479 2011-08-03  Yannick Moy  <moy@adacore.com>
4480
4481         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4482         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4483         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4484         detect that an array has static bounds.
4485
4486 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4487
4488         * exp_dist.adb: Minor reformatting.
4489
4490 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4491
4492         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4493         (ATCB_Key): Removed, not always used.
4494
4495 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4496
4497         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4498         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4499         most remaining global variables.
4500
4501 2011-08-03  Robert Dewar  <dewar@adacore.com>
4502
4503         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4504         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4505         reformatting.
4506
4507 2011-08-03  Javier Miranda  <miranda@adacore.com>
4508
4509         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
4510         that must be passed by copy in VM targets.
4511
4512 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4513
4514         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4515         duplicates a similar htable now in the project tree.
4516
4517 2011-08-03  Claire Dross  <dross@adacore.com>
4518
4519         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4520         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4521         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4522         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4523         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4524         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4525         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4526         update.
4527
4528 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4529
4530         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4531         (ATCB_Key): Removed, not always used.
4532         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4533         s-taprop-posix.adb.
4534         * s-tpopsp-tls.adb: New file.
4535         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4536         x86/x64/ia64/powerpc/sparc Linux.
4537
4538 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4539
4540         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4541         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4542
4543 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4544
4545         * rtsfind.ads, exp_dist.adb, exp_dist.ads
4546         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4547         Fix type selection for mapping integer types to PolyORB types.
4548
4549 2011-08-03  Bob Duff  <duff@adacore.com>
4550
4551         * sem_ch7.adb: Minor comment clarification.
4552
4553 2011-08-03  Bob Duff  <duff@adacore.com>
4554
4555         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4556         an error analyzing a choice, skip further processing. Further
4557         processing could cause a crash or cascade errors.
4558
4559 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4560
4561         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4562         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4563         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4564         prj-env.ads (Shared_Project_Tree_Data): new type
4565         An aggregate project and its aggregated trees need to share the common
4566         data structures used for lists of strings, packages,... This makes the
4567         code simpler since otherwise we have to pass the root tree (also used
4568         for the configuration file data) in addition to the current project
4569         tree. This also avoids ambiguities as to which tree should be used.
4570         And finally this saves a bit of memory.
4571         (For_Every_Project_Imported): new parameter Tree.
4572         Since aggregated projects are using a different tree, we need to let
4573         the caller know which tree to use to manipulate the returned project.
4574
4575 2011-08-03  Robert Dewar  <dewar@adacore.com>
4576
4577         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4578         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4579         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4580         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4581
4582 2011-08-03  Javier Miranda  <miranda@adacore.com>
4583
4584         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4585         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4586
4587 2011-08-03  Bob Duff  <duff@adacore.com>
4588
4589         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4590         the Base_Type.
4591
4592 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
4593
4594         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4595         g-sehash.ads: Fix typo. Update header.
4596
4597 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4598
4599         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4600         expansion.
4601
4602 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4603
4604         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4605         prefixes of private types along with records, since the selector may be
4606         a discriminant.
4607         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4608         private types along with records, since the selector may be a
4609         discriminant.
4610
4611 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4612
4613         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4614
4615 2011-08-03  Javier Miranda  <miranda@adacore.com>
4616
4617         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4618         Tagged_Type_Expansion.
4619
4620 2011-08-03  Yannick Moy  <moy@adacore.com>
4621
4622         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4623         violation when the argument of concatenation is the name of a
4624         constant.
4625
4626 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4627
4628         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4629         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4630         (Process_Declarative_Items): new parameter Child_Env.
4631
4632 2011-08-03  Yannick Moy  <moy@adacore.com>
4633
4634         * alfa.ads: Update format of ALFA section in ALI file in order to
4635         add a mapping from bodies to specs when both are present.
4636         (ALFA_Scope_Record): Add components for spec file/scope.
4637         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4638         present.
4639         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4640         collected, fill in the spec information when relevant.
4641         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4642         present.
4643
4644 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4645
4646         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4647         code unit to decide whether to add internally generated subprograms.
4648
4649 2011-08-03  Javier Miranda  <miranda@adacore.com>
4650
4651         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4652         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4653         be handled by copy in VM targets.
4654
4655 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4656
4657         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4658         code with Makeutl.Get_Switches.
4659         * prj-tree.adb: Update comment.
4660
4661 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4662
4663         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4664         subprogram with a limited formal that does not support external
4665         streaming.
4666
4667 2011-08-03  Yannick Moy  <moy@adacore.com>
4668
4669         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4670         continuation line
4671         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4672         not from current unit in two phases, because it is not possible to
4673         change the table while iterating over its content.
4674         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4675
4676 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4677
4678         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4679         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4680
4681 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4682
4683         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4684         and the component type is composite, this is ambiguous for predefined
4685         concatenation, but if the node is not overloaded and the entity is a use
4686         -defined function its profile can be used to resolve that aggregate.
4687
4688 2011-08-03  Robert Dewar  <dewar@adacore.com>
4689
4690         * exp_ch4.adb: Minor code cleanup.
4691
4692 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4693
4694         * exp_dist.adb: Do not generate distribution stubs if serious errors
4695         have been diagnosed.
4696
4697 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4698
4699         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4700         the first formal of a primitive operation, go to the base type to
4701         handle properly an access to a derived type with constrained
4702         discriminants.
4703         * sem_type.adb (Disambiguate): an immediately visible operator hides a
4704         user-defined function that is only use-visible.
4705
4706 2011-08-03  Robert Dewar  <dewar@adacore.com>
4707
4708         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4709         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4710         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4711         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4712         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4713         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4714         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4715         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4716
4717 2011-08-03  Robert Dewar  <dewar@adacore.com>
4718
4719         * repinfo.adb (List_Mechanism): Add handling of
4720         Convention_Ada_Pass_By_XXX.
4721         * sem_mech.adb (Set_Mechanism): Ditto.
4722         * sem_prag.adb (Process_Convention): Add entries for
4723         Convention_Ada_Pass_By_XXX.
4724         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4725
4726 2011-08-03  Pascal Obry  <obry@adacore.com>
4727
4728         * makeutl.adb: Minor reformatting.
4729
4730 2011-08-03  Vincent Celier  <celier@adacore.com>
4731
4732         * fname-uf.adb
4733         (Get_File_Name) If the file cannot be found when there are no config
4734         pragmas file and May_Fail is True, return No_File instead of the file
4735         name, to be consistent.
4736
4737 2011-08-03  Pascal Obry  <obry@adacore.com>
4738
4739         * adaint.c (__gnat_is_executable_file_attr): Avoid access
4740         to null pointer.
4741
4742 2011-08-03  Javier Miranda  <miranda@adacore.com>
4743
4744         * sem_ch13.adb
4745         (Same_Representation): In VM targets the representation of arrays with
4746         aliased components differs from arrays with non-aliased components.
4747
4748 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4749
4750         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4751         not systematically lower case attribute indexes that contain no "."
4752         Fix definition of several Naming attributes, which take
4753         a unit name as index and therefore should be case insensitive.
4754         Minor refactoring (reduce length of variable names).
4755
4756 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4757
4758         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
4759
4760 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4761
4762         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
4763         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
4764         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
4765         prj-tree.ads (Prj.Tree.Environment): new type.
4766
4767 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4768
4769         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
4770         prj-tree.adb, prj-tree.ads (Environment): new type.
4771
4772 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4773
4774         * prj-tree.ads: Remove unused variable.
4775
4776 2011-08-03  Yannick Moy  <moy@adacore.com>
4777
4778         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
4779         issuing messages related to SPARK restriction violation.
4780
4781 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4782
4783         * sem_ch6.adb: guard against error nodes in return statements.
4784
4785 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4786
4787         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
4788         a warning can only appear on a configuration file, so emit warning
4789         without further checks.
4790
4791 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4792
4793         * s-interr.ads: add overriding keyword.
4794
4795 2011-08-03  Geert Bosch  <bosch@adacore.com>
4796
4797         * exp_attr.adb: Fix minor typo.
4798
4799 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4800
4801         * par-ch4.adb: improve error recovery.
4802
4803 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4804
4805         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
4806         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
4807         to Errout_Handling.
4808
4809 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4810
4811         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
4812         "external" as an attribute name in aggregate projects.
4813
4814 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4815
4816         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
4817         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
4818         from 0, so we need to adjust.
4819
4820 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4821
4822         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
4823         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
4824
4825 2011-08-03  Yannick Moy  <moy@adacore.com>
4826
4827         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
4828         restriction on overloaded entity if the entity is not an operator.
4829
4830 2011-08-03  Yannick Moy  <moy@adacore.com>
4831
4832         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
4833         restrict.ads: Rename remaining Check_Formal_Restriction* into
4834         Check_SPARK_Restriction*.
4835
4836 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4837
4838         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
4839         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
4840         qualifier.
4841         (Project_Empty): removed
4842         (Empty_Project): new parameter Qualifier
4843         This is used to have fields specific to aggregate projects, cleaner
4844         New field to store the list of aggregated projects.
4845         (Check_Aggregate_Project): removed
4846         (Process_Aggregated_Projects, Free): new subprograms.
4847
4848 2011-08-03  Olivier Hainque  <hainque@adacore.com>
4849
4850         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
4851
4852 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4853
4854         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
4855         explicit dereference of an unconstrained type, create a constrained
4856         subtype for it, as is done for function calls that return an
4857         unconstrained type.
4858
4859 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4860
4861         * g-pehage.adb (Finalize): Avoid possible double-free.
4862
4863 2011-08-03  Steve Baird  <baird@adacore.com>
4864
4865         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
4866         Elab_Spec/Body attrs in CodePeer_Mode.
4867
4868 2011-08-03  Javier Miranda  <miranda@adacore.com>
4869
4870         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
4871         low bound is not known at compile time but they have no others choice.
4872         Done because in this case the bounds can be obtained directly from the
4873         aggregate.
4874
4875 2011-08-03  Ed Falis  <falis@adacore.com>
4876
4877         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
4878         on VxWorks SMP. Remove unusable constant ANY_CPU.
4879
4880 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4881
4882         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4883         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
4884         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
4885         Prj.Env.Initialize_Empty): new subprograms
4886         (Get_Env, Find_Project): remove parameter Target_Name.
4887
4888 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4889
4890         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
4891         as a condition for the delayed call to Derived_Subprograms done for the
4892         case of the rewriting of a derived type that constrains the
4893         discriminants of its parent type.
4894         Avoids redundant subprogram derivations for private subtype derivations.
4895
4896 2011-08-03  Javier Miranda  <miranda@adacore.com>
4897
4898         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
4899         Build_Record_Aggr_Code.
4900         (Build_Record_Aggr_Code): Add missing support to initialize hidden
4901         discriminants in extension aggregates.
4902
4903 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4904
4905         * prj-pp.adb (Print): also output project qualifiers, since in
4906         particular "aggregate" is mandatory in an aggregate project.
4907
4908 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4909
4910         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
4911         (Debug_Output): new function.
4912
4913 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4914
4915         * gnat_ugn.texi: Document -Wstack-usage.
4916         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
4917
4918 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4919
4920         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
4921         have keyword LIMITED.
4922
4923 2011-08-03  Yannick Moy  <moy@adacore.com>
4924
4925         * alfa.adb, alfa.ads, alfa_test.adb: New files.
4926         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
4927         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
4928         section (does not happen in compiler, only if code directly calls
4929         Scan_ALI).
4930         * get_alfa.adb, get_alfa.ads: New files.
4931         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
4932         needed.
4933         * lib-xref-alfa.adb: New file.
4934         * lib-xref.adb, lib-xref.ads
4935         (Xref_Entry): redefine information needed in cross-references for ALFA.
4936         Push ALFA treatments in separated local package.
4937         (Enclosing_Subpragram_Or_Package): treat specially subprogram
4938         identifiers. Return entity of package body instead of spec. Return
4939         Empty for a scope with no location.
4940         (Generate_Reference): adapt to new components for ALFA information.
4941         Remove the need for D references on definitions.
4942         (Is_Local_Reference): moved to ALFA local package
4943         (Output_References): extract subfunction as Extract_Source_Name
4944         (Output_Local_References): remove procedure, replaced by filtering of
4945         cross-references in package ALFA and printing in Put_ALFA.
4946         (Write_Entity_Name): remove procedure
4947         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
4948         print exact name of entity as it appears in source file
4949         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
4950         * put_alfa.adb, put_alfa.ads: New files.
4951         * xref_lib.adb (Search_Xref): protect read of cross-references against
4952         reading other sections of the ALI file, in gnatxref
4953         (Search): protect read of cross-references against reading other
4954         sections of the ALI file, in gnatfind.
4955         * gcc-interface/Make-lang.in: Update dependencies.
4956
4957 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4958
4959         * sem_ch3.adb: Minor reformatting.
4960
4961 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4962
4963         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
4964         raising an exception.
4965
4966 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4967
4968         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
4969         type, always use 1 as the lower bound or string, even if lower bound of
4970         context is not static, to handle properly null strings in a non-static
4971         context.
4972
4973 2011-08-03  Bob Duff  <duff@adacore.com>
4974
4975         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
4976         always legal on the right-hand side of an assignment statement; there
4977         is always an applicable index constraint in this case. Therefore, the
4978         check for Pkind = N_Assignment_Statement is now unconditional -- it
4979         doesn't depend on whether Is_Constrained (Typ).
4980
4981 2011-08-03  Robert Dewar  <dewar@adacore.com>
4982
4983         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
4984
4985 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4986
4987         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
4988         for an itype created within a generic unit.
4989
4990 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4991
4992         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
4993         suppresses all inlining.
4994
4995 2011-08-03  Robert Dewar  <dewar@adacore.com>
4996
4997         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
4998         exp_aggr.adb: Minor reformatting.
4999
5000 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5001
5002         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
5003         tagged assignment when discriminant checks are suppressed. This is
5004         useless and extremely costly in terms of static stack usage.
5005
5006 2011-08-03  Bob Duff  <duff@adacore.com>
5007
5008         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
5009         of generics, because this leads to the wrong entity in the wrong scope,
5010         causing (e.g.) pragma Export_Procedure to get an error if the entity is
5011         an instance.
5012         (Process_Interface_Name): Follow Alias for instances of generics, to
5013         correct for the above change.
5014
5015 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5016
5017         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
5018         is an integer literal it is always safe to replace the reference. In
5019         addition, if the reference appears in the generated code for an object
5020         declaration it is necessary to copy because otherwise the reference
5021         might be to the uninitilized value of the discriminant of the object
5022         itself.
5023
5024 2011-08-03  Pascal Obry  <obry@adacore.com>
5025
5026         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
5027         ACL used, in this case we want to check for ending .exe, not .exe
5028         anywhere in the path.
5029
5030 2011-08-03  Sergey Rybin  <rybin@adacore.com>
5031
5032         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5033         the tree structure (semantic decoration of references to record
5034         discriminants).
5035
5036 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
5037
5038         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
5039         choices of a named array aggregate, bail out when any choices are
5040         marked as Errors_Posted.
5041
5042 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5043
5044         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
5045         in which entity is frozen, to handle properly loop variables in
5046         iterators.
5047
5048 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5049
5050         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
5051         subtype is not static, compute the upper bound using attributes, to
5052         handle properly index types that are not integer types.
5053
5054 2011-08-03  Bob Duff  <duff@adacore.com>
5055
5056         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
5057         Update copyright notice.
5058
5059 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5060
5061         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
5062         Original_Discriminant if within an instance.
5063         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
5064
5065 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5066
5067         * einfo.ads: Minor reformatting.
5068
5069 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5070
5071         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
5072         composite type with an unfrozen subcomponent, in the profile of a
5073         primitive operation.
5074
5075 2011-08-03  Robert Dewar  <dewar@adacore.com>
5076
5077         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5078
5079 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5080
5081         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
5082         unconstrained type with discriminants is initialized with an aggregate,
5083         use the constrained subtype of the aggregate as the type of the object,
5084         because it is immutable, and this allows the back-end to generate no
5085         code for the object declaration.
5086
5087 2011-08-03  Robert Dewar  <dewar@adacore.com>
5088
5089         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
5090         comparison operand is variable, and turns out to be zero or negative.
5091
5092 2011-08-03  Javier Miranda  <miranda@adacore.com>
5093
5094         * exp_intr.adb
5095         (Expand_Dispatching_Constructor_Call): Disable expansion of
5096         code required for native targets. Done to avoid generating
5097         references to unavailable runtime entities in VM targets.
5098         * exp_ch3.adb
5099         (Expand_N_Object_Declaration): Add missing support to handle
5100         the explicit initialization of class-wide interface objects.
5101         Fix documentation.
5102
5103 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5104
5105         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
5106
5107 2011-08-03  Matthew Heaney  <heaney@adacore.com>
5108
5109         * a-cbdlli.adb (Splice): move source items from first to last
5110
5111 2011-08-03  Yannick Moy  <moy@adacore.com>
5112
5113         * sem_util.ads: comment added.
5114
5115 2011-08-03  Javier Miranda  <miranda@adacore.com>
5116
5117         * exp_aggr.adb
5118         (Expand_Record_Aggregate): In VM targets disable the expansion into
5119         assignments of aggregates whose type is not known at compile time.
5120
5121 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5122
5123         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
5124         protected entries and task entries, to build the proper renaming
5125         declaration for entry formals, used in debugging.
5126         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
5127         parameters in the same way.
5128
5129 2011-08-02  Robert Dewar  <dewar@adacore.com>
5130
5131         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
5132         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
5133         code reorganization.
5134
5135 2011-08-02  Robert Dewar  <dewar@adacore.com>
5136
5137         * debug.adb: Debug flag d.P to suppress length comparison optimization
5138         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
5139         comparison of Length by comparing First/Last instead.
5140
5141 2011-08-02  Matthew Heaney  <heaney@adacore.com>
5142
5143         * a-cobove.ads: Code clean up.
5144
5145 2011-08-02  Vincent Celier  <celier@adacore.com>
5146
5147         * adaint.c (file_names_case_sensitive_cache): New static int.
5148         (__gnat_get_file_names_case_sensitive): Cache the return value in
5149         file_names_case_sensitive_cache at the first invocation, to avoid
5150         multiple calls to getenv.
5151
5152 2011-08-02  Bob Duff  <duff@adacore.com>
5153
5154         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
5155
5156 2011-08-02  Yannick Moy  <moy@adacore.com>
5157
5158         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
5159         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
5160         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
5161         indicate that we are in a precondition or postcondition. This is used in
5162         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
5163         decide whether to flag the spec or body of the current subprogram as
5164         not in ALFA.
5165
5166 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
5167
5168         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
5169         list.
5170         * a-extiin.ads: New file.
5171
5172 2011-08-02  Bob Duff  <duff@adacore.com>
5173
5174         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
5175         now raises Name_Error instead of Use_Error in certain cases. The other
5176         parts of this AI were already implemented properly.
5177
5178 2011-08-02  Vincent Celier  <celier@adacore.com>
5179
5180         * link.c: Only import "auto-host.h" when building the gnattools.
5181
5182 2011-08-02  Yannick Moy  <moy@adacore.com>
5183
5184         * sem_util.adb: Inter-unit inlining does not work for a subprogram
5185         which calls a local subprogram, so extract subprogram
5186         from Mark_Non_ALFA_Subprogram_Body.
5187
5188 2011-08-02  Javier Miranda  <miranda@adacore.com>
5189
5190         * exp_ch9.adb
5191         (Extract_Dispatching_Call): If the type of the dispatching object is an
5192         access type then return an explicit dereference in the Object out-mode
5193         parameter.
5194
5195 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5196
5197         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
5198         compatibility checks for all indexes of an array subtype, not just the
5199         first. Reset Has_Dynamic_Range_Check on the subtype before each
5200         potential check to ensure that Insert_Range_Checks will not elide any
5201         of the dynamic checks.
5202
5203 2011-08-02  Yannick Moy  <moy@adacore.com>
5204
5205         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
5206         SPARK restriction at parsing time.
5207         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
5208         directive only if the SPARK restriction is set for this unit.
5209
5210 2011-08-02  Yannick Moy  <moy@adacore.com>
5211
5212         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
5213         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
5214         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
5215         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
5216         Mark_Non_ALFA_Subprogram_Body.
5217         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
5218         inlined.
5219
5220 2011-08-02  Yannick Moy  <moy@adacore.com>
5221
5222         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
5223         might be costly.
5224
5225 2011-08-02  Robert Dewar  <dewar@adacore.com>
5226
5227         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
5228         exp_ch3.adb: Minor reformatting.
5229
5230 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5231
5232         * adaint.c (__gnat_locate_exec_on_path): only returns executable
5233         files, not any regular file.
5234         (__gnat_locate_file_with_predicate): new subprogram.
5235
5236 2011-08-02  Yannick Moy  <moy@adacore.com>
5237
5238         * sinfo.adb, sinfo.ads: Restrict the use of flags
5239         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
5240         nodes, plus N_Subtype_Declaration for the 2nd one.
5241
5242 2011-08-02  Sergey Rybin  <rybin@adacore.com>
5243
5244         * gnat_rm.texi: Ramification of pragma Eliminate documentation
5245          - fix bugs in the description of Source_Trace;
5246          - get rid of UNIT_NAME;
5247
5248 2011-08-02  Javier Miranda  <miranda@adacore.com>
5249
5250         * exp_ch9.adb
5251         (Build_Dispatching_Requeue): Adding support for VM targets
5252         since we cannot directly reference the Tag entity.
5253         * exp_sel.adb (Build_K): Adding support for VM targets.
5254         (Build_S_Assignment): Adding support for VM targets.
5255         * exp_disp.adb
5256         (Default_Prim_Op_Position): In VM targets do not restrict availability
5257         of predefined interface primitives to compiling in Ada 2005 mode.
5258         (Is_Predefined_Interface_Primitive): In VM targets this service is not
5259         restricted to compiling in Ada 2005 mode.
5260         (Make_VM_TSD): Generate code that declares and initializes the OSD
5261         record. Needed to support dispatching calls through synchronized
5262         interfaces.
5263         * exp_ch3.adb
5264         (Make_Predefined_Primitive_Specs): Enable generation of predefined
5265         primitives associated with synchronized interfaces.
5266         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5267         primitives associated with synchronized interfaces.
5268
5269 2011-08-02  Yannick Moy  <moy@adacore.com>
5270
5271         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5272         statements hidden in SPARK if preceded by the HIDE directive
5273         (Parse_Exception_Handlers): mark each exception handler in a sequence of
5274         exception handlers as hidden in SPARK if preceded by the HIDE directive
5275         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5276         if starting with the HIDE directive
5277         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5278         starting with the HIDE directive; mark the declarations in a private
5279         part as hidden in SPARK if the private part starts with the HIDE
5280         directive
5281         * restrict.adb, restrict.ads
5282         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5283         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5284         argument node belongs to a part which is hidden in SPARK
5285         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5286         parts in SPARK; protect the possibly costly call to
5287         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5288         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5289         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5290         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5291         Tok_SPARK_Hide.
5292         (Scan): recognize special comment starting with '#' and followed by
5293         SPARK keyword "hide" as a HIDE directive.
5294
5295 2011-08-02  Yannick Moy  <moy@adacore.com>
5296
5297         * types.ads, erroutc.ads: Minor reformatting.
5298
5299 2011-08-02  Vincent Celier  <celier@adacore.com>
5300
5301         * link.c: Add response file support for cross platforms.
5302
5303 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5304
5305         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5306         in an association, set parent field of copy before partial analysis.
5307         * sem_res.adb (Resolve_Slice): create reference to itype only when
5308         expansion is enabled.
5309
5310 2011-08-02  Yannick Moy  <moy@adacore.com>
5311
5312         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5313         for new flag denoting which subprogram bodies are in ALFA
5314         * restrict.adb, sem_ch7.adb: Update comment
5315         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5316         sem_ch9.adb, sem_res.adb: Add calls to
5317         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5318         * sem_ch6.adb (Analyze_Function_Return): add calls to
5319         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5320         middle of the body, and extended return.
5321         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5322         False when missing return.
5323         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5324         to True for subprograms whose spec is in ALFA. Remove later on the flag
5325         on the entity used for a subprogram body when there exists a separate
5326         declaration.
5327         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5328         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5329         False, otherwise do nothing.
5330
5331 2011-08-02  Robert Dewar  <dewar@adacore.com>
5332
5333         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5334
5335 2011-08-02  Yannick Moy  <moy@adacore.com>
5336
5337         * sem_ch4.ads: minor formatting.
5338
5339 2011-08-02  Yannick Moy  <moy@adacore.com>
5340
5341         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5342         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5343         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5344         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5345         opt.ads: cleanup of SPARK mode
5346
5347 2011-08-02  Yannick Moy  <moy@adacore.com>
5348
5349         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5350         types.
5351         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5352         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5353         * sem_ch3.adb
5354         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5355         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5356         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5357         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5358         types.
5359         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5360         non-static range.
5361         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5362         functions whose return type is not in ALFA.
5363         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5364         specifications.
5365         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5366         parameter's type is not in ALFA.
5367         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5368         types are in ALFA.
5369
5370 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5371
5372         * sem_ch6 (Analyze_Expression_Function): treat the function as
5373         Inline_Always, and introduce a subprogram declaration for it when it is
5374         not a completion.
5375         * inline.adb (Add_Inlined_Body): recognize bodies that come from
5376         expression functions, so that the back-end can determine whether they
5377         can in fact be inlined.
5378         * sem_util.adb (Is_Expression_Function): predicate to determine whether
5379         a function body comes from an expression function.
5380
5381 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5382
5383         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5384         null exclusions to test Can_Never_Be_Null on the anonymous access types
5385         of the formals rather than testing the formals themselves. Exclude this
5386         check in cases where the Old_Formal is marked as a controlling formal,
5387         to avoid issuing spurious errors for bodies completing dispatching
5388         operations (due to the flag not getting set on controlling access
5389         formals in body specs).
5390         (Find_Corresponding_Spec): When checking full and subtype conformance of
5391         subprogram bodies in instances, pass Designated and E in that order, for
5392         consistency with the expected order of the formals (New_Id followed by
5393         Old_Id).
5394
5395 2011-08-02  Robert Dewar  <dewar@adacore.com>
5396
5397         * sem_ch8.adb: Minor reformatting.
5398
5399 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5400
5401         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5402         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5403         primitive operations of class-wide actuals.
5404
5405 2011-08-02  Javier Miranda  <miranda@adacore.com>
5406
5407         * exp_atag.ads, exp_atag.adb
5408         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5409         since its value is implicitly passed in argument Typ.
5410         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5411         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5412         Build_Common_Dispatching_Select_Statements.
5413
5414 2011-08-02  Robert Dewar  <dewar@adacore.com>
5415
5416         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5417         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5418         Minor reformatting.
5419
5420 2011-08-02  Robert Dewar  <dewar@adacore.com>
5421
5422         * sem_res.adb: Minor reformatting.
5423         * sem_prag.adb: Minor reformatting.
5424
5425 2011-08-02  Javier Miranda  <miranda@adacore.com>
5426
5427         * exp_atag.adb, exp_atags.ads
5428         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5429         by the tagged type Entity. Required to use this routine in the VM
5430         targets since we do not have available the Tag entity in the VM
5431         platforms.
5432         * exp_ch6.adb
5433         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5434         Ada.Tags has not been previously loaded.
5435         * exp_ch7.adb
5436         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5437         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5438         * sem_aux.adb
5439         (Enclosing_Dynamic_Scope): Add missing support to handle the full
5440         view of enclosing scopes. Required to handle enclosing scopes that
5441         are synchronized types whose full view is a task type.
5442         * exp_disp.adb
5443         (Build_VM_TSDs): Minor code improvement to avoid generating and
5444         analyzing lists with empty nodes.
5445         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5446         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5447         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5448         (Make_Disp_Timed_Select_Body): Add support for VM targets.
5449         (Make_Select_Specific_Data_Table): Add support for VM targets.
5450         (Make_VM_TSD): Generate code to initialize the SSD structure of
5451         the TSD.
5452
5453 2011-08-02  Yannick Moy  <moy@adacore.com>
5454
5455         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5456         cross-references section in ALI.
5457         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5458         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5459         Sub).
5460         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5461         subprogram or package entity of a node
5462         (Is_Local_Reference_Type): new function returns True for references
5463         selected in local cross-references.
5464         (Lt): function extracted from Lt in Output_References
5465         (Write_Entity_Name): function extracted from Output_References
5466         (Generate_Definition): generate reference with type 'D' for definition
5467         of objects (object declaration and parameter specification), with
5468         appropriate locations and units, for use in local cross-references.
5469         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5470         references of type 'I' for initialization in object definition.
5471         (Output_References): move part of function Lt and procedure
5472         Write_Entity_Name outside of the body. Ignore references of types 'D'
5473         and 'I' introduced for local cross-references.
5474         (Output_Local_References): new procedure to output the local
5475         cross-references sections.
5476         (Lref_Entity_Status): new array defining whether an entity is a local
5477         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5478         with 'I' type when initialization expression is present.
5479         * get_scos.adb, get_scos.ads: Correct comments and typos
5480
5481 2011-08-02  Javier Miranda  <miranda@adacore.com>
5482
5483         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5484         the JVM target.
5485         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5486         the JVM target.
5487         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5488         TSD support.
5489
5490 2011-08-02  Vincent Celier  <celier@adacore.com>
5491
5492         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5493         (No_Space_Img): New function
5494         (Find_Excluded_Sources): When reading from a file, record the file name
5495         and the line number for each excluded source.
5496         (Mark_Excluded_Sources): When reporting an error, if the excluded
5497         sources were read from a file, include file name and line number in
5498         the error message.
5499
5500 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5501
5502         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5503
5504 2011-08-02  Robert Dewar  <dewar@adacore.com>
5505
5506         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5507
5508 2011-08-02  Javier Miranda  <miranda@adacore.com>
5509
5510         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5511         generation of TSDs to the DOTNET compiler.
5512         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5513         generation of TSDs to the DOTNET compiler.
5514
5515 2011-08-02  Javier Miranda  <miranda@adacore.com>
5516
5517         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5518         record of all the tagged types declared inside library level package
5519         declarations, library level package bodies or library level subprograms.
5520         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5521         associated with a given tagged type.
5522         (Build_VM_TSDs): New subprogram.
5523         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5524         compilation units that are subprograms.
5525         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5526         compilation units that are package bodies.
5527         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5528         units that are a package declaration or a package instantiation.
5529         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5530         reorganization to improve the error generated by the frontend when the
5531         function Ada.Tags.Secondary_Tag is not available.
5532         * rtsfind.ads (RE_Register_TSD): New runtime entity.
5533         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5534
5535 2011-08-02  Javier Miranda  <miranda@adacore.com>
5536
5537         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5538
5539 2011-08-02  Robert Dewar  <dewar@adacore.com>
5540
5541         * s-imenne.ads: Minor reformatting.
5542
5543 2011-08-02  Robert Dewar  <dewar@adacore.com>
5544
5545         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5546         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5547         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5548
5549 2011-08-02  Robert Dewar  <dewar@adacore.com>
5550
5551         * einfo.ads (Materialize_Entity): Document this is only for renamings
5552         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5553         required debug information in the case where we transform the object
5554         declaration into a renaming declaration.
5555         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5556         object
5557         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5558         Materialize_Entity.
5559
5560 2011-08-02  Robert Dewar  <dewar@adacore.com>
5561
5562         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5563         Suppress_Init_Procs.
5564         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5565         Suppress_Initialization/Initialization_Suppressed.
5566         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5567         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5568         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5569         * sem_prag.adb: New processing for pragma Suppress_Initialization.
5570
5571 2011-08-02  Robert Dewar  <dewar@adacore.com>
5572
5573         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5574         Minor reformatting.
5575
5576 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5577
5578         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5579         only have inheritable classwide pre/postconditions.
5580
5581 2011-08-02  Javier Miranda  <miranda@adacore.com>
5582
5583         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5584         * rtsfind.ads (RE_Check_TSD): New runtime entity.
5585         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5586         checks if the external tag of a type is the same as the external tag
5587         of some other declaration.
5588
5589 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5590
5591         * s-taskin.ads: Minor reformatting.
5592
5593 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5594
5595         * g-comlin.adb (Display_Help): swap the order in which it prints the
5596         short help and the general usage.
5597
5598 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5599
5600         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5601         the aspect declarations and attach them to the generic copy for
5602         subsequent analysis.
5603         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5604         declarations of the generic tree to the new subprogram declarations.
5605         * sem_attr.adb (Check_Precondition_Postcondition): recognize
5606         conditions that apply to a subprogram instance.
5607
5608 2011-08-02  Robert Dewar  <dewar@adacore.com>
5609
5610         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5611
5612 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5613
5614         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5615         private type with a tagged full view is not derived in the immediate
5616         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5617
5618 2011-08-02  Robert Dewar  <dewar@adacore.com>
5619
5620         * exp_ch4.adb: Minor reformatting.
5621
5622 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5623
5624         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
5625         Ada2012 iterator, the loop will be rewritten during expansion into a
5626         while loop with a cursor and an element declaration. Do not analyze the
5627         body in this case, because if the container is for indefinite types the
5628         actual subtype of the elements will only be determined when the cursor
5629         declaration is analyzed.
5630
5631 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5632
5633         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5634         size/alignment related attributes in CodePeer_Mode.
5635
5636 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5637
5638         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5639         Prepend_Element, since this can result in the operation getting the
5640         wrong slot in the full type's dispatch table if the full type has
5641         inherited operations. The incomplete type's operation will get added
5642         to the proper position in the full type's primitives
5643         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5644         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5645         dispatching operations, since there are cases where nonprimitive
5646         subprograms can get added to the list of incomplete dependents (such
5647         as subprograms in nested packages).
5648         * sem_ch6.adb (Process_Formals): First, remove test for being in a
5649         private part when determining whether to add a primitive with a
5650         parameter of a tagged incomplete type to the Private_Dependents list.
5651         Such primitives can also occur in the visible part, and should not have
5652         been excluded from being private dependents.
5653         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5654         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5655         list of a Taft-amendment incomplete type is a primitive before issuing
5656         an error that the full type must appear in the same unit. There are
5657         cases where nonprimitives can be in the list (such as subprograms in
5658         nested packages).
5659         * sem_disp.adb (Derives_From): Use correct condition for checking that
5660         a formal's type is derived from the type of the corresponding formal in
5661         the parent subprogram (the condition was completely wrong). Add
5662         checking that was missing for controlling result types being derived
5663         from the result type of the parent operation.
5664
5665 2011-08-02  Yannick Moy  <moy@adacore.com>
5666
5667         * errout.adb (First_Node): minor renaming
5668         * restrict.adb (Check_Formal_Restriction): put restriction warning on
5669         first node.
5670
5671 2011-08-02  Yannick Moy  <moy@adacore.com>
5672
5673         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5674         before accessing operands.
5675         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5676         decide whether an initialization expression respects SPARK rules, as
5677         the plain node is the expanded one. This allows for more valid warnings
5678         to be issued.
5679         * gnat_rm.texi: Minor update.
5680
5681 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5682
5683         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5684         previous change.
5685
5686 2011-08-02  Robert Dewar  <dewar@adacore.com>
5687
5688         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5689
5690 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5691
5692         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5693         loop statements and the element renaming declaration with a block when
5694         the element type is controlled.
5695
5696 2011-08-02  Yannick Moy  <moy@adacore.com>
5697
5698         * sinfo.ads: Minor formatting.
5699
5700 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5701
5702         * sem_aggr.adb (Add_Association): if the association has a box and no
5703         expression, use the Sloc of the aggregate itself for the new
5704         association.
5705         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5706         the Original_Node.
5707
5708 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5709
5710         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5711         When a container is provided via a function call, generate a renaming
5712         of the function result. This avoids the creation of a transient scope
5713         and the premature finalization of the container.
5714         * exp_ch7.adb (Is_Container_Cursor): Removed.
5715         (Wrap_Transient_Declaration): Remove the supression of the finalization
5716         of the list controller when the declaration denotes a container cursor,
5717         it is not needed.
5718
5719 2011-08-02  Yannick Moy  <moy@adacore.com>
5720
5721         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5722         node is from source, instead of the original node being from source.
5723         * sem_aggr.adb
5724         (Resolve_Array_Aggregate): refine the check for a static expression, to
5725         recognize also static ranges
5726         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5727         Array_Type_Declaration): postpone the test for the type being a subtype
5728         mark after the type has been resolved, so that component-selection and
5729         expanded-name are discriminated.
5730         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5731         to distinguish the case of an iteration scheme, so that an error is
5732         issed on a non-static range in SPARK except in an iteration scheme.
5733         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5734         In_Iter_Schm = True.
5735         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5736         user-defined operators so that they are allowed in renaming
5737         * sem_ch8.adb
5738         (Find_Selected_Component): refine the check for prefixing of operators
5739         so that they are allowed in renaming. Move the checks for restrictions
5740         on selector name after analysis discriminated between
5741         component-selection and expanded-name.
5742         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5743         concatenation argument of string type if it is static.
5744         * sem_util.adb, sem_util.ads
5745         (Check_Later_Vs_Basic_Declarations): add a new function
5746         Is_Later_Declarative_Item to decice which declarations are allowed as
5747         later items, in the two different modes Ada 83 and SPARK. In the SPARK
5748         mode, add that renamings are considered as later items.
5749         (Enclosing_Package): new function to return the enclosing package
5750         (Enter_Name): correct the rule for homonyms in SPARK
5751         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5752         from source (result of expansion) to avoid issuing wrong warnings.
5753
5754 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5755
5756         * errout.adb: On anything but an expression First_Node returns its
5757         argument.
5758
5759 2011-08-02  Pascal Obry  <obry@adacore.com>
5760
5761         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5762
5763 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5764
5765         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5766         Set the associated loop as the related expression of internally
5767         generated cursors.
5768         * exp_ch7.adb (Is_Container_Cursor): New routine.
5769         (Wrap_Transient_Declaration): Supress the finalization of the list
5770         controller when the declaration denotes a container cursor.
5771
5772 2011-08-02  Yannick Moy  <moy@adacore.com>
5773
5774         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5775         command line now.
5776         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5777         expression is a simple expression. This check cannot be performed in
5778         the semantics, so just drop it.
5779         (P_Index_Or_Discriminant_Constraint): move check that the index or
5780         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5781         semantics. Other cases were previously checked in the semantics.
5782         * par-ch4.adb (P_Name): move checks that a selector name is not
5783         character literal or an operator symbol to Find_Selected_Component in
5784         the semantics
5785         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5786         declarations are not placed after later declarations in a separate
5787         procedure in Sem_Util (possibly not the best choice?), to be used both
5788         during parsing, for Ada 83 mode, and during semantic analysis, for
5789         SPARK mode.
5790         * par-endh.adb (Check_End): move check that end label is not missing
5791         to Process_End_Label in the semantics
5792         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5793         the special case for SPARK restriction
5794         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5795         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5796         parameter Force to issue the error message even on internal node (used
5797         for generated end label). Call Check_Restriction to check when an error
5798         must be issued. In SPARK mode, issue an error message even if the
5799         restriction is not set.
5800         (Check_Restriction): new procedure with an additional out parameter to
5801         inform the caller that a message has been issued
5802         * sem_aggr.adb: Minor modification of message
5803         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5804         instead of issuing an error message directly
5805         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5806         declarations are not placed after later declarations, by calling
5807         Check_Later_Vs_Basic_Declarations
5808         (Analyze_Subtype_Declaration): move here the check that an index or
5809         discriminant constraint must be a subtype mark. Change the check that
5810         a subtype of String must start at one so that it works on subtype marks.
5811         * sem_ch4.adb (Analyze_Call): move here the check that a named
5812         association cannot follow a positional one in a call
5813         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5814         instead of issuing an error message directly
5815         * sem_ch8.adb (Find_Selected_Component): move here the check that a
5816         selector name is not a character literal or an operator symbol. Move
5817         here the check that the prefix of an expanded name cannot be a
5818         subprogram or a loop statement.
5819         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5820         procedure called from parsing and semantics to check that basic
5821         declarations are not placed after later declarations
5822         (Process_End_Label): move here the check that end label is not missing
5823
5824 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5825
5826         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5827         representation clause in codepeer mode, since it confuses CodePeer and
5828         does not bring useful info.
5829
5830 2011-08-02  Ed Falis  <falis@adacore.com>
5831
5832         * init.c: initialize fp hw on MILS.
5833
5834 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5835
5836         * errout.adb (First_Node): for bodies, return the node itself (small
5837         optimization). For other nodes, do not check source_unit if the node
5838         comes from Standard.
5839
5840 2011-08-02  Robert Dewar  <dewar@adacore.com>
5841
5842         * exp_ch3.adb: Minor comment additions.
5843         * sem_ch13.adb: Minor reformatting.
5844
5845 2011-08-02  Pascal Obry  <obry@adacore.com>
5846
5847         * make.adb, makeutl.adb: Removes some superfluous directory separator.
5848
5849 2011-08-02  Robert Dewar  <dewar@adacore.com>
5850
5851         * sem_attr.adb: Minor reformatting.
5852
5853 2011-08-02  Robert Dewar  <dewar@adacore.com>
5854
5855         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5856         (Has_Default_Component_Value): Removed
5857         * einfo.ads Comment updates
5858         (Has_Default_Aspect): Replaces Has_Default_Value
5859         (Has_Default_Component_Value): Removed
5860         * exp_ch13.adb
5861         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5862         * exp_ch3.adb
5863         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5864         (Get_Simple_Init_Val): Handle Default_Value aspect
5865         (Needs_Simple_Initialization): Handle Default_Value aspect
5866         * exp_ch3.ads: Needs_Simple_Initialization
5867         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5868         * par-prag.adb (Pragma_Default[_Component]Value) Removed
5869         * sem_ch13.adb
5870         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5871         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5872         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5873
5874 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5875
5876         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5877         package containing iteration primitives.
5878         exp_ch5.adb (Expand_Iterator_Loop): ditto.
5879
5880 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5881
5882         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5883         "of", pre-analyze expression in case it is a function call with
5884         finalization actions that must be placed ahead of the loop.
5885         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5886         on an Ada2012 iterator, insert them ahead of the rewritten loop.
5887
5888 2011-08-02  Geert Bosch  <bosch@adacore.com>
5889
5890         * cstand.adb (Create_Float_Types): Only consider C's long double for
5891         Long_Long_Float, in addition to double.
5892
5893 2011-08-02  Robert Dewar  <dewar@adacore.com>
5894
5895         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5896         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5897         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5898         Minor reformatting.
5899
5900 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5901
5902         * sem_attr.adb: handle properly 'Result when it is a prefix of an
5903         indexed component.
5904
5905 2011-08-02  Javier Miranda  <miranda@adacore.com>
5906
5907         * einfo.ads, einfo.adb
5908         (Original_Access_Type): Move this attribute to Node26 since there was
5909         an undocumented use of Node21 in E_Access_Subprogram_Type entities
5910         which causes conflicts and breaks the generation of the .NET compiler.
5911         (Interface_Name): Add missing documentation on JGNAT only uses of
5912         this attribute.
5913
5914 2011-08-02  Geert Bosch  <bosch@adacore.com>
5915
5916         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5917         (Find_Back_End_Float_Type): Likewise
5918         (Create_Back_End_Float_Types): Likewise
5919         (Create_Float_Types): Likewise
5920         (Register_Float_Type): Likewise
5921         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5922         Nlist and split out type selection in new local Find_Base_Type function.
5923         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5924         Nlist
5925         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5926
5927 2011-08-02  Robert Dewar  <dewar@adacore.com>
5928
5929         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5930         alpha order).
5931         * opt.ads: Minor comment change.
5932         * sem_ch12.adb: Minor code reorganization.
5933
5934 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5935
5936         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5937         subtype's list of rep items to the list on the full subtype in the case
5938         where the lists are the same.
5939
5940 2011-08-02  Geert Bosch  <bosch@adacore.com>
5941
5942         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5943         using the one from System.Strings, which also deallocates all strings.
5944
5945 2011-08-02  Geert Bosch  <bosch@adacore.com>
5946
5947         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5948         function.
5949         * gcc-interface/Make-lang.in: Update dependencies.
5950
5951 2011-08-02  Olivier Hainque  <hainque@adacore.com>
5952
5953         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5954         end_locus.
5955
5956 2011-08-02  Javier Miranda  <miranda@adacore.com>
5957
5958         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5959         associated with anonymous access to subprograms.
5960
5961 2011-08-02  Geert Bosch  <bosch@adacore.com>
5962
5963         * opt.ads
5964         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5965         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5966         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5967         (Add_Symbol_Definition): Move to switch-c.adb
5968         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5969         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5970         (Add_Symbol_Definition): Move to switch-c.adb.
5971         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5972         * sem_warn.adb
5973         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5974         Move to warnsw.adb.
5975         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5976         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5977         Move to warnsw.adb.
5978         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5979         (Add_Symbol_Definition): Moved from Prepcomp.
5980         * switch-c.ads: Update copyright notice. Use String_List instead of
5981         Argument_List, removing dependency on System.OS_Lib.
5982
5983 2011-08-02  Yannick Moy  <moy@adacore.com>
5984
5985         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5986         mode on initialization expression which does not respect SPARK
5987         restrictions.
5988         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5989         if the tree referenced by its argument represents an initialization
5990         expression in SPARK, suitable for initializing an object in an object
5991         declaration.
5992
5993 2011-08-02  Javier Miranda  <miranda@adacore.com>
5994
5995         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5996         internally generated access to subprogram with its associated protected
5997         subprogram type.
5998         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5999
6000 2011-08-02  Geert Bosch  <bosch@adacore.com>
6001
6002         * cstand.adb (Register_Float_Type): Print information about type to
6003         register, if the Debug_Flag_Dot_B is set.
6004         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6005         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6006         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6007         with a requested precision of more than Max_Digits digits and no more
6008         than Max_Base_Digits digits, if a range specification is present and the
6009         Predefined_Float_Types list has a suitable type to derive from.
6010         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6011         case of type completion with pragma Import
6012         * sem_prag.adb
6013         (Process_Import_Predefined_Type): Processing to complete a type
6014         with pragma Import. Currently supports floating point types only.
6015         (Set_Convention_From_Pragma): Do nothing without underlying type.
6016         (Process_Convention): Guard against absence of underlying type,
6017         which may happen when importing incomplete types.
6018         (Process_Import_Or_Interface): Handle case of importing predefined
6019         types. Tweak error message.
6020
6021 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6022
6023         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6024         functions to previous change.  Reorganize code slightly.
6025
6026 2011-08-02  Geert Bosch  <bosch@adacore.com>
6027
6028         * back_end.ads (Register_Type_Proc): New call back procedure type for
6029         allowing the back end to provide information about available types.
6030         (Register_Back_End_Types): New procedure to register back end types.
6031         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6032         available types.
6033         * cstand.adb (Back_End_Float_Types): New list for floating point types
6034         supported by the back end.
6035         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6036         (Copy_Float_Type): New procedure to make new copies of predefined types.
6037         (Register_Float_Type): New call back procedure to populate the BEFT list
6038         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6039         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6040         (Create_Float_Types): New procedure to create entities for floating
6041         point types predefined in Standard, and put these and any remaining
6042         BEFTs on the Predefined_Float_Types list.
6043         * stand.ads (Predefined_Float_Types): New list for predefined floating
6044         point types that do not have declarations in package Standard.
6045
6046 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6047
6048         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
6049         entity node for the unit containing the parameter.
6050         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6051         (Add_Inlined_Subprogram): Likewise.
6052         * gcc-interface/Make-lang.in: Update dependencies.
6053
6054 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6055
6056         * s-stusta.adb (Print): Make sure Pos is always initialized to a
6057         suitable value.
6058
6059 2011-08-02  Geert Bosch  <bosch@adacore.com>
6060
6061         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6062
6063 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6064
6065         * sem_type.adb (Covers): Move trivial case to the top and reuse the
6066         computed value of Base_Type.
6067
6068 2011-08-02  Yannick Moy  <moy@adacore.com>
6069
6070         * restrict.adb (Check_Restriction): issue an error for any use of
6071         class-wide, even if the No_Dispatch restriction is not set.
6072         * sem_aggr.adb: Correct typos in comments and messages in formal mode
6073         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6074         when completing a private extension, the type named in the private part
6075         is not the same as that named in the visible part.
6076         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6077         of an inherited primitive operations of a tagged type or type extension
6078         that returns the tagged type.
6079         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6080         function which returns True for an implicit operation inherited by the
6081         derived type declaration for the argument type.
6082         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6083         order.
6084
6085 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6086
6087         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6088         Process_Bounds, to perform analysis with expansion of a range or an
6089         expression that is the iteration scheme for a loop.
6090         (Analyze_Iterator_Specification): If domain of iteration is given by a
6091         function call with a controlled result, as is the case if call returns
6092         a predefined container, ensure that finalization actions are properly
6093         generated.
6094         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6095
6096 2011-08-02  Javier Miranda  <miranda@adacore.com>
6097
6098         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6099         * gcc-interface/Make-lang.in: Update dependencies.
6100
6101 2011-08-02  Javier Miranda  <miranda@adacore.com>
6102
6103         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6104         determine if the analysis is performed using N or Original_Node (N).
6105         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6106         functionality of routine Is_Variable avoids code duplication.
6107         * checks.adb (Determine_Range): Handle temporaries generated by
6108         Remove_Side_Effects.
6109
6110 2011-08-02  Javier Miranda  <miranda@adacore.com>
6111
6112         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6113         expansion of the condition. Required since the previous analysis was
6114         done with expansion disabled (see Resolve_Quantified_Expression) and
6115         hence checks were not inserted and record comparisons have not been
6116         expanded.
6117
6118 2011-08-02  Ed Falis  <falis@adacore.com>
6119
6120         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6121         Update header.
6122
6123 2011-08-02  Bob Duff  <duff@adacore.com>
6124
6125         * opt.ads: Minor comment fix.
6126
6127 2011-08-02  Bob Duff  <duff@adacore.com>
6128
6129         * sem_ch12.adb (Analyze_Package_Instantiation,
6130         Analyze_Subprogram_Instantiation): Turn off style checking while
6131         analyzing an instance. Whatever style checks that apply to the generic
6132         unit should apply, so it makes no sense to apply them in an instance.
6133         This was causing trouble when compiling an instance of a runtime
6134         unit that violates the -gnatyO switch.
6135         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6136         one of the two case statements, causing spurious errors.
6137
6138 2011-08-02  Robert Dewar  <dewar@adacore.com>
6139
6140         * uname.adb: Minor reformatting.
6141         * gnatcmd.adb: Minor reformatting.
6142         * exp_attr.adb: Minor reformatting.
6143
6144 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6145
6146         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6147         No_Dispatching_Calls, do not look for the Assign primitive, because
6148         predefined primitives are not created in this case.
6149
6150 2011-08-02  Bob Duff  <duff@adacore.com>
6151
6152         * stylesw.ads: Minor comment fixes.
6153
6154 2011-08-02  Robert Dewar  <dewar@adacore.com>
6155
6156         * freeze.adb (Add_To_Result): New procedure.
6157
6158 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6159
6160         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6161         time, if the specific run-time routines for handling streams of strings
6162         are not available, use the default mechanism.
6163
6164 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6165
6166         * s-regpat.ads: Fix typo.
6167
6168 2011-08-02  Vincent Celier  <celier@adacore.com>
6169
6170         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6171         not null, call it to create the in memory config project file without
6172         parsing an existing default config project file.
6173
6174 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6175
6176         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6177
6178 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6179
6180         * sem_elim.adb: an abstract subprogram does not need an eliminate
6181         pragma for its descendant to be eliminable.
6182
6183 2011-08-02  Ed Falis  <falis@adacore.com>
6184
6185         * init.c: revert to handling before previous checkin for VxWorks
6186         * s-intman-vxworks.adb: delete unnecessary declarations related to
6187         using Ada interrupt facilities for handling signals.
6188         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6189         * s-intman-vxworks.ads: Import __gnat_install_handler as
6190         Initialize_Interrupts.
6191         * s-taprop-vxworks.adb: Delete Signal_Mask.
6192         (Abort_Handler): change construction of mask to unblock exception
6193         signals.
6194
6195 2011-08-02  Jerome Guitton  <guitton@adacore.com>
6196
6197         * a-except-2005.adb (Raise_From_Signal_Handler): Call
6198         Debug_Raise_Exception before propagation starts.
6199
6200 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6201
6202         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6203         to Restriction_Check_Required.
6204         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6205         * sem_res.adb (Resolve_Call): Likewise.
6206         * sem_attr.adb (Check_Stream_Attribute): Likewise.
6207
6208 2011-08-02  Bob Duff  <duff@adacore.com>
6209
6210         * stylesw.ads: Update comment.
6211         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6212         * errout.ads: Remove obsolete comment.
6213
6214 2011-08-02  Javier Miranda  <miranda@adacore.com>
6215
6216         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6217         (Set_Is_Safe_To_Reevaluate): new procedure.
6218         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6219         assignment is allowed on safe-to-reevaluate variables.
6220         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6221         temporary created to remove side effects in expressions that use
6222         the secondary stack as safe-to-reevaluate.
6223         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6224         variables that are not true constants.
6225
6226 2011-08-02  Robert Dewar  <dewar@adacore.com>
6227
6228         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6229         sem_res.adb, sem_ch6.adb: Minor reformatting.
6230
6231 2011-08-02  Jerome Guitton  <guitton@adacore.com>
6232
6233         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6234
6235 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6236
6237         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6238         not set Overridden_Operation if subprogram is an initialization
6239         procedure.
6240
6241 2011-08-02  Yannick Moy  <moy@adacore.com>
6242
6243         * par-ch6.adb: Correct obsolete name in comments
6244         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6245         which takes two message arguments (existing function takes one), with
6246         second message used for continuation.
6247         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6248         block statements that originate from a source block statement, not
6249         generated block statements
6250         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6251         symmetry with procedure case
6252         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6253         function to issue an error in formal mode if a package specification
6254         contains more than one tagged type or type extension.
6255         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6256         parameters matching formals of tagged types are objects (or ancestor
6257         type conversions of objects), not general expressions. Issue an error
6258         on view conversions that are not involving ancestor conversion of an
6259         extended type.
6260         (Resolve_Type_Conversion): in formal mode, issue an error on the
6261         operand of an ancestor type conversion which is not an object
6262         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6263         procedure so that it works also for actuals of function calls
6264         (Is_Actual_Tagged_Parameter): new function which determines if its
6265         argument is an actual parameter of a formal of tagged type in a
6266         subprogram call
6267         (Is_SPARK_Object_Reference): new function which determines if the tree
6268         referenced by its argument represents an object in SPARK
6269
6270 2011-08-02  Robert Dewar  <dewar@adacore.com>
6271
6272         * sem_ch3.adb: Minor reformatting
6273         Minor comment addition
6274         Minor error msg text change
6275
6276 2011-08-02  Javier Miranda  <miranda@adacore.com>
6277
6278         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6279         function. Used to be more precise when we generate a variable plus one
6280         assignment to remove side effects in the evaluation of the Bound
6281         expressions.
6282         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6283         of the bound expression to force its re-analysis and thus expand the
6284         associated transient scope (if required). Code cleanup replacing the
6285         previous code that declared the constant entity by an invocation to
6286         routine Force_Evaluation which centralizes this work in the frontend.
6287
6288 2011-08-02  Robert Dewar  <dewar@adacore.com>
6289
6290         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6291         (Base_Type): Now uses improved Is_Base_Type function
6292         * einfo.ads (Base_Type): Inline this function
6293
6294 2011-08-02  Robert Dewar  <dewar@adacore.com>
6295
6296         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6297         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6298
6299 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6300
6301         * gcc-interface/Make-lang.in: Update dependencies.
6302         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6303         targets.
6304
6305 2011-08-02  Yannick Moy  <moy@adacore.com>
6306
6307         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6308         non-simple expression used in delta constraint
6309         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6310         index constraint which is not a subtype mark
6311         * par.adb: With and use Restrict
6312         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6313         mode on component type which is not a subtype mark and default
6314         expression on component
6315         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6316         of string which does not have a lower index bound equal to 1
6317         (Array_Type_Declaration): issue an error in formal mode on index or
6318         component type which is not a subtype mark, and on aliased keyword on
6319         component
6320         (Derived_Type_Declaration): issue an error in formal mode on interface,
6321         limited or abstract type
6322         (Record_Type_Declaration): issue an error in formal mode on interface
6323         (Record_Type_Definition): issue an error in formal mode on tagged types
6324         and type extensions not declared in the specification of a library unit
6325         package; on null non-tagged record; on variant part
6326
6327 2011-08-02  Vincent Celier  <celier@adacore.com>
6328
6329         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6330         not declared for qualified library project when Library_Name is not
6331         declared, but Library_Dir is.
6332
6333 2011-08-02  Robert Dewar  <dewar@adacore.com>
6334
6335         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6336         pragmas (affects aspects [Component_]Default_Value
6337         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6338         component type for the resolution
6339
6340 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6341
6342         * einfo.adb (Base_Type): Tune implementation for speed.
6343
6344 2011-08-02  Robert Dewar  <dewar@adacore.com>
6345
6346         * freeze.adb: Minor reformatting.
6347
6348 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6349
6350         * scos.ads: Update comments.
6351
6352 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6353
6354         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6355         base type, because the parent may be a subtype of a private type whose
6356         convention is established in a private part.
6357
6358 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6359
6360         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6361         statement in a block when the expansion of the return expression has
6362         created a finalization chain.
6363         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6364         with the parent node.
6365         Add N_Extended_Return_Statement to handle the case where a transient
6366         object declaration appears in the Return_Object_Declarations list of
6367         an extended return statement.
6368
6369 2011-08-02  Matthew Gingell  <gingell@adacore.com>
6370
6371         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6372         unused parameter 'name'.
6373
6374 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6375
6376         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6377         inherited operation, check whether its alias, which is the source
6378         operastion that it renames, has been marked eliminated.
6379
6380 2011-08-02  Javier Miranda  <miranda@adacore.com>
6381
6382         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6383         in-mode parameter whose type is an access type since it can be used to
6384         modify its designated object. Enforce code that handles as safe an
6385         access type that is not access-to-constant but it is the result of a
6386         previous removal of side-effects.
6387         (Remove_Side_Effects): Minor code reorganization of cases which require
6388         no action. Done to incorporate documentation on new cases uncovered
6389         working in this ticket: no action needed if this routine was invoked
6390         too early and the nodes are not yet decorated.
6391         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6392         to routine Remove_Side_Effects by calls to Force_Evaluation since they
6393         were issued with actuals that are implicitly provided by
6394         Force_Evaluation.
6395
6396 2011-08-02  Robert Dewar  <dewar@adacore.com>
6397
6398         * sem_ch3.adb, sem_res.adb: Minor reformatting.
6399
6400 2011-08-02  Yannick Moy  <moy@adacore.com>
6401
6402         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6403         to issue an error in formal mode on attribute not supported in this mode
6404         (Analyze_Attribute): issue errors on standard attributes not supported
6405         in formal mode.
6406         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6407         comment, and issue error in formal mode on modulus which is not a power
6408         of 2.
6409         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6410         range.
6411         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6412         subtype mark.
6413         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6414         operator on modular type (except 'not').
6415
6416 2011-08-02  Robert Dewar  <dewar@adacore.com>
6417
6418         * gnat_rm.texi: Minor reformatting.
6419
6420 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6421
6422         * s-osinte-linux.ads: Minor comment update and reformatting.
6423         * i-cexten.ads: Make this unit pure, as for its parent.
6424         Will allow its usage in more contexts if needed.
6425
6426 2011-08-02  Robert Dewar  <dewar@adacore.com>
6427
6428         * s-utf_32.ads: Minor comment fix.
6429
6430 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6431
6432         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6433         operation of a tagged synchronized type, handle the case where the
6434         controlling argument is overloaded.
6435
6436 2011-08-02  Yannick Moy  <moy@adacore.com>
6437
6438         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6439         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6440         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6441         SPARK mode and formal verification mode on processing SPARK restriction
6442         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6443         requiring consistency checking.
6444
6445 2011-08-02  Robert Dewar  <dewar@adacore.com>
6446
6447         * sem_res.adb: Minor reformatting.
6448
6449 2011-08-02  Robert Dewar  <dewar@adacore.com>
6450
6451         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6452         a-cforse.ads: Remove unneeded with of Ada.Containers
6453         Remove commented out pragma Inline's
6454         Move specifications of new subprograms to the actual specs
6455
6456 2011-08-02  Yannick Moy  <moy@adacore.com>
6457
6458         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6459         a-cforse.ads: Update comments.
6460
6461 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6462
6463         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6464
6465 2011-08-02  Robert Dewar  <dewar@adacore.com>
6466
6467         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6468         a-cforse.ads, a-cofove.ads: Minor reformatting.
6469
6470 2011-08-02  Claire Dross  <dross@adacore.com>
6471
6472         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6473         a-cofove.ads: Add comments.
6474
6475 2011-08-02  Yannick Moy  <moy@adacore.com>
6476
6477         * gnat_rm.texi: Document formal containers.
6478
6479 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6480
6481         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6482         are empty sections.
6483
6484 2011-08-02  Robert Dewar  <dewar@adacore.com>
6485
6486         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6487         reformatting.
6488
6489 2011-08-02  Robert Dewar  <dewar@adacore.com>
6490
6491         * aspects.adb: New aspects Default_Value and Default_Component_Value
6492         New format of Aspect_Names table checks for omitted entries
6493         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6494         handling of boolean aspects for derived types.
6495         New aspects Default_Value and Default_Component_Value
6496         New format of Aspect_Names table checks for omitted entries
6497         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6498         (Has_Default_Value): New flag
6499         (Has_Default_Component_Value): New flag
6500         (Has_Default_Value): New flag
6501         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6502         table.
6503         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6504         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6505         Default_Value and Default_Component_Value
6506         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6507         New aspects Default_Value and Default_Component_Value
6508         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6509         * sprint.adb: Print N_Aspect_Specification node when called from gdb
6510
6511 2011-08-02  Vincent Celier  <celier@adacore.com>
6512
6513         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6514         inherit library kind.
6515
6516 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6517
6518         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6519         Minor reformatting.
6520
6521 2011-08-02  Robert Dewar  <dewar@adacore.com>
6522
6523         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6524
6525 2011-08-02  Yannick Moy  <moy@adacore.com>
6526
6527         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6528
6529 2011-08-02  Robert Dewar  <dewar@adacore.com>
6530
6531         * impunit.adb: Add comment.
6532
6533 2011-08-02  Yannick Moy  <moy@adacore.com>
6534
6535         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6536         qualification of aggregates in formal mode
6537         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6538         another aggregate
6539         (Resolve_Aggregate): complete the test that an aggregate is adequately
6540         qualified in formal mode
6541
6542 2011-08-02  Pascal Obry  <obry@adacore.com>
6543
6544         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6545         * mlib-prj.adb: Supress warning when compiling binder generated file.
6546         (Build_Library): Supress all warnings when compiling the binder
6547         generated file.
6548
6549 2011-08-02  Yannick Moy  <moy@adacore.com>
6550
6551         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6552         from here...
6553         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6554         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6555         Add with/use clauses to make Check_Formal_Restriction visible
6556
6557 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6558
6559         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6560         in-parameters when type of the generic formal is private in the generic
6561         spec and non-private in the body.
6562
6563 2011-08-02  Claire Dross  <dross@adacore.com>
6564
6565         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6566         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6567         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6568         * impunit.adb, Makefile.rtl: Take new files into account.
6569
6570 2011-08-02  Robert Dewar  <dewar@adacore.com>
6571
6572         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6573         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6574
6575 2011-08-02  Yannick Moy  <moy@adacore.com>
6576
6577         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6578         formal mode
6579         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6580         matching static array bounds, taking into account the special case of
6581         string literals
6582         * sem_ch3.adb: Typo in comment.
6583
6584 2011-08-02  Yannick Moy  <moy@adacore.com>
6585
6586         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6587         which issues an error in formal mode if its argument node is originally
6588         from source
6589         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6590         has a discriminant specification so that it does not include the case
6591         of derived types
6592         (Derived_Type_Declaration): move here the test that a derived type has a
6593         discriminant specification
6594         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6595         first element of a component association before accessing its choices
6596         (presence of component association is not enough)
6597         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6598         declaration is a library item before accessing the next element in a
6599         list, as library items are not member of lists
6600         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6601         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6602         Check_Formal_Restriction whenever possible.
6603
6604 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6605
6606         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6607         reference when needed.
6608
6609 2011-08-02  Bob Duff  <duff@adacore.com>
6610
6611         * gnat_ugn.texi: Fix typo.
6612
6613 2011-08-02  Vincent Celier  <celier@adacore.com>
6614
6615         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6616         archive file name. Do not use the full path name of archives for Open
6617         VMS.
6618
6619 2011-08-02  Robert Dewar  <dewar@adacore.com>
6620
6621         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6622         Analyze_Aspect_Specifications
6623         * sem_ch13.adb
6624         (Analyze_Aspect_Specifications): New handling for boolean aspects
6625         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6626         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6627         sequence for Analyze_Aspect_Specifications
6628         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6629         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6630
6631 2011-08-02  Robert Dewar  <dewar@adacore.com>
6632
6633         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6634         aspects, since these no longer exist.
6635
6636 2011-08-02  Robert Dewar  <dewar@adacore.com>
6637
6638         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6639         semicolon, do not try to see if there are aspects following it.
6640         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6641         aspect spec.
6642
6643 2011-08-02  Robert Dewar  <dewar@adacore.com>
6644
6645         * sem_ch8.adb, aspects.ads: Minor reformatting.
6646
6647 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6648
6649         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6650         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6651         extracted from...
6652         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
6653
6654 2011-08-02  Yannick Moy  <moy@adacore.com>
6655
6656         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6657         mode on subprogram declaration outside of package specification, unless
6658         it is followed by a pragma Import
6659         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6660         Access_Type_Declaration): issue error in formal mode on access type
6661         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6662         incomplete type
6663         (Analyze_Object_Declaration): issue error in formal mode on object
6664         declaration which does not respect SPARK restrictions
6665         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6666         declaration which does not respect SPARK restrictions
6667         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6668         error in formal mode on digits or delta constraint
6669         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6670         decimal fixed point type
6671         (Derived_Type_Declaration): issue error in formal mode on derived type
6672         other than type extensions of tagged record types
6673         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6674         with check on access definition
6675         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6676         mode on protected definition.
6677         (Analyze_Task_Definition): issue error in formal mode on task definition
6678
6679 2011-08-02  Robert Dewar  <dewar@adacore.com>
6680
6681         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6682
6683 2011-08-02  Javier Miranda  <miranda@adacore.com>
6684
6685         * sem_ch6.adb (Can_Override_Operator): New function.
6686         (Verify_Overriding_Indicator): Add missing code to check overriding
6687         indicator in operators. Fixes regression.
6688         (Check_Overriding_Indicator): Minor reformating after replacing the
6689         code that evaluates if the subprogram can override an operator by
6690         invocations to the above new function.
6691         * einfo.adb
6692         (Write_Field26_Name): Add missing code to ensure that, following
6693         the documentation in einfo.ads, this field is not shown as attribute
6694         "Static_Initialization" on non-dispatching functions.
6695
6696 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6697
6698         * sem_res.adb (Resolve_Call): A call to
6699         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6700         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6701         i.e., when the second parameter is of type Time_Span.
6702
6703 2011-08-02  Vincent Celier  <celier@adacore.com>
6704
6705         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6706         with an archive instead of -L<library dir> -l<library name>.
6707
6708 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6709
6710         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6711         mark the base types In_Use in addition to making the operations
6712         use_visible.
6713
6714 2011-08-02  Ed Falis  <falis@adacore.com>
6715
6716         * init.c: add and setup __gnat_signal_mask for the exception signals
6717         * s-inmaop-vxworks.adb: new file.
6718         * s-intman-vxworks.adb: remove unnecessary initializations and
6719         simplify remaining
6720         * s-intman-vxworks.ads: remove unnecessary variable
6721         * s-taprop-vxworks.adb: simplify signal initialization
6722
6723 2011-08-02  Robert Dewar  <dewar@adacore.com>
6724
6725         * sem_ch8.adb: Minor code reorganization, comment updates.
6726
6727 2011-08-02  Robert Dewar  <dewar@adacore.com>
6728
6729         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6730         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6731         here from Sem_Res.
6732         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6733         (Matching_Static_Array_Bounds): Moved here from Sem_Res
6734
6735 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6736
6737         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6738         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6739         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6740         use_type_clauses, to handle more efficiently use_type and use_all_type
6741         constructs.
6742         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6743         Ada2012 Use_All_Type clause.
6744         (Use_Class_Wide_Operations): new procedure.
6745
6746 2011-08-02  Robert Dewar  <dewar@adacore.com>
6747
6748         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6749         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6750         expression to expression function.
6751
6752 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6753
6754         * sem_ch4.adb: transform simple Ada2012 membership into equality only
6755         if types are compatible.
6756
6757 2011-08-02  Yannick Moy  <moy@adacore.com>
6758
6759         * sem_res.adb (Matching_Static_Array_Bounds): new function which
6760         returns True if its argument array types have same dimension and same
6761         static bounds at each index.
6762         (Resolve_Actuals): issue an error in formal mode on actuals passed as
6763         OUT or IN OUT paramaters which are not view conversions in SPARK.
6764         (Resolve_Arithmetic_Op): issue an error in formal mode on
6765         multiplication or division with operands of fixed point types which are
6766         not qualified or explicitly converted.
6767         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6768         Boolean or array type (except String) operands.
6769         (Resolve_Equality_Op): issue an error in formal mode on equality
6770         operators for array types other than String with non-matching static
6771         bounds.
6772         (Resolve_Logical_Op): issue an error in formal mode on logical operators
6773         for array types with non-matching static bounds. Factorize the code in
6774         Matching_Static_Array_Bounds.
6775         (Resolve_Qualified_Expression): issue an error in formal mode on
6776         qualified expressions for array types with non-matching static bounds.
6777         (Resolve_Type_Conversion): issue an error in formal mode on type
6778         conversion for array types with non-matching static bounds
6779
6780 2011-08-02  Robert Dewar  <dewar@adacore.com>
6781
6782         * par-ch10.adb: Minor code reorganization (use Nkind_In).
6783
6784 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6785
6786         * par-ch9.adb: save location of entry for proper error message.
6787
6788 2011-08-02  Javier Miranda  <miranda@adacore.com>
6789
6790         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6791         (Use_Full_View) which permits this routine to climb through the
6792         ancestors using the full-view of private parents.
6793         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6794         Use_Full_View to true in calls to Is_Ancestor.
6795         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6796         true in call to Is_Ancestor.
6797         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6798         Use_Full_View to true in call to Is_Ancestor.
6799         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6800         call to Is_Ancestor.
6801         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6802         Use_Full_View to true in calls to Is_Ancestor.
6803         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6804         Make_Select_Specific_Data_Table, Register_Primitive,
6805         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6806         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6807         to true in call to Is_Ancestor.
6808         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6809         Use_Full_View to true in calls to Is_Ancestor.
6810         * exp_cg.adb
6811         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6812         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6813
6814 2011-08-02  Robert Dewar  <dewar@adacore.com>
6815
6816         * gnat_rm.texi: Minor reformatting.
6817         * sem_prag.adb: Minor reformatting.
6818
6819 2011-08-02  Tristan Gingold  <gingold@adacore.com>
6820
6821         * vms_data.ads: Add VMS qualifier for -gnateP.
6822
6823 2011-08-02  Robert Dewar  <dewar@adacore.com>
6824
6825         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6826         * par-ch7.adb (P_Package): Proper placement of aspects for package
6827         decl/instantiation.
6828         * par-endh.adb (Check_End): Ad Is_Sloc parameter
6829         (End_Statements): Add Is_Sloc parameterr
6830         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6831         (Check_End): Ad Is_Sloc parameter
6832         (End_Statements): Add Is_Sloc parameterr
6833
6834 2011-08-02  Vincent Celier  <celier@adacore.com>
6835
6836         * ug_words: Add VMS qualifier equivalent to -gnateP:
6837         /SYMBOL_PREPROCESSING.
6838
6839 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6840
6841         * gnat-style.texi: For hexadecimal numeric literals the typical
6842         grouping of digits is 4 to represent 2 bytes.
6843         A procedure spec which is split into several lines is indented two
6844         characters.
6845
6846 2011-08-02  Yannick Moy  <moy@adacore.com>
6847
6848         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6849         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6850         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6851         properly qualified
6852         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6853         choice in array aggregate
6854         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6855         mark as ancestor
6856         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6857         positional and named aggregate for record, or others in record
6858         aggregate, or multiple choice in record aggregate
6859         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6860         array operands to logical operations AND, OR and XOR do not have the
6861         same static lower and higher bounds
6862         * sem_ch5.adb, sinfo.ads: Correct typos in comments
6863
6864 2011-08-01  Robert Dewar  <dewar@adacore.com>
6865
6866         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6867         Replaces Last_Source_Node_In_Sequence.
6868         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6869         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6870         parens and blank in string (this was inconsistently implemented).
6871         * errout.ads
6872         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6873         blank in string (this was inconsistently implemented).
6874         * gnat1drv.adb
6875         (Set_Global_Switches): Set formal mode switches appropriately
6876         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6877         * par-prag.adb
6878         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6879         call Set_Error_Msg_Lang to set "spark" as language name.
6880         * par.adb: Remove unnecessary call to set formal language for errout
6881         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6882         appropriately and call Set_Error_Msg_Lang to set "spark" as language
6883         name.
6884         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6885         calls to it, moved after resolution so that types are known
6886         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6887         result of concatenation is not of type String
6888         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6889         concatenation is not properly restricted
6890         * gnat_rm.texi: Add doc on pragma Spark_95.
6891         * gcc-interface/Makefile.in: Remove obsolete target pairs for
6892         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6893         * gcc-interface/Make-lang.in: Update dependencies.
6894
6895 2011-08-01  Javier Miranda  <miranda@adacore.com>
6896
6897         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6898         condition that detects if the overridden operation must replace an
6899         existing entity.
6900
6901 2011-08-01  Javier Miranda  <miranda@adacore.com>
6902
6903         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6904         code declarations inserted by Insert_Actions in each alternative of the
6905         N_Case_Expression node.
6906
6907 2011-08-01  Robert Dewar  <dewar@adacore.com>
6908
6909         * sem_ch6.adb: Minor code reorganization.
6910         * sem_util.adb: Minor reformatting.
6911
6912 2011-08-01  Pascal Obry  <obry@adacore.com>
6913
6914         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6915         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6916
6917 2011-08-01  Yannick Moy  <moy@adacore.com>
6918
6919         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6920         literal or operator symbol which is prefixed
6921         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6922         mode on access attributes.
6923         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6924         that concatenation operands are properly restricted in formal mode
6925         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6926         Analyze_Concatenation_Operand. Issue an error in formal mode if the
6927         result of the concatenation has a type different from String.
6928         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6929         Analyze_Quantified_Expression, Analyze_Slice,
6930         Analyze_Null): issue an error in formal mode on unsupported constructs
6931         * sem_ch5.adb
6932         (Analyze_Block_Statement): only issue error on source block statement
6933         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6934         function which returns the last node in a list of nodes for which
6935         Comes_From_Source returns True, if any
6936         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6937         Last_Source_Node_In_Sequence
6938         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6939         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6940         mode on unsupported constructs
6941         * sem_ch9.adb Do not return after issuing error in formal mode, as the
6942         rest of the actions may be needed later on since the error is marked as
6943         not serious.
6944         * sinfo.ads: Typos in comments.
6945
6946 2011-08-01  Pascal Obry  <obry@adacore.com>
6947
6948         * projects.texi: Minor editing.
6949
6950 2011-08-01  Yannick Moy  <moy@adacore.com>
6951
6952         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6953         insertion character ~~
6954         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6955         (Set_Error_Msg_Lang): new procedure which fixes the language for use
6956         with insertion character ~~
6957         (Set_Msg_Text): treat insertion character ~~
6958         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6959         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6960         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6961         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6962         errors related to the formal language restriction not serious
6963         (insertion character |).
6964         * par.adb (Par): set formal language for error messages if needed
6965         * sem_ch6.adb (Check_Missing_Return): take into account possible
6966         generated statements at the end of the function
6967         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6968         enumeration value to define a new pragma SPARK_95
6969         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6970         SPARK_Version): new type and variables to store the SPARK version
6971         (none by default).
6972         (SPARK_Mode): return True when SPARK_Version is set
6973         * par-prag.adb: Correct indentation
6974         (Prag): take Pragma_SPARK_95 into account
6975         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6976         into account.
6977
6978 2011-08-01  Robert Dewar  <dewar@adacore.com>
6979
6980         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6981         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6982         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6983
6984 2011-08-01  Pascal Obry  <obry@adacore.com>
6985
6986         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6987         Target_Name to Get_Path call.
6988         (Parse_Single_Project): Likewise.
6989         (Post_Parse_Context_Clause): Likewise.
6990         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6991         Call Initialise_Project_Path with the proper Target_Name.
6992         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6993         search path.
6994         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6995         with the proper Target_Name.
6996         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6997         Part.Parse routine.
6998         (Parse_Project_And_Apply_Config): Likewise.
6999         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7000         This is fine as this part of the code is supporting only native
7001         compilation.
7002         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7003         is fine as this part of the code is supporting only native compilation.
7004
7005 2011-08-01  Yannick Moy  <moy@adacore.com>
7006
7007         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7008         of homonym, unless the homonym is one of the cases allowed in SPARK
7009         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7010         package declaration occurring after a body.
7011
7012 2011-08-01  Robert Dewar  <dewar@adacore.com>
7013
7014         * checks.adb, exp_ch4.adb: Minor reformatting.
7015
7016 2011-08-01  Javier Miranda  <miranda@adacore.com>
7017
7018         * einfo.ads (Access_Disp_Table): Fix documentation.
7019         (Dispatch_Table_Wrappers): Fix documentation.
7020
7021 2011-08-01  Pascal Obry  <obry@adacore.com>
7022
7023         * prj-env.adb, prj-env.ads: Minor reformatting.
7024
7025 2011-08-01  Yannick Moy  <moy@adacore.com>
7026
7027         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7028         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7029         procedures out of these packages.
7030         * errout.ads, errout.adb
7031         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7032         procedures in of this package
7033         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7034         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7035         on misplaced later vs initial declarations, like in Ada 83
7036         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7037         formal mode on attribute of private type whose full type declaration
7038         is not visible
7039         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7040         package declaration inside a package specification
7041         (Analyze_Full_Type_Declaration): issue error in formal mode on
7042         controlled type or discriminant type
7043         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7044         user-defined operator means that it should come from the source
7045         (New_Overloaded_Entity): issue error in formal mode on overloaded
7046         entity.
7047         * sem_ch6.ads, sem_ch13.ads: typos in comments.
7048
7049 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7050
7051         * atree.adb: Minor reformatting.
7052         * checks.adb: Minor reformatting.
7053
7054 2011-08-01  Vincent Celier  <celier@adacore.com>
7055
7056         * s-parame-vms-ia64.ads: Fix typo in comment
7057         Minor reformatting
7058         * s-parame-vms-restrict.ads: Removed, unused.
7059
7060 2011-08-01  Javier Miranda  <miranda@adacore.com>
7061
7062         * exp_ch3.adb
7063         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7064         * sem_ch3.adb
7065         (Constrain_Index): Remove side effects in the evaluation of the bounds.
7066         * sem_ch3.ads, sem_ch3.adb
7067         (Is_Constant_Bound): New extended version of the subprogram that was
7068         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7069         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7070         * sem_aux.ads (Constant_Value): Fix typo in comment.
7071         * checks.adb (Generate_Index_Checks): New implementation which, for
7072         array objects with constant bounds, generates the runtime check
7073         referencing the bounds of the array type. For other cases this routine
7074         provides its previous behavior obtaining such values from the array
7075         object.
7076         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7077         parent type.
7078         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7079         we cannot have semantic interpretations of the new node.
7080
7081 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7082
7083         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7084         expressions.
7085
7086 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7087
7088         * sem_ch8.adb: Minor code editing.
7089         * s-vxwext.adb: Remove trailing space.
7090         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7091         consistency with other files.
7092
7093 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7094
7095         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7096
7097 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7098
7099         * par-ch10.adb: reject parameterized expressions as compilation unit.
7100         * sem_ch4.adb: handle properly conditional expression with overloaded
7101         then_clause and no else_clause.
7102
7103 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7104
7105         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7106         like done by System.Aux_DEC.
7107         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7108
7109 2011-08-01  Yannick Moy  <moy@adacore.com>
7110
7111         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7112         missing label at end of declaration (subprogram or package)
7113         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7114         of positional and named parameter association
7115         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7116         Error_Msg_SP which adds a prefix to the error message giving the name
7117         of the formal language analyzed
7118         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7119         access result type in subprogram, unconstrained array as result type,.
7120         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7121         procedure
7122         * sem_ch8.adb: Code clean up.
7123
7124 2011-08-01  Javier Miranda  <miranda@adacore.com>
7125
7126         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7127         * einfo.ads (Access_Disp_Table): Fix documentation.
7128         (Dispatch_Table_Wrappers): Fix documentation.
7129         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7130         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7131         to enforce the documentation of this attribute.
7132         (Set_Is_Interface): Cleanup the assertion.
7133         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7134         the Underlying_Type entity before reading attribute Access_Disp_Table.
7135         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7136         Locate the Underlying_Type before reading attribute Access_Disp_Table.
7137         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7138         the Underlying_Type entity before reading attribute Access_Disp_Table.
7139         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7140         Locate the Underlying_Type entity before reading attribute
7141         Access_Disp_Table.
7142
7143 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7144
7145         * s-poosiz.ads: Additional overriding indicators.
7146
7147 2011-08-01  Yannick Moy  <moy@adacore.com>
7148
7149         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7150         formal mode.
7151         (Analyze_Iteration_Scheme): issue error in formal mode when loop
7152         parameter specification does not include a subtype mark.
7153         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7154         formal mode on abstract subprogram.
7155         (Analyze_Subprogram_Specification): issue error in formal mode on
7156         user-defined operator.
7157         (Process_Formals): issue error in formal mode on access parameter and
7158         default expression.
7159         * sem_ch9.adb (Analyze_Abort_Statement,
7160         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7161         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7162         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7163         Analyze_Requeue, Analyze_Selective_Accept,
7164         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7165         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7166         issue error in formal mode on user-defined raise statement.
7167
7168 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7169
7170         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7171         declaration being hidden when overriding an implicit inherited
7172         subprogram.
7173         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7174         (-gnats), do not complain about a source file that contains only a
7175         pragma No_Body.
7176
7177 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7178
7179         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7180         variable if already set.
7181
7182 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7183
7184         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7185         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7186         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7187         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7188         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7189         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7190         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7191         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7192         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7193         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7194         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7195         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7196         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7197         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7198         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7199         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7200         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7201         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7202         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7203         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7204         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7205         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7206         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7207         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7208         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7209         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7210         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7211         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7212         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7213         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7214         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7215         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7216         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7217         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7218         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7219         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7220         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7221         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7222         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7223         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7224         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7225         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7226         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7227         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7228         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7229         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7230         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7231         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7232         s-osinte-mingw.ads: Update to GPLv3 run-time license.
7233         Use GNAT instead of GNARL.
7234
7235 2011-08-01  Bob Duff  <duff@adacore.com>
7236
7237         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7238         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7239         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7240         reformatting.
7241
7242 2011-08-01  Yannick Moy  <moy@adacore.com>
7243
7244         * debug.adb (d.D) reverve flag for the SPARK mode
7245         (d.E) reverve flag for SPARK generation mode
7246         (d.F) reverve flag for Why generation mode
7247         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7248         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
7249         functions which return True when the corresponding modes are set
7250         (Formal_Language): return "spark" or "alfa" when in formal verification
7251         mode.
7252         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7253         Error_Msg to prefix the error message with a tag giving the formal
7254         language
7255         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7256         message with a tag giving the formal language
7257         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7258         block statement
7259         (Analyze_Case_Statement): issue error in formal mode on case statement
7260         with a single "others" case alternative
7261         (Analyze_Exit_Statement): issue errors in formal mode on exit
7262         statements which do not respect SPARK restrictions
7263         (Analyze_Goto_Statement): issue error in formal mode on goto statement
7264         (Check_Unreachable_Code): always issue an error (not a warning) in
7265         formal mode on unreachable code (concerns both code after an infinite
7266         loop and after an unconditional jump, both not allowed in SPARK)
7267         * sem_ch6.adb (Analyze_Return_Statement): add call to
7268         Set_Return_Present for a procedure containing a return statement
7269         (already done for functions in Analyze_Function_Return)
7270         (Analyze_Function_Return): issue error in formal mode on extended
7271         return or if return is not last statement in function
7272         (Check_Missing_Return): issue error in formal mode if function does
7273         not end with return or if procedure contains a return
7274         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7275         function to detect if there is an inner scope of its parameter S which
7276         is a loop.
7277
7278 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7279
7280         * sem_ch6.ads: Minor reformatting.
7281
7282 2011-08-01  Javier Miranda  <miranda@adacore.com>
7283
7284         * sem_util.adb (Abstract_Interface_List): Complete condition when
7285         processing private type declarations to avoid reading unavailable
7286         attribute.
7287         (Is_Synchronized_Tagged_Type): Complete condition when processing
7288         private extension declaration nodes to avoid reading unavailable
7289         attribute.
7290
7291 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7292
7293         * sem_ch3.adb: Minor reformatting.
7294
7295 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7296
7297         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7298         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7299         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7300         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7301         for VMS, instead parametrize the common implementation with
7302         System.Parameters declarations.
7303
7304 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
7305
7306         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7307
7308 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7309
7310         * seh_init.c: Fix SEH handler installation on win64.
7311
7312 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7313
7314         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7315         double analysis of an anonymous access to subprogram, because it can
7316         lead to improper sharing of profiles and a back-end crash.
7317
7318 2011-08-01  Robert Dewar  <dewar@adacore.com>
7319
7320         * make.adb, sem_ch4.adb: Minor reformatting.
7321         * gcc-interface/Make-lang.in: Update dependencies.
7322         * sem_util.adb, exp_ch5.adb: Minor reformatting.
7323
7324 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7325
7326         * gnat_rm.texi: Fix definition of Long_Integer.
7327
7328 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7329
7330         * exp_aggr.adb: check limit size of static aggregate unconditionally,
7331         to prevent storage exhaustion.
7332         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7333         finalized is a function body, insert the cleanup code before the final
7334         return statement, to prevent spurious warnings.
7335         * s-pooglo.ads: add overriding indicator.
7336
7337 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7338
7339         * sem_ch4.adb (Operator_Check): improve error message when both a
7340         with_clause and a use_clause are needed to make operator usage legal.
7341         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7342         determine whether a compilation unit is visible within an other,
7343         either through a with_clause in the current unit, or a with_clause in
7344         its library unit or one one of its parents.
7345
7346 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7347
7348         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7349         over an arbitrary expression of an array or container type.
7350         * lib-xref.adb: clarify comment.
7351
7352 2011-08-01  Bob Duff  <duff@adacore.com>
7353
7354         * einfo.ads: Minor reformatting.
7355         * debug.adb: Minor comment improvement.
7356
7357 2011-08-01  Javier Miranda  <miranda@adacore.com>
7358
7359         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7360         consider hidden subprograms as valid candidates.
7361
7362 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7363
7364         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7365
7366 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
7367
7368         * gnat_ugn.texi: Fix typo.
7369
7370 2011-08-01  Robert Dewar  <dewar@adacore.com>
7371
7372         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7373         lib-xref.adb: Minor reformatting
7374
7375 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7376
7377         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7378         when to generate a call to Move_Final_List.
7379         (Has_Controlled_Parts): Remove this function.
7380
7381 2011-08-01  Geert Bosch  <bosch@adacore.com>
7382
7383         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7384         "," in choice list.
7385
7386 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7387
7388         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7389         explicit raise of a predefined exception as Comes_From_Source if the
7390         original N_Raise_Statement comes from source.
7391
7392 2011-08-01  Robert Dewar  <dewar@adacore.com>
7393
7394         * sinfo.ads: Add comment.
7395         * sem_ch6.adb: Minor reformatting.
7396
7397 2011-08-01  Robert Dewar  <dewar@adacore.com>
7398
7399         * freeze.adb (Freeze_Entity): Refine check for bad component size
7400         clause to avoid rejecting confirming clause when atomic/aliased present.
7401
7402 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7403
7404         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7405         better determine whether an entity reference is a write.
7406         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7407         subcomponent.
7408         * lib-xref.adb (Output_References): Do no suppress a read reference at
7409         the same location as an immediately preceeding modify-reference, to
7410         handle properly in-out actuals.
7411
7412 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7413
7414         * env.c (__gnat_setenv) [VMS]: Refine previous change.
7415
7416 2011-08-01  Quentin Ochem  <ochem@adacore.com>
7417
7418         * i-cstrin.adb (New_String): Changed implementation, now uses only the
7419         heap to compute the result.
7420
7421 2011-08-01  Robert Dewar  <dewar@adacore.com>
7422
7423         * atree.ads: Minor reformatting.
7424
7425 2011-08-01  Emmanuel Briot  <briot@adacore.com>
7426
7427         * g-expect.adb (Get_Command_Output): Fix memory leak.
7428
7429 2011-08-01  Geert Bosch  <bosch@adacore.com>
7430
7431         * cstand.adb (P_Float_Type): New procedure to print the definition of
7432         predefined fpt types.
7433         (P_Mixed_Name): New procedure to print a name using mixed case
7434         (Print_Standard): Use P_Float_Type for printing floating point types
7435         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7436         precision IEEE float.
7437
7438 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7439
7440         * sem_ch3.adb: Minor reformatting.
7441
7442 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7443
7444         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7445         the completion of a generic function, insert the new body rather than
7446         rewriting the original.
7447
7448 2011-08-01  Yannick Moy  <moy@adacore.com>
7449
7450         * sinfo.ads, errout.ads: Typos in comments.
7451
7452 2011-08-01  Robert Dewar  <dewar@adacore.com>
7453
7454         * par-endh.adb: Minor reformatting.
7455
7456 2011-08-01  Robert Dewar  <dewar@adacore.com>
7457
7458         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7459         (Pre_Post_Aspects): New subtype.
7460         * par-ch12.adb (P_Generic): New syntax for aspects in packages
7461         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7462         * par-ch7.adb (P_Package): Remove Decl parameter
7463         (P_Package): Handle new syntax for aspects (before IS)
7464         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7465         new aspect syntax
7466         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7467         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7468         (P_Package): Remove Decl parameter
7469         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7470         aspects
7471         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7472         specs
7473         * sem_util.ads, sem_util.adb (Static_Boolean): New function
7474         * sinfo.ads: Document new syntax for aspects in packages etc.
7475         * sprint.adb: Handle new syntax of aspects before IS in package
7476
7477 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7478
7479         * atree.ads: Minor reformatting.
7480         * sem_prag.adb: Minor reformatting.
7481
7482 2011-08-01  Robert Dewar  <dewar@adacore.com>
7483
7484         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7485         case expr alternative.
7486
7487 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7488
7489         * sem_ch12.adb: Fix typo.
7490
7491 2011-08-01  Geert Bosch  <bosch@adacore.com>
7492
7493         * sem_prag.adb (Check_No_Link_Name): New procedure.
7494         (Process_Import_Or_Interface): Use Check_No_Link_Name.
7495         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7496         instead of Standard_Long_Long_Float_Size global. Preparation for
7497         eventual removal of per type constants.
7498         * exp_util.ads (Get_Stream_Size): New function returning the stream
7499         size value of subtype E.
7500         * exp_util.adb (Get_Stream_Size): Implement new function.
7501         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7502         function.
7503         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7504         * einfo.adb:
7505         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7506
7507 2011-08-01  Geert Bosch  <bosch@adacore.com>
7508
7509         * cstand.adb: Fix comments.
7510         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7511         count of arguments.
7512
7513 2011-08-01  Robert Dewar  <dewar@adacore.com>
7514
7515         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7516
7517 2011-08-01  Geert Bosch  <bosch@adacore.com>
7518
7519         * atree.ads: Fix comment.
7520
7521 2011-08-01  Robert Dewar  <dewar@adacore.com>
7522
7523         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7524         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7525         * par.adb: Add with for Namet.Sp.
7526         * par-tchk.adb: Minor reformatting.
7527
7528 2011-08-01  Vincent Celier  <celier@adacore.com>
7529
7530         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7531         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7532         of the init procedure of a SAL.
7533         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7534         New procedure.
7535
7536 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7537
7538         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7539         reformatting.
7540
7541 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7542
7543         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7544
7545 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7546
7547         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7548         conformant with its spec (return True only for types that have
7549         an overriding Initialize primitive operation that prevents them from
7550         having preelaborable initialization).
7551         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7552         initialization for controlled types in Ada 2005 or later mode.
7553
7554 2011-08-01  Robert Dewar  <dewar@adacore.com>
7555
7556         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7557         Postcondition.
7558         (Same_Aspect): New function.
7559         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7560         Type_Invariant, Precondition, Postcondition.
7561         * snames.ads-tmpl: Add Name_Type_Invariant.
7562
7563 2011-08-01  Robert Dewar  <dewar@adacore.com>
7564
7565         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7566         here.
7567         (Freeze_All_Ent): Fix error in handling inherited aspects.
7568         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7569         already analyzed, but don't skip entire processing of a declaration,
7570         that's wrong in some cases of declarations being rewritten.
7571         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7572         Don't delay for integer, string literals
7573         Treat predicates in usual manner for delay, remove special case code,
7574         not needed.
7575         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7576         (Build_Predicate_Function): Update saved expression in aspect
7577         (Build_Invariant_Procedure): Update saved expression in aspect
7578         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7579         of replacement of discriminant references if the reference is simple.
7580
7581 2011-08-01  Robert Dewar  <dewar@adacore.com>
7582
7583         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7584         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7585         Static_Predicate and Dynamic_Predicate.
7586         (Build_Predicate_Function): Add processing for Static_Predicate
7587         and Dynamic_Predicate.
7588         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7589         (From_Static_Predicate): New flag
7590         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7591
7592 2011-08-01  Robert Dewar  <dewar@adacore.com>
7593
7594         * usage.adb: Documentation cleanup for Ada version modes in usage.
7595         * expander.adb: Minor reformatting.
7596
7597 2011-08-01  Robert Dewar  <dewar@adacore.com>
7598
7599         * atree.ads: Minor comment fix.
7600         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7601         a-witeio.ads, sem_prag.adb: Minor reformatting.
7602
7603 2011-08-01  Doug Rupp  <rupp@adacore.com>
7604
7605         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7606         pointers. Use descrip.h header file for convenience. Add some
7607         comments.
7608
7609 2011-08-01  Robert Dewar  <dewar@adacore.com>
7610
7611         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7612         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7613         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7614         New procedure.
7615         (Check_Aspect_At_End_Of_Declarations): New procedure
7616         (Analye_Aspect_Specification): Minor changes for above procedures
7617         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7618         specification node as well.
7619
7620 2011-08-01  Pascal Obry  <obry@adacore.com>
7621
7622         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7623         Windows files. Use GetFilesAttributes() in this case to check for file
7624         existence instead of returning with an error code.
7625
7626 2011-08-01  Vincent Celier  <celier@adacore.com>
7627
7628         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7629         High is above Source length.
7630
7631 2011-08-01  Robert Dewar  <dewar@adacore.com>
7632
7633         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7634
7635 2011-08-01  Robert Dewar  <dewar@adacore.com>
7636
7637         * aspects.ads (Boolean_Aspects): New subtype.
7638         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7639         for derived types in cases where the parent type and derived type have
7640         aspects.
7641         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7642         with aspects when parent type also has aspects.
7643         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7644         boolean expression at this point).
7645         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7646         accordance with final decision on the Ada 2012 feature.
7647         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7648
7649 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7650
7651         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7652
7653 2011-08-01  Pascal Obry  <obry@adacore.com>
7654
7655         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7656         Fix Replace_Slice when High is above current string size.
7657         (Replace_Slice): Fix DL computation when High is above current
7658         string length.
7659
7660 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7661
7662         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7663
7664 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7665
7666         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7667         of node.
7668
7669 2011-08-01  Pascal Obry  <obry@adacore.com>
7670
7671         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7672         reformatting.
7673
7674 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7675
7676         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7677         access to protected subprograms in generic bodies.
7678         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7679         protected type, indicate that the convention of the subprogram is
7680         Convention_Protected, because it may be used in subsequent declarations
7681         within the protected declaration.
7682
7683 2011-08-01  Vincent Celier  <celier@adacore.com>
7684
7685         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7686         and "final" procedures when the name of the library is "ada", to avoid
7687         duplicate symbols "adainit" and "adafinal" in executables.
7688
7689 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7690
7691         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7692         quantified expression that appears within a postcondition and uses the
7693         Ada2012 'Result attribute.
7694
7695 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7696
7697         * init.c (__gnat_error_handler): Cast reason to int.
7698         (__gnat_install_handler): Explain sa_sigaction use.
7699
7700 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7701
7702         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7703         subprogram has copy-in copy-out parameters, try to promote the mode of
7704         the return type if it is passed in registers.
7705
7706 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7707
7708         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7709         left operand as addressable.
7710
7711 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7712
7713         * gcc-interface/gigi.h (build_function_stub): Remove.
7714         (build_return_expr): Likewise.
7715         (convert_vms_descriptor): Declare.
7716         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7717         (build_function_stub): Move to...
7718         * gcc-interface/utils2.c (build_return_expr): Move to...
7719         * gcc-interface/trans.c (build_function_stub): ...here.
7720         (build_return_expr): ...here.
7721         (Subprogram_Body_to_gnu): Add local variable for language_function.
7722         Disconnect the parameter attributes cache, if any, once done with it.
7723         Call end_subprog_body only after setting the end_locus.
7724         Build the stub associated with the function, if any, at the very end.
7725         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7726         variables and streamline control flow.
7727
7728 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
7729
7730         PR ada/49819
7731         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7732         g-trasym-dwarf.adb.
7733
7734 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7735
7736         PR bootstrap/49794
7737         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7738         Assign to act.sa_sigaction.
7739         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7740         current->return_address to char * before arithmetic.
7741
7742 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7743
7744         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7745         Correct argument types.
7746         Extract code from reason.
7747         (__gnat_install_handler): Assign to act.sa_sigaction.
7748
7749 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
7750
7751         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7752         (GNAT1_OBJS): ...here.
7753
7754 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
7755
7756         PR ada/48711
7757         * g-socthi-mingw.adb (Fill): Fix formatting.
7758
7759         * gcc-interface/gigi.h: Move around comment.
7760
7761 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7762
7763         PR ada/46350
7764         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7765
7766 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
7767
7768         PR ada/48711
7769         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7770
7771 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
7772
7773         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7774         range comparison if Pmode is SImode.
7775
7776 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
7777             Eric Botcazou  <ebotcazou@adacore.com>
7778
7779         * adadecode.c: Wrap up in extern "C" block.
7780         * adadecode.h: Likewise.
7781         * adaint.c: Likewise.  Remove 'const' keyword.
7782         * adaint.h: Likewise.
7783         * argv.c: Likewise.
7784         * atree.h: Likewise.
7785         * cio.c: Likewise.
7786         * cstreams.c: Likewise.
7787         * env.c: Likewise.
7788         * exit.c: Likewise.
7789         * fe.h: Likewise.
7790         * final.c: Likewise.
7791         * init.c: Likewise.
7792         * initialize.c: Likewise.
7793         * link.c: Likewise.
7794         * namet.h: Likewise.
7795         * nlists.h: Likewise.
7796         * raise.c: Likewise.
7797         * raise.h: Likewise.
7798         * repinfo.h: Likewise.
7799         * seh_init.c: Likewise.
7800         * targext.c: Likewise.
7801         * tracebak.c: Likewise.
7802         * uintp.h: Likewise.
7803         * urealp.h: Likewise.
7804         * xeinfo.adb: Wrap up generated C code in extern "C" block.
7805         * xsinfo.adb: Likewise.
7806         * xsnamest.adb: Likewise.
7807         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7808         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7809         * gcc-interface/misc.c: Likewise.
7810         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7811         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
7812         ada/targext.o here...
7813         (GNAT_ADA_OBJS): ...and not here.
7814         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7815         (GNATBIND_OBJS): Reorder.
7816
7817 2011-07-07  Richard Henderson  <rth@redhat.com>
7818
7819         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7820         dwarf2out_frame_init.
7821
7822 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
7823
7824         * gcc-interface/misc.c (gnat_init): Tweak previous change.
7825
7826 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7827
7828         PR target/39150
7829         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7830
7831 2011-07-06  Richard Guenther  <rguenther@suse.de>
7832
7833         * gcc-interface/misc.c (gnat_init): Merge calls to
7834         build_common_tree_nodes and build_common_tree_nodes_2.
7835         Re-initialize boolean_false_node.
7836
7837 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
7838             Olivier Hainque  <hainque@adacore.com>
7839             Nicolas Setton  <setton@adacore.com>
7840
7841         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7842         the type according to the ARTIFICIAL_P parameter.
7843         (create_type_decl): Likewise.
7844         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7845
7846 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
7847
7848         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7849         (gnatbind): Likewise.
7850
7851 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7852
7853         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7854
7855 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7856
7857         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7858         local variable throughout.  Remove useless call to Base_Type.
7859         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7860         Take it also into account for the volatileness of the field.  Set the
7861         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
7862
7863 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7864
7865         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7866         on a dereference built for a by-ref object if it has an address clause.
7867
7868 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7869
7870         * einfo.ads (Address_Taken): Document use for the second argument of
7871         Asm_Input and Asm_Output attributes.
7872         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7873         argument is an entity name, then set Address_Taken on it.
7874         <Attribute_Asm_Output>: Likewise.
7875         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7876         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7877         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7878         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7879
7880 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
7881
7882         PR middle-end/46500
7883         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7884
7885 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
7886
7887         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7888         (ada/utils.o): Update dependencies.
7889         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7890         ../../../libcpp/libcpp.a.
7891         * gcc-interface/utils.c: Include common/common-target.h.
7892         (process_attributes): Use targetm_common.have_named_sections.
7893
7894 2011-06-07  Richard Guenther  <rguenther@suse.de>
7895
7896         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7897         set_sizetype.
7898
7899 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7900
7901         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7902         TREE_THIS_NOTRAP flag.
7903
7904 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7905
7906         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7907         Fix thinko.
7908
7909 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7910
7911         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7912         constants whose full view has discriminants specially.
7913
7914 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7915
7916         * gcc-interface/utils.c: Include diagnostic.h.
7917         (gnat_write_global_declarations): Output debug information for all
7918         global type declarations before finalizing the compilation unit.
7919         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7920
7921 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
7922
7923         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7924
7925 2011-05-25  Kai Tietz  <ktietz@redhat.com>
7926
7927         * adaint.c (__gnat_to_canonical_file_list_next): Use array
7928         initialization instead of const/none-const pointer assignment.
7929
7930 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
7931
7932         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7933         $(EXTRA_GNAT1_OBJS).
7934         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7935         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7936         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7937         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7938         libcommon-target.a instead of prefix.o.
7939
7940 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
7941
7942         PR ada/49097
7943         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7944
7945 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
7946
7947         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7948         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7949         instead of version.o.
7950
7951 2011-05-18  Kai Tietz <ktietz@redhat.com>
7952
7953         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7954         boolean_false_node instead of integer_zero_node.
7955         (convert_with_check): Likewise.
7956         * gcc-interface/decl.c (choices_to_gnu): Likewise.
7957
7958 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
7959
7960         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7961         type of the parameter is an unconstrained array, convert the actual to
7962         the type of the formal in the In Out and Out cases as well.
7963
7964 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
7965
7966         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7967         call build_function_type_array or build_varargs_function_type_array
7968         instead.
7969         (create_subprog_type): Don't call build_function_type; call
7970         build_function_type_vec instead.
7971
7972 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
7973
7974         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7975         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7976         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7977
7978 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
7979
7980         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7981
7982         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7983         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7984
7985 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
7986
7987         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7988
7989 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
7990
7991         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7992         instead of accessing TYPE_ARG_TYPES directly.
7993         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7994
7995 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
7996
7997         PR ada/48844
7998         * gcc-interface/gigi.h (get_variant_part): Declare.
7999         * gcc-interface/decl.c (get_variant_part): Make global.
8000         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8001         types have the same constant size, are record types and T1 has a
8002         variant part while T2 doesn't.
8003
8004 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
8005
8006         * gcc-interface/utils.c (begin_subprog_body): Do not call
8007         get_pending_sizes.
8008         (end_subprog_body): Likewise.
8009
8010 2011-05-04  Richard Guenther  <rguenther@suse.de>
8011
8012         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8013         int_const_binop.
8014         (pos_to_constructor): Likewise.
8015
8016 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
8017             Eric Botcazou  <ebotcazou@adacore.com>
8018
8019         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8020         of build_function_type.  Adjust calls to...
8021         (build_raise_check): ...this.  Do not take a void_tree parameter.
8022         Call build_function_type_list instead of build_function_type.
8023         Fix head comment and swap couple of conditional blocks.
8024
8025 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
8026
8027         * gnatvsn.ads (Library_Version): Bump to 4.7.
8028         (Current_Year): Bump to 2011.
8029
8030 2011-04-29  Michael Matz  <matz@suse.de>
8031
8032         * gcc-interface/misc.c (gnat_handle_option): Set
8033         warn_maybe_uninitialized.
8034
8035 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
8036
8037         * gnat_ugn.texi (Complexity Metrics Control): Update link to
8038         the Watson/McCabe paper.
8039
8040 2011-04-23  Jim Meyering  <meyering@redhat.com>
8041
8042         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8043
8044 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8045
8046         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8047         onto the new type.
8048
8049 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8050
8051         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8052         parameter.
8053         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
8054         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8055         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8056         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8057         <all>: Do not set flags on the reused DECL node coming from an alias.
8058         Set DECL_IGNORED_P on the DECL node built for subprograms if they
8059         don't need debug info here...
8060         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8061         (gigi): Adjust calls to create_subprog_decl.
8062         (build_raise_check): Likewise.
8063         (establish_gnat_vms_condition_handler): Likewise.
8064         (Compilation_Unit_to_gnu): Likewise.
8065         (gnat_to_gnu): Likewise.
8066
8067 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
8068
8069         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8070         (NO_REORDER_ADAFLAGS): New variable.
8071         (EXTRA_GNATTOOLS): Always define.
8072         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8073         Clean up and adjust list of files compiled with special options.
8074         * gcc-interface/Make-lang.in: Likewise.
8075         (ada/decl.o): Cosmetical change.
8076         (ada/misc.o): Remove dependency on $(PLUGIN_H).
8077
8078 2011-04-20  Jim Meyering  <meyering@redhat.com>
8079
8080         * initialize.c (__gnat_initialize): Remove useless if-before-free.
8081
8082 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8083
8084         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8085         $(CFLAGS) on the link line.
8086
8087 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8088
8089         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8090         padded type built for the return type if it is unconstrained.
8091
8092 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
8093
8094         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8095
8096 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
8097
8098         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8099         before calling TREE_CHAIN.
8100         * gcc-interface/misc.c (gnat_init_ts): New function.
8101         (LANG_HOOKS_INIT_TS): Define.
8102
8103 2011-04-12  Martin Jambor  <mjambor@suse.cz>
8104
8105         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8106         instead of cgraph_node.
8107
8108 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8109
8110         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8111         alignment on fields of the RETURN type built for the Copy-In Copy-Out
8112         mechanism.
8113
8114 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8115
8116         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8117         of aggregate types that contain a placeholder.
8118
8119 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
8120
8121         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8122         TYPE_ARG_TYPES.
8123         (handle_type_generic_attribute): Likewise.
8124
8125 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
8126
8127         PR ada/47163
8128         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8129
8130 2011-04-04  Kai Tietz  <ktietz@redhat.com>
8131
8132         PR ada/47163
8133         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8134         to flag value.
8135
8136 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8137
8138         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8139         type case, do not strip a padding type around the array type.
8140
8141 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8142
8143         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8144         types.
8145
8146 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8147
8148         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8149         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8150         code for -feliminate-unused-debug-types.
8151         (gnat_post_options): Likewise.
8152
8153 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8154
8155         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8156         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8157         distinct copy.
8158
8159 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8160
8161         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8162         DECL_ARTIFICIAL flag on enumeration types.
8163
8164 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8165
8166         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8167         fat pointer types artificial unconditionally.
8168         <E_Array_Subtype>: Attach the base array type as a parallel type if it
8169         isn't artificial.
8170
8171 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8172
8173         * gcc-interface/gigi.h (get_dummy_type): Declare.
8174         (build_dummy_unc_pointer_types): Likewise.
8175         (finish_fat_pointer_type): Likewise.
8176         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8177         fat pointer type has been built, complete it in place.
8178         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8179         and thin pointers.  Remove useless variable.
8180         (finish_fat_pointer_type): Make global and move to...
8181         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8182         (get_dummy_type): New function.
8183         (build_dummy_unc_pointer_types): Likewise.
8184         (gnat_pushdecl): Propage the name to the anonymous variants only.
8185         (update_pointer_to): Only adjust the pointer types in the unconstrained
8186         array case.
8187
8188 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8189
8190         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8191         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8192         if this is a Taft amendment type and the full declaration is available.
8193         * gcc-interface/trans.c (process_type): Likewise.
8194         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8195         (process_freeze_entity): Likewise.
8196         * gcc-interface/utils.c (dummy_global): New static variable.
8197         (gnat_write_global_declarations): If there are types declared as used
8198         at the global level, insert them in the global hash table.
8199
8200 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8201
8202         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8203         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8204         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8205         copy.
8206         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
8207         flag of the type accordingly.
8208         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8209
8210 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8211
8212         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8213         finalizing types when updating the pointers to the designated type.
8214         <all>: Finalize the deferred types even if we didn't defer processing
8215         of incomplete types in this invocation.
8216
8217 2011-04-01  Olivier Hainque  <hainque@adacore.com>
8218             Nicolas Setton  <setton@adacore.com>
8219             Eric Botcazou  <ebotcazou@adacore.com>
8220
8221         * gcc-interface/misc.c (gnat_descriptive_type): New function.
8222         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8223
8224 2011-03-28  Kai Tietz  <ktietz@redhat.com>
8225
8226         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8227         Windows targets.
8228         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8229         * system-mingw.ads (System): Change ZCX_By_Default default to True.
8230
8231         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8232
8233 2011-03-28  Tristan Gingold  <gingold@adacore.com>
8234
8235         PR ada/44431
8236         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8237         Use ada output of gnatbind.
8238         (ada/b_gnatb.adb): Ditto.
8239         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8240         (ada.mostlyclean, ada.stage1)
8241         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8242         (ada.stagefeedback): Adjust.
8243         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8244         Use ada output of gnatbind.
8245         (b_gnatm.adb): Ditto.
8246         (b_gnatl.o, b_gnatm.o): New rules.
8247
8248 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8249
8250         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8251         for the padded type built to support a specified size or alignment.
8252
8253 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8254
8255         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8256         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8257         unconditionally to the end of the unit when the designated type is
8258         limited_with'ed.
8259         <all>: Rename local variable.  Attempt to un-defer types only and do it
8260         for limited_with'ed types as well.
8261         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
8262         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8263         consistently and remove redundant call to finalize_from_with_types.
8264
8265 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8266
8267         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8268         subprograms without a previous spec declared in the same unit.
8269         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8270         subprograms at the end of the unit instead of at the beginning.
8271         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8272         isn't public for the special handling of non-inline functions nested
8273         inside inline external functions.
8274
8275 2011-03-25  Jeff Law  <law@redhat.com>
8276
8277         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8278
8279 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
8280
8281         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8282         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8283         to compute Set_Size_Depends_On_Discriminant.
8284         (Layout_Type): Call it on array types in back-end layout mode.
8285         * sem_util.adb (Requires_Transient_Scope): Return true for array
8286         types only if the size depends on the value of discriminants.
8287         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8288         type if the RHS is a call to a function that returns an unconstrained
8289         type with default discriminant.
8290
8291 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
8292
8293         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8294         non-conversion to the nominal result type at the end.
8295
8296 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8297
8298         * gcc-interface/trans.c (create_temporary): New function taken from...
8299         (create_init_temporary): ...here.  Call it.
8300         (call_to_gnu): Create the temporary for the return value early, if any.
8301         Create it for a function with copy-in/copy-out parameters if there is
8302         no target; in other cases of copy-in/copy-out, use another temporary.
8303         Push the new binding level lazily.  Add and rename local variables.
8304
8305 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8306
8307         * gcc-interface/decl.c (validate_size): Improve comments and tweak
8308         error message.
8309         (set_rm_size): Likewise.
8310
8311 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8312
8313         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8314         for the padded type built in order to support a specified alignment.
8315         Fix incorrect formatting.
8316
8317 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8318
8319         PR bootstrap/48216
8320         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8321
8322 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8323
8324         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8325         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8326         to the end of the list.  Adjust recursive call.  Rename local variable.
8327         If REORDER is true, reorder components of the record type.
8328         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8329         components_to_record and adjust the parameter list.
8330
8331 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8332
8333         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8334         disabled, use the variable for bounds of loop iteration scheme.
8335
8336 2011-03-21  Kai Tietz  <ktietz@redhat.com>
8337
8338         PR target/12171
8339         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8340
8341 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8342
8343         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8344         out whether the expression is read-only.  Short-circuit placeholder
8345         case and rename a couple of local variables.
8346
8347 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8348
8349         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8350         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8351         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8352         (convert): Deal with conversions from a smaller form type specially.
8353
8354 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
8355
8356         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8357         its argument, except for the special -I- switch.
8358
8359 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
8360
8361         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8362         "Ada Issues".
8363
8364 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
8365
8366         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8367
8368 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
8369
8370         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8371         GNAT_FORMAL.
8372         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8373         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
8374         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
8375         Do not generate the check directly, instead instantiate the template
8376         check present in the descriptor.
8377         (make_descriptor_field): Move around.
8378         (build_vms_descriptor32): Build a template check in the POINTER field.
8379         (build_vms_descriptor): Remove useless suffixes.
8380         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8381
8382 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
8383
8384         PR bootstrap/47467
8385         * targext.c: Include target files if IN_RTS is defined.
8386
8387 2011-01-26  Richard Guenther  <rguenther@suse.de>
8388
8389         PR bootstrap/47467
8390         * targext.c: Include config.h.
8391         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8392         dependency.
8393
8394 2011-01-04  Pascal Obry  <obry@adacore.com>
8395             Eric Botcazou  <ebotcazou@adacore.com>
8396
8397         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8398
8399 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8400
8401         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8402         end-of-case on the end label and its associated gotos, if any.
8403
8404 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8405
8406         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8407         expressions of the parameter cache within the statement group of
8408         the CICO mechanism.
8409
8410 2011-01-04  Olivier Hainque  <hainque@adacore.com>
8411             Eric Botcazou  <ebotcazou@adacore.com>
8412
8413         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8414         (set_end_locus_from_node): New function.
8415         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8416         make and the function end_locus.
8417         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8418         for the elaboration subprogram.
8419         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8420         set the end_locus of the expression as well.
8421
8422 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8423
8424         PR ada/47131
8425         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8426         variables that are referenced in exception handlers volatile.
8427
8428
8429 \f
8430 Copyright (C) 2011 Free Software Foundation, Inc.
8431
8432 Copying and distribution of this file, with or without modification,
8433 are permitted in any medium without royalty provided the copyright
8434 notice and this notice are preserved.
8435
8436         * gnat_rm.texi: Ramification of pragma Eliminate documentation
8437          - fix bugs in the description of Source_Trace;
8438          - get rid of UNIT_NAME;
8439
8440 2011-08-02  Javier Miranda  <miranda@adacore.com>
8441
8442         * exp_ch9.adb
8443         (Build_Dispatching_Requeue): Adding support for VM targets
8444         since we cannot directly reference the Tag entity.
8445         * exp_sel.adb (Build_K): Adding support for VM targets.
8446         (Build_S_Assignment): Adding support for VM targets.
8447         * exp_disp.adb
8448         (Default_Prim_Op_Position): In VM targets do not restrict availability
8449         of predefined interface primitives to compiling in Ada 2005 mode.
8450         (Is_Predefined_Interface_Primitive): In VM targets this service is not
8451         restricted to compiling in Ada 2005 mode.
8452         (Make_VM_TSD): Generate code that declares and initializes the OSD
8453         record. Needed to support dispatching calls through synchronized
8454         interfaces.
8455         * exp_ch3.adb
8456         (Make_Predefined_Primitive_Specs): Enable generation of predefined
8457         primitives associated with synchronized interfaces.
8458         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8459         primitives associated with synchronized interfaces.
8460
8461 2011-08-02  Yannick Moy  <moy@adacore.com>
8462
8463         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8464         statements hidden in SPARK if preceded by the HIDE directive
8465         (Parse_Exception_Handlers): mark each exception handler in a sequence of
8466         exception handlers as hidden in SPARK if preceded by the HIDE directive
8467         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8468         if starting with the HIDE directive
8469         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8470         starting with the HIDE directive; mark the declarations in a private
8471         part as hidden in SPARK if the private part starts with the HIDE
8472         directive
8473         * restrict.adb, restrict.ads
8474         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8475         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8476         argument node belongs to a part which is hidden in SPARK
8477         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8478         parts in SPARK; protect the possibly costly call to
8479         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8480         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8481         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8482         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8483         Tok_SPARK_Hide.
8484         (Scan): recognize special comment starting with '#' and followed by
8485         SPARK keyword "hide" as a HIDE directive.
8486
8487 2011-08-02  Yannick Moy  <moy@adacore.com>
8488
8489         * types.ads, erroutc.ads: Minor reformatting.
8490
8491 2011-08-02  Vincent Celier  <celier@adacore.com>
8492
8493         * link.c: Add response file support for cross platforms.
8494
8495 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8496
8497         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8498         in an association, set parent field of copy before partial analysis.
8499         * sem_res.adb (Resolve_Slice): create reference to itype only when
8500         expansion is enabled.
8501
8502 2011-08-02  Yannick Moy  <moy@adacore.com>
8503
8504         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8505         for new flag denoting which subprogram bodies are in ALFA
8506         * restrict.adb, sem_ch7.adb: Update comment
8507         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8508         sem_ch9.adb, sem_res.adb: Add calls to
8509         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8510         * sem_ch6.adb (Analyze_Function_Return): add calls to
8511         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8512         middle of the body, and extended return.
8513         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8514         False when missing return.
8515         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8516         to True for subprograms whose spec is in ALFA. Remove later on the flag
8517         on the entity used for a subprogram body when there exists a separate
8518         declaration.
8519         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8520         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8521         False, otherwise do nothing.
8522
8523 2011-08-02  Robert Dewar  <dewar@adacore.com>
8524
8525         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8526
8527 2011-08-02  Yannick Moy  <moy@adacore.com>
8528
8529         * sem_ch4.ads: minor formatting.
8530
8531 2011-08-02  Yannick Moy  <moy@adacore.com>
8532
8533         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8534         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8535         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8536         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8537         opt.ads: cleanup of SPARK mode
8538
8539 2011-08-02  Yannick Moy  <moy@adacore.com>
8540
8541         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8542         types.
8543         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8544         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8545         * sem_ch3.adb
8546         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8547         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8548         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8549         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8550         types.
8551         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8552         non-static range.
8553         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8554         functions whose return type is not in ALFA.
8555         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8556         specifications.
8557         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8558         parameter's type is not in ALFA.
8559         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8560         types are in ALFA.
8561
8562 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8563
8564         * sem_ch6 (Analyze_Expression_Function): treat the function as
8565         Inline_Always, and introduce a subprogram declaration for it when it is
8566         not a completion.
8567         * inline.adb (Add_Inlined_Body): recognize bodies that come from
8568         expression functions, so that the back-end can determine whether they
8569         can in fact be inlined.
8570         * sem_util.adb (Is_Expression_Function): predicate to determine whether
8571         a function body comes from an expression function.
8572
8573 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8574
8575         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8576         null exclusions to test Can_Never_Be_Null on the anonymous access types
8577         of the formals rather than testing the formals themselves. Exclude this
8578         check in cases where the Old_Formal is marked as a controlling formal,
8579         to avoid issuing spurious errors for bodies completing dispatching
8580         operations (due to the flag not getting set on controlling access
8581         formals in body specs).
8582         (Find_Corresponding_Spec): When checking full and subtype conformance of
8583         subprogram bodies in instances, pass Designated and E in that order, for
8584         consistency with the expected order of the formals (New_Id followed by
8585         Old_Id).
8586
8587 2011-08-02  Robert Dewar  <dewar@adacore.com>
8588
8589         * sem_ch8.adb: Minor reformatting.
8590
8591 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8592
8593         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8594         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8595         primitive operations of class-wide actuals.
8596
8597 2011-08-02  Javier Miranda  <miranda@adacore.com>
8598
8599         * exp_atag.ads, exp_atag.adb
8600         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8601         since its value is implicitly passed in argument Typ.
8602         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8603         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8604         Build_Common_Dispatching_Select_Statements.
8605
8606 2011-08-02  Robert Dewar  <dewar@adacore.com>
8607
8608         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8609         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8610         Minor reformatting.
8611
8612 2011-08-02  Robert Dewar  <dewar@adacore.com>
8613
8614         * sem_res.adb: Minor reformatting.
8615         * sem_prag.adb: Minor reformatting.
8616
8617 2011-08-02  Javier Miranda  <miranda@adacore.com>
8618
8619         * exp_atag.adb, exp_atags.ads
8620         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8621         by the tagged type Entity. Required to use this routine in the VM
8622         targets since we do not have available the Tag entity in the VM
8623         platforms.
8624         * exp_ch6.adb
8625         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8626         Ada.Tags has not been previously loaded.
8627         * exp_ch7.adb
8628         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8629         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8630         * sem_aux.adb
8631         (Enclosing_Dynamic_Scope): Add missing support to handle the full
8632         view of enclosing scopes. Required to handle enclosing scopes that
8633         are synchronized types whose full view is a task type.
8634         * exp_disp.adb
8635         (Build_VM_TSDs): Minor code improvement to avoid generating and
8636         analyzing lists with empty nodes.
8637         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8638         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8639         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8640         (Make_Disp_Timed_Select_Body): Add support for VM targets.
8641         (Make_Select_Specific_Data_Table): Add support for VM targets.
8642         (Make_VM_TSD): Generate code to initialize the SSD structure of
8643         the TSD.
8644
8645 2011-08-02  Yannick Moy  <moy@adacore.com>
8646
8647         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8648         cross-references section in ALI.
8649         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8650         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8651         Sub).
8652         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8653         subprogram or package entity of a node
8654         (Is_Local_Reference_Type): new function returns True for references
8655         selected in local cross-references.
8656         (Lt): function extracted from Lt in Output_References
8657         (Write_Entity_Name): function extracted from Output_References
8658         (Generate_Definition): generate reference with type 'D' for definition
8659         of objects (object declaration and parameter specification), with
8660         appropriate locations and units, for use in local cross-references.
8661         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8662         references of type 'I' for initialization in object definition.
8663         (Output_References): move part of function Lt and procedure
8664         Write_Entity_Name outside of the body. Ignore references of types 'D'
8665         and 'I' introduced for local cross-references.
8666         (Output_Local_References): new procedure to output the local
8667         cross-references sections.
8668         (Lref_Entity_Status): new array defining whether an entity is a local
8669         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8670         with 'I' type when initialization expression is present.
8671         * get_scos.adb, get_scos.ads: Correct comments and typos
8672
8673 2011-08-02  Javier Miranda  <miranda@adacore.com>
8674
8675         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8676         the JVM target.
8677         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8678         the JVM target.
8679         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8680         TSD support.
8681
8682 2011-08-02  Vincent Celier  <celier@adacore.com>
8683
8684         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8685         (No_Space_Img): New function
8686         (Find_Excluded_Sources): When reading from a file, record the file name
8687         and the line number for each excluded source.
8688         (Mark_Excluded_Sources): When reporting an error, if the excluded
8689         sources were read from a file, include file name and line number in
8690         the error message.
8691
8692 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8693
8694         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8695
8696 2011-08-02  Robert Dewar  <dewar@adacore.com>
8697
8698         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8699
8700 2011-08-02  Javier Miranda  <miranda@adacore.com>
8701
8702         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8703         generation of TSDs to the DOTNET compiler.
8704         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8705         generation of TSDs to the DOTNET compiler.
8706
8707 2011-08-02  Javier Miranda  <miranda@adacore.com>
8708
8709         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8710         record of all the tagged types declared inside library level package
8711         declarations, library level package bodies or library level subprograms.
8712         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8713         associated with a given tagged type.
8714         (Build_VM_TSDs): New subprogram.
8715         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8716         compilation units that are subprograms.
8717         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8718         compilation units that are package bodies.
8719         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8720         units that are a package declaration or a package instantiation.
8721         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8722         reorganization to improve the error generated by the frontend when the
8723         function Ada.Tags.Secondary_Tag is not available.
8724         * rtsfind.ads (RE_Register_TSD): New runtime entity.
8725         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8726
8727 2011-08-02  Javier Miranda  <miranda@adacore.com>
8728
8729         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8730
8731 2011-08-02  Robert Dewar  <dewar@adacore.com>
8732
8733         * s-imenne.ads: Minor reformatting.
8734
8735 2011-08-02  Robert Dewar  <dewar@adacore.com>
8736
8737         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8738         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8739         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8740
8741 2011-08-02  Robert Dewar  <dewar@adacore.com>
8742
8743         * einfo.ads (Materialize_Entity): Document this is only for renamings
8744         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8745         required debug information in the case where we transform the object
8746         declaration into a renaming declaration.
8747         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8748         object
8749         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8750         Materialize_Entity.
8751
8752 2011-08-02  Robert Dewar  <dewar@adacore.com>
8753
8754         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8755         Suppress_Init_Procs.
8756         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8757         Suppress_Initialization/Initialization_Suppressed.
8758         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8759         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8760         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8761         * sem_prag.adb: New processing for pragma Suppress_Initialization.
8762
8763 2011-08-02  Robert Dewar  <dewar@adacore.com>
8764
8765         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8766         Minor reformatting.
8767
8768 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8769
8770         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8771         only have inheritable classwide pre/postconditions.
8772
8773 2011-08-02  Javier Miranda  <miranda@adacore.com>
8774
8775         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8776         * rtsfind.ads (RE_Check_TSD): New runtime entity.
8777         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8778         checks if the external tag of a type is the same as the external tag
8779         of some other declaration.
8780
8781 2011-08-02  Thomas Quinot  <quinot@adacore.com>
8782
8783         * s-taskin.ads: Minor reformatting.
8784
8785 2011-08-02  Emmanuel Briot  <briot@adacore.com>
8786
8787         * g-comlin.adb (Display_Help): swap the order in which it prints the
8788         short help and the general usage.
8789
8790 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8791
8792         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8793         the aspect declarations and attach them to the generic copy for
8794         subsequent analysis.
8795         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8796         declarations of the generic tree to the new subprogram declarations.
8797         * sem_attr.adb (Check_Precondition_Postcondition): recognize
8798         conditions that apply to a subprogram instance.
8799
8800 2011-08-02  Robert Dewar  <dewar@adacore.com>
8801
8802         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8803
8804 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8805
8806         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8807         private type with a tagged full view is not derived in the immediate
8808         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8809
8810 2011-08-02  Robert Dewar  <dewar@adacore.com>
8811
8812         * exp_ch4.adb: Minor reformatting.
8813
8814 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8815
8816         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
8817         Ada2012 iterator, the loop will be rewritten during expansion into a
8818         while loop with a cursor and an element declaration. Do not analyze the
8819         body in this case, because if the container is for indefinite types the
8820         actual subtype of the elements will only be determined when the cursor
8821         declaration is analyzed.
8822
8823 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8824
8825         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8826         size/alignment related attributes in CodePeer_Mode.
8827
8828 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8829
8830         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8831         Prepend_Element, since this can result in the operation getting the
8832         wrong slot in the full type's dispatch table if the full type has
8833         inherited operations. The incomplete type's operation will get added
8834         to the proper position in the full type's primitives
8835         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8836         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8837         dispatching operations, since there are cases where nonprimitive
8838         subprograms can get added to the list of incomplete dependents (such
8839         as subprograms in nested packages).
8840         * sem_ch6.adb (Process_Formals): First, remove test for being in a
8841         private part when determining whether to add a primitive with a
8842         parameter of a tagged incomplete type to the Private_Dependents list.
8843         Such primitives can also occur in the visible part, and should not have
8844         been excluded from being private dependents.
8845         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8846         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8847         list of a Taft-amendment incomplete type is a primitive before issuing
8848         an error that the full type must appear in the same unit. There are
8849         cases where nonprimitives can be in the list (such as subprograms in
8850         nested packages).
8851         * sem_disp.adb (Derives_From): Use correct condition for checking that
8852         a formal's type is derived from the type of the corresponding formal in
8853         the parent subprogram (the condition was completely wrong). Add
8854         checking that was missing for controlling result types being derived
8855         from the result type of the parent operation.
8856
8857 2011-08-02  Yannick Moy  <moy@adacore.com>
8858
8859         * errout.adb (First_Node): minor renaming
8860         * restrict.adb (Check_Formal_Restriction): put restriction warning on
8861         first node.
8862
8863 2011-08-02  Yannick Moy  <moy@adacore.com>
8864
8865         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8866         before accessing operands.
8867         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8868         decide whether an initialization expression respects SPARK rules, as
8869         the plain node is the expanded one. This allows for more valid warnings
8870         to be issued.
8871         * gnat_rm.texi: Minor update.
8872
8873 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8874
8875         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8876         previous change.
8877
8878 2011-08-02  Robert Dewar  <dewar@adacore.com>
8879
8880         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8881
8882 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8883
8884         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8885         loop statements and the element renaming declaration with a block when
8886         the element type is controlled.
8887
8888 2011-08-02  Yannick Moy  <moy@adacore.com>
8889
8890         * sinfo.ads: Minor formatting.
8891
8892 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8893
8894         * sem_aggr.adb (Add_Association): if the association has a box and no
8895         expression, use the Sloc of the aggregate itself for the new
8896         association.
8897         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8898         the Original_Node.
8899
8900 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8901
8902         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8903         When a container is provided via a function call, generate a renaming
8904         of the function result. This avoids the creation of a transient scope
8905         and the premature finalization of the container.
8906         * exp_ch7.adb (Is_Container_Cursor): Removed.
8907         (Wrap_Transient_Declaration): Remove the supression of the finalization
8908         of the list controller when the declaration denotes a container cursor,
8909         it is not needed.
8910
8911 2011-08-02  Yannick Moy  <moy@adacore.com>
8912
8913         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8914         node is from source, instead of the original node being from source.
8915         * sem_aggr.adb
8916         (Resolve_Array_Aggregate): refine the check for a static expression, to
8917         recognize also static ranges
8918         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8919         Array_Type_Declaration): postpone the test for the type being a subtype
8920         mark after the type has been resolved, so that component-selection and
8921         expanded-name are discriminated.
8922         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8923         to distinguish the case of an iteration scheme, so that an error is
8924         issed on a non-static range in SPARK except in an iteration scheme.
8925         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8926         In_Iter_Schm = True.
8927         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8928         user-defined operators so that they are allowed in renaming
8929         * sem_ch8.adb
8930         (Find_Selected_Component): refine the check for prefixing of operators
8931         so that they are allowed in renaming. Move the checks for restrictions
8932         on selector name after analysis discriminated between
8933         component-selection and expanded-name.
8934         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8935         concatenation argument of string type if it is static.
8936         * sem_util.adb, sem_util.ads
8937         (Check_Later_Vs_Basic_Declarations): add a new function
8938         Is_Later_Declarative_Item to decice which declarations are allowed as
8939         later items, in the two different modes Ada 83 and SPARK. In the SPARK
8940         mode, add that renamings are considered as later items.
8941         (Enclosing_Package): new function to return the enclosing package
8942         (Enter_Name): correct the rule for homonyms in SPARK
8943         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8944         from source (result of expansion) to avoid issuing wrong warnings.
8945
8946 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8947
8948         * errout.adb: On anything but an expression First_Node returns its
8949         argument.
8950
8951 2011-08-02  Pascal Obry  <obry@adacore.com>
8952
8953         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8954
8955 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8956
8957         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8958         Set the associated loop as the related expression of internally
8959         generated cursors.
8960         * exp_ch7.adb (Is_Container_Cursor): New routine.
8961         (Wrap_Transient_Declaration): Supress the finalization of the list
8962         controller when the declaration denotes a container cursor.
8963
8964 2011-08-02  Yannick Moy  <moy@adacore.com>
8965
8966         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8967         command line now.
8968         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8969         expression is a simple expression. This check cannot be performed in
8970         the semantics, so just drop it.
8971         (P_Index_Or_Discriminant_Constraint): move check that the index or
8972         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8973         semantics. Other cases were previously checked in the semantics.
8974         * par-ch4.adb (P_Name): move checks that a selector name is not
8975         character literal or an operator symbol to Find_Selected_Component in
8976         the semantics
8977         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8978         declarations are not placed after later declarations in a separate
8979         procedure in Sem_Util (possibly not the best choice?), to be used both
8980         during parsing, for Ada 83 mode, and during semantic analysis, for
8981         SPARK mode.
8982         * par-endh.adb (Check_End): move check that end label is not missing
8983         to Process_End_Label in the semantics
8984         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8985         the special case for SPARK restriction
8986         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8987         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8988         parameter Force to issue the error message even on internal node (used
8989         for generated end label). Call Check_Restriction to check when an error
8990         must be issued. In SPARK mode, issue an error message even if the
8991         restriction is not set.
8992         (Check_Restriction): new procedure with an additional out parameter to
8993         inform the caller that a message has been issued
8994         * sem_aggr.adb: Minor modification of message
8995         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8996         instead of issuing an error message directly
8997         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8998         declarations are not placed after later declarations, by calling
8999         Check_Later_Vs_Basic_Declarations
9000         (Analyze_Subtype_Declaration): move here the check that an index or
9001         discriminant constraint must be a subtype mark. Change the check that
9002         a subtype of String must start at one so that it works on subtype marks.
9003         * sem_ch4.adb (Analyze_Call): move here the check that a named
9004         association cannot follow a positional one in a call
9005         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9006         instead of issuing an error message directly
9007         * sem_ch8.adb (Find_Selected_Component): move here the check that a
9008         selector name is not a character literal or an operator symbol. Move
9009         here the check that the prefix of an expanded name cannot be a
9010         subprogram or a loop statement.
9011         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9012         procedure called from parsing and semantics to check that basic
9013         declarations are not placed after later declarations
9014         (Process_End_Label): move here the check that end label is not missing
9015
9016 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9017
9018         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9019         representation clause in codepeer mode, since it confuses CodePeer and
9020         does not bring useful info.
9021
9022 2011-08-02  Ed Falis  <falis@adacore.com>
9023
9024         * init.c: initialize fp hw on MILS.
9025
9026 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9027
9028         * errout.adb (First_Node): for bodies, return the node itself (small
9029         optimization). For other nodes, do not check source_unit if the node
9030         comes from Standard.
9031
9032 2011-08-02  Robert Dewar  <dewar@adacore.com>
9033
9034         * exp_ch3.adb: Minor comment additions.
9035         * sem_ch13.adb: Minor reformatting.
9036
9037 2011-08-02  Pascal Obry  <obry@adacore.com>
9038
9039         * make.adb, makeutl.adb: Removes some superfluous directory separator.
9040
9041 2011-08-02  Robert Dewar  <dewar@adacore.com>
9042
9043         * sem_attr.adb: Minor reformatting.
9044
9045 2011-08-02  Robert Dewar  <dewar@adacore.com>
9046
9047         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9048         (Has_Default_Component_Value): Removed
9049         * einfo.ads Comment updates
9050         (Has_Default_Aspect): Replaces Has_Default_Value
9051         (Has_Default_Component_Value): Removed
9052         * exp_ch13.adb
9053         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9054         * exp_ch3.adb
9055         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9056         (Get_Simple_Init_Val): Handle Default_Value aspect
9057         (Needs_Simple_Initialization): Handle Default_Value aspect
9058         * exp_ch3.ads: Needs_Simple_Initialization
9059         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9060         * par-prag.adb (Pragma_Default[_Component]Value) Removed
9061         * sem_ch13.adb
9062         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9063         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9064         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9065
9066 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9067
9068         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9069         package containing iteration primitives.
9070         exp_ch5.adb (Expand_Iterator_Loop): ditto.
9071
9072 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9073
9074         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9075         "of", pre-analyze expression in case it is a function call with
9076         finalization actions that must be placed ahead of the loop.
9077         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9078         on an Ada2012 iterator, insert them ahead of the rewritten loop.
9079
9080 2011-08-02  Geert Bosch  <bosch@adacore.com>
9081
9082         * cstand.adb (Create_Float_Types): Only consider C's long double for
9083         Long_Long_Float, in addition to double.
9084
9085 2011-08-02  Robert Dewar  <dewar@adacore.com>
9086
9087         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9088         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9089         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9090         Minor reformatting.
9091
9092 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9093
9094         * sem_attr.adb: handle properly 'Result when it is a prefix of an
9095         indexed component.
9096
9097 2011-08-02  Javier Miranda  <miranda@adacore.com>
9098
9099         * einfo.ads, einfo.adb
9100         (Original_Access_Type): Move this attribute to Node26 since there was
9101         an undocumented use of Node21 in E_Access_Subprogram_Type entities
9102         which causes conflicts and breaks the generation of the .NET compiler.
9103         (Interface_Name): Add missing documentation on JGNAT only uses of
9104         this attribute.
9105
9106 2011-08-02  Geert Bosch  <bosch@adacore.com>
9107
9108         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9109         (Find_Back_End_Float_Type): Likewise
9110         (Create_Back_End_Float_Types): Likewise
9111         (Create_Float_Types): Likewise
9112         (Register_Float_Type): Likewise
9113         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9114         Nlist and split out type selection in new local Find_Base_Type function.
9115         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9116         Nlist
9117         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9118
9119 2011-08-02  Robert Dewar  <dewar@adacore.com>
9120
9121         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9122         alpha order).
9123         * opt.ads: Minor comment change.
9124         * sem_ch12.adb: Minor code reorganization.
9125
9126 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9127
9128         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9129         subtype's list of rep items to the list on the full subtype in the case
9130         where the lists are the same.
9131
9132 2011-08-02  Geert Bosch  <bosch@adacore.com>
9133
9134         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9135         using the one from System.Strings, which also deallocates all strings.
9136
9137 2011-08-02  Geert Bosch  <bosch@adacore.com>
9138
9139         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9140         function.
9141         * gcc-interface/Make-lang.in: Update dependencies.
9142
9143 2011-08-02  Olivier Hainque  <hainque@adacore.com>
9144
9145         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9146         end_locus.
9147
9148 2011-08-02  Javier Miranda  <miranda@adacore.com>
9149
9150         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9151         associated with anonymous access to subprograms.
9152
9153 2011-08-02  Geert Bosch  <bosch@adacore.com>
9154
9155         * opt.ads
9156         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9157         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9158         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9159         (Add_Symbol_Definition): Move to switch-c.adb
9160         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9161         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9162         (Add_Symbol_Definition): Move to switch-c.adb.
9163         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9164         * sem_warn.adb
9165         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9166         Move to warnsw.adb.
9167         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9168         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9169         Move to warnsw.adb.
9170         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
9171         (Add_Symbol_Definition): Moved from Prepcomp.
9172         * switch-c.ads: Update copyright notice. Use String_List instead of
9173         Argument_List, removing dependency on System.OS_Lib.
9174
9175 2011-08-02  Yannick Moy  <moy@adacore.com>
9176
9177         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9178         mode on initialization expression which does not respect SPARK
9179         restrictions.
9180         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9181         if the tree referenced by its argument represents an initialization
9182         expression in SPARK, suitable for initializing an object in an object
9183         declaration.
9184
9185 2011-08-02  Javier Miranda  <miranda@adacore.com>
9186
9187         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9188         internally generated access to subprogram with its associated protected
9189         subprogram type.
9190         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9191
9192 2011-08-02  Geert Bosch  <bosch@adacore.com>
9193
9194         * cstand.adb (Register_Float_Type): Print information about type to
9195         register, if the Debug_Flag_Dot_B is set.
9196         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9197         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9198         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9199         with a requested precision of more than Max_Digits digits and no more
9200         than Max_Base_Digits digits, if a range specification is present and the
9201         Predefined_Float_Types list has a suitable type to derive from.
9202         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9203         case of type completion with pragma Import
9204         * sem_prag.adb
9205         (Process_Import_Predefined_Type): Processing to complete a type
9206         with pragma Import. Currently supports floating point types only.
9207         (Set_Convention_From_Pragma): Do nothing without underlying type.
9208         (Process_Convention): Guard against absence of underlying type,
9209         which may happen when importing incomplete types.
9210         (Process_Import_Or_Interface): Handle case of importing predefined
9211         types. Tweak error message.
9212
9213 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9214
9215         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9216         functions to previous change.  Reorganize code slightly.
9217
9218 2011-08-02  Geert Bosch  <bosch@adacore.com>
9219
9220         * back_end.ads (Register_Type_Proc): New call back procedure type for
9221         allowing the back end to provide information about available types.
9222         (Register_Back_End_Types): New procedure to register back end types.
9223         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9224         available types.
9225         * cstand.adb (Back_End_Float_Types): New list for floating point types
9226         supported by the back end.
9227         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9228         (Copy_Float_Type): New procedure to make new copies of predefined types.
9229         (Register_Float_Type): New call back procedure to populate the BEFT list
9230         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9231         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9232         (Create_Float_Types): New procedure to create entities for floating
9233         point types predefined in Standard, and put these and any remaining
9234         BEFTs on the Predefined_Float_Types list.
9235         * stand.ads (Predefined_Float_Types): New list for predefined floating
9236         point types that do not have declarations in package Standard.
9237
9238 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9239
9240         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
9241         entity node for the unit containing the parameter.
9242         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
9243         (Add_Inlined_Subprogram): Likewise.
9244         * gcc-interface/Make-lang.in: Update dependencies.
9245
9246 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9247
9248         * s-stusta.adb (Print): Make sure Pos is always initialized to a
9249         suitable value.
9250
9251 2011-08-02  Geert Bosch  <bosch@adacore.com>
9252
9253         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
9254
9255 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9256
9257         * sem_type.adb (Covers): Move trivial case to the top and reuse the
9258         computed value of Base_Type.
9259
9260 2011-08-02  Yannick Moy  <moy@adacore.com>
9261
9262         * restrict.adb (Check_Restriction): issue an error for any use of
9263         class-wide, even if the No_Dispatch restriction is not set.
9264         * sem_aggr.adb: Correct typos in comments and messages in formal mode
9265         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
9266         when completing a private extension, the type named in the private part
9267         is not the same as that named in the visible part.
9268         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
9269         of an inherited primitive operations of a tagged type or type extension
9270         that returns the tagged type.
9271         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
9272         function which returns True for an implicit operation inherited by the
9273         derived type declaration for the argument type.
9274         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
9275         order.
9276
9277 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9278
9279         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
9280         Process_Bounds, to perform analysis with expansion of a range or an
9281         expression that is the iteration scheme for a loop.
9282         (Analyze_Iterator_Specification): If domain of iteration is given by a
9283         function call with a controlled result, as is the case if call returns
9284         a predefined container, ensure that finalization actions are properly
9285         generated.
9286         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
9287
9288 2011-08-02  Javier Miranda  <miranda@adacore.com>
9289
9290         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9291         * gcc-interface/Make-lang.in: Update dependencies.
9292
9293 2011-08-02  Javier Miranda  <miranda@adacore.com>
9294
9295         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9296         determine if the analysis is performed using N or Original_Node (N).
9297         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9298         functionality of routine Is_Variable avoids code duplication.
9299         * checks.adb (Determine_Range): Handle temporaries generated by
9300         Remove_Side_Effects.
9301
9302 2011-08-02  Javier Miranda  <miranda@adacore.com>
9303
9304         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9305         expansion of the condition. Required since the previous analysis was
9306         done with expansion disabled (see Resolve_Quantified_Expression) and
9307         hence checks were not inserted and record comparisons have not been
9308         expanded.
9309
9310 2011-08-02  Ed Falis  <falis@adacore.com>
9311
9312         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9313         Update header.
9314
9315 2011-08-02  Bob Duff  <duff@adacore.com>
9316
9317         * opt.ads: Minor comment fix.
9318
9319 2011-08-02  Bob Duff  <duff@adacore.com>
9320
9321         * sem_ch12.adb (Analyze_Package_Instantiation,
9322         Analyze_Subprogram_Instantiation): Turn off style checking while
9323         analyzing an instance. Whatever style checks that apply to the generic
9324         unit should apply, so it makes no sense to apply them in an instance.
9325         This was causing trouble when compiling an instance of a runtime
9326         unit that violates the -gnatyO switch.
9327         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9328         one of the two case statements, causing spurious errors.
9329
9330 2011-08-02  Robert Dewar  <dewar@adacore.com>
9331
9332         * uname.adb: Minor reformatting.
9333         * gnatcmd.adb: Minor reformatting.
9334         * exp_attr.adb: Minor reformatting.
9335
9336 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9337
9338         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9339         No_Dispatching_Calls, do not look for the Assign primitive, because
9340         predefined primitives are not created in this case.
9341
9342 2011-08-02  Bob Duff  <duff@adacore.com>
9343
9344         * stylesw.ads: Minor comment fixes.
9345
9346 2011-08-02  Robert Dewar  <dewar@adacore.com>
9347
9348         * freeze.adb (Add_To_Result): New procedure.
9349
9350 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9351
9352         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9353         time, if the specific run-time routines for handling streams of strings
9354         are not available, use the default mechanism.
9355
9356 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9357
9358         * s-regpat.ads: Fix typo.
9359
9360 2011-08-02  Vincent Celier  <celier@adacore.com>
9361
9362         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9363         not null, call it to create the in memory config project file without
9364         parsing an existing default config project file.
9365
9366 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9367
9368         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9369
9370 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9371
9372         * sem_elim.adb: an abstract subprogram does not need an eliminate
9373         pragma for its descendant to be eliminable.
9374
9375 2011-08-02  Ed Falis  <falis@adacore.com>
9376
9377         * init.c: revert to handling before previous checkin for VxWorks
9378         * s-intman-vxworks.adb: delete unnecessary declarations related to
9379         using Ada interrupt facilities for handling signals.
9380         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9381         * s-intman-vxworks.ads: Import __gnat_install_handler as
9382         Initialize_Interrupts.
9383         * s-taprop-vxworks.adb: Delete Signal_Mask.
9384         (Abort_Handler): change construction of mask to unblock exception
9385         signals.
9386
9387 2011-08-02  Jerome Guitton  <guitton@adacore.com>
9388
9389         * a-except-2005.adb (Raise_From_Signal_Handler): Call
9390         Debug_Raise_Exception before propagation starts.
9391
9392 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9393
9394         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9395         to Restriction_Check_Required.
9396         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9397         * sem_res.adb (Resolve_Call): Likewise.
9398         * sem_attr.adb (Check_Stream_Attribute): Likewise.
9399
9400 2011-08-02  Bob Duff  <duff@adacore.com>
9401
9402         * stylesw.ads: Update comment.
9403         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9404         * errout.ads: Remove obsolete comment.
9405
9406 2011-08-02  Javier Miranda  <miranda@adacore.com>
9407
9408         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9409         (Set_Is_Safe_To_Reevaluate): new procedure.
9410         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9411         assignment is allowed on safe-to-reevaluate variables.
9412         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9413         temporary created to remove side effects in expressions that use
9414         the secondary stack as safe-to-reevaluate.
9415         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9416         variables that are not true constants.
9417
9418 2011-08-02  Robert Dewar  <dewar@adacore.com>
9419
9420         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9421         sem_res.adb, sem_ch6.adb: Minor reformatting.
9422
9423 2011-08-02  Jerome Guitton  <guitton@adacore.com>
9424
9425         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9426
9427 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9428
9429         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9430         not set Overridden_Operation if subprogram is an initialization
9431         procedure.
9432
9433 2011-08-02  Yannick Moy  <moy@adacore.com>
9434
9435         * par-ch6.adb: Correct obsolete name in comments
9436         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9437         which takes two message arguments (existing function takes one), with
9438         second message used for continuation.
9439         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9440         block statements that originate from a source block statement, not
9441         generated block statements
9442         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9443         symmetry with procedure case
9444         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9445         function to issue an error in formal mode if a package specification
9446         contains more than one tagged type or type extension.
9447         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9448         parameters matching formals of tagged types are objects (or ancestor
9449         type conversions of objects), not general expressions. Issue an error
9450         on view conversions that are not involving ancestor conversion of an
9451         extended type.
9452         (Resolve_Type_Conversion): in formal mode, issue an error on the
9453         operand of an ancestor type conversion which is not an object
9454         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9455         procedure so that it works also for actuals of function calls
9456         (Is_Actual_Tagged_Parameter): new function which determines if its
9457         argument is an actual parameter of a formal of tagged type in a
9458         subprogram call
9459         (Is_SPARK_Object_Reference): new function which determines if the tree
9460         referenced by its argument represents an object in SPARK
9461
9462 2011-08-02  Robert Dewar  <dewar@adacore.com>
9463
9464         * sem_ch3.adb: Minor reformatting
9465         Minor comment addition
9466         Minor error msg text change
9467
9468 2011-08-02  Javier Miranda  <miranda@adacore.com>
9469
9470         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9471         function. Used to be more precise when we generate a variable plus one
9472         assignment to remove side effects in the evaluation of the Bound
9473         expressions.
9474         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9475         of the bound expression to force its re-analysis and thus expand the
9476         associated transient scope (if required). Code cleanup replacing the
9477         previous code that declared the constant entity by an invocation to
9478         routine Force_Evaluation which centralizes this work in the frontend.
9479
9480 2011-08-02  Robert Dewar  <dewar@adacore.com>
9481
9482         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9483         (Base_Type): Now uses improved Is_Base_Type function
9484         * einfo.ads (Base_Type): Inline this function
9485
9486 2011-08-02  Robert Dewar  <dewar@adacore.com>
9487
9488         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9489         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9490
9491 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9492
9493         * gcc-interface/Make-lang.in: Update dependencies.
9494         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9495         targets.
9496
9497 2011-08-02  Yannick Moy  <moy@adacore.com>
9498
9499         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9500         non-simple expression used in delta constraint
9501         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9502         index constraint which is not a subtype mark
9503         * par.adb: With and use Restrict
9504         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9505         mode on component type which is not a subtype mark and default
9506         expression on component
9507         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9508         of string which does not have a lower index bound equal to 1
9509         (Array_Type_Declaration): issue an error in formal mode on index or
9510         component type which is not a subtype mark, and on aliased keyword on
9511         component
9512         (Derived_Type_Declaration): issue an error in formal mode on interface,
9513         limited or abstract type
9514         (Record_Type_Declaration): issue an error in formal mode on interface
9515         (Record_Type_Definition): issue an error in formal mode on tagged types
9516         and type extensions not declared in the specification of a library unit
9517         package; on null non-tagged record; on variant part
9518
9519 2011-08-02  Vincent Celier  <celier@adacore.com>
9520
9521         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9522         not declared for qualified library project when Library_Name is not
9523         declared, but Library_Dir is.
9524
9525 2011-08-02  Robert Dewar  <dewar@adacore.com>
9526
9527         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9528         pragmas (affects aspects [Component_]Default_Value
9529         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9530         component type for the resolution
9531
9532 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9533
9534         * einfo.adb (Base_Type): Tune implementation for speed.
9535
9536 2011-08-02  Robert Dewar  <dewar@adacore.com>
9537
9538         * freeze.adb: Minor reformatting.
9539
9540 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9541
9542         * scos.ads: Update comments.
9543
9544 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9545
9546         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9547         base type, because the parent may be a subtype of a private type whose
9548         convention is established in a private part.
9549
9550 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9551
9552         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9553         statement in a block when the expansion of the return expression has
9554         created a finalization chain.
9555         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9556         with the parent node.
9557         Add N_Extended_Return_Statement to handle the case where a transient
9558         object declaration appears in the Return_Object_Declarations list of
9559         an extended return statement.
9560
9561 2011-08-02  Matthew Gingell  <gingell@adacore.com>
9562
9563         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9564         unused parameter 'name'.
9565
9566 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9567
9568         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9569         inherited operation, check whether its alias, which is the source
9570         operastion that it renames, has been marked eliminated.
9571
9572 2011-08-02  Javier Miranda  <miranda@adacore.com>
9573
9574         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9575         in-mode parameter whose type is an access type since it can be used to
9576         modify its designated object. Enforce code that handles as safe an
9577         access type that is not access-to-constant but it is the result of a
9578         previous removal of side-effects.
9579         (Remove_Side_Effects): Minor code reorganization of cases which require
9580         no action. Done to incorporate documentation on new cases uncovered
9581         working in this ticket: no action needed if this routine was invoked
9582         too early and the nodes are not yet decorated.
9583         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9584         to routine Remove_Side_Effects by calls to Force_Evaluation since they
9585         were issued with actuals that are implicitly provided by
9586         Force_Evaluation.
9587
9588 2011-08-02  Robert Dewar  <dewar@adacore.com>
9589
9590         * sem_ch3.adb, sem_res.adb: Minor reformatting.
9591
9592 2011-08-02  Yannick Moy  <moy@adacore.com>
9593
9594         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9595         to issue an error in formal mode on attribute not supported in this mode
9596         (Analyze_Attribute): issue errors on standard attributes not supported
9597         in formal mode.
9598         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9599         comment, and issue error in formal mode on modulus which is not a power
9600         of 2.
9601         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9602         range.
9603         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9604         subtype mark.
9605         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9606         operator on modular type (except 'not').
9607
9608 2011-08-02  Robert Dewar  <dewar@adacore.com>
9609
9610         * gnat_rm.texi: Minor reformatting.
9611
9612 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9613
9614         * s-osinte-linux.ads: Minor comment update and reformatting.
9615         * i-cexten.ads: Make this unit pure, as for its parent.
9616         Will allow its usage in more contexts if needed.
9617
9618 2011-08-02  Robert Dewar  <dewar@adacore.com>
9619
9620         * s-utf_32.ads: Minor comment fix.
9621
9622 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9623
9624         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9625         operation of a tagged synchronized type, handle the case where the
9626         controlling argument is overloaded.
9627
9628 2011-08-02  Yannick Moy  <moy@adacore.com>
9629
9630         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9631         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9632         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9633         SPARK mode and formal verification mode on processing SPARK restriction
9634         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9635         requiring consistency checking.
9636
9637 2011-08-02  Robert Dewar  <dewar@adacore.com>
9638
9639         * sem_res.adb: Minor reformatting.
9640
9641 2011-08-02  Robert Dewar  <dewar@adacore.com>
9642
9643         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9644         a-cforse.ads: Remove unneeded with of Ada.Containers
9645         Remove commented out pragma Inline's
9646         Move specifications of new subprograms to the actual specs
9647
9648 2011-08-02  Yannick Moy  <moy@adacore.com>
9649
9650         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9651         a-cforse.ads: Update comments.
9652
9653 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9654
9655         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9656
9657 2011-08-02  Robert Dewar  <dewar@adacore.com>
9658
9659         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9660         a-cforse.ads, a-cofove.ads: Minor reformatting.
9661
9662 2011-08-02  Claire Dross  <dross@adacore.com>
9663
9664         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9665         a-cofove.ads: Add comments.
9666
9667 2011-08-02  Yannick Moy  <moy@adacore.com>
9668
9669         * gnat_rm.texi: Document formal containers.
9670
9671 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9672
9673         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9674         are empty sections.
9675
9676 2011-08-02  Robert Dewar  <dewar@adacore.com>
9677
9678         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9679         reformatting.
9680
9681 2011-08-02  Robert Dewar  <dewar@adacore.com>
9682
9683         * aspects.adb: New aspects Default_Value and Default_Component_Value
9684         New format of Aspect_Names table checks for omitted entries
9685         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9686         handling of boolean aspects for derived types.
9687         New aspects Default_Value and Default_Component_Value
9688         New format of Aspect_Names table checks for omitted entries
9689         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9690         (Has_Default_Value): New flag
9691         (Has_Default_Component_Value): New flag
9692         (Has_Default_Value): New flag
9693         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9694         table.
9695         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9696         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9697         Default_Value and Default_Component_Value
9698         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9699         New aspects Default_Value and Default_Component_Value
9700         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9701         * sprint.adb: Print N_Aspect_Specification node when called from gdb
9702
9703 2011-08-02  Vincent Celier  <celier@adacore.com>
9704
9705         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9706         inherit library kind.
9707
9708 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9709
9710         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9711         Minor reformatting.
9712
9713 2011-08-02  Robert Dewar  <dewar@adacore.com>
9714
9715         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9716
9717 2011-08-02  Yannick Moy  <moy@adacore.com>
9718
9719         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9720
9721 2011-08-02  Robert Dewar  <dewar@adacore.com>
9722
9723         * impunit.adb: Add comment.
9724
9725 2011-08-02  Yannick Moy  <moy@adacore.com>
9726
9727         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9728         qualification of aggregates in formal mode
9729         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9730         another aggregate
9731         (Resolve_Aggregate): complete the test that an aggregate is adequately
9732         qualified in formal mode
9733
9734 2011-08-02  Pascal Obry  <obry@adacore.com>
9735
9736         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9737         * mlib-prj.adb: Supress warning when compiling binder generated file.
9738         (Build_Library): Supress all warnings when compiling the binder
9739         generated file.
9740
9741 2011-08-02  Yannick Moy  <moy@adacore.com>
9742
9743         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9744         from here...
9745         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9746         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9747         Add with/use clauses to make Check_Formal_Restriction visible
9748
9749 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9750
9751         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9752         in-parameters when type of the generic formal is private in the generic
9753         spec and non-private in the body.
9754
9755 2011-08-02  Claire Dross  <dross@adacore.com>
9756
9757         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9758         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9759         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9760         * impunit.adb, Makefile.rtl: Take new files into account.
9761
9762 2011-08-02  Robert Dewar  <dewar@adacore.com>
9763
9764         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9765         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9766
9767 2011-08-02  Yannick Moy  <moy@adacore.com>
9768
9769         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9770         formal mode
9771         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9772         matching static array bounds, taking into account the special case of
9773         string literals
9774         * sem_ch3.adb: Typo in comment.
9775
9776 2011-08-02  Yannick Moy  <moy@adacore.com>
9777
9778         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9779         which issues an error in formal mode if its argument node is originally
9780         from source
9781         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9782         has a discriminant specification so that it does not include the case
9783         of derived types
9784         (Derived_Type_Declaration): move here the test that a derived type has a
9785         discriminant specification
9786         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9787         first element of a component association before accessing its choices
9788         (presence of component association is not enough)
9789         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9790         declaration is a library item before accessing the next element in a
9791         list, as library items are not member of lists
9792         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9793         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9794         Check_Formal_Restriction whenever possible.
9795
9796 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9797
9798         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9799         reference when needed.
9800
9801 2011-08-02  Bob Duff  <duff@adacore.com>
9802
9803         * gnat_ugn.texi: Fix typo.
9804
9805 2011-08-02  Vincent Celier  <celier@adacore.com>
9806
9807         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9808         archive file name. Do not use the full path name of archives for Open
9809         VMS.
9810
9811 2011-08-02  Robert Dewar  <dewar@adacore.com>
9812
9813         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9814         Analyze_Aspect_Specifications
9815         * sem_ch13.adb
9816         (Analyze_Aspect_Specifications): New handling for boolean aspects
9817         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9818         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9819         sequence for Analyze_Aspect_Specifications
9820         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9821         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9822
9823 2011-08-02  Robert Dewar  <dewar@adacore.com>
9824
9825         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9826         aspects, since these no longer exist.
9827
9828 2011-08-02  Robert Dewar  <dewar@adacore.com>
9829
9830         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9831         semicolon, do not try to see if there are aspects following it.
9832         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9833         aspect spec.
9834
9835 2011-08-02  Robert Dewar  <dewar@adacore.com>
9836
9837         * sem_ch8.adb, aspects.ads: Minor reformatting.
9838
9839 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9840
9841         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9842         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9843         extracted from...
9844         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
9845
9846 2011-08-02  Yannick Moy  <moy@adacore.com>
9847
9848         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9849         mode on subprogram declaration outside of package specification, unless
9850         it is followed by a pragma Import
9851         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9852         Access_Type_Declaration): issue error in formal mode on access type
9853         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9854         incomplete type
9855         (Analyze_Object_Declaration): issue error in formal mode on object
9856         declaration which does not respect SPARK restrictions
9857         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9858         declaration which does not respect SPARK restrictions
9859         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9860         error in formal mode on digits or delta constraint
9861         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9862         decimal fixed point type
9863         (Derived_Type_Declaration): issue error in formal mode on derived type
9864         other than type extensions of tagged record types
9865         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9866         with check on access definition
9867         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9868         mode on protected definition.
9869         (Analyze_Task_Definition): issue error in formal mode on task definition
9870
9871 2011-08-02  Robert Dewar  <dewar@adacore.com>
9872
9873         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9874
9875 2011-08-02  Javier Miranda  <miranda@adacore.com>
9876
9877         * sem_ch6.adb (Can_Override_Operator): New function.
9878         (Verify_Overriding_Indicator): Add missing code to check overriding
9879         indicator in operators. Fixes regression.
9880         (Check_Overriding_Indicator): Minor reformating after replacing the
9881         code that evaluates if the subprogram can override an operator by
9882         invocations to the above new function.
9883         * einfo.adb
9884         (Write_Field26_Name): Add missing code to ensure that, following
9885         the documentation in einfo.ads, this field is not shown as attribute
9886         "Static_Initialization" on non-dispatching functions.
9887
9888 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9889
9890         * sem_res.adb (Resolve_Call): A call to
9891         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9892         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9893         i.e., when the second parameter is of type Time_Span.
9894
9895 2011-08-02  Vincent Celier  <celier@adacore.com>
9896
9897         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9898         with an archive instead of -L<library dir> -l<library name>.
9899
9900 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9901
9902         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9903         mark the base types In_Use in addition to making the operations
9904         use_visible.
9905
9906 2011-08-02  Ed Falis  <falis@adacore.com>
9907
9908         * init.c: add and setup __gnat_signal_mask for the exception signals
9909         * s-inmaop-vxworks.adb: new file.
9910         * s-intman-vxworks.adb: remove unnecessary initializations and
9911         simplify remaining
9912         * s-intman-vxworks.ads: remove unnecessary variable
9913         * s-taprop-vxworks.adb: simplify signal initialization
9914
9915 2011-08-02  Robert Dewar  <dewar@adacore.com>
9916
9917         * sem_ch8.adb: Minor code reorganization, comment updates.
9918
9919 2011-08-02  Robert Dewar  <dewar@adacore.com>
9920
9921         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9922         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9923         here from Sem_Res.
9924         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9925         (Matching_Static_Array_Bounds): Moved here from Sem_Res
9926
9927 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9928
9929         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9930         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9931         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9932         use_type_clauses, to handle more efficiently use_type and use_all_type
9933         constructs.
9934         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9935         Ada2012 Use_All_Type clause.
9936         (Use_Class_Wide_Operations): new procedure.
9937
9938 2011-08-02  Robert Dewar  <dewar@adacore.com>
9939
9940         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9941         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9942         expression to expression function.
9943
9944 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9945
9946         * sem_ch4.adb: transform simple Ada2012 membership into equality only
9947         if types are compatible.
9948
9949 2011-08-02  Yannick Moy  <moy@adacore.com>
9950
9951         * sem_res.adb (Matching_Static_Array_Bounds): new function which
9952         returns True if its argument array types have same dimension and same
9953         static bounds at each index.
9954         (Resolve_Actuals): issue an error in formal mode on actuals passed as
9955         OUT or IN OUT paramaters which are not view conversions in SPARK.
9956         (Resolve_Arithmetic_Op): issue an error in formal mode on
9957         multiplication or division with operands of fixed point types which are
9958         not qualified or explicitly converted.
9959         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9960         Boolean or array type (except String) operands.
9961         (Resolve_Equality_Op): issue an error in formal mode on equality
9962         operators for array types other than String with non-matching static
9963         bounds.
9964         (Resolve_Logical_Op): issue an error in formal mode on logical operators
9965         for array types with non-matching static bounds. Factorize the code in
9966         Matching_Static_Array_Bounds.
9967         (Resolve_Qualified_Expression): issue an error in formal mode on
9968         qualified expressions for array types with non-matching static bounds.
9969         (Resolve_Type_Conversion): issue an error in formal mode on type
9970         conversion for array types with non-matching static bounds
9971
9972 2011-08-02  Robert Dewar  <dewar@adacore.com>
9973
9974         * par-ch10.adb: Minor code reorganization (use Nkind_In).
9975
9976 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9977
9978         * par-ch9.adb: save location of entry for proper error message.
9979
9980 2011-08-02  Javier Miranda  <miranda@adacore.com>
9981
9982         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9983         (Use_Full_View) which permits this routine to climb through the
9984         ancestors using the full-view of private parents.
9985         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9986         Use_Full_View to true in calls to Is_Ancestor.
9987         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9988         true in call to Is_Ancestor.
9989         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9990         Use_Full_View to true in call to Is_Ancestor.
9991         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9992         call to Is_Ancestor.
9993         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9994         Use_Full_View to true in calls to Is_Ancestor.
9995         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9996         Make_Select_Specific_Data_Table, Register_Primitive,
9997         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9998         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9999         to true in call to Is_Ancestor.
10000         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10001         Use_Full_View to true in calls to Is_Ancestor.
10002         * exp_cg.adb
10003         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10004         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10005
10006 2011-08-02  Robert Dewar  <dewar@adacore.com>
10007
10008         * gnat_rm.texi: Minor reformatting.
10009         * sem_prag.adb: Minor reformatting.
10010
10011 2011-08-02  Tristan Gingold  <gingold@adacore.com>
10012
10013         * vms_data.ads: Add VMS qualifier for -gnateP.
10014
10015 2011-08-02  Robert Dewar  <dewar@adacore.com>
10016
10017         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10018         * par-ch7.adb (P_Package): Proper placement of aspects for package
10019         decl/instantiation.
10020         * par-endh.adb (Check_End): Ad Is_Sloc parameter
10021         (End_Statements): Add Is_Sloc parameterr
10022         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10023         (Check_End): Ad Is_Sloc parameter
10024         (End_Statements): Add Is_Sloc parameterr
10025
10026 2011-08-02  Vincent Celier  <celier@adacore.com>
10027
10028         * ug_words: Add VMS qualifier equivalent to -gnateP:
10029         /SYMBOL_PREPROCESSING.
10030
10031 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10032
10033         * gnat-style.texi: For hexadecimal numeric literals the typical
10034         grouping of digits is 4 to represent 2 bytes.
10035         A procedure spec which is split into several lines is indented two
10036         characters.
10037
10038 2011-08-02  Yannick Moy  <moy@adacore.com>
10039
10040         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10041         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10042         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10043         properly qualified
10044         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10045         choice in array aggregate
10046         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10047         mark as ancestor
10048         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10049         positional and named aggregate for record, or others in record
10050         aggregate, or multiple choice in record aggregate
10051         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10052         array operands to logical operations AND, OR and XOR do not have the
10053         same static lower and higher bounds
10054         * sem_ch5.adb, sinfo.ads: Correct typos in comments
10055
10056 2011-08-01  Robert Dewar  <dewar@adacore.com>
10057
10058         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10059         Replaces Last_Source_Node_In_Sequence.
10060         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10061         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10062         parens and blank in string (this was inconsistently implemented).
10063         * errout.ads
10064         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10065         blank in string (this was inconsistently implemented).
10066         * gnat1drv.adb
10067         (Set_Global_Switches): Set formal mode switches appropriately
10068         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10069         * par-prag.adb
10070         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10071         call Set_Error_Msg_Lang to set "spark" as language name.
10072         * par.adb: Remove unnecessary call to set formal language for errout
10073         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10074         appropriately and call Set_Error_Msg_Lang to set "spark" as language
10075         name.
10076         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10077         calls to it, moved after resolution so that types are known
10078         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10079         result of concatenation is not of type String
10080         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10081         concatenation is not properly restricted
10082         * gnat_rm.texi: Add doc on pragma Spark_95.
10083         * gcc-interface/Makefile.in: Remove obsolete target pairs for
10084         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10085         * gcc-interface/Make-lang.in: Update dependencies.
10086
10087 2011-08-01  Javier Miranda  <miranda@adacore.com>
10088
10089         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10090         condition that detects if the overridden operation must replace an
10091         existing entity.
10092
10093 2011-08-01  Javier Miranda  <miranda@adacore.com>
10094
10095         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10096         code declarations inserted by Insert_Actions in each alternative of the
10097         N_Case_Expression node.
10098
10099 2011-08-01  Robert Dewar  <dewar@adacore.com>
10100
10101         * sem_ch6.adb: Minor code reorganization.
10102         * sem_util.adb: Minor reformatting.
10103
10104 2011-08-01  Pascal Obry  <obry@adacore.com>
10105
10106         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10107         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10108
10109 2011-08-01  Yannick Moy  <moy@adacore.com>
10110
10111         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10112         literal or operator symbol which is prefixed
10113         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10114         mode on access attributes.
10115         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10116         that concatenation operands are properly restricted in formal mode
10117         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10118         Analyze_Concatenation_Operand. Issue an error in formal mode if the
10119         result of the concatenation has a type different from String.
10120         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10121         Analyze_Quantified_Expression, Analyze_Slice,
10122         Analyze_Null): issue an error in formal mode on unsupported constructs
10123         * sem_ch5.adb
10124         (Analyze_Block_Statement): only issue error on source block statement
10125         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10126         function which returns the last node in a list of nodes for which
10127         Comes_From_Source returns True, if any
10128         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10129         Last_Source_Node_In_Sequence
10130         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10131         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10132         mode on unsupported constructs
10133         * sem_ch9.adb Do not return after issuing error in formal mode, as the
10134         rest of the actions may be needed later on since the error is marked as
10135         not serious.
10136         * sinfo.ads: Typos in comments.
10137
10138 2011-08-01  Pascal Obry  <obry@adacore.com>
10139
10140         * projects.texi: Minor editing.
10141
10142 2011-08-01  Yannick Moy  <moy@adacore.com>
10143
10144         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10145         insertion character ~~
10146         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10147         (Set_Error_Msg_Lang): new procedure which fixes the language for use
10148         with insertion character ~~
10149         (Set_Msg_Text): treat insertion character ~~
10150         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10151         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10152         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10153         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10154         errors related to the formal language restriction not serious
10155         (insertion character |).
10156         * par.adb (Par): set formal language for error messages if needed
10157         * sem_ch6.adb (Check_Missing_Return): take into account possible
10158         generated statements at the end of the function
10159         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10160         enumeration value to define a new pragma SPARK_95
10161         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10162         SPARK_Version): new type and variables to store the SPARK version
10163         (none by default).
10164         (SPARK_Mode): return True when SPARK_Version is set
10165         * par-prag.adb: Correct indentation
10166         (Prag): take Pragma_SPARK_95 into account
10167         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
10168         into account.
10169
10170 2011-08-01  Robert Dewar  <dewar@adacore.com>
10171
10172         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
10173         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
10174         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10175
10176 2011-08-01  Pascal Obry  <obry@adacore.com>
10177
10178         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10179         Target_Name to Get_Path call.
10180         (Parse_Single_Project): Likewise.
10181         (Post_Parse_Context_Clause): Likewise.
10182         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10183         Call Initialise_Project_Path with the proper Target_Name.
10184         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10185         search path.
10186         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10187         with the proper Target_Name.
10188         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10189         Part.Parse routine.
10190         (Parse_Project_And_Apply_Config): Likewise.
10191         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10192         This is fine as this part of the code is supporting only native
10193         compilation.
10194         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10195         is fine as this part of the code is supporting only native compilation.
10196
10197 2011-08-01  Yannick Moy  <moy@adacore.com>
10198
10199         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10200         of homonym, unless the homonym is one of the cases allowed in SPARK
10201         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10202         package declaration occurring after a body.
10203
10204 2011-08-01  Robert Dewar  <dewar@adacore.com>
10205
10206         * checks.adb, exp_ch4.adb: Minor reformatting.
10207
10208 2011-08-01  Javier Miranda  <miranda@adacore.com>
10209
10210         * einfo.ads (Access_Disp_Table): Fix documentation.
10211         (Dispatch_Table_Wrappers): Fix documentation.
10212
10213 2011-08-01  Pascal Obry  <obry@adacore.com>
10214
10215         * prj-env.adb, prj-env.ads: Minor reformatting.
10216
10217 2011-08-01  Yannick Moy  <moy@adacore.com>
10218
10219         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10220         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10221         procedures out of these packages.
10222         * errout.ads, errout.adb
10223         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10224         procedures in of this package
10225         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10226         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10227         on misplaced later vs initial declarations, like in Ada 83
10228         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10229         formal mode on attribute of private type whose full type declaration
10230         is not visible
10231         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10232         package declaration inside a package specification
10233         (Analyze_Full_Type_Declaration): issue error in formal mode on
10234         controlled type or discriminant type
10235         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10236         user-defined operator means that it should come from the source
10237         (New_Overloaded_Entity): issue error in formal mode on overloaded
10238         entity.
10239         * sem_ch6.ads, sem_ch13.ads: typos in comments.
10240
10241 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10242
10243         * atree.adb: Minor reformatting.
10244         * checks.adb: Minor reformatting.
10245
10246 2011-08-01  Vincent Celier  <celier@adacore.com>
10247
10248         * s-parame-vms-ia64.ads: Fix typo in comment
10249         Minor reformatting
10250         * s-parame-vms-restrict.ads: Removed, unused.
10251
10252 2011-08-01  Javier Miranda  <miranda@adacore.com>
10253
10254         * exp_ch3.adb
10255         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
10256         * sem_ch3.adb
10257         (Constrain_Index): Remove side effects in the evaluation of the bounds.
10258         * sem_ch3.ads, sem_ch3.adb
10259         (Is_Constant_Bound): New extended version of the subprogram that was
10260         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
10261         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
10262         * sem_aux.ads (Constant_Value): Fix typo in comment.
10263         * checks.adb (Generate_Index_Checks): New implementation which, for
10264         array objects with constant bounds, generates the runtime check
10265         referencing the bounds of the array type. For other cases this routine
10266         provides its previous behavior obtaining such values from the array
10267         object.
10268         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
10269         parent type.
10270         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
10271         we cannot have semantic interpretations of the new node.
10272
10273 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10274
10275         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
10276         expressions.
10277
10278 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10279
10280         * sem_ch8.adb: Minor code editing.
10281         * s-vxwext.adb: Remove trailing space.
10282         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
10283         consistency with other files.
10284
10285 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10286
10287         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
10288
10289 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10290
10291         * par-ch10.adb: reject parameterized expressions as compilation unit.
10292         * sem_ch4.adb: handle properly conditional expression with overloaded
10293         then_clause and no else_clause.
10294
10295 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10296
10297         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10298         like done by System.Aux_DEC.
10299         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10300
10301 2011-08-01  Yannick Moy  <moy@adacore.com>
10302
10303         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10304         missing label at end of declaration (subprogram or package)
10305         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10306         of positional and named parameter association
10307         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10308         Error_Msg_SP which adds a prefix to the error message giving the name
10309         of the formal language analyzed
10310         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10311         access result type in subprogram, unconstrained array as result type,.
10312         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10313         procedure
10314         * sem_ch8.adb: Code clean up.
10315
10316 2011-08-01  Javier Miranda  <miranda@adacore.com>
10317
10318         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10319         * einfo.ads (Access_Disp_Table): Fix documentation.
10320         (Dispatch_Table_Wrappers): Fix documentation.
10321         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10322         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10323         to enforce the documentation of this attribute.
10324         (Set_Is_Interface): Cleanup the assertion.
10325         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10326         the Underlying_Type entity before reading attribute Access_Disp_Table.
10327         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10328         Locate the Underlying_Type before reading attribute Access_Disp_Table.
10329         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10330         the Underlying_Type entity before reading attribute Access_Disp_Table.
10331         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10332         Locate the Underlying_Type entity before reading attribute
10333         Access_Disp_Table.
10334
10335 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10336
10337         * s-poosiz.ads: Additional overriding indicators.
10338
10339 2011-08-01  Yannick Moy  <moy@adacore.com>
10340
10341         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10342         formal mode.
10343         (Analyze_Iteration_Scheme): issue error in formal mode when loop
10344         parameter specification does not include a subtype mark.
10345         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10346         formal mode on abstract subprogram.
10347         (Analyze_Subprogram_Specification): issue error in formal mode on
10348         user-defined operator.
10349         (Process_Formals): issue error in formal mode on access parameter and
10350         default expression.
10351         * sem_ch9.adb (Analyze_Abort_Statement,
10352         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10353         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10354         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10355         Analyze_Requeue, Analyze_Selective_Accept,
10356         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10357         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10358         issue error in formal mode on user-defined raise statement.
10359
10360 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10361
10362         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10363         declaration being hidden when overriding an implicit inherited
10364         subprogram.
10365         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10366         (-gnats), do not complain about a source file that contains only a
10367         pragma No_Body.
10368
10369 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10370
10371         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10372         variable if already set.
10373
10374 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10375
10376         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10377         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10378         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10379         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10380         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10381         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10382         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10383         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10384         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10385         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10386         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10387         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10388         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10389         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10390         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10391         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10392         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10393         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10394         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10395         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10396         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10397         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10398         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10399         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10400         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10401         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10402         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10403         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10404         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10405         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10406         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10407         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10408         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10409         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10410         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10411         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10412         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10413         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10414         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10415         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10416         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10417         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10418         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10419         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10420         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10421         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10422         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10423         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10424         s-osinte-mingw.ads: Update to GPLv3 run-time license.
10425         Use GNAT instead of GNARL.
10426
10427 2011-08-01  Bob Duff  <duff@adacore.com>
10428
10429         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10430         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10431         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10432         reformatting.
10433
10434 2011-08-01  Yannick Moy  <moy@adacore.com>
10435
10436         * debug.adb (d.D) reverve flag for the SPARK mode
10437         (d.E) reverve flag for SPARK generation mode
10438         (d.F) reverve flag for Why generation mode
10439         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10440         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
10441         functions which return True when the corresponding modes are set
10442         (Formal_Language): return "spark" or "alfa" when in formal verification
10443         mode.
10444         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10445         Error_Msg to prefix the error message with a tag giving the formal
10446         language
10447         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10448         message with a tag giving the formal language
10449         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10450         block statement
10451         (Analyze_Case_Statement): issue error in formal mode on case statement
10452         with a single "others" case alternative
10453         (Analyze_Exit_Statement): issue errors in formal mode on exit
10454         statements which do not respect SPARK restrictions
10455         (Analyze_Goto_Statement): issue error in formal mode on goto statement
10456         (Check_Unreachable_Code): always issue an error (not a warning) in
10457         formal mode on unreachable code (concerns both code after an infinite
10458         loop and after an unconditional jump, both not allowed in SPARK)
10459         * sem_ch6.adb (Analyze_Return_Statement): add call to
10460         Set_Return_Present for a procedure containing a return statement
10461         (already done for functions in Analyze_Function_Return)
10462         (Analyze_Function_Return): issue error in formal mode on extended
10463         return or if return is not last statement in function
10464         (Check_Missing_Return): issue error in formal mode if function does
10465         not end with return or if procedure contains a return
10466         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10467         function to detect if there is an inner scope of its parameter S which
10468         is a loop.
10469
10470 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10471
10472         * sem_ch6.ads: Minor reformatting.
10473
10474 2011-08-01  Javier Miranda  <miranda@adacore.com>
10475
10476         * sem_util.adb (Abstract_Interface_List): Complete condition when
10477         processing private type declarations to avoid reading unavailable
10478         attribute.
10479         (Is_Synchronized_Tagged_Type): Complete condition when processing
10480         private extension declaration nodes to avoid reading unavailable
10481         attribute.
10482
10483 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10484
10485         * sem_ch3.adb: Minor reformatting.
10486
10487 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10488
10489         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10490         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10491         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10492         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10493         for VMS, instead parametrize the common implementation with
10494         System.Parameters declarations.
10495
10496 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
10497
10498         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10499
10500 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10501
10502         * seh_init.c: Fix SEH handler installation on win64.
10503
10504 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10505
10506         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10507         double analysis of an anonymous access to subprogram, because it can
10508         lead to improper sharing of profiles and a back-end crash.
10509
10510 2011-08-01  Robert Dewar  <dewar@adacore.com>
10511
10512         * make.adb, sem_ch4.adb: Minor reformatting.
10513         * gcc-interface/Make-lang.in: Update dependencies.
10514         * sem_util.adb, exp_ch5.adb: Minor reformatting.
10515
10516 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10517
10518         * gnat_rm.texi: Fix definition of Long_Integer.
10519
10520 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10521
10522         * exp_aggr.adb: check limit size of static aggregate unconditionally,
10523         to prevent storage exhaustion.
10524         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10525         finalized is a function body, insert the cleanup code before the final
10526         return statement, to prevent spurious warnings.
10527         * s-pooglo.ads: add overriding indicator.
10528
10529 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10530
10531         * sem_ch4.adb (Operator_Check): improve error message when both a
10532         with_clause and a use_clause are needed to make operator usage legal.
10533         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10534         determine whether a compilation unit is visible within an other,
10535         either through a with_clause in the current unit, or a with_clause in
10536         its library unit or one one of its parents.
10537
10538 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10539
10540         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10541         over an arbitrary expression of an array or container type.
10542         * lib-xref.adb: clarify comment.
10543
10544 2011-08-01  Bob Duff  <duff@adacore.com>
10545
10546         * einfo.ads: Minor reformatting.
10547         * debug.adb: Minor comment improvement.
10548
10549 2011-08-01  Javier Miranda  <miranda@adacore.com>
10550
10551         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10552         consider hidden subprograms as valid candidates.
10553
10554 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10555
10556         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10557
10558 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
10559
10560         * gnat_ugn.texi: Fix typo.
10561
10562 2011-08-01  Robert Dewar  <dewar@adacore.com>
10563
10564         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10565         lib-xref.adb: Minor reformatting
10566
10567 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
10568
10569         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10570         when to generate a call to Move_Final_List.
10571         (Has_Controlled_Parts): Remove this function.
10572
10573 2011-08-01  Geert Bosch  <bosch@adacore.com>
10574
10575         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10576         "," in choice list.
10577
10578 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10579
10580         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10581         explicit raise of a predefined exception as Comes_From_Source if the
10582         original N_Raise_Statement comes from source.
10583
10584 2011-08-01  Robert Dewar  <dewar@adacore.com>
10585
10586         * sinfo.ads: Add comment.
10587         * sem_ch6.adb: Minor reformatting.
10588
10589 2011-08-01  Robert Dewar  <dewar@adacore.com>
10590
10591         * freeze.adb (Freeze_Entity): Refine check for bad component size
10592         clause to avoid rejecting confirming clause when atomic/aliased present.
10593
10594 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10595
10596         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10597         better determine whether an entity reference is a write.
10598         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10599         subcomponent.
10600         * lib-xref.adb (Output_References): Do no suppress a read reference at
10601         the same location as an immediately preceeding modify-reference, to
10602         handle properly in-out actuals.
10603
10604 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10605
10606         * env.c (__gnat_setenv) [VMS]: Refine previous change.
10607
10608 2011-08-01  Quentin Ochem  <ochem@adacore.com>
10609
10610         * i-cstrin.adb (New_String): Changed implementation, now uses only the
10611         heap to compute the result.
10612
10613 2011-08-01  Robert Dewar  <dewar@adacore.com>
10614
10615         * atree.ads: Minor reformatting.
10616
10617 2011-08-01  Emmanuel Briot  <briot@adacore.com>
10618
10619         * g-expect.adb (Get_Command_Output): Fix memory leak.
10620
10621 2011-08-01  Geert Bosch  <bosch@adacore.com>
10622
10623         * cstand.adb (P_Float_Type): New procedure to print the definition of
10624         predefined fpt types.
10625         (P_Mixed_Name): New procedure to print a name using mixed case
10626         (Print_Standard): Use P_Float_Type for printing floating point types
10627         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10628         precision IEEE float.
10629
10630 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10631
10632         * sem_ch3.adb: Minor reformatting.
10633
10634 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10635
10636         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10637         the completion of a generic function, insert the new body rather than
10638         rewriting the original.
10639
10640 2011-08-01  Yannick Moy  <moy@adacore.com>
10641
10642         * sinfo.ads, errout.ads: Typos in comments.
10643
10644 2011-08-01  Robert Dewar  <dewar@adacore.com>
10645
10646         * par-endh.adb: Minor reformatting.
10647
10648 2011-08-01  Robert Dewar  <dewar@adacore.com>
10649
10650         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10651         (Pre_Post_Aspects): New subtype.
10652         * par-ch12.adb (P_Generic): New syntax for aspects in packages
10653         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10654         * par-ch7.adb (P_Package): Remove Decl parameter
10655         (P_Package): Handle new syntax for aspects (before IS)
10656         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10657         new aspect syntax
10658         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10659         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10660         (P_Package): Remove Decl parameter
10661         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10662         aspects
10663         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10664         specs
10665         * sem_util.ads, sem_util.adb (Static_Boolean): New function
10666         * sinfo.ads: Document new syntax for aspects in packages etc.
10667         * sprint.adb: Handle new syntax of aspects before IS in package
10668
10669 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10670
10671         * atree.ads: Minor reformatting.
10672         * sem_prag.adb: Minor reformatting.
10673
10674 2011-08-01  Robert Dewar  <dewar@adacore.com>
10675
10676         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10677         case expr alternative.
10678
10679 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10680
10681         * sem_ch12.adb: Fix typo.
10682
10683 2011-08-01  Geert Bosch  <bosch@adacore.com>
10684
10685         * sem_prag.adb (Check_No_Link_Name): New procedure.
10686         (Process_Import_Or_Interface): Use Check_No_Link_Name.
10687         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10688         instead of Standard_Long_Long_Float_Size global. Preparation for
10689         eventual removal of per type constants.
10690         * exp_util.ads (Get_Stream_Size): New function returning the stream
10691         size value of subtype E.
10692         * exp_util.adb (Get_Stream_Size): Implement new function.
10693         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10694         function.
10695         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10696         * einfo.adb:
10697         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10698
10699 2011-08-01  Geert Bosch  <bosch@adacore.com>
10700
10701         * cstand.adb: Fix comments.
10702         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10703         count of arguments.
10704
10705 2011-08-01  Robert Dewar  <dewar@adacore.com>
10706
10707         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10708
10709 2011-08-01  Geert Bosch  <bosch@adacore.com>
10710
10711         * atree.ads: Fix comment.
10712
10713 2011-08-01  Robert Dewar  <dewar@adacore.com>
10714
10715         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10716         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10717         * par.adb: Add with for Namet.Sp.
10718         * par-tchk.adb: Minor reformatting.
10719
10720 2011-08-01  Vincent Celier  <celier@adacore.com>
10721
10722         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10723         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10724         of the init procedure of a SAL.
10725         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10726         New procedure.
10727
10728 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10729
10730         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10731         reformatting.
10732
10733 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10734
10735         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10736
10737 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10738
10739         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10740         conformant with its spec (return True only for types that have
10741         an overriding Initialize primitive operation that prevents them from
10742         having preelaborable initialization).
10743         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10744         initialization for controlled types in Ada 2005 or later mode.
10745
10746 2011-08-01  Robert Dewar  <dewar@adacore.com>
10747
10748         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10749         Postcondition.
10750         (Same_Aspect): New function.
10751         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10752         Type_Invariant, Precondition, Postcondition.
10753         * snames.ads-tmpl: Add Name_Type_Invariant.
10754
10755 2011-08-01  Robert Dewar  <dewar@adacore.com>
10756
10757         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10758         here.
10759         (Freeze_All_Ent): Fix error in handling inherited aspects.
10760         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10761         already analyzed, but don't skip entire processing of a declaration,
10762         that's wrong in some cases of declarations being rewritten.
10763         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10764         Don't delay for integer, string literals
10765         Treat predicates in usual manner for delay, remove special case code,
10766         not needed.
10767         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10768         (Build_Predicate_Function): Update saved expression in aspect
10769         (Build_Invariant_Procedure): Update saved expression in aspect
10770         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10771         of replacement of discriminant references if the reference is simple.
10772
10773 2011-08-01  Robert Dewar  <dewar@adacore.com>
10774
10775         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10776         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10777         Static_Predicate and Dynamic_Predicate.
10778         (Build_Predicate_Function): Add processing for Static_Predicate
10779         and Dynamic_Predicate.
10780         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10781         (From_Static_Predicate): New flag
10782         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10783
10784 2011-08-01  Robert Dewar  <dewar@adacore.com>
10785
10786         * usage.adb: Documentation cleanup for Ada version modes in usage.
10787         * expander.adb: Minor reformatting.
10788
10789 2011-08-01  Robert Dewar  <dewar@adacore.com>
10790
10791         * atree.ads: Minor comment fix.
10792         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10793         a-witeio.ads, sem_prag.adb: Minor reformatting.
10794
10795 2011-08-01  Doug Rupp  <rupp@adacore.com>
10796
10797         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10798         pointers. Use descrip.h header file for convenience. Add some
10799         comments.
10800
10801 2011-08-01  Robert Dewar  <dewar@adacore.com>
10802
10803         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10804         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10805         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10806         New procedure.
10807         (Check_Aspect_At_End_Of_Declarations): New procedure
10808         (Analye_Aspect_Specification): Minor changes for above procedures
10809         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10810         specification node as well.
10811
10812 2011-08-01  Pascal Obry  <obry@adacore.com>
10813
10814         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10815         Windows files. Use GetFilesAttributes() in this case to check for file
10816         existence instead of returning with an error code.
10817
10818 2011-08-01  Vincent Celier  <celier@adacore.com>
10819
10820         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10821         High is above Source length.
10822
10823 2011-08-01  Robert Dewar  <dewar@adacore.com>
10824
10825         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10826
10827 2011-08-01  Robert Dewar  <dewar@adacore.com>
10828
10829         * aspects.ads (Boolean_Aspects): New subtype.
10830         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10831         for derived types in cases where the parent type and derived type have
10832         aspects.
10833         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10834         with aspects when parent type also has aspects.
10835         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10836         boolean expression at this point).
10837         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10838         accordance with final decision on the Ada 2012 feature.
10839         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10840
10841 2011-08-01  Matthew Heaney  <heaney@adacore.com>
10842
10843         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10844
10845 2011-08-01  Pascal Obry  <obry@adacore.com>
10846
10847         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10848         Fix Replace_Slice when High is above current string size.
10849         (Replace_Slice): Fix DL computation when High is above current
10850         string length.
10851
10852 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
10853
10854         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10855
10856 2011-08-01  Matthew Heaney  <heaney@adacore.com>
10857
10858         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10859         of node.
10860
10861 2011-08-01  Pascal Obry  <obry@adacore.com>
10862
10863         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10864         reformatting.
10865
10866 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10867
10868         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10869         access to protected subprograms in generic bodies.
10870         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10871         protected type, indicate that the convention of the subprogram is
10872         Convention_Protected, because it may be used in subsequent declarations
10873         within the protected declaration.
10874
10875 2011-08-01  Vincent Celier  <celier@adacore.com>
10876
10877         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10878         and "final" procedures when the name of the library is "ada", to avoid
10879         duplicate symbols "adainit" and "adafinal" in executables.
10880
10881 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10882
10883         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10884         quantified expression that appears within a postcondition and uses the
10885         Ada2012 'Result attribute.
10886
10887 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10888
10889         * init.c (__gnat_error_handler): Cast reason to int.
10890         (__gnat_install_handler): Explain sa_sigaction use.
10891
10892 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10893
10894         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10895         subprogram has copy-in copy-out parameters, try to promote the mode of
10896         the return type if it is passed in registers.
10897
10898 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10899
10900         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10901         left operand as addressable.
10902
10903 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10904
10905         * gcc-interface/gigi.h (build_function_stub): Remove.
10906         (build_return_expr): Likewise.
10907         (convert_vms_descriptor): Declare.
10908         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10909         (build_function_stub): Move to...
10910         * gcc-interface/utils2.c (build_return_expr): Move to...
10911         * gcc-interface/trans.c (build_function_stub): ...here.
10912         (build_return_expr): ...here.
10913         (Subprogram_Body_to_gnu): Add local variable for language_function.
10914         Disconnect the parameter attributes cache, if any, once done with it.
10915         Call end_subprog_body only after setting the end_locus.
10916         Build the stub associated with the function, if any, at the very end.
10917         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10918         variables and streamline control flow.
10919
10920 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
10921
10922         PR ada/49819
10923         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10924         g-trasym-dwarf.adb.
10925
10926 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10927
10928         PR bootstrap/49794
10929         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10930         Assign to act.sa_sigaction.
10931         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10932         current->return_address to char * before arithmetic.
10933
10934 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10935
10936         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10937         Correct argument types.
10938         Extract code from reason.
10939         (__gnat_install_handler): Assign to act.sa_sigaction.
10940
10941 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
10942
10943         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10944         (GNAT1_OBJS): ...here.
10945
10946 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
10947
10948         PR ada/48711
10949         * g-socthi-mingw.adb (Fill): Fix formatting.
10950
10951         * gcc-interface/gigi.h: Move around comment.
10952
10953 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
10954
10955         PR ada/46350
10956         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10957
10958 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
10959
10960         PR ada/48711
10961         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10962
10963 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
10964
10965         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10966         range comparison if Pmode is SImode.
10967
10968 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
10969             Eric Botcazou  <ebotcazou@adacore.com>
10970
10971         * adadecode.c: Wrap up in extern "C" block.
10972         * adadecode.h: Likewise.
10973         * adaint.c: Likewise.  Remove 'const' keyword.
10974         * adaint.h: Likewise.
10975         * argv.c: Likewise.
10976         * atree.h: Likewise.
10977         * cio.c: Likewise.
10978         * cstreams.c: Likewise.
10979         * env.c: Likewise.
10980         * exit.c: Likewise.
10981         * fe.h: Likewise.
10982         * final.c: Likewise.
10983         * init.c: Likewise.
10984         * initialize.c: Likewise.
10985         * link.c: Likewise.
10986         * namet.h: Likewise.
10987         * nlists.h: Likewise.
10988         * raise.c: Likewise.
10989         * raise.h: Likewise.
10990         * repinfo.h: Likewise.
10991         * seh_init.c: Likewise.
10992         * targext.c: Likewise.
10993         * tracebak.c: Likewise.
10994         * uintp.h: Likewise.
10995         * urealp.h: Likewise.
10996         * xeinfo.adb: Wrap up generated C code in extern "C" block.
10997         * xsinfo.adb: Likewise.
10998         * xsnamest.adb: Likewise.
10999         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11000         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11001         * gcc-interface/misc.c: Likewise.
11002         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11003         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
11004         ada/targext.o here...
11005         (GNAT_ADA_OBJS): ...and not here.
11006         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11007         (GNATBIND_OBJS): Reorder.
11008
11009 2011-07-07  Richard Henderson  <rth@redhat.com>
11010
11011         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11012         dwarf2out_frame_init.
11013
11014 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
11015
11016         * gcc-interface/misc.c (gnat_init): Tweak previous change.
11017
11018 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11019
11020         PR target/39150
11021         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11022
11023 2011-07-06  Richard Guenther  <rguenther@suse.de>
11024
11025         * gcc-interface/misc.c (gnat_init): Merge calls to
11026         build_common_tree_nodes and build_common_tree_nodes_2.
11027         Re-initialize boolean_false_node.
11028
11029 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
11030             Olivier Hainque  <hainque@adacore.com>
11031             Nicolas Setton  <setton@adacore.com>
11032
11033         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11034         the type according to the ARTIFICIAL_P parameter.
11035         (create_type_decl): Likewise.
11036         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11037
11038 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
11039
11040         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11041         (gnatbind): Likewise.
11042
11043 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11044
11045         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11046
11047 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11048
11049         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11050         local variable throughout.  Remove useless call to Base_Type.
11051         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11052         Take it also into account for the volatileness of the field.  Set the
11053         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
11054
11055 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11056
11057         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11058         on a dereference built for a by-ref object if it has an address clause.
11059
11060 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
11061
11062         * einfo.ads (Address_Taken): Document use for the second argument of
11063         Asm_Input and Asm_Output attributes.
11064         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11065         argument is an entity name, then set Address_Taken on it.
11066         <Attribute_Asm_Output>: Likewise.
11067         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11068         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11069         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11070         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11071
11072 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
11073
11074         PR middle-end/46500
11075         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11076
11077 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
11078
11079         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11080         (ada/utils.o): Update dependencies.
11081         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11082         ../../../libcpp/libcpp.a.
11083         * gcc-interface/utils.c: Include common/common-target.h.
11084         (process_attributes): Use targetm_common.have_named_sections.
11085
11086 2011-06-07  Richard Guenther  <rguenther@suse.de>
11087
11088         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11089         set_sizetype.
11090
11091 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11092
11093         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11094         TREE_THIS_NOTRAP flag.
11095
11096 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11097
11098         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11099         Fix thinko.
11100
11101 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11102
11103         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11104         constants whose full view has discriminants specially.
11105
11106 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11107
11108         * gcc-interface/utils.c: Include diagnostic.h.
11109         (gnat_write_global_declarations): Output debug information for all
11110         global type declarations before finalizing the compilation unit.
11111         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11112
11113 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
11114
11115         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11116
11117 2011-05-25  Kai Tietz  <ktietz@redhat.com>
11118
11119         * adaint.c (__gnat_to_canonical_file_list_next): Use array
11120         initialization instead of const/none-const pointer assignment.
11121
11122 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
11123
11124         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11125         $(EXTRA_GNAT1_OBJS).
11126         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11127         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11128         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11129         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11130         libcommon-target.a instead of prefix.o.
11131
11132 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
11133
11134         PR ada/49097
11135         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11136
11137 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
11138
11139         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11140         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11141         instead of version.o.
11142
11143 2011-05-18  Kai Tietz <ktietz@redhat.com>
11144
11145         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11146         boolean_false_node instead of integer_zero_node.
11147         (convert_with_check): Likewise.
11148         * gcc-interface/decl.c (choices_to_gnu): Likewise.
11149
11150 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
11151
11152         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11153         type of the parameter is an unconstrained array, convert the actual to
11154         the type of the formal in the In Out and Out cases as well.
11155
11156 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
11157
11158         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11159         call build_function_type_array or build_varargs_function_type_array
11160         instead.
11161         (create_subprog_type): Don't call build_function_type; call
11162         build_function_type_vec instead.
11163
11164 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
11165
11166         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11167         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11168         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
11169
11170 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
11171
11172         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
11173
11174         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11175         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11176
11177 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
11178
11179         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11180
11181 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
11182
11183         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11184         instead of accessing TYPE_ARG_TYPES directly.
11185         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11186
11187 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
11188
11189         PR ada/48844
11190         * gcc-interface/gigi.h (get_variant_part): Declare.
11191         * gcc-interface/decl.c (get_variant_part): Make global.
11192         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11193         types have the same constant size, are record types and T1 has a
11194         variant part while T2 doesn't.
11195
11196 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
11197
11198         * gcc-interface/utils.c (begin_subprog_body): Do not call
11199         get_pending_sizes.
11200         (end_subprog_body): Likewise.
11201
11202 2011-05-04  Richard Guenther  <rguenther@suse.de>
11203
11204         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11205         int_const_binop.
11206         (pos_to_constructor): Likewise.
11207
11208 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
11209             Eric Botcazou  <ebotcazou@adacore.com>
11210
11211         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11212         of build_function_type.  Adjust calls to...
11213         (build_raise_check): ...this.  Do not take a void_tree parameter.
11214         Call build_function_type_list instead of build_function_type.
11215         Fix head comment and swap couple of conditional blocks.
11216
11217 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
11218
11219         * gnatvsn.ads (Library_Version): Bump to 4.7.
11220         (Current_Year): Bump to 2011.
11221
11222 2011-04-29  Michael Matz  <matz@suse.de>
11223
11224         * gcc-interface/misc.c (gnat_handle_option): Set
11225         warn_maybe_uninitialized.
11226
11227 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
11228
11229         * gnat_ugn.texi (Complexity Metrics Control): Update link to
11230         the Watson/McCabe paper.
11231
11232 2011-04-23  Jim Meyering  <meyering@redhat.com>
11233
11234         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11235
11236 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
11237
11238         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11239         onto the new type.
11240
11241 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
11242
11243         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
11244         parameter.
11245         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
11246         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
11247         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
11248         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
11249         <all>: Do not set flags on the reused DECL node coming from an alias.
11250         Set DECL_IGNORED_P on the DECL node built for subprograms if they
11251         don't need debug info here...
11252         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
11253         (gigi): Adjust calls to create_subprog_decl.
11254         (build_raise_check): Likewise.
11255         (establish_gnat_vms_condition_handler): Likewise.
11256         (Compilation_Unit_to_gnu): Likewise.
11257         (gnat_to_gnu): Likewise.
11258
11259 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
11260
11261         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
11262         (NO_REORDER_ADAFLAGS): New variable.
11263         (EXTRA_GNATTOOLS): Always define.
11264         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
11265         Clean up and adjust list of files compiled with special options.
11266         * gcc-interface/Make-lang.in: Likewise.
11267         (ada/decl.o): Cosmetical change.
11268         (ada/misc.o): Remove dependency on $(PLUGIN_H).
11269
11270 2011-04-20  Jim Meyering  <meyering@redhat.com>
11271
11272         * initialize.c (__gnat_initialize): Remove useless if-before-free.
11273
11274 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
11275
11276         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
11277         $(CFLAGS) on the link line.
11278
11279 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
11280
11281         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
11282         padded type built for the return type if it is unconstrained.
11283
11284 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
11285
11286         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
11287
11288 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
11289
11290         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11291         before calling TREE_CHAIN.
11292         * gcc-interface/misc.c (gnat_init_ts): New function.
11293         (LANG_HOOKS_INIT_TS): Define.
11294
11295 2011-04-12  Martin Jambor  <mjambor@suse.cz>
11296
11297         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11298         instead of cgraph_node.
11299
11300 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
11301
11302         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11303         alignment on fields of the RETURN type built for the Copy-In Copy-Out
11304         mechanism.
11305
11306 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
11307
11308         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11309         of aggregate types that contain a placeholder.
11310
11311 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
11312
11313         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11314         TYPE_ARG_TYPES.
11315         (handle_type_generic_attribute): Likewise.
11316
11317 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
11318
11319         PR ada/47163
11320         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11321
11322 2011-04-04  Kai Tietz  <ktietz@redhat.com>
11323
11324         PR ada/47163
11325         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11326         to flag value.
11327
11328 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11329
11330         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11331         type case, do not strip a padding type around the array type.
11332
11333 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11334
11335         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11336         types.
11337
11338 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11339
11340         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11341         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11342         code for -feliminate-unused-debug-types.
11343         (gnat_post_options): Likewise.
11344
11345 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11346
11347         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11348         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11349         distinct copy.
11350
11351 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11352
11353         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11354         DECL_ARTIFICIAL flag on enumeration types.
11355
11356 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11357
11358         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11359         fat pointer types artificial unconditionally.
11360         <E_Array_Subtype>: Attach the base array type as a parallel type if it
11361         isn't artificial.
11362
11363 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11364
11365         * gcc-interface/gigi.h (get_dummy_type): Declare.
11366         (build_dummy_unc_pointer_types): Likewise.
11367         (finish_fat_pointer_type): Likewise.
11368         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11369         fat pointer type has been built, complete it in place.
11370         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11371         and thin pointers.  Remove useless variable.
11372         (finish_fat_pointer_type): Make global and move to...
11373         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11374         (get_dummy_type): New function.
11375         (build_dummy_unc_pointer_types): Likewise.
11376         (gnat_pushdecl): Propage the name to the anonymous variants only.
11377         (update_pointer_to): Only adjust the pointer types in the unconstrained
11378         array case.
11379
11380 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11381
11382         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11383         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11384         if this is a Taft amendment type and the full declaration is available.
11385         * gcc-interface/trans.c (process_type): Likewise.
11386         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11387         (process_freeze_entity): Likewise.
11388         * gcc-interface/utils.c (dummy_global): New static variable.
11389         (gnat_write_global_declarations): If there are types declared as used
11390         at the global level, insert them in the global hash table.
11391
11392 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11393
11394         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11395         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11396         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11397         copy.
11398         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
11399         flag of the type accordingly.
11400         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11401
11402 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11403
11404         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11405         finalizing types when updating the pointers to the designated type.
11406         <all>: Finalize the deferred types even if we didn't defer processing
11407         of incomplete types in this invocation.
11408
11409 2011-04-01  Olivier Hainque  <hainque@adacore.com>
11410             Nicolas Setton  <setton@adacore.com>
11411             Eric Botcazou  <ebotcazou@adacore.com>
11412
11413         * gcc-interface/misc.c (gnat_descriptive_type): New function.
11414         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11415
11416 2011-03-28  Kai Tietz  <ktietz@redhat.com>
11417
11418         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11419         Windows targets.
11420         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11421         * system-mingw.ads (System): Change ZCX_By_Default default to True.
11422
11423         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11424
11425 2011-03-28  Tristan Gingold  <gingold@adacore.com>
11426
11427         PR ada/44431
11428         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11429         Use ada output of gnatbind.
11430         (ada/b_gnatb.adb): Ditto.
11431         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11432         (ada.mostlyclean, ada.stage1)
11433         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11434         (ada.stagefeedback): Adjust.
11435         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11436         Use ada output of gnatbind.
11437         (b_gnatm.adb): Ditto.
11438         (b_gnatl.o, b_gnatm.o): New rules.
11439
11440 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11441
11442         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11443         for the padded type built to support a specified size or alignment.
11444
11445 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11446
11447         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11448         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11449         unconditionally to the end of the unit when the designated type is
11450         limited_with'ed.
11451         <all>: Rename local variable.  Attempt to un-defer types only and do it
11452         for limited_with'ed types as well.
11453         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
11454         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11455         consistently and remove redundant call to finalize_from_with_types.
11456
11457 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11458
11459         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11460         subprograms without a previous spec declared in the same unit.
11461         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11462         subprograms at the end of the unit instead of at the beginning.
11463         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11464         isn't public for the special handling of non-inline functions nested
11465         inside inline external functions.
11466
11467 2011-03-25  Jeff Law  <law@redhat.com>
11468
11469         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11470
11471 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11472
11473         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11474         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11475         to compute Set_Size_Depends_On_Discriminant.
11476         (Layout_Type): Call it on array types in back-end layout mode.
11477         * sem_util.adb (Requires_Transient_Scope): Return true for array
11478         types only if the size depends on the value of discriminants.
11479         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11480         type if the RHS is a call to a function that returns an unconstrained
11481         type with default discriminant.
11482
11483 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11484
11485         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11486         non-conversion to the nominal result type at the end.
11487
11488 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11489
11490         * gcc-interface/trans.c (create_temporary): New function taken from...
11491         (create_init_temporary): ...here.  Call it.
11492         (call_to_gnu): Create the temporary for the return value early, if any.
11493         Create it for a function with copy-in/copy-out parameters if there is
11494         no target; in other cases of copy-in/copy-out, use another temporary.
11495         Push the new binding level lazily.  Add and rename local variables.
11496
11497 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11498
11499         * gcc-interface/decl.c (validate_size): Improve comments and tweak
11500         error message.
11501         (set_rm_size): Likewise.
11502
11503 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11504
11505         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11506         for the padded type built in order to support a specified alignment.
11507         Fix incorrect formatting.
11508
11509 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11510
11511         PR bootstrap/48216
11512         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11513
11514 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11515
11516         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11517         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11518         to the end of the list.  Adjust recursive call.  Rename local variable.
11519         If REORDER is true, reorder components of the record type.
11520         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11521         components_to_record and adjust the parameter list.
11522
11523 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11524
11525         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11526         disabled, use the variable for bounds of loop iteration scheme.
11527
11528 2011-03-21  Kai Tietz  <ktietz@redhat.com>
11529
11530         PR target/12171
11531         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11532
11533 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
11534
11535         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11536         out whether the expression is read-only.  Short-circuit placeholder
11537         case and rename a couple of local variables.
11538
11539 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
11540
11541         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11542         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11543         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11544         (convert): Deal with conversions from a smaller form type specially.
11545
11546 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
11547
11548         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11549         its argument, except for the special -I- switch.
11550
11551 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
11552
11553         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11554         "Ada Issues".
11555
11556 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
11557
11558         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11559
11560 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
11561
11562         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11563         GNAT_FORMAL.
11564         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11565         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
11566         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
11567         Do not generate the check directly, instead instantiate the template
11568         check present in the descriptor.
11569         (make_descriptor_field): Move around.
11570         (build_vms_descriptor32): Build a template check in the POINTER field.
11571         (build_vms_descriptor): Remove useless suffixes.
11572         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11573
11574 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
11575
11576         PR bootstrap/47467
11577         * targext.c: Include target files if IN_RTS is defined.
11578
11579 2011-01-26  Richard Guenther  <rguenther@suse.de>
11580
11581         PR bootstrap/47467
11582         * targext.c: Include config.h.
11583         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11584         dependency.
11585
11586 2011-01-04  Pascal Obry  <obry@adacore.com>
11587             Eric Botcazou  <ebotcazou@adacore.com>
11588
11589         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11590
11591 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11592
11593         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11594         end-of-case on the end label and its associated gotos, if any.
11595
11596 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11597
11598         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11599         expressions of the parameter cache within the statement group of
11600         the CICO mechanism.
11601
11602 2011-01-04  Olivier Hainque  <hainque@adacore.com>
11603             Eric Botcazou  <ebotcazou@adacore.com>
11604
11605         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11606         (set_end_locus_from_node): New function.
11607         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11608         make and the function end_locus.
11609         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11610         for the elaboration subprogram.
11611         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11612         set the end_locus of the expression as well.
11613
11614 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11615
11616         PR ada/47131
11617         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11618         variables that are referenced in exception handlers volatile.
11619
11620
11621 \f
11622 Copyright (C) 2011 Free Software Foundation, Inc.
11623
11624 Copying and distribution of this file, with or without modification,
11625 are permitted in any medium without royalty provided the copyright
11626 notice and this notice are preserved.