OSDN Git Service

2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
2
3         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4         than the current node.
5         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
6         Finalization_Master. The list headers have two fields instead of three.
7         This should fix alignment issue but subpool allocations are now
8         unusable. Alphabetize subprograms.
9         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
10         the size of the header when converting the beginning of the object to
11         a FM_Node. Set the master's Finalize_Address attribute if not already
12         set.
13         (Deallocate_Any_Controlled): Use the offset rather than the size of the
14         header when converting the beginning of the object to a FM_Node.
15
16 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
17
18         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
19         reraise when compiling for CodePeer.
20
21 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
22
23         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
24         now needed by a-convec.adb. Fix warning.
25
26 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
27
28         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
29         processing of TSS routine Finalize_Address when compiling in
30         CodePeer_Mode.
31
32 2011-08-29  Thomas Quinot  <quinot@adacore.com>
33
34         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
35         sem_warn.adb: Minor reformatting.
36
37 2011-08-29  Emmanuel Briot  <briot@adacore.com>
38
39         * prj-conf.adb (Get_Config_Switches): Also collect the list of
40         languages from aggregated projects.
41
42 2011-08-29  Yannick Moy  <moy@adacore.com>
43
44         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
45         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
46         Traverse_Package_Declaration, Traverse_Subprogram_Body,
47         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
48         for stubs are traversed too when parameter is set
49         (Traverse_All_Compilation_Units): Traverse without going inside stubs
50         (Traverse_Declarations_Or_Statements): Do the special traversing for
51         stubs when required.
52         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
53         return subprogram or package body from stub.
54         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
55         stubs without prior subprogram decl.
56
57 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
58
59         * gnat_ugn.texi: Fix typo.
60
61 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
62
63         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
64         which accounts for size vs alignment issues and calculates the size of
65         the list header.
66         (Deallocate_Any_Controlled): Ditto.
67         (Nearest_Multiple_Rounded_Up): New routine.
68
69 2011-08-29  Tristan Gingold  <gingold@adacore.com>
70
71         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
72         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
73         (Set_Exception_Msg): Ditto.
74         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
75         Private_Data.
76         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
77         Use Save_Occurrence instead of Save_Occurrence_No_Private.
78         (Raise_With_Msg): Remove Cleanup_Flag.
79         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
80         Clean_Flag and Private_Data components.
81
82 2011-08-29  Yannick Moy  <moy@adacore.com>
83
84         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
85         in CodePeer mode.
86         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
87         of an explicitly declared type, so that the base types of the original
88         type and this generated type are the same, and a "type" (not a subtype
89         like previously).
90         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
91         small" in Alfa mode, like in CodePeer mode.
92         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
93         clauses in Alfa mode.
94
95 2011-08-29  Javier Miranda  <miranda@adacore.com>
96
97         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
98         function to the package spec.
99         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
100         internally generated bodies of null procedures locate the internally
101         generated spec enforcing mode conformance.
102         (Is_Interface_Conformant): Ensure that the controlling formal of the
103         primitives match.
104
105 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
106
107         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
108         reject the pragma if it appears to apply to a formal subprogram.
109
110 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
111
112         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
113         inner expression, to prevent double evaluation.
114
115 2011-08-29  Tristan Gingold  <gingold@adacore.com>
116
117         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
118         they were unused.
119         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
120         * a-except-2005.adb (Propagate_Exception): Adjust spec.
121         (Raise_Current_Excep): Adjust call.
122         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
123
124 2011-08-29  Thomas Quinot  <quinot@adacore.com>
125
126         * exp_disp.adb: Minor reformatting.
127
128 2011-08-29  Tristan Gingold  <gingold@adacore.com>
129
130         * a-exexpr.adb (Setup_Exception): Removed.
131         * a-exexpr-gcc.adb (Setup_Exception): Removed.
132         * a-except.adb (Exception_Propagation): Removed.
133         * a-except-2005.adb (Setup_Exception): Removed.
134         (Reraise): Remove call to Setup_Exception.
135         (Reraise_Occurrence): Ditto.
136         (Reraise_Occurrence_Always): Ditto.
137         (Reraise_Occurrence_No_Defer): Ditto.
138         (Transfer_Occurrence): Ditto.
139         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
140         (Set_Exception_Msg): Ditto.
141
142 2011-08-29  Robert Dewar  <dewar@adacore.com>
143
144         * a-convec.adb, exp_disp.adb: Minor reformatting.
145
146 2011-08-29  Tristan Gingold  <gingold@adacore.com>
147
148         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
149
150 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
151
152         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
153         Exception_Handlers to No_List instead of Empty_List in the case where
154         there are no handlers.
155
156 2011-08-29  Tristan Gingold  <gingold@adacore.com>
157
158         * gcc-interface/gigi.h (enum standard_datatypes): Add
159         ADT_reraise_zcx_decl
160         (reraise_zcx_decl): New macro.
161         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
162         (gigi): Set reraise_zcx_decl.
163         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
164         (gnat_to_gnu): Handle N_Raise_Statement.
165
166 2011-08-29  Robert Dewar  <dewar@adacore.com>
167
168         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
169         a-undesu.adb: Minor reformatting.
170
171 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
172
173         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
174         table, accept an unfrozen untagged component if it is an actual for a
175         formal incomplete type.
176         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
177         provide new iterator forms over vectors.
178         Introduce type Iterator in package body to implement operations of
179         Reversible_Iterator interface.
180         * a-iteint.ads: Make package pure so it is usable with new container
181         packages, that are categorized Remote_Types.
182
183 2011-08-29  Robert Dewar  <dewar@adacore.com>
184
185         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
186
187 2011-08-29  Bob Duff  <duff@adacore.com>
188
189         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
190         of <>, because this is the routine that checks for dimensionality
191         errors (for example, for a two-dimensional array, (others => <>) should
192         be (others => (others => <>)).
193
194 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
195
196         * impunit.adb: Add new run-time units.
197         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
198         s-stposu.ads, s-stposu.adb: Code clean up.
199         Handle protected class-wide or task class-wide types
200         Handle C/C++/CIL/Java types.
201         * s-spsufi.adb, s-spsufi.ads: New files.
202
203 2011-08-29  Yannick Moy  <moy@adacore.com>
204
205         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
206         library-level subprogram.
207         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
208         placement.
209         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
210         component.
211         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
212         component.
213         * gnat_rm.texi: Update doc for Test_Case pragma.
214
215 2011-08-29  Tristan Gingold  <gingold@adacore.com>
216
217         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
218         convention C.
219         (GCC_Exception_Access): New type.
220         (Unwind_DeleteException): New imported procedure
221         (Foreign_Exception): Import it.
222         (GNAT_GCC_Exception): Simply have the occurrence inside.
223         (To_GCC_Exception): New function.
224         (To_GNAT_GCC_Exception): New function.
225         (GNAT_GCC_Exception_Cleanup): New procedure..
226         (Propagate_GCC_Exception): New procedure.
227         (Reraise_GCC_Exception): New procedure.
228         (Setup_Current_Excep): New procedure.
229         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
230         (Unwind_RaiseException): Ditto.
231         (Unwind_ForcedUnwind): Ditto.
232         (Remove): Removed.
233         (Begin_Handler): Change type of parameter.
234         (End_Handler): Ditto. Now delete the exception if still present.
235         (Setup_Key): Removed.
236         (Is_Setup_And_Not_Propagated): Removed.
237         (Set_Setup_And_Not_Propagated): Ditto.
238         (Clear_Setup_And_Not_Propagated): Ditto.
239         (Save_Occurrence_And_Private): Ditto.
240         (EID_For): Add 'not null' constraint on parameter.
241         (Setup_Exception): Does nothing.
242         (Propagate_Exception): Simplified.
243         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
244         re-raise is not expanded anymore.
245         * s-except.ads (Foreign_Exception): New exception - placeholder for
246         non Ada exceptions.
247         * raise-gcc.c (__gnat_setup_current_excep): Declare
248         (CXX_EXCEPTION_CLASS): Define (not yet used)
249         (GNAT_EXCEPTION_CLASS): Define.
250         (is_handled_by): Handle foreign exceptions.
251         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
252
253 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
254
255         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
256
257 2011-08-29  Thomas Quinot  <quinot@adacore.com>
258
259         * a-synbar-posix.adb: Minor reformatting.
260
261 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
262
263         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
264         a-exetim-default.ads (Interrupt_Clocks_Supported,
265         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
266         definitions to be compliant with AI-0171. The target systems do not
267         support separate account for the execution time of interrupt handlers.
268
269 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
270
271         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
272         in the barrier to put first the easiest to evaluate (and the one which
273         will be True more often). More efficient.
274
275 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
276
277         * s-atocou-x86.adb: Fix constraint in machine code insertion.
278
279 2011-08-29  Bob Duff  <duff@adacore.com>
280
281         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
282         attributes that are now aspects, as specified by AI05-0229-1.
283         * sem_ch13.adb (Analyze_Aspect_Specifications,
284         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
285         pragmas or attribute references, as appropriate.
286
287 2011-08-29  Robert Dewar  <dewar@adacore.com>
288
289         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
290         a-synbar-posix.ads: Minor reformatting.
291
292 2011-08-29  Yannick Moy  <moy@adacore.com>
293
294         * snames.ads-tmpl: Add name Force.
295
296 2011-08-29  Pascal Obry  <obry@adacore.com>
297
298         * prj-nmsc.adb: Minor reformatting.
299
300 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
301
302         * a-exetim.ads (Interrupt_Clocks_Supported,
303         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
304         definitions to be compliant with AI-0171.
305
306 2011-08-29  Robert Dewar  <dewar@adacore.com>
307
308         * a-ngelfu.adb: Add comments.
309
310 2011-08-29  Geert Bosch  <bosch@adacore.com>
311
312         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
313         the closest machine number to Pi / 2.0.
314
315 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
316
317         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
318         package Ada.Synchronous_Barriers.
319         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
320         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
321         default implementation using protected objects and another one
322         a-synbar-posix using POSIX barriers as the underlying support.
323         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
324         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
325         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
326         Clean up dependencies.
327         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
328
329 2011-08-29  Robert Dewar  <dewar@adacore.com>
330
331         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
332         exp_dist.adb: Minor code reorganization.
333         Minor reformatting.
334
335 2011-08-29  Thomas Quinot  <quinot@adacore.com>
336
337         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
338         primitive operation must support external streaming if it is not a
339         controlling access result.
340
341 2011-08-29  Thomas Quinot  <quinot@adacore.com>
342
343         * sinfo.ads, sem_ch7.adb: Minor reformatting.
344
345 2011-08-29  Bob Duff  <duff@adacore.com>
346
347         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
348         restriction on allocators, as required by AI05-0013-1.
349         * restrict.ads: Minor comment fix.
350
351 2011-08-29  Tristan Gingold  <gingold@adacore.com>
352
353         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
354         (To_Jmpbuf_Address): Ditto
355         (builtin_longjmp): Ditto
356
357 2011-08-29  Thomas Quinot  <quinot@adacore.com>
358
359         * sem_res.adb: Minor reformatting.
360
361 2011-08-29  Vincent Celier  <celier@adacore.com>
362
363         * make.adb (Gnatmake): Move special processing for VM targets after the
364         call to Get_Target_Parameters.
365
366 2011-08-29  Thomas Quinot  <quinot@adacore.com>
367
368         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
369
370 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
371
372         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
373         where an anonymous access discriminant of a limited designated type
374         appears in a non-immutably limited discriminated type and issue an
375         error message. Add local variable Desig_T and replace all occurrences
376         of Designated_Type.
377
378 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
379
380         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
381         implementation is compliant to RM D.15(15/2) after the modification
382         imposed by AI05-0094-1 (binding interpretation).
383
384 2011-08-29  Robert Dewar  <dewar@adacore.com>
385
386         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
387         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
388
389 2011-08-29  Thomas Quinot  <quinot@adacore.com>
390
391         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
392         the scope name, do not report a missing label as a style violation (it
393         will be diagnosed as an illegality).
394         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
395         variant records: Get_Enum_Lit_From_Pos already returns a usage
396         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
397         on Expr in Integer_Literal case so that it can be used by
398         Build_To_Any_Call.
399
400 2011-08-29  Tristan Gingold  <gingold@adacore.com>
401
402         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
403         Adjust comment.
404         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
405         (Build_Abort_Block_Handler): New function to build an Abort_Signal
406         exception handler.
407         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
408         Build_Abort_Block_Handler to build the exception handler. Do not
409         undefer aborts for the Abort_Signal exception handler if back-end
410         exception mechanism.
411         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
412         back_end exceptions for all others and abort_signal.
413         * s-except.ads (ZCX_By_Default): New constant.
414         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
415         (Raise_Exception_Always): Ditto.
416         (Raise_From_Signal_Handler): Ditto.
417         (Raise_With_Location_And_Msg): Ditto.
418         (Raise_With_Msg): Ditto.
419         (Reraise): Ditto.
420         (Reraise_Occurence): Ditto.
421         (Reraise_Occurrence_Always): Ditto.
422         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
423         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
424
425 2011-08-29  Thomas Quinot  <quinot@adacore.com>
426
427         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
428
429 2011-08-29  Robert Dewar  <dewar@adacore.com>
430
431         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
432         Minor code reorganization.
433
434 2011-08-29  Bob Duff  <duff@adacore.com>
435
436         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
437         2012, not just Ada 2005.
438
439 2011-08-29  Vincent Celier  <celier@adacore.com>
440
441         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
442         with a project file or with gprbuid, if -gnatep= is specified, the
443         builder may need to be invoked with -x.
444
445 2011-08-29  Tristan Gingold  <gingold@adacore.com>
446
447         * a-exexpr-gcc.adb: Minor comment fix.
448
449 2011-08-29  Robert Dewar  <dewar@adacore.com>
450
451         * sem_ch8.adb: Minor reformatting.
452
453 2011-08-29  Bob Duff  <duff@adacore.com>
454
455         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
456         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
457         treating "some" as unreserved in earlier Ada versions. This is now
458         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
459         rather than Name_Some, since Tok_Some is now recognized as reserved.
460         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
461         reserved word.
462         * scans.ads: Minor comment fixes.
463         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
464         for other language versions.
465         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
466         treating "some" as unreserved in earlier Ada versions. This is now
467         handled in Snames.Is_Keyword_Name.
468         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
469         Ada 2012.
470         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
471         unreserved in earlier Ada versions. This is now handled in
472         Snames.Is_Keyword_Name.
473         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
474         words as for other language versions.
475         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
476         Ada 2012, not just Ada 2005.
477
478 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
479
480         * sem_ch13.adb: Additional semantic checks for aspects involved in
481         iterators.
482
483 2011-08-29  Matthew Heaney  <heaney@adacore.com>
484
485         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
486         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
487         Container parameter.
488         (Ancestor_Find): ditto.
489
490 2011-08-29  Thomas Quinot  <quinot@adacore.com>
491
492         * par-endh.adb: Minor reformatting.
493
494 2011-08-29  Tristan Gingold  <gingold@adacore.com>
495
496         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
497         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
498         (Adjust_N_CLeanups_For): Remove.
499         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
500         stack is reached.
501         (Propgate_Exception): Adjust.
502         * raise-gcc.c: Add a few static/const.
503         (Adjust_N_Cleanups_For): Remove declaration.
504         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
505
506 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
507
508         * sem_ch8.adb: Use type of function return when rewriting as object
509         declaration.
510
511 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
512
513         * sem_type.adb: Minor reformatting.
514
515 2011-08-29  Robert Dewar  <dewar@adacore.com>
516
517         * makeutl.adb: Minor reformatting.
518
519 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
520
521         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
522         function call of a limited type, the expansion of the renaming is
523         complicated by the presence of various temporaries and subtypes that
524         capture constraints of the renamed object.
525         Rewrite node as an object declaration, whose expansion is simpler.
526         Given that the object is limited there is no copy involved and no
527         performance hit.
528
529 2011-08-29  Robert Dewar  <dewar@adacore.com>
530
531         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
532         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
533
534 2011-08-29  Tristan Gingold  <gingold@adacore.com>
535
536         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
537         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
538         system-linux-hppa.ads, system-linux-s390.ads,
539         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
540         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
541         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
542         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
543         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
544         system-solaris-sparc.ads, system-lynxos-x86.ads,
545         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
546         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
547         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
548         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
549         system-vxworks-x86.ads: Remove GCC_ZCX_Support
550         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
551         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
552         * opt.ads: Adjust comment.
553         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
554         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
555         * system.ads: Move GCC_ZCX_Support to obsolete entries.
556
557 2011-08-29  Emmanuel Briot  <briot@adacore.com>
558
559         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
560         file name is specified on the gnatmake or gprbuild command line, and
561         before we search for that file in the project.
562
563 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
564
565         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
566         used to determine whether a possible interpretation for an overloadable
567         entity is declared within the current instantiation and should be
568         included in the candidate set.
569
570 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
571
572         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
573
574 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
575
576         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
577         access subtype is access_to_subprogram, when applying checks for
578         RM 3.10.2 (27).
579
580 2011-08-29  Matthew Heaney  <heaney@adacore.com>
581
582         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
583         for sibling when common parent.
584
585 2011-08-29  Thomas Quinot  <quinot@adacore.com>
586
587         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
588         "pragma_".
589
590 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
591
592         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
593         for the return type when in ASIS mode.
594
595 2011-08-29  Vincent Celier  <celier@adacore.com>
596
597         * make.adb (Gnatmake): Get the default search dirs, then the target
598         parameters after getting the Builder switches, as the Builder switches
599         may include --RTS= and that could change the default search dirs.
600
601 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
602
603         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
604         Make_Final_Call. Move the processing for class-wide types before the
605         processing for derivations from [Limited_]Controlled.
606         (Make_Final_Call): Move the processing for class-wide types before the
607         processing for derivations from [Limited_]Controlled.
608         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
609         Add code to account for alignments larger than the list header. Add a
610         comment illustrating the structure of the allocated object + padding +
611         header.
612         (Deallocate_Any_Controlled): Add code to account for alignments larger
613         than the list header.
614
615 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
616
617         * sinfo.ads, sinfo.adb: New node kind
618         N_Formal_Incomplete_Type_Definition, related flags.
619         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
620         Parse formal incomplete types.
621         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
622         sem_ch12.
623         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
624         Formal incomplete types do not need completion.
625         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
626         Validate_Incomplete_Type_Instance): New procedures to handle formal
627         incomplete types.
628         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
629         that corresponds to a formal incomplete type.
630         * sprint.adb: Handle formal incomplete type declarations.
631         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
632         an insertion point.
633
634 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
635
636         * a-fihema.ads, a-fihema.adb: Unit removed.
637         * a-undesu.ads, a-undesu.adb: New unit implementing
638         Ada.Unchecked_Deallocate_Subpool.
639         * einfo.adb: Remove Associated_Collection from the node usage.
640         Add Finalization_Master to the node usage.
641         (Associated_Collection): Removed.
642         (Finalization_Master): New routine.
643         (Set_Associated_Collection): Removed.
644         (Set_Finalization_Master): New routine.
645         (Write_Field23_Name): Remove Associated_Collection from the output. Add
646         Finalization_Master to the output.
647         * einfo.ads: Remove attribute Associated_Collection and its uses in
648         entities.
649         Add new attribute Finalization_Master along with its uses in entitites.
650         (Associated_Collection): Removed along with its pragma import.
651         (Finalization_Master): New routine along with a pragma import.
652         (Set_Associated_Collection): Removed along with its pragma import.
653         (Set_Finalization_Master): New routine along with a pragma import.
654         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
655         Build_Finalization_Collection with Build_Finalization_Master.
656         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
657         before the bodies of the predefined routines. Add comment explaining
658         this. Replace call to Build_Finalization_Collection with
659         Build_Finalization_Master.
660         (Freeze_Type): Replace call to Build_Finalization_Collection with
661         Build_Finalization_Master.
662         (Make_Finalize_Address_Body): Comment reformatting.
663         (Make_Predefined_Primitive_Specs): Code reformatting.
664         (Stream_Operation_OK): Update comment mentioning finalization
665         collections. Replace RE_Finalization_Collection with
666         RE_Finalization_Master.
667         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
668         Associated_Collection with Finalization_Master. Replace call to
669         Build_Finalization_Collection with Build_Finalization_Master.
670         (Expand_Allocator_Expression): Replace call to Associated_Collection
671         with Finalization_Master. Replace call to Set_Associated_Collection with
672         Set_Finalization_Master. Remove the generation of
673         Set_Finalize_Address_Ptr.
674         (Expand_N_Allocator): Replace call to Associated_Collection with
675         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
676         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
677         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
678         comment on usage. Replace call to Needs_BIP_Collection with
679         Needs_BIP_Finalization_Master Remplace BIP_Collection with
680         BIP_Finalization_Master. Update all comments which mention finalization
681         collections. Replace Associated_Collection with
682         Finalization_Master. Replace Build_Finalization_Collection with
683         Build_Finalization_Master.
684         (BIP_Formal_Suffix): Update BIP_Collection's case.
685         (Build_Heap_Allocator): Update the related comment. Rename local
686         variable Collect to Fin_Mas_Id and update its occurrences. Update
687         comments which mention finalization collections. Replace
688         Set_Associated_Collection with Set_Finalization_Master.
689         (Expand_Call): Update the code which detects a special piece of library
690         code for .NET/JVM.
691         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
692         Add_Collection_Actual_To_Build_In_Place_Call with
693         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
694         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
695         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
696         Add_Collection_Actual_To_Build_In_Place_Call with
697         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
698         (Make_Build_In_Place_Call_In_Assignment): Replace call to
699         Add_Collection_Actual_To_Build_In_Place_Call with
700         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
701         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
702         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
703         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
704         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
705         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
706         Replace call to Set_Associated_Collection with Set_Finalization_Master.
707         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
708         Replace the call to Associated_Collection with Finalization_Master.
709         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
710         Update the way finalization master names are generated. Update the
711         retrieval of the correct access type which will carry the pool and
712         master attributes.
713         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
714         (Make_Finalize_Address_Body): Abstract types do not need
715         Finalize_Address. Code reformatting.
716         (Make_Finalize_Address_Stmts): Update comment on usage.
717         (Make_Set_Finalize_Address_Ptr_Call): Removed.
718         (Process_Declarations): Update comments.
719         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
720         Build_Finalization_Master. Update associated comment.
721         (Make_Set_Finalize_Address_Ptr_Call): Removed.
722         * exp_ch13.adb: Update comments which mention finalization collections.
723         (Expand_N_Free_Statement): Replace the call to Associated_Collection
724         with Finalization_Master.
725         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
726         create calls to routines Allocate_Any_Controlled and
727         Deallocate_Any_Controlled.
728         (Find_Finalize_Address): New routine.
729         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
730         comparison.
731         (Requires_Cleanup_Actions): Update the comment on freeze node
732         inspection.
733         * exp_util.ads: Remove comment on generated code for
734         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
735         is better to simply look in the body.
736         * freeze.adb (Freeze_All): Update the comment of finalization
737         collections. Replace the call to Associated_Collection with
738         Finalization_Master. Replace the call to Build_Finalization_Collection
739         with Build_Finalization_Master.
740         * impunit.adb: Add a-undesu and s-stposu to the list of units.
741         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
742         a-fihema.
743         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
744         Ada.Finalization. Add processing for children of System.Storage_Pools.
745         * rtsfind.ads: Remove the naming of second level children of
746         Ada.Finalization.
747         Remove Ada_Finalization_Heap_Management from the list of units.
748         Remove subtype Ada_Finalization_Child.
749         Remove the following subprogram entities:
750         
751            RE_Allocate
752            RE_Deallocate
753            RE_Finalization_Collection
754            RE_Finalization_Collection_Ptr
755            RE_Set_Finalize_Address_Ptr
756         
757         Add the naming of second level children of System.Storage_Pools.
758         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
759         the list of units.
760         Add subtype System_Storage_Pools_Child.
761         Add the following subprogram entities to System.Finalization_Masters:
762         
763            RE_Finalization_Master
764            RE_Finalization_Master_Ptr
765         
766         Add the following subprogram entities to System.Storage_Pools.Subpools:
767         
768            RE_Allocate_Any_Controlled
769            RE_Deallocate_Any_Controlled
770            RE_Root_Storage_Pool_With_Subpools
771            RE_Root_Subpool
772            RE_Subpool_Handle
773         
774         Move the following subprogram entities from
775         Ada.Finalization.Heap_Management to System.Finalization_Masters:
776         
777            RE_Add_Offset_To_Address
778            RE_Attach
779            RE_Base_Pool
780            RE_Detach
781         
782         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
783         Set_Associated_Collection with Set_Finalization_Master.
784         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
785         BIP_Finalization_Master is created.
786         * s-finmas.adb: New unit System.Finalization_Masters.
787         * s-finmas.ads: New unit System.Finalization_Masters.
788         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
789         * s-stposu.ads, s-stposu.adb: New unit implementing
790         System.Storage_Pools.Subpools.
791
792 2011-08-29  Bob Duff  <duff@adacore.com>
793
794         * tbuild.adb: Add assertion.
795
796 2011-08-29  Thomas Quinot  <quinot@adacore.com>
797
798         * s-pooglo.adb: Minor reformatting.
799
800 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
801
802         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
803         an indexed component of a packed array whose element type is a record
804         with a representation clause different from that of the right-hand
805         side, generate a temporary to minimuze the number of bit-field
806         operations generated.
807
808 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
809
810         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
811         declarations, and thus are likely insertion points for actions.
812
813 2011-08-29  Bob Duff  <duff@adacore.com>
814
815         * einfo.ads: Minor comment fix.
816
817 2011-08-29  Robert Dewar  <dewar@adacore.com>
818
819         * frontend.adb, gnat1drv.adb: Minor reformatting.
820
821 2011-08-29  Tristan Gingold  <gingold@adacore.com>
822
823         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
824         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
825         space in front of the header.
826
827 2011-08-29  Johannes Kanig  <kanig@adacore.com>
828
829         * frontend.adb (Frontend): Exit after creating Standard package when
830         -gnatd.H is present.
831         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
832         present.
833
834 2011-08-29  Robert Dewar  <dewar@adacore.com>
835
836         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
837         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
838         snames.ads-tmpl: Minor reformatting.
839
840 2011-08-29  Philippe Gil  <gil@adacore.com>
841
842         * prj.adb (Reset_Units_In_Table): New procedure.
843         Reset units to avoid access to freed memory.
844
845 2011-08-29  Thomas Quinot  <quinot@adacore.com>
846
847         * get_scos.adb: When reading a P statement SCO without a pragma name
848         (from an older ALI file), ensure that the Pragma_Name component is set
849         to Unknown_Pragma (not left uninitialized).
850
851 2011-08-29  Vincent Celier  <celier@adacore.com>
852
853         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
854         modified to compute correctly the object path of a SAL project that is
855         extending another library project.
856         (Write_Path_File): New procedure.
857         * makeutl.ads (Directories): New table moved from Buildgpr
858         (Get_Directories): New procedure moved from Buildgpr
859         (Write_Path_File): New procedure
860         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
861         paths before binding SALs, instead of Set_Ada_Paths.
862         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
863         Prj.
864         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
865         (Current_Source_Path_File_Of): New function
866         (Set_Current_Object_Path_File_Of): New procedure
867         (Current_Source_Object_File_Of): New function
868         (Set_Current_Object_Path_File_Of): New procedure
869         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
870         (Current_Source_Path_File_Of): New function
871         (Set_Current_Object_Path_File_Of): New procedure
872         (Current_Source_Object_File_Of): New function
873         (Set_Current_Object_Path_File_Of): New procedure
874
875 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
876
877         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
878         packed entity, use a bit-field assignment only if there is no change of
879         representation.
880
881 2011-08-29  Thomas Quinot  <quinot@adacore.com>
882
883         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
884         Is_RTU instead of using Chars comparisons.
885
886 2011-08-29  Thomas Quinot  <quinot@adacore.com>
887
888         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
889         temporary object if the actual is constrained, and the discriminants
890         read from the stream don't match.
891
892 2011-08-29  Tristan Gingold  <gingold@adacore.com>
893
894         * sem_attr.adb, exp_attr.adb: Add handling of
895         Attribute_System_Allocator_Alignment
896         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
897         Attribute_System_Allocator_Alignment.
898         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
899         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
900         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
901         get_target_system_allocator_alignment.
902
903 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
904
905         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
906         dependencies.
907
908 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
909
910         * exp_ch3.adb (In_Runtime): Fix typo.
911
912 2011-08-29  Bob Duff  <duff@adacore.com>
913
914         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
915
916 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
917
918         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
919         and a separate tag assignment is generated, ensure that the tag
920         assignment is analyzed.
921
922 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
923
924         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
925         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
926         of statement lists that may contain local declarations.
927         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
928         duplicate the triggering statements needed for the expansion of this
929         construct, when the trigger is a dispatching call to a synchronized
930         primitive.
931
932 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
933
934         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
935         * bindgen.adb: Add comments.
936         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
937         in CodePeer mode.
938
939 2011-08-29  Robert Dewar  <dewar@adacore.com>
940
941         * exp_attr.adb: Minor reformatting.
942         Minor code reorganization and commenting.
943         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
944         reformatting.
945
946 2011-08-29  Thomas Quinot  <quinot@adacore.com>
947
948         * get_scos.adb: Ignore chaining indicators not currently supported
949         by Ada.
950
951 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
952
953         * system.ads: Minor editing.
954
955 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
956
957         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
958         CodePeer mode.
959         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
960         Attribute_Elab_Subp_Body.
961         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
962         * sem_util.adb: Update comments.
963
964 2011-08-29  Thomas Quinot  <quinot@adacore.com>
965
966         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
967         pragma name for each SCO statement corresponding to a pragma.
968
969 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
970
971         * opt.ads: Minor editing.
972
973 2011-08-29  Yannick Moy  <moy@adacore.com>
974
975         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
976         that only made sense for CodePeer mode.
977
978 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
979
980         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
981         which is no longer used.
982         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
983         handling of the 64-bit division check.
984         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
985         division available.
986         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
987         longer used.
988
989 2011-08-29  Thomas Quinot  <quinot@adacore.com>
990
991         * get_scos.adb: Minor reformatting.
992
993 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
994
995         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
996         statement list is wrapped in a block, the block is explicitly analyzed
997         in order to properly redecorate the entities and create a servicing
998         finalizer.
999
1000 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1001
1002         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
1003         (Set_Zero_Cost_Handling): Remove.
1004
1005 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1006
1007         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
1008
1009 2011-08-29  Geert Bosch  <bosch@adacore.com>
1010
1011         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
1012         instruction, as the latter may produce -0.0, which is not a valid VAX
1013         F float number.
1014         (Neg_G): Likewise for VAX F float.
1015
1016 2011-08-29  Robert Dewar  <dewar@adacore.com>
1017
1018         * exp_util.adb: Minor reformatting.
1019
1020 2011-08-29  Yannick Moy  <moy@adacore.com>
1021
1022         * sem_ch3.adb: Minor comment update.
1023
1024 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1025
1026         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
1027         the operand type.
1028
1029 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1030
1031         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
1032         current statement sequence on a generic instantiation or a subprogram
1033         declaration.
1034
1035 2011-08-29  Robert Dewar  <dewar@adacore.com>
1036
1037         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
1038         Minor reformatting.
1039
1040 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1041
1042         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1043         Correct the check which involves the freeze node of a controlled or
1044         access-to-controlled type.
1045
1046 2011-08-29  Geert Bosch  <bosch@adacore.com>
1047
1048         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
1049         statements.
1050         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
1051         Asm statements.
1052
1053 2011-08-29  Yannick Moy  <moy@adacore.com>
1054
1055         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
1056         for every index type and component type that is not a subtype_mark.
1057         (Process_Subtype): Set Etype of subtype.
1058
1059 2011-08-29  Robert Dewar  <dewar@adacore.com>
1060
1061         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
1062         reorganization.  Minor reformatting.
1063
1064 2011-08-29  Steve Baird  <baird@adacore.com>
1065
1066         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
1067         for CodePeer and ALFA modes.
1068
1069 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1070
1071         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
1072         that comes from an enclosing scope if it is not the renaming of an
1073         actual, to handle properly a spurious ambiguity in an instance.
1074
1075 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
1076
1077         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
1078         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
1079         use it instead of the Esize of the first parameter.
1080         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
1081         above change.
1082         <Size>: Likewise.  Call it for composite types on the RM size.
1083
1084 2011-08-29  Yannick Moy  <moy@adacore.com>
1085
1086         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
1087         * sem_util.adb (Unique_Name): Correct behaviour for names of
1088         compilation units.
1089
1090 2011-08-29  Yannick Moy  <moy@adacore.com>
1091
1092         * sem_prag.adb (Check_Precondition_Postcondition): In formal
1093         verification mode, analyze pragma expression for correctness, for
1094         pre/post on library-level subprogram, as it is not expanded later.
1095
1096 2011-08-29  Yannick Moy  <moy@adacore.com>
1097
1098         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
1099         in formal verification.
1100
1101 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1102
1103         * sem_util.adb: Minor reformatting.
1104         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
1105         there's no pragma.
1106         * par_sco.ads, par_sco.adb: Update comments.
1107
1108 2011-08-29  Yannick Moy  <moy@adacore.com>
1109
1110         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
1111         associated getter/setter.
1112         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
1113
1114 2011-08-29  Vincent Celier  <celier@adacore.com>
1115
1116         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
1117         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
1118         with declarations for Language_Kind and Dependency_Kind for Ada.
1119         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
1120         (Process_Compiler): Take into account the new attributes Dependency_Kind
1121         and Language_Kind.
1122         (Check_Configuration): Check if language kind is unit based, not if the
1123         language name is Ada.
1124         (Process_Exceptions_Unit_Based): Ditto
1125         (Add_Language): Remove default additions of language and dependency kind
1126         * prj.ads: Minor comment change
1127         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
1128
1129 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1130
1131         * debug.adb: Update comments.
1132
1133 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
1134
1135         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
1136         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
1137         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
1138         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
1139         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
1140
1141 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1142
1143         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
1144         (GNATLIBCFLAGS_FOR_C): Replace
1145         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
1146         (gnatlib-shared-default, gnatlib-shared-dual-win32)
1147         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
1148         (gnatlib-sjlj, gnatlib-zcx): Likewise.
1149
1150 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
1151
1152         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
1153
1154         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
1155
1156         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
1157
1158 2011-08-05  Nicolas Roche  <roche@adacore.com>
1159
1160         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
1161         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
1162         canadian cross.
1163         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
1164
1165 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1166
1167         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
1168         subprogram bodies declared out-of-order.
1169
1170 2011-08-05  Yannick Moy  <moy@adacore.com>
1171
1172         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
1173         entities directly in package Standard, otherwise skip the standard
1174         prefix.
1175
1176 2011-08-05  Robert Dewar  <dewar@adacore.com>
1177
1178         * a-cbmutr.adb: Minor reformatting
1179         (Allocate_Node): refactor node allocation algorithm
1180
1181 2011-08-05  Robert Dewar  <dewar@adacore.com>
1182
1183         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
1184         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
1185         mode.
1186         (Analyze_Pragma, case Check_Policy): Ditto.
1187         * sem_prag.ads (Check_Disabled): New function
1188         * snames.ads-tmpl: Add Name_Disable.
1189
1190 2011-08-05  Robert Dewar  <dewar@adacore.com>
1191
1192         * gnat_rm.texi: Document implementation-defined policy DISABLE for
1193         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
1194
1195 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1196
1197         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
1198         that appears in a generic formal part and applies to a formal
1199         subprogram.
1200
1201 2011-08-05  Robert Dewar  <dewar@adacore.com>
1202
1203         * a-cbmutr.ads: Minor reformatting.
1204
1205 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1206
1207         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
1208         to check count, check sign of value instead.
1209         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
1210         (Copy_Subtree): allocate copy of source element
1211         (Equal_Subtree): compare elements, not access objects
1212
1213 2011-08-05  Vincent Celier  <celier@adacore.com>
1214
1215         * gnat_ugn.texi: Fix VMS alternative.
1216
1217 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1218
1219         * sem_ch11.adb: Add comment.
1220
1221 2011-08-05  Robert Dewar  <dewar@adacore.com>
1222
1223         * exp_util.adb: Minor comment fix.
1224
1225 2011-08-05  Robert Dewar  <dewar@adacore.com>
1226
1227         * scng.adb (Error_Unterminated_String): Improve flag position when
1228         comma present.
1229
1230 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1231
1232         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
1233         tree containers).
1234         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
1235         multiway tree containers.
1236
1237 2011-08-05  Robert Dewar  <dewar@adacore.com>
1238
1239         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
1240         * stylesw.adb: Implement -gnatyC to control comment spacing
1241         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
1242         -gnatyc/C).
1243         * usage.adb: Add line for -gnatyC.
1244
1245 2011-08-05  Robert Dewar  <dewar@adacore.com>
1246
1247         * gnat_ugn.texi: Document -gnatyC.
1248         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
1249         synonym for COMMENTS2).
1250
1251 2011-08-05  Robert Dewar  <dewar@adacore.com>
1252
1253         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
1254         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
1255         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
1256         a-comutr.ads, lib-xref.adb: Minor reformatting.
1257
1258 2011-08-05  Robert Dewar  <dewar@adacore.com>
1259
1260         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
1261         warning if there is an exception handler present.
1262
1263 2011-08-05  Pascal Obry  <obry@adacore.com>
1264
1265         * a-iteint.ads: Fix copyright year.
1266
1267 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1268
1269         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
1270         statement SCO for a USE clause or a representation clause.
1271
1272 2011-08-05  Yannick Moy  <moy@adacore.com>
1273
1274         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
1275         between body and spec for stub.
1276         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
1277         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
1278         pragma precondition or postcondition, for which the enclosing
1279         subprogram or package in the AST is not the desired one, return empty.
1280
1281 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1282
1283         * g-expect.adb: Minor reformatting.
1284
1285 2011-08-05  Bob Duff  <duff@adacore.com>
1286
1287         * a-fihema.adb: Comment out OS_Lib.
1288
1289 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1290
1291         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
1292         (unbounded multiway tree containers) and a-iteint.ads.
1293         * a-comutr.ads, a-comutr.adb:
1294         This is the new Ada 2012 unit for unbounded multiway tree containers
1295         * a-cimutr.ads, a-cimutr.adb
1296         This is the new Ada 2012 unit for indefinite multiway tree containers
1297         * a-iteint.ads: New file.
1298
1299 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1300
1301         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1302
1303 2011-08-05  Bob Duff  <duff@adacore.com>
1304
1305         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1306         subpools.
1307         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1308
1309 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1310
1311         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1312         general indexing aspects of Ada2012. Called when analyzing indexed
1313         components when other interpretations fail.
1314         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1315         in an expression context where overloading is meaningful. This excludes
1316         the occurrence in an aspect specification (efficiency only).
1317         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1318         related to iterators can be set by an attribute specification, but
1319         cannot be queried.
1320         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1321         Constant_Indexing and Variable_Indexing.
1322         (Check_Indexing_Functions): New procedure to perform legality checks.
1323         Additional semantic checks at end of declarations.
1324
1325 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1326
1327         * tree_io.ads: Update ASIS_Version_Number because of the change of the
1328         order of calling Tree_Write/Tree_Read routines made for aspects.
1329
1330 2011-08-05  Bob Duff  <duff@adacore.com>
1331
1332         * a-fihema.adb (Finalize): Fix race condition.
1333
1334 2011-08-05  Yannick Moy  <moy@adacore.com>
1335
1336         * sem_ch12.adb (Analyze_Package_Instantiation,
1337         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1338         mode.
1339
1340 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1341
1342         * sem_type.adb (Specific_Type): in an instance, the type-specific
1343         operand of an equality check that involves null may have a private
1344         type. Use full view to determine legality of construct.
1345
1346 2011-08-05  Vincent Celier  <celier@adacore.com>
1347
1348         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1349         delete or close the file when the call to gnatmake was successful.
1350
1351 2011-08-05  Yannick Moy  <moy@adacore.com>
1352
1353         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1354         Global_Discard_Names.
1355
1356 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1357
1358         * sinfo.ads: comments on use of entity field for aspect specifications.
1359
1360 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1361
1362         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1363         node is not itself an entity but a selected component, it is a
1364         rewritten parameterless call to an en enclosing synchronized operation,
1365         and this expansion will be performed again in the instance, so there is
1366         no global information to preserve.
1367
1368 2011-08-05  Javier Miranda  <miranda@adacore.com>
1369
1370         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1371         for renamings of predefined primitives.
1372         (In_Predef_Prims_DT): New subprogram.
1373
1374 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1375
1376         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1377         possible interpretation of name is a reference type, add an
1378         interpretation that is the designated type of the reference
1379         discriminant of that type.
1380         * sem_res.adb (resolve): If the interpretation imposed by context is an
1381         implicit dereference, rewrite the node as the deference of the
1382         reference discriminant.
1383         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1384         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1385         parent type or base type.
1386         * sem_ch4.adb (Process_Indexed_Component,
1387         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1388         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1389         Check for implicit dereference.
1390         (List_Operand_Interps): Indicate when an implicit dereference is
1391         ambiguous.
1392         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1393
1394 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1395
1396         * scos.ads: Update documentation of SCO table. Pragma statements can now
1397         be marked as disabled (using 'p' instead of 'P' as the statement kind).
1398         * par_sco.ads, par_sco.adb: Implement the above change.
1399         (Process_Decisions_Defer): Generate a P decision for the first parameter
1400         of a dyadic pragma Debug.
1401         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1402         necessary.
1403         * put_scos.adb: Code simplification based on above change.
1404
1405 2011-08-05  Robert Dewar  <dewar@adacore.com>
1406
1407         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1408         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1409         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1410         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1411
1412 2011-08-05  Bob Duff  <duff@adacore.com>
1413
1414         * a-stunau.ads, g-spipat.adb: Update comments.
1415
1416 2011-08-05  Bob Duff  <duff@adacore.com>
1417
1418         * a-fihema.ads: Minor comment fix.
1419         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1420         correct.
1421         (Attach, Detach): Remove some unnecessary code.
1422         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1423
1424 2011-08-05  Bob Duff  <duff@adacore.com>
1425
1426         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1427         allocation for Objects component. This simplifies the code somewhat. It
1428         is also a little more efficient in the not-so-unusual case where there
1429         are no controlled objects allocated.
1430         Make Finalization_Started flag atomic.
1431         (Finalize): Avoid unnecessary detachment of items from the list.
1432         (pcol): Minor cleanup.
1433
1434 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1435
1436         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1437         package whose name is the same as that of the generic unit, or its
1438         ultimate prefix.
1439
1440 2011-08-05  Bob Duff  <duff@adacore.com>
1441
1442         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1443         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1444         Minor comment fixes.
1445
1446 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
1447
1448         * make.adb (Linking_Phase): No longer need to set source search path
1449         before calling gnatlink in CodePeer mode.
1450         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1451         gcc in CodePeer mode, since the binder generated file no longer has a
1452         'with Main'.
1453         * switch.ads, switch.adb (Is_Language_Switch): Removed.
1454         * switch-c.adb: Update comment.
1455
1456 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1457
1458         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1459
1460 2011-08-05  Nicolas Roche  <roche@adacore.com>
1461
1462         * gnat_ugn.texi: Fix minor syntax error issue.
1463
1464 2011-08-05  Vincent Celier  <celier@adacore.com>
1465
1466         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1467         delete or close the file when the call to gnatmake returns a non
1468         successful return code.
1469
1470 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1471
1472         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1473         check, indicate that the copy of the original node does not come from
1474         source, to prevent an infinite recursion of the expansion.
1475
1476 2011-08-05  Johannes Kanig  <kanig@adacore.com>
1477
1478         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1479         VC generation for subprogram bodies.
1480
1481 2011-08-05  Yannick Moy  <moy@adacore.com>
1482
1483         * einfo.ads: Typo.
1484         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1485         the base type with the smallest allowed base type.
1486
1487 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1488
1489         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1490         aspects.
1491
1492 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1493
1494         * sem_ch12.ads: minor comment updates.
1495
1496 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1497
1498         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1499         instantiation and a formal package the compiler generates a package
1500         renaming declaration so that the generic name within the declaration
1501         is interpreted as a renaming of the instance. At the end of a formal
1502         package declaration, this renaming must become invisible.
1503
1504 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1505
1506         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1507         comparison and rely on concrete entities instead.
1508
1509 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1510
1511         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1512         and discriminants, to indicate that the type has an access discriminant
1513         that supports implicit dereference.
1514         * snames.ads-tmpl: Add names of aspects and attributes related to
1515         Ada2012 iterators: constant_indexing, default_iterator,
1516         iterator_element, implicit_dereference, variable_indexing.
1517         * aspects.ads, aspects.adb: entries for iterator-related aspects.
1518         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1519         iterator-related aspects.
1520         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1521
1522 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1523
1524         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1525         metrics in gnatmetric to cover new kinds of coupling mentrics.
1526
1527 2011-08-05  Steve Baird  <baird@adacore.com>
1528
1529         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1530         of calling the user-defined main subprogram.
1531         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
1532         is set) Call_Main_Subprogram ahead of, as opposed to
1533         inside of, Main.
1534         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1535         generation of a "with" of the user-defined main subprogram.
1536         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1537         (which is now called from Gen_Main instead).
1538
1539 2011-08-05  Emmanuel Briot  <briot@adacore.com>
1540
1541         * projects.texi: Added reference to the Makefile package.
1542
1543 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1544
1545         * exp_ch7.adb: Minor comment rewording.
1546
1547 2011-08-05  Ed Falis  <falis@adacore.com>
1548
1549         * env.c: Fix comment.
1550
1551 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1552
1553         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1554         character comparison and rely on concrete entities instead.
1555
1556 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1557
1558         * sem_ch3.adb: (Check_Private_Overriding): better error message,
1559         suggested by AI95-0068.
1560
1561 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1562
1563         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1564         the two potential initialization calls. This accounts for any
1565         access-before-elaboration checks which may precede the initialization
1566         calls.
1567         (Next_Suitable_Statement): New routine. Returns the next real statement
1568         after the input node while skipping generated checks.
1569         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1570         with comment on usage.
1571         Do not generate Elaborate_All when the trigger is a finalization call
1572         coming from a type init proc.
1573         (Check_Elab_Call): Propagate the initialization procedure context to
1574         subsequent calls to Check_A_Call.
1575         (Check_Internal_Call_Continue): Propagate the initialization procedure
1576         context to subsequent calls to Check_Elab_Call.
1577         (Is_Finalization_Procedure): New routine. Returns True if the input
1578         entity denotes a [Deep_]Finalize routine.
1579         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1580         along with comment on usage.
1581
1582 2011-08-05  Vadim Godunko  <godunko@adacore.com>
1583
1584         * s-atocou.ads: Add list of supported platforms.
1585
1586 2011-08-05  Yannick Moy  <moy@adacore.com>
1587
1588         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
1589
1590         * opt.ads (Disable_ALI_File): new Boolean flag
1591         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
1592
1593 2011-08-05  Ed Falis  <falis@adacore.com>
1594
1595         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
1596         environ is properly defined.
1597
1598 2011-08-05  Vincent Celier  <celier@adacore.com>
1599
1600         * make.adb (Compilation_Phase): Exit immediately when all objects have
1601         been found up to date, to avoid multiple exit messages.
1602         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
1603         same project for languages with no compiler.
1604         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
1605         -eI.
1606 2011-08-05  Robert Dewar  <dewar@adacore.com>
1607
1608         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
1609         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
1610         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
1611         s-atocou-builtin.adb: Minor reformatting.
1612
1613 2011-08-05  Yannick Moy  <moy@adacore.com>
1614
1615         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
1616         if the node to wrap is a pragma check, this node and enclosed
1617         expression are not expanded, so do not apply any transformations here.
1618         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
1619         introducing transient scopes.
1620
1621 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
1622
1623         * adaint.c (__gnat_set_writable, __gnat_set_readable,
1624         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
1625         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
1626         routine is available, so we use the default implementation of these
1627         functions.
1628         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
1629         support for copying attributes on VxWorks 6.
1630
1631 2011-08-05  Yannick Moy  <moy@adacore.com>
1632
1633         * debug.adb: Remove use of -gnatd.D.
1634         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
1635         * opt.ads: Simplify variables for ALFA mode, to keep one only
1636         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
1637         to ALFA mode.
1638
1639 2011-08-05  Vincent Celier  <celier@adacore.com>
1640
1641         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
1642         Builder'Default_Switches.
1643
1644 2011-08-05  Vincent Celier  <celier@adacore.com>
1645
1646         * makeusg.adb: Add lines for --create-map-file switches.
1647
1648 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1649
1650         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
1651         profile is incomplete and the full view is available, replace it with
1652         the full view.
1653         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
1654         incomplete, freezing the subprogram is delayed until the full view is
1655         frozen.
1656         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
1657         fixed-point multiplication operator and the predefined operator is
1658         resolved in favor of the user-defined one.
1659
1660 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1661
1662         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
1663         CONST_CAST.
1664
1665 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1666
1667         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
1668         whether a type lacks user-defined Read or Write operations, or has a
1669         component that lacks them.
1670         * sem_attr.adb (Check_Stream_Attribute): if restriction
1671         No_Default_Stream_Attributes is active, verify that all subcomponent
1672         types of the target have user-defined stream operations, and report
1673         error otherwise.
1674         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
1675         * exp_strm.adb: Build_Elementary_Input_Call,
1676         Build_Elementary_Write_Call): remove checks for restriction
1677         No_Default_Stream_Attributes, now checked in semantics.
1678
1679 2011-08-04  Vincent Celier  <celier@adacore.com>
1680
1681         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
1682         switches on the command line, look for all valid --RTS switches in the
1683         Builder switches and for each language use the first runtime name found
1684         to invoke gprconfig.
1685         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
1686         command line and there is no auto-configuration.
1687         (Runtime_Name_Set_For): New function.
1688
1689 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1690
1691         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
1692         elaborate initialization expression for variable Abort when processing
1693         a package body or a declaration.
1694         (Create_Finalizer): Propagate the package context when creating the
1695         exception-related variables.
1696         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
1697         For_Package along with usage comment.
1698
1699 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1700
1701         * gcc-interface/Makefile.in: Clean up targets.
1702         Enable new package for atomic counters and copy-on-write implementation
1703         of unbounded strings on x86 platforms.
1704         * gcc-interface/Make-lang.in: Update dependencies.
1705
1706 2011-08-04  Robert Dewar  <dewar@adacore.com>
1707
1708         * exp_ch7.adb: Minor reformatting.
1709
1710 2011-08-04  Robert Dewar  <dewar@adacore.com>
1711
1712         * exp_strm.adb: Minor reformatting.
1713
1714 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1715
1716         * s-atocou.adb: Replace by dummy version and use on targets where atomic
1717         operations are not supported.
1718         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
1719         * s-atocou-x86.adb: New file.
1720         * Makefile.rtl: Add s-atocou.o file
1721
1722 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1723
1724         * make.adb (Compile): Move setting of CodePeer_Mode to ...
1725         (Compilation_Phase): ... here.
1726         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
1727
1728 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1729
1730         * Make-generated.in: Fix minor typo in comment.
1731
1732 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1733
1734         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
1735         the project path.
1736
1737 2011-08-04  Robert Dewar  <dewar@adacore.com>
1738
1739         * a-coinho.adb: Minor reformatting.
1740
1741 2011-08-04  Robert Dewar  <dewar@adacore.com>
1742
1743         * a-coinho.ads: Minor reformatting.
1744
1745 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1746
1747         * s-atocou.ads, s-atocou.adb: New files.
1748         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
1749         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
1750         direct use of GCC's atomic builtins and replace them by use of new
1751         atomic counter package.
1752
1753 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1754
1755         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
1756
1757 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1758
1759         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
1760         with a call to Get_External_Tag.
1761         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
1762         subprogram usage. Remove the guard against package declarations and
1763         bodies since Build_Cleanup_Statements is no longer invoked in that
1764         context.
1765         (Build_Components): Initialize Tagged_Type_Stmts when the context
1766         contains at least one library-level tagged type.
1767         (Build_Finalizer): New local variables Has_Tagged_Types and
1768         Tagged_Type_Stmts along with associated comments on usage. Update the
1769         logic to include tagged type processing.
1770         (Create_Finalizer): Insert all library-level tagged type unregistration
1771         code before the jump block circuitry.
1772         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
1773         (Expand_N_Package_Declaration): Remove the call to
1774         Build_Cleanup_Statements.
1775         (Process_Tagged_Type_Declaration): New routine. Generate a call to
1776         unregister the external tag of a tagged type.
1777         (Processing_Actions): Reimplemented to handle tagged types.
1778         (Process_Declarations): Detect the declaration of a library-level
1779         tagged type and carry out the appropriate actions.
1780         (Unregister_Tagged_Types): Removed. The machinery has been directly
1781         merged with Build_Finalizer.
1782
1783 2011-08-04  Robert Dewar  <dewar@adacore.com>
1784
1785         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
1786         gnatls.adb, exp_ch3.adb: Minor reformatting.
1787
1788 2011-08-04  Marc Sango  <sango@adacore.com>
1789
1790         * sem_attr.adb (Analyze_Attribute): Replace the message
1791         "invisible attribute of}" of the spark restriction violation in
1792         attribute reference by the simple message "invisible attribute of type".
1793         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
1794         two insertion characters: '&' and '}'.
1795
1796 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1797
1798         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
1799         * a-coinho.ads, a-coinho.adb: New file.
1800         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
1801
1802 2011-08-04  Nicolas Roche  <roche@adacore.com>
1803
1804         * alfa_test.adb: Not all ali files are containing alfa information even
1805         if compiled with -gnatd.F. So suppress warning about missing ALFA
1806         information.
1807
1808 2011-08-04  Yannick Moy  <moy@adacore.com>
1809
1810         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
1811         scope.
1812         * put_alfa.adb: Check that scope name is not empty.
1813
1814 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1815
1816         * exp_ch3.adb (Stream_Operation_Ok): new predicate
1817         Needs_Elementary_Stream_Operation, to determine whether user-defined
1818         Read and Write attributes are available for the elementary components
1819         of the given type. If only the predefined attributes are available,
1820         then when restriction No_Default_Stream_Attributes is active the
1821         predefined stream attributes for the composite type cannot be created.
1822
1823 2011-08-04  Robert Dewar  <dewar@adacore.com>
1824
1825         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
1826         Put routines in alpha order
1827
1828 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
1829
1830         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
1831         * gcc-interface/Make-lang.in: Update dependencies.
1832
1833 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1834
1835         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
1836         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
1837         gnat1why).
1838
1839 2011-08-04  Robert Dewar  <dewar@adacore.com>
1840
1841         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
1842         lib-xref-alfa.adb: Minor reformatting.
1843
1844 2011-08-04  Marc Sango  <sango@adacore.com>
1845
1846         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1847         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
1848         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
1849         mode.
1850
1851 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1852
1853         * bindgen.adb (Gen_Adainit_C): Remove.
1854         (Gen_Adafinal_C): Ditto.
1855         (Gen_Elab_Externals_C): Ditto.
1856         (Gen_Elab_Calls_C): Ditto.
1857         (Gen_Elab_Order_C): Ditto.
1858         (Gen_Elab_Defs_C): Ditto.
1859         (Gen_Finalize_Library_C): Ditto.
1860         (Gen_Finalize_Library_Defs_C): Ditto.
1861         (Gen_Main_C): Ditto.
1862         (Gen_Output_File_C): Ditto.
1863         (Gen_Restrictions_C): Ditto.
1864         (Gen_Versions_C): Ditto.
1865         (Write_Info_Ada_C): Ditto.
1866         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
1867         (Gen_Output_File): Do not force Ada_Bind_File anymore.
1868         Always call Gen_Output_File_Ada.
1869         * gnatlink.adb (Begin_Info): Now a constant.
1870         (End_Info): Ditto.
1871         (Ada_Bind_File): Remove
1872         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
1873         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
1874         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
1875         * opt.ads (Ada_Bind_File): Remove.
1876
1877 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1878
1879         * projects.texi: Document target-specific directory in default project
1880         path for gnatmake.
1881
1882 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1883
1884         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
1885         path in all cases .
1886
1887 2011-08-04  Yannick Moy  <moy@adacore.com>
1888
1889         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
1890         opt.ads, lib-xref.ads: Code clean up.
1891
1892 2011-08-04  Yannick Moy  <moy@adacore.com>
1893
1894         * gnat_rm.texi: Update description of Test_Case
1895         * gnat_ugn.texi: Typo.
1896
1897 2011-08-04  Ed Falis  <falis@adacore.com>
1898
1899         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
1900
1901 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1902
1903         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
1904         it is of type Root_Controlled. This action eliminates fields Prev and
1905         Next from type equality.
1906
1907 2011-08-04  Yannick Moy  <moy@adacore.com>
1908
1909         * lib-xref-alfa.adb: Correct typo.
1910
1911 2011-08-04  Matthew Heaney  <heaney@adacore.com>
1912
1913         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
1914         component.
1915
1916 2011-08-04  Yannick Moy  <moy@adacore.com>
1917
1918         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
1919         (Analyze_Pragma): allow static string expression for name of Test_Case,
1920         instead of simply string literals.
1921         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
1922         expressions.
1923
1924 2011-08-04  Vincent Celier  <celier@adacore.com>
1925
1926         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
1927         case suffixes to find truncated main sources.
1928
1929 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1930
1931         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
1932         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
1933         (Compute_Current_Task): Ditto.
1934
1935 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1936
1937         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
1938
1939 2011-08-04  Yannick Moy  <moy@adacore.com>
1940
1941         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
1942         library-level constant.
1943         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
1944         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1945         used as selector of parameter association, in ALFA mode.
1946
1947 2011-08-04  Robert Dewar  <dewar@adacore.com>
1948
1949         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1950         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1951         reformatting.
1952
1953 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1954
1955         * make.adb (Linking_Phase): Set source search path before calling
1956         gnatlink in CodePeer mode.
1957
1958 2011-08-04  Javier Miranda  <miranda@adacore.com>
1959
1960         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1961         Remove code which takes care of building TSDs.
1962         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1963         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1964         the accessibility check in VM targets.
1965         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1966         (Building_Static_DT): Now returns false for VM targets.
1967         (Build_VM_TSDs): Removed.
1968         (Expand_Interface_Conversion): Generate missing runtime check for
1969         conversions to interface types whose target type is unknown at compile
1970         time.
1971         (Make_VM_TSD): Add missing code to disable the generation of calls to
1972         Check_TSD if the tagged type is not defined at library level, or not
1973         has a representation clause specifying its external tag, or -gnatdQ is
1974         active.
1975         * exp_disp.ads (Build_VM_TSDs): Removed.
1976         (Make_VM_TSDs): Spec relocated from exp_disp.adb
1977         * sem_disp.adb (Check_Dispatching_Operation): No code required to
1978         register primitives in the dispatch tables in VM targets.
1979         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1980         initialization of class-wide interface objects in VM targets.
1981         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1982         of Make_DT).
1983
1984 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
1985
1986         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1987         when dotnet-ld cannot be found.
1988
1989 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1990
1991         * bindgen.adb: Simplify significantly generation of binder body file in
1992         CodePeer mode.
1993         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1994         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1995         not expanded).
1996
1997 2011-08-04  Yannick Moy  <moy@adacore.com>
1998
1999         * sem_prag.adb, sem.ads: Code cleanup.
2000
2001 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2002
2003         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
2004         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
2005         results if possible.
2006         * s-stusta.adb (Print): Adjust after changes in s-stausa.
2007         * gnat_ugn.texi: Update dynamic stack usage section.
2008
2009 2011-08-04  Steve Baird  <baird@adacore.com>
2010
2011         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
2012         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
2013         contains only a call to the user-defined main subprogram.
2014         (Gen_Main_Ada) - If CodePeer_Mode is set, then
2015         call the "wrapper" subprogram instead of directly
2016         calling the user-defined main subprogram.
2017
2018 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2019
2020         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
2021         alternatives of a case statement for controlled objects. Rename local
2022         variable A to Dead_Alt.
2023         (Expand_N_If_Statement): Check the then and else statements of an if
2024         statement for controlled objects. Check the then statements of all
2025         elsif parts of an if statement for controlled objects.
2026         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
2027         objects.
2028         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
2029         detects a loop associated with the expansion of an array object.
2030         Augment the processing of the loop statements to account for a possible
2031         wrap done by Process_Statements_For_Controlled_Objects.
2032         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
2033         statements and abortable part of an asynchronous select for controlled
2034         objects.
2035         (Expand_N_Conditional_Entry_Call): Check the else statements of a
2036         conditional entry call for controlled objects.
2037         (Expand_N_Selective_Accept): Check the alternatives of a selective
2038         accept for controlled objects.
2039         (Expand_N_Timed_Entry_Call): Check the entry call and delay
2040         alternatives of a timed entry call for controlled objects.
2041         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
2042         exception handler for controlled objects.
2043         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2044         Add formal parameter Nested_Constructs along with its associated
2045         comment.
2046         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
2047         Requires_Cleanup_Actions.
2048         (Process_Statements_For_Controlled_Objects): New routine.
2049         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
2050         routine. Inspect a node which contains a non-handled sequence of
2051         statements for controlled objects. If such an object is found, the
2052         statements are wrapped in a block.
2053
2054 2011-08-04  Bob Duff  <duff@adacore.com>
2055
2056         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
2057         need to compare with Class_Wide_Type (T2), in order to get at the
2058         original class-wide type node.
2059         * sem_type.ads (Covers): Improve the comment.
2060         * einfo.ads (Class_Wide_Type): Improve the comment.
2061         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
2062         the type of the Deref.
2063
2064 2011-08-04  Yannick Moy  <moy@adacore.com>
2065
2066         * gnat_rm.texi: Document that Test_Case pragma can only appear on
2067         separate declarations.
2068         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
2069         check identifier of pragma argument.
2070         (Chain_TC): check that no other test case associated to the same entity
2071         share the same name.
2072         (Check_Test_Case): disallow test case inside subprogram body
2073         (Analyze_Pragma): correct call to check identifier and not argument
2074         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
2075         function gets name from test case pragma.
2076
2077 2011-08-04  Yannick Moy  <moy@adacore.com>
2078
2079         * gnat_rm.texi: Document new pragma and aspect.
2080         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
2081         (No_Duplicates_Allowed): new constant array defining whether duplicates
2082         aspects of each kind can appear on the same declaration.
2083         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
2084         field, which points to a node holding the previous Spec_PPC_List.
2085         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
2086         through the indirection with Contract.
2087         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
2088         * par-prag.adb (Prag): do nothing on Test_Case pragma
2089         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
2090         be called directly.
2091         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
2092         component Ensures of Test_Case.
2093         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
2094         (Analyze_Generic_Subprogram_Declaration,
2095         Analyze_Subprogram_Instantiation,
2096         Analyze_Abstract_Subprogram_Declaration,
2097         Analyze_Subprogram_Body_Helper,
2098         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
2099         insert contract in subprogram node at point of definition
2100         * sem_ch13.adb
2101         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
2102         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
2103         corresponding pragma
2104         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
2105         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
2106         similar to the analysis of pre/post
2107         (Derive_Subprogram): insert contract in subprogram node at point of
2108         derivation.
2109         * sem_prag.adb, sem_prag.ads
2110         (Check_Arg_Is_String_Literal, Check_Identifier):
2111         new checking procedures to be called in treatment of pragmas
2112         (Check_Test_Case): new procedure to check that a Test_Case aspect or
2113         pragma is well-formed. This does not check currently that 'Result is
2114         used only in the Ensures component of a Test_Case.
2115         (Analyze_Pragma): add case for Test_Case
2116         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
2117         components of a Test_Case.
2118         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
2119         expressions in the 3rd (and 4th if present) arguments of a Test_Case
2120         pragma, treated as spec expressions.
2121         (Sig_Flags): add value -1 for Test_Case.
2122         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
2123         Get_Requires_From_Test_Case_Pragma): getters for both expression
2124         components of a Test_Case.
2125         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
2126         indirection between an entry or [generic] subprogram entity and its
2127         pre/post + test-cases.
2128         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
2129         get/set for fields of an N_Contract node.
2130         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
2131         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
2132         names and pragma for Test_Case.
2133         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
2134
2135 2011-08-04  Vincent Celier  <celier@adacore.com>
2136
2137         * gnat_ugn.texi: Improve documentation of gnatmake switch
2138         --source-info-file=.
2139
2140 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2141
2142         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
2143         type). Initialize Atyp to the appropriate type which is later checked
2144         for completion. Rewrite the assertion associated with private type
2145         completion.
2146
2147 2011-08-04  Ed Falis  <falis@adacore.com>
2148
2149         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
2150         initialize the number of CPUs.
2151
2152 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2153
2154         * sem_type.adb (Disambiguate): New subsidiary routine
2155         In_Same_Declaration_List, to implement AI05-0020: a user-defined
2156         equality on an anonymous access type whose designated type is private
2157         does not lead to an ambiguity with the universal access equality
2158         operator in the body or child units of the defining package. The same
2159         is true for a multiplication operator on a private type completed with
2160         a fixed-point-type.
2161
2162 2011-08-04  Javier Miranda  <miranda@adacore.com>
2163
2164         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
2165         (Normalize_Scalars_Config): Removed.
2166         * opt.adb
2167         (Register_Opt_Config_Switches): Remove registering config values of
2168         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
2169         (Restore_Opt_Config_Switches): Remove code which restores the values of
2170         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2171         Init_Or_Norm_Scalars.
2172         (Save_Opt_Config_Switches): Remove code which saves values of
2173         Init_Or_Norm_Scalars and Normalize_Scalars.
2174         (Set_Opt_Config_Switches): Remove code which restores config values of
2175         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2176         Init_Or_Norm_Scalars.
2177
2178 2011-08-04  Yannick Moy  <moy@adacore.com>
2179
2180         * frontend.adb (Frontend): remove previous patch to avoid full
2181         qualification in ALFA mode.
2182         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
2183         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
2184         unique name for an entity, which could be used to identify the entity
2185         across compilation units.
2186
2187 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2188
2189         * prj-env.adb
2190         (Initialize_Default_Project_Path): Add target specific directory
2191         ($prefix/$target/lib/gnat) in front of project path in all cases
2192         (making gnatmake's behaviour consistent with gprbuild).
2193         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
2194         Pass target name from Sdefault to project subsystem.
2195         * gnatls.adb: Show new target specific default project directory.
2196
2197 2011-08-04  Johannes Kanig  <kanig@adacore.com>
2198
2199         * cstand.adb: Add Information to Identifier in Standard
2200         (Identifer_For): Set Entity to the corresponding entity
2201
2202 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2203
2204         * gnat_ugn.texi: Update doc on gnatcheck.
2205
2206 2011-08-04  Yannick Moy  <moy@adacore.com>
2207
2208         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
2209         xrefs in a scope.
2210
2211 2011-08-04  Yannick Moy  <moy@adacore.com>
2212
2213         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
2214         performing expansion.
2215         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
2216         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
2217         it is not called in ALFA mode.
2218
2219 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2220
2221         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
2222         after all, so removed.
2223
2224 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2225
2226         * vms_data.ads: Add missing VMS qualifiers.
2227
2228 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2229
2230         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
2231         the list of files on the command line after processing it through
2232         Complete_Mains.
2233
2234 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2235
2236         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
2237         processing for .NET/JVM. These targets can now benefit from
2238         Raise_From_Controlled_Operation and they share the same processing with
2239         standard targets.
2240         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
2241         These targets need transient scopes in order to properly finalize short
2242         lived controlled objects.
2243         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
2244          NET/JVM. These targets can now benefit from
2245         Raise_From_Controlled_Operation and they share the same processing with
2246         standard targets.
2247
2248 2011-08-04  Geert Bosch  <bosch@adacore.com>
2249
2250         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
2251
2252 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2253
2254         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
2255         Expand_Record_Aggregate, to determine whether aggregate must be
2256         expanded into assignments. This is the case if the ancestor part is
2257         private, regarless of the setting of the flag Has_Private_Ancestor.
2258
2259 2011-08-04  Ed Falis  <falis@adacore.com>
2260
2261         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
2262
2263 2011-08-04  Bob Duff  <duff@adacore.com>
2264
2265         * sinfo.ads: Fix comment.
2266
2267 2011-08-04  Steve Baird  <baird@adacore.com>
2268
2269         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
2270         choose a package name in much the same way as is
2271         done for JGNAT when VM_Target /= No_VM, except that
2272         a slightly more distinctive prefix string is used.
2273
2274 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2275
2276         * makeutl.adb (Complete_Mains): no longer accept unit names on the
2277         gnatmake command line.
2278         This behavior was never documented (and was supported only because of
2279         an early bug in the code). This case might lead to ambiguous cases
2280         (between unit names and truncated base names without suffixes).
2281
2282 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2283
2284         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
2285         Remove the external tag of a tagged type from the internal hash table.
2286         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
2287         expanded usage of the routine. Strenghten the check for Is_Master. Add
2288         processing for tagged types.
2289         (Build_Finalizer): Create all the necessary lists used in finalizer
2290         creation when the processed context is a package that may contain
2291         tagged types.
2292         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
2293         Requires_Cleanup_Actions.
2294         (Expand_N_Package_Body): Package bodies may need clean up code
2295         depending on whether they contain tagged types.
2296         (Expand_N_Package_Declaration): Package declarations may need clean up
2297         code depending on whether they contain tagged types.
2298         (Unregister_Tagged_Types): New routine. Search through a list of
2299         declarations or statements, looking for non-abstract Ada tagged types.
2300         For each such type, generate code to unregister the external tag.
2301         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2302         Requires_Cleanup_Actions.
2303         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2304         through a list of declarations or statements looking for non-abstract
2305         Ada tagged types or controlled objects.
2306         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2307         Requires_Cleanup_Actions.
2308         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2309         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2310         RE_Unit_Table.
2311
2312 2011-08-04  Vincent Celier  <celier@adacore.com>
2313
2314         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2315         has Ada sources, not project Project, because if the root project
2316         Project has no sources of its own, all projects will be deemed without
2317         sources.
2318
2319 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2320
2321         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2322         of the No_Param_Proc acc-to-subp type used for initialization of
2323         __gnat_finalize_library_objects so that it's declared at library level
2324         rather than nested inside of the adainit routine.
2325
2326 2011-08-04  Javier Miranda  <miranda@adacore.com>
2327
2328         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2329         if the tagged type has a representation clause which specifies its
2330         external tag.
2331
2332 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2333
2334         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
2335         Remove previous procedure with that name.
2336         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
2337         when appropriate.
2338         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2339         subtype mark, the ancestor cannot have unknown discriminants.
2340         (Resolve_Record_Aggregate): if the type has invisible components
2341         because of a private ancestor, the aggregate is illegal.
2342
2343 2011-08-04  Vincent Celier  <celier@adacore.com>
2344
2345         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2346         account switches -gnat2005, -gnat12 and -gnat2012.
2347
2348 2011-08-04  Bob Duff  <duff@adacore.com>
2349
2350         * s-tasdeb.ads: Minor comment fix.
2351
2352 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2353
2354         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2355         CodePeer mode.
2356         * switch.ads, switch.adb (Is_Language_Switch): New function.
2357
2358 2011-08-04  Vincent Celier  <celier@adacore.com>
2359
2360         * switch-c.adb: Minor comment addition.
2361
2362 2011-08-04  Vincent Celier  <celier@adacore.com>
2363
2364         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2365         ending with '=' is followed by a space (missing file name).
2366
2367 2011-08-04  Pascal Obry  <obry@adacore.com>
2368
2369         * g-regist.ads: Fix size of HKEY on x86_64-windows.
2370
2371 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2372
2373         * sem_ch12.adb (Analyze_Associations): New routine
2374         Check_Overloaded_Formal_Subprogram to reject a formal package when
2375         there is a named association or a box initialisation for an overloaded
2376         formal subprogram of the corresponding generic.
2377
2378 2011-08-04  Yannick Moy  <moy@adacore.com>
2379
2380         * alfa.ads (ALFA_Xref_Record): add component for type of entity
2381         * get_alfa.adb, put_alfa.adb: Read and write new component of
2382         cross-reference.
2383         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2384
2385 2011-08-04  Pascal Obry  <obry@adacore.com>
2386
2387         * urealp.adb: Minor reformatting.
2388
2389 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2390
2391         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2392         Handle the case when Cleanup_Protected_Object returns Empty.
2393
2394 2011-08-04  Yannick Moy  <moy@adacore.com>
2395
2396         * frontend.adb (Frontend): only qualify names in non-ALFA mode
2397
2398 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2399
2400         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2401         call, ignore functions.
2402
2403 2011-08-04  Geert Bosch  <bosch@adacore.com>
2404
2405         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2406         point.
2407
2408 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2409
2410         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2411         as an index for Builder'Switches. This conforms to the documentation.
2412         * make.adb (Insert_Project_Sources): avoid duplicate code
2413
2414 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2415
2416         * makeutl.adb (Complete_Mains): if the user has passed a relative file
2417         name on the command line (for instance "../dummy"), never assume it can
2418         be a unit name.
2419
2420 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2421
2422         * bindgen.adb: Remove code the reference or create the
2423         Break_Start/__gnat_break_start procedure.
2424         * s-stalib.adb (Break_Start): Removed.
2425
2426 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2427
2428         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2429         shared with gprbuild.
2430
2431 2011-08-04  Yannick Moy  <moy@adacore.com>
2432
2433         * par-ch4.adb (P_Primary): preferentially issue an error message about
2434         a missing parenthesis arount a conditional or case expression in Ada
2435         2012 mode, if we detect that the alignment is not correct for a
2436         statement.
2437
2438 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2439
2440         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2441         tag-to-class-wide conversion as needing finalization actions.
2442         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2443         a tag-to-class-wide conversion as needing finalization actions.
2444         (Is_Finalizable_Transient): The result of a tag-to-class-wide
2445         conversion does not need finalization actions.
2446         (Is_Tag_To_CW_Conversion): New routine.
2447         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2448         whether an object is the result of a tag-to-class-wide conversion.
2449
2450 2011-08-04  Yannick Moy  <moy@adacore.com>
2451
2452         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2453         the left-hand-side and right-hand-side of a conjunct are inserted when
2454         translating a pre- or postcondition
2455         * sem_ch6.adb: Correct typo in comment
2456
2457 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2458
2459         * gnat_rm.texi: Ravenscar does not prohibit dependence on
2460         Unchecked_Conversion and Unchecked_Deallocation.
2461
2462 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2463
2464         * make.adb: Minor reformatting.
2465
2466 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2467
2468         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2469         sources in the project and its imported projects, but not in the whole
2470         tree.
2471
2472 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2473
2474         * make.adb: Remove debug trace.
2475
2476 2011-08-04  Vincent Celier  <celier@adacore.com>
2477
2478         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2479         path in canonical form, to be able to compare path names on platforms
2480         such as Windows or Darwin.
2481
2482 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2483
2484         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2485         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2486         * scos.ads: Update documentation accordingly.
2487         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2488         pragmas.
2489
2490 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2491
2492         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2493         attribute only if prefix type is scalar.
2494
2495 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2496
2497         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2498         in gnatmake for specifying mains on the command line that do not belong
2499         to the main project. These mains must currently all belong to the same
2500         project, though.
2501         (Ultimate_Extension_Of): removed, since duplicated
2502         Ultimate_Extending_Project.
2503
2504 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2505
2506         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2507         instead.
2508         (CodePeer_Mode_String): New.
2509         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2510         CodePeer mode.
2511         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2512         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2513         mode, since no useful elaboration subprogram is needed by CodePeer.
2514         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2515         In this mode, compile binder file with -gnatC and do stop after this
2516         step.
2517
2518 2011-08-04  Vincent Celier  <celier@adacore.com>
2519
2520         * exp_ch7.adb: Minor comment fix.
2521
2522 2011-08-04  Robert Dewar  <dewar@adacore.com>
2523
2524         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2525         exp_ch4.adb, makeutl.adb: Minor reformatting.
2526
2527 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2528
2529         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2530         Create several new subprograms to move code out of Make. This makes the
2531         code more readable, removes code duplication, and is a preparation work
2532         for adding support for aggregate projects.
2533
2534 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2535
2536         * s-po32gl.ads, s-po32gl.adb: New files.
2537         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2538         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2539         (Build_Finalization_Collection): Use it.
2540         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2541         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2542         literals.
2543         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2544         * gcc-interface/Make-lang.in: Update dependencies.
2545
2546 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2547
2548         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2549         the command line.
2550
2551 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2552
2553         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2554         command line is not a file name, also check whether it could be a unit
2555         name.
2556
2557 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2558
2559         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2560         the header of the finalization routine.
2561         If the unit has no finalizer but is a body whose spec has one, then
2562         generate the decrement of the elaboration entity only.
2563         If the unit has a finalizer and is a spec, then do not generate the
2564         decrement of the elaboration entity.
2565         (Gen_Finalize_Library_C): Likewise.
2566
2567 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2568
2569         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2570         (Bounds_Size_Expression): Removed.
2571         (Double_Alignment_Of): New subsidiary routine.
2572         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2573         for a hole in the dope vector of unconstrained arrays due to different
2574         index and element alignments.
2575
2576 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2577
2578         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2579         raise program_error because body has not been seen yet.
2580
2581 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2582
2583         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
2584         an unresolved name.
2585
2586 2011-08-04  Vincent Celier  <celier@adacore.com>
2587
2588         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
2589
2590 2011-08-04  Yannick Moy  <moy@adacore.com>
2591
2592         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
2593         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
2594
2595 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2596
2597         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
2598         instantiation in RCI.
2599
2600 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2601
2602         * make.adb: Share more code with gprbuild
2603
2604 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2605
2606         * projects.texi: Added documentation for the IDE'Gnat project file
2607         attribute.
2608
2609 2011-08-04  Nicolas Roche  <roche@adacore.com>
2610
2611         * gnat_rm.texi: Minor editing.
2612
2613 2011-08-04  Javier Miranda  <miranda@adacore.com>
2614
2615         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
2616         and the library case for VM targets.
2617         (Gen_Adainit_Ada): Likewise.
2618
2619 2011-08-04  Robert Dewar  <dewar@adacore.com>
2620
2621         * g-altive.ads: Minor comment updates.
2622         * prj-nmsc.adb: Minor reformatting.
2623
2624 2011-08-04  Javier Miranda  <miranda@adacore.com>
2625
2626         * opt.ads
2627         (Normalize_Scalars_Config): Value of the configuration switch set by
2628         pragma Normalize_Scalars when it appears in the gnat.adc file.
2629         (Normalize_Scalars): New field for record Config_Switches_Type. Used
2630         to save and restore settings of this pragma.
2631         * opt.adb
2632         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
2633         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
2634
2635 2011-08-04  Vincent Celier  <celier@adacore.com>
2636
2637         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
2638
2639 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2640
2641         * makeutl.adb: Minor reformatting.
2642
2643 2011-08-04  Olivier Hainque  <hainque@adacore.com>
2644
2645         * g-altive.ads: Update comments to reflect that only the soft
2646         binding is available today.
2647
2648 2011-08-04  Robert Dewar  <dewar@adacore.com>
2649
2650         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
2651         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
2652         * gcc-interface/Make-lang.in: Update dependencies.
2653
2654 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2655
2656         * prj-env.adb: Remove local debug traces.
2657
2658 2011-08-04  Yannick Moy  <moy@adacore.com>
2659
2660         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
2661         was used instead of Hi_OK, which could cause a read of an uninitialized
2662         value later on. Detected while working on the new warning.
2663         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
2664         to local variable.
2665         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
2666         in more cases, in order to detect more unreferenced values.
2667         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
2668         object for expression, if any.
2669
2670 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2671
2672         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
2673         the operand types instead of the Esize.
2674
2675 2011-08-04  Steve Baird  <baird@adacore.com>
2676
2677         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
2678         enable CodePeer_Mode.
2679         * bindusg.adb (Display): Add help message describing -P binder switch.
2680         * gnat_ugn.texi: Document -P binder switch.
2681         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
2682         user-defined main program directly.
2683         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
2684         user-defined main program in the context clause of the package body.
2685
2686 2011-08-04  Yannick Moy  <moy@adacore.com>
2687
2688         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
2689         duplicate of Defining_Entity
2690         (Get_Unique_Entity_For_Decl): rename function into
2691         Unique_Defining_Entity
2692         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
2693         (Formal_Proof_On): remove synthesized flag
2694         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2695         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
2696         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
2697         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
2698         Annotate (Formal_Proof)
2699
2700 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2701
2702         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
2703         source files with non-standard naming schemes, in imported projects
2704
2705 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2706
2707         * makeutl.adb (Complete_Mains): when a multi-unit source file is
2708         specified on the gprbuild command line, we need to compile all units
2709         within that file, not just the first one we find
2710         Fix error message for mains that are not found.
2711
2712 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2713
2714         * sem_ch6.adb: Update comment.
2715         * sem_ch12.adb: Minor reformatting.
2716
2717 2011-08-04  Bob Duff  <duff@adacore.com>
2718
2719         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
2720         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
2721         race condition whose symptom is to fail to lock Parent. That, in turn,
2722         causes Parent.Awake_Count to be accessed without locking Parent, which
2723         causes another race condition whose symptom is that Parent.Awake_Count
2724         can be off by 1 (either too high or too low). The solution is to lock
2725         Parent unconditionally, and then lock Acceptor, before reading
2726         Acceptor.Terminate_Alternative.
2727
2728 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2729
2730         * debug.adb: Update comment.
2731
2732 2011-08-04  Robert Dewar  <dewar@adacore.com>
2733
2734         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
2735         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
2736         exp_ch6.adb: Minor reformatting.
2737
2738 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2739
2740         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
2741         checks for -gnateE.
2742
2743 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2744
2745         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
2746
2747 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2748
2749         * sinfo.ads: Minor reformatting.
2750
2751 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2752
2753         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
2754         even if there is no location.
2755
2756 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2757
2758         * sem_res.adb, sem_ch4.adb: move check for restriction
2759         No_Task_Hierarchy to resolve_allocator.
2760
2761 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2762
2763         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
2764         This flag of N_Pragma nodes is not used, remove it as well as all of
2765         the associated circuitry.
2766
2767 2011-08-04  Javier Miranda  <miranda@adacore.com>
2768
2769         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
2770         runtime check on duplicated externa tags
2771         * debug.adb Document switch -gnatdQ.
2772
2773 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2774
2775         * a-fihema.ads: Minor typo fix.
2776
2777 2011-08-04  Yannick Moy  <moy@adacore.com>
2778
2779         * sem_ch10.adb: Minor comment update.
2780
2781 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2782
2783         * einfo.adb: Update the node field usage to reflect the renaming of
2784         Return_Flag to Return_ Flag_Or_Transient_Decl.
2785         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
2786         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
2787         (Write_Field15_Name): Change Return_Flag to
2788         Return_Flag_Or_Transient_Decl.
2789         * einfo.ads: Rename node field Return_Flag to
2790         Return_Flag_Or_Transient_Decl. Update the associated comment and all
2791         occurrences in entities.
2792         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
2793         associated Inline pragma.
2794         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
2795         associated Inline pragma.
2796         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
2797         routine.
2798         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
2799         Return_Flag and Set_Return_Flag.
2800         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
2801         objects generated for controlled transients declared inside an
2802         Exception_With_Actions. Update the calls to Return_Flag.
2803         (Process_Object_Declaration): Add code to add a null guard for hook
2804         objects generated for controlled transients declared inside an
2805         Exception_With_Actions. Update related comment.
2806         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
2807         objects generated for controlled transients declared inside an
2808         Exception_With_Actions. Update the calls to Return_Flag.
2809         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
2810
2811 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2812
2813         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
2814         positional aggregate.
2815
2816 2011-08-04  Vincent Celier  <celier@adacore.com>
2817
2818         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
2819         SLOC only for pragmas.
2820
2821 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2822
2823         * projects.texi: Minor typo fix.
2824
2825 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2826
2827         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
2828         on case-sensitive file systems.
2829
2830 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2831
2832         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
2833         nested in a disabled pragma.
2834         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
2835         enclosing pragma, if any, for X decisions.
2836
2837 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2838
2839         * sem_prag.adb: Minor reformatting.
2840
2841 2011-08-04  Vincent Celier  <celier@adacore.com>
2842
2843         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
2844         allowed in no run time mode.
2845
2846 2011-08-04  Vincent Celier  <celier@adacore.com>
2847
2848         * make.adb (Check): When -gnatc is used, check for the source file
2849         inside the ALI file with a canonical case file name.
2850
2851 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2852
2853         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
2854         overriding the separator.
2855
2856 2011-08-04  Robert Dewar  <dewar@adacore.com>
2857
2858         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
2859         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
2860
2861 2011-08-04  Robert Dewar  <dewar@adacore.com>
2862
2863         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
2864
2865 2011-08-04  Yannick Moy  <moy@adacore.com>
2866
2867         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
2868         'Result only appears in postcondition of function.
2869
2870 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2871
2872         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
2873         external tag, include the value of the external tag in the exception
2874         message.
2875
2876 2011-08-04  Yannick Moy  <moy@adacore.com>
2877
2878         * sem_attr.adb (Result): modify error message for misplaced 'Result
2879
2880 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2881
2882         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
2883         clear that the second argument must be an identifier.
2884
2885 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2886
2887         * exp_ch9.adb (Build_Barrier_Function): When compiling with
2888         -fpreserve-control-flow, insert an IF statement on the barrier
2889         condition to ensure that a conditional branch instruction is generated.
2890
2891 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2892
2893         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
2894         (Processing_Flags.Ignore_Missing_With): new flag.
2895
2896 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2897
2898         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
2899         Source_List_File on case-insensitive systems where the file is actually
2900         on a case-sensitive file system (NFS,...).
2901
2902 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2903
2904         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
2905         function return contains a controlled [extension] aggregate and the
2906         return statement is not part of a handled sequence of statements, wrap
2907         the return in a block. This ensures that all controlled temporaries
2908         generated during aggregate resolution will be picked up by the
2909         finalization machinery.
2910
2911 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2912
2913         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
2914         components, freeze type before resolution, to ensure that default
2915         initializations are present for all components.
2916         * sem_res.adb (Resolve_Actuals): the designated object of an
2917         accces-to-constant type is a legal actual in a call to an
2918         initialization procedure.
2919
2920 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2921
2922         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
2923         N_Unchecked_Type_Conversion to the possible containers of a renamed
2924         transient variable.
2925
2926 2011-08-04  Yannick Moy  <moy@adacore.com>
2927
2928         * par-ch13.adb (Aspect_Specifications_Present): recognize
2929         "with Identifier'Class =>" as an aspect, so that a meaningful warning
2930         is issued in Strict mode.
2931         * par.adb: Fix typos in comments.
2932
2933 2011-08-04  Yannick Moy  <moy@adacore.com>
2934
2935         * sem_attr.adb (Result): modify error message to take into account Post
2936         aspect when compiling Ada 2012 (or newer) code.
2937
2938 2011-08-04  Nicolas Roche  <roche@adacore.com>
2939
2940         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2941         remove need for GCC exceptions.
2942
2943 2011-08-04  Vincent Celier  <celier@adacore.com>
2944
2945         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2946         project, not the source file name.
2947         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2948         excluded, continue looking. This excluded source will only be returned
2949         if there is no other source with the same base name that is not locally
2950         removed.
2951
2952 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2953
2954         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2955         private and one of the operands is a real literal, use a qualified
2956         expression rather than a conversion which is not meaningful to the
2957         back-end.
2958
2959 2011-08-04  Yannick Moy  <moy@adacore.com>
2960
2961         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2962         corresponding aspect X'Class are allowed, proceed with analysis of the
2963         aspect instead of skipping it.
2964
2965 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2966
2967         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2968         This will allow to have an Ada implementation for the subprogram.
2969
2970 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2971
2972         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2973         completion and aspects are present, apply them to the entity for the
2974         type which is currently the partial view, but which is the one that
2975         will be frozen.
2976         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2977         applies to a partial view, indicate that the full view has predicates
2978         and delayed aspects.
2979         (Replace_Type_Reference): Handle properly predicates that apply to the
2980         full view of a private completion.
2981
2982 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2983
2984         * layout.adb (Layout_Type): For composite types, do not set Esize.
2985         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2986         set Esize.
2987         (Size_Known): Look at the RM size of components instead of the Esize.
2988         (Freeze_Record_Type): Look at the RM size instead of the Esize to
2989         issue warning and activate Implicit_Packing.
2990         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
2991         if the Esize is not known.
2992         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2993         for elementary types only.
2994         (Analyze_Record_Representation_Clause): Look at the RM size instead
2995         of the Esize to issue errors.
2996         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2997         is not known.
2998         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
2999         obsolete block.
3000         Look at the RM size instead of the Esize for types if the latter is
3001         not known.
3002         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
3003
3004 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3005
3006         * sem_type.adb: proper handling of equality not involving anonymous
3007         access types.
3008
3009 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3010
3011         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
3012         Vis_Decls. When creating a library-level finalizer for a package spec,
3013         both the declaration and body of the finalizer are inserted either in
3014         the visible or private declarations of the package spec.
3015
3016 2011-08-04  Javier Miranda  <miranda@adacore.com>
3017
3018         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
3019         use of the full-view of a type when invoking Is_Ancestor.
3020         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
3021         the full-view of private parents is requested, then use also the
3022         full-view of the parent of the first derivation.
3023
3024 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3025
3026         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
3027         instead of the locally imported procedure.
3028         * s-taprop-mingw.adb (Enter_Task): Ditto.
3029         * s-valrea.adb (Scan_Real): Ditto.
3030         * s-imgrea.adb (Set_Image_Real): Ditto.
3031         * s-flocon.ads: Make the package pure.
3032
3033 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3034
3035         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
3036         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
3037         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
3038         New subprogram, moved here from...
3039         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
3040         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
3041         rewriting of the last argument into a procedure call statement here...
3042         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
3043         instead.
3044
3045 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3046
3047         * par_sco.adb: Minor reformatting.
3048
3049 2011-08-04  Robert Dewar  <dewar@adacore.com>
3050
3051         * erroutc.adb: Minor reformatting.
3052
3053 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3054
3055         * par_sco.adb: Comment update.
3056
3057 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3058
3059         * s-flocon.ads: New file.
3060         * g-flocon.ads: Now a renaming of s-flocon.
3061         * Makefile.rtl: Add s-flocon.o
3062
3063 2011-08-04  Javier Miranda  <miranda@adacore.com>
3064
3065         * exp_strm.adb (Build_Array_Input_Function): if the array type is
3066         constrained, do not attempt to build a subtype of it.
3067
3068 2011-08-04  Yannick Moy  <moy@adacore.com>
3069
3070         * errout.ads Change comments: remove 'R'M as an example where quotes
3071         are needed; add ALFA as another case where quotes are not needed
3072         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
3073         case where quotes are not needed.
3074         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3075         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
3076         Remove all occurrences of 'A'L'F'A
3077
3078 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3079
3080         * sem_ch13.adb: check legality of invariant pragma.
3081
3082 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3083
3084         * bindgen.adb: Add comments.
3085
3086 2011-08-04  Yannick Moy  <moy@adacore.com>
3087
3088         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
3089         synthesized flag.
3090         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
3091         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
3092
3093 2011-08-04  Robert Dewar  <dewar@adacore.com>
3094
3095         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
3096         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
3097         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
3098
3099 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3100
3101         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
3102
3103 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3104
3105         PR ada/47880
3106         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
3107         allocated object.
3108
3109 2011-08-04  Robert Dewar  <dewar@adacore.com>
3110
3111         * einfo.ads, exp_ch4.adb: Minor reformatting.
3112
3113 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3114
3115         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
3116
3117 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3118
3119         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
3120         type in all cases to compute list of primitive operations, because full
3121         view may be an itype that is not attached to the list of declarations.
3122
3123 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3124
3125         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
3126         library has already been finalized.
3127         (Gen_Adafinal_C): Likewise.
3128         (Gen_Adainit_Ada): Generate an early return if the library has
3129         already been elaborated.
3130         (Gen_Adainit_C): Likewise.
3131         (Gen_Output_File_Ada): Generate an elaboration flag.
3132         (Gen_Output_File_C): Likewise.
3133
3134 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3135
3136         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
3137         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
3138         built in the first place.
3139         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
3140         for CodePeer because Finalize_Address was not built to begin with.
3141         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
3142
3143 2011-08-04  Pascal Obry  <obry@adacore.com>
3144
3145         * adaint.c (__gnat_tmp_name): Use current process id to create temp
3146         filenames, this ensures unicity of filenames across processes.
3147
3148 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3149
3150         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
3151         Raise_Controlled to Raise_From_Controlled_Operation. Update the
3152         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
3153         Add False as the actual to From_Abort in the generated call to
3154         Raise_From_Controlled_Operation.
3155
3156 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3157
3158         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
3159         so that the ali file name can be retrieved from outside of this package.
3160         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
3161         doing nothing in the general case, but used to update the object file
3162         timestamp if directly generated by the backend.
3163         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
3164         to a later time than the ali file one.
3165
3166 2011-08-04  Yannick Moy  <moy@adacore.com>
3167
3168         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
3169         entities whose body contains an Annotate pragma which forces formal
3170         proof on this body.
3171         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3172         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
3173         Mark_Non_ALFA_Subprogram to pass in a message and node.
3174         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
3175         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
3176         surrounding subprogram.
3177         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
3178         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
3179         as not in ALFA is annotated with Formal_Proof being On, then an error
3180         is issued based on the additional parameters for message and node.
3181         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
3182         * gcc-interface/Make-lang.in: Update dependencies.
3183
3184 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3185
3186         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
3187         Finalize_Address when CodePeer is enabled.
3188
3189 2011-08-04  Pascal Obry  <obry@adacore.com>
3190
3191         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
3192         the latter returns a pointer to a static buffer which is deallocated
3193         at the end of the routine.
3194
3195 2011-08-04  Yannick Moy  <moy@adacore.com>
3196
3197         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
3198         after index creation; mark unconstrained base array type generated as
3199         being in/not in ALFA as well
3200         (Make_Index): mark subtype created as in/not in ALFA
3201         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
3202         over a loop as in/not in ALFA, depending on its type and form of loop
3203         iteration.
3204
3205 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3206
3207         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
3208         directly to False on .NET and JVM.
3209
3210 2011-08-04  Yannick Moy  <moy@adacore.com>
3211
3212         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
3213         constraint that subtype must come from source code to be in ALFA, so
3214         that anonymous subtypes can be in ALFA too.
3215
3216 2011-08-04  Yannick Moy  <moy@adacore.com>
3217
3218         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
3219         reference for ALFA mode.
3220         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
3221         procedure public so as to use it from formal verification back-end.
3222
3223 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3224
3225         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
3226         invalid checks of the Parameter, making Remove_Switch not working
3227         correctly.
3228
3229 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3230
3231         * targparm.ads: Update header: no run-time exception is needed on this
3232         file.
3233
3234 2011-08-04  Vincent Celier  <celier@adacore.com>
3235
3236         * a-fihema.adb: Use System.IO instead of GNAT.IO
3237
3238 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3239
3240         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
3241         are forbidden in Compiler_Unit mode.
3242
3243 2011-08-04  Robert Dewar  <dewar@adacore.com>
3244
3245         * sem_util.adb: Minor reformatting.
3246
3247 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3248
3249         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
3250         library-level finalizers.
3251         (Gen_Finalize_Library_C): Update the import string for library-level
3252         finalizers.
3253         (Gen_Finalize_Library_Defs_C): Update the definition name of a
3254         library-level finalizer.
3255         * exp_ch7.adb: Remove with and use clauses for Stringt.
3256         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
3257         Spec_Decl. Add local variable Body_Id. The names of library-level
3258         finalizers are now manually fully qualified and are no longer external.
3259         A single name is now capable of servicing .NET, JVM and non-VM targets.
3260         Pragma Export is no longer required to provide visibility for the name.
3261         (Create_Finalizer_String): Removed.
3262         (New_Finalizer_Name): New routine which mimics New_..._Name.
3263
3264 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3265
3266         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
3267         elaboration counter to Standard_Short_Integer.
3268         * sem_util.adb (Build_Elaboration_Entity): Likewise.
3269         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
3270         (Gen_Elab_Externals_C): Likewise.
3271
3272 2011-08-04  Ed Falis  <falis@adacore.com>
3273
3274         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
3275         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
3276         system-vxworks-mips.ads, system-vxworks-x86.ads
3277         (Always_Compatible_Rep): set to False for all VxWorks targets.
3278
3279 2011-08-04  Robert Dewar  <dewar@adacore.com>
3280
3281         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
3282         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
3283         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
3284         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
3285         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
3286         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
3287         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
3288         Minor reformatting and code reorganization.
3289
3290 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3291
3292         * projects.texi: Added doc for aggregate projects.
3293
3294 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3295
3296         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3297         Add support for overriding the Project_Path in aggregate projects.
3298
3299 2011-08-04  Robert Dewar  <dewar@adacore.com>
3300
3301         * a-cofove.ads: Minor reformatting.
3302
3303 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3304
3305         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3306         on the generated code.
3307         (Build_Finalize_Statements): Update the comment on the generated code.
3308         (Build_Initialize_Statements): Update the comment on the generated code.
3309         (Build_Object_Declarations): Add local variable Result. The object
3310         declarations are now built in sequence.
3311         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3312         RE_Unit_Table.
3313
3314 2011-08-04  Robert Dewar  <dewar@adacore.com>
3315
3316         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3317
3318 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3319
3320         * einfo.ads (Elaboration_Entity): Document new definition and use.
3321         (Elaboration_Entity_Required): Adjust to above change.
3322         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3323         * exp_ch12.adb: And with and use for Snames.
3324         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3325         * exp_util.adb (Set_Elaboration_Flag): Likewise.
3326         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3327         <Check_Unit_Name>: Deal with N_Expanded_Name.
3328         <Attribute_Elaborated>: Extend to all unit names.
3329         * sem_elab.adb: And with and use for Uintp.
3330         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
3331         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
3332         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
3333         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
3334         from Gen_Adainit_Ada.
3335         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
3336         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
3337         case, do not call System.Standard_Library.Adafinal; instead call
3338         finalize_library if needed.
3339         (Gen_Adafinal_C): Likewise.
3340         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3341         non-main program case.
3342         (Gen_Adainit_C): Generate a couple of external declarations here.
3343         In the main program case, set SSL.Finalize_Library_Objects.
3344         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3345         (Gen_Elab_Calls_C): Likewise.
3346         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
3347         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
3348         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3349         objects here.
3350         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3351         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
3352         Gen_Adafinal_Ada.
3353         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3354         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
3355         of external declarations.  Call Gen_Finalize_Library_C.
3356
3357 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3358
3359         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3360         Compute_Compilation_Phases): new subprogram.
3361         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3362         The number of mains as well as the various compilation phases that
3363         need to be run are now project tree specific, since various
3364         aggregated trees might have different requirements. In particular,
3365         they do not all require bind or link phases.
3366
3367 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3368
3369         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3370         (Project_Tree_Appdata): New type.
3371         It is now possible to associate application-specific data to a project
3372         tree. In particular, this is used in the gprbuild builder to avoid a
3373         number of global tables and htables, especially now that there can be
3374         several project trees loaded at once because of aggregate projects.
3375         (Debug_Name): new procedure.
3376         * projects.texi: Clarify syntax of "**" for Source_Dirs
3377
3378 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3379
3380         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3381         the "roots" for a main.
3382         (Fill_From_Project): add support for aggregate projects. Main units
3383         in aggregated projects are now automatically added in the list of
3384         files to build (although this fails later on in gprbuild, because
3385         these files are not using the root proejct tree, so this needs
3386         further cleanup)
3387         * gcc-interface/Make-lang.in: Update dependencies.
3388
3389 2011-08-03  Yannick Moy  <moy@adacore.com>
3390
3391         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3392         conditional expression in ALFA.
3393         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3394         expressions as not in ALFA.
3395
3396 2011-08-03  Robert Dewar  <dewar@adacore.com>
3397
3398         * a-cofove.adb: Minor reformatting.
3399
3400 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3401
3402         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3403         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3404         gprbuild sources.
3405         These packages are more logically placed in the Queue package, since
3406         they manipulate the queue. It is also likely that they can be adapted
3407         for gnatmake, thus sharing more code.
3408         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3409         that we could move the above.
3410
3411 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3412
3413         * errutil.adb (Finalize): clean up the list of error messages on exit.
3414         Calling this subprogram multiple times will no longer show duplicate
3415         error messages on stderr.
3416
3417 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3418
3419         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3420         Getopt_Switches when we have already define a command line
3421         configuration.
3422
3423 2011-08-03  Yannick Moy  <moy@adacore.com>
3424
3425         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3426         in ALFA. Instead, they are considered as assertions to prove.
3427         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3428         nodes as not in ALFA. Instead, include conditional expressions in ALFA
3429         if they have no ELSE part, or if they occur in pre- and postconditions,
3430         where the Condition cannot have side-effects in ALFA
3431         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3432         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3433         Instead, include type conversion between scalar types in ALFA.
3434         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3435         if-and-only-if its type is in ALFA.
3436
3437 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3438
3439         * scos.adb, get_scos.adb, put_scos.adb
3440         New code letter for decisions: G (entry guard)
3441         * par_sco.adb
3442         (Traverse_Subprogram_Body): Rename to...
3443         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3444         (Traverse_Protected_Body): New subprogram
3445         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3446         protected bodies and entry bodies.
3447
3448 2011-08-03  Yannick Moy  <moy@adacore.com>
3449
3450         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3451         entities with get/set subprograms, which is set on procedure entities
3452         generated by the compiler for a postcondition.
3453         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3454         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3455         entity for a declaration
3456         (Get_Unique_Entity_For_Decl): new function returning an entity which
3457         represents a declaration, so that matching spec and body have the same
3458         entity.
3459
3460 2011-08-03  Robert Dewar  <dewar@adacore.com>
3461
3462         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3463         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3464
3465 2011-08-03  Yannick Moy  <moy@adacore.com>
3466
3467         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3468         library-level because retriction No_Implicit_Dynamic_Code in the
3469         front-end prevents its definition as a local subprogram
3470         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3471         for reuse in other contexts
3472         (Traverse_Declarations_Or_Statements,
3473         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3474         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3475         procedures take a callback parameter to be called on all declarations
3476         * lib-xref.ads
3477         (Traverse_All_Compilation_Units): new generic function to traverse a
3478         compilation unit and call a callback parameter on all declarations
3479
3480 2011-08-03  Javier Miranda  <miranda@adacore.com>
3481
3482         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3483         in Java since they are always enclosed in a namespace that
3484         differentiates them, and overloaded entities are supported by the VM.
3485
3486 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3487
3488         * checks.adb (Determine_Range): If a computed bound of an operation is
3489         outside the range of the base type of the expression, and overflow
3490         checks are enabled, the result is unknown and cannot be used for any
3491         subsequent constant folding.
3492         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3493         unknown, so is the result of the comparison.
3494
3495 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3496
3497         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3498         From_Abort. When finalization was triggered by an abort, propagate
3499         Standard'Abort_Signal rather than Program_Error.
3500         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3501         From_Abort.
3502         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3503         From_Abort. When finalization was triggered by an abort, propagate
3504         Standard'Abort_Signal rather than Program_Error.
3505         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3506         From_Abort.
3507         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3508         Abort_Id. Update the calls to Build_Object_Declarations and
3509         Build_Raise_Statement to include Abort_Id.
3510         (Build_Adjust_Statements): New local variable Abort_Id. Update the
3511         calls to Build_Object_Declarations and Build_Raise_Statement to include
3512         Abort_Id.
3513         (Build_Finalize_Statements): New local variable Abort_Id. Update the
3514         calls to Build_Object_Declarations and Build_Raise_Statement to include
3515         Abort_Id.
3516         (Build_Components): Create an entity for Abort_Id when exceptions are
3517         allowed on the target.
3518         (Build_Finalizer): New local variable Abort_Id.
3519         (Build_Initialize_Statements): New local variable Abort_Id. Update the
3520         calls to Build_Object_Declarations and Build_Raise_Statement to include
3521         Abort_Id.
3522         (Build_Object_Declarations): Add new formal Abort_Id. Create the
3523         declaration of flag Abort_Id to preserve the original abort status
3524         before finalization code is executed.
3525         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3526         runtime routine Raise_From_Controlled_Operation.
3527         (Create_Finalizer): Update the call to Build_Raise_Statement to include
3528         Abort_Id. Update the call to Build_Object_Declarations to include
3529         Abort_Id. Update the layout of the finalizer body.
3530         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3531         (Process_Transient_Objects): New local variable Abort_Id. Remove the
3532         clunky code to create all flags and objects related to
3533         exception propagation and replace it with a call to
3534         Build_Object_Declarations. Update the call to Build_Raise_Statement to
3535         include Abort_Id.
3536         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3537         Add new formal Abort_Id and associated comment on its use.
3538         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3539         on its use.
3540         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3541         Remove the clunky code to create all flags and objects related to
3542         exception propagation and replace it with a call to
3543         Build_Object_Declarations. Update the call to Build_Raise_Statement.
3544
3545 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3546
3547         * s-tassta.adb: Fix minor typos.
3548
3549 2011-08-03  Robert Dewar  <dewar@adacore.com>
3550
3551         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3552         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3553
3554 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3555
3556         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3557         to packages. This ensures that the finalizer body will not end up
3558         inside the freeze node.
3559         (Process_Declarations): Add code to detect whether a freeze node has a
3560         nested finalization collection.
3561
3562 2011-08-03  Pascal Obry  <obry@adacore.com>
3563
3564         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3565         (Current_Session): Return a not null access to Session_Type.
3566         (Default_Session): Likewise.
3567
3568 2011-08-03  Robert Dewar  <dewar@adacore.com>
3569
3570         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3571         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3572
3573 2011-08-03  Pascal Obry  <obry@adacore.com>
3574
3575         * g-awk.ads: Minor comment fix.
3576
3577 2011-08-03  Sergey Rybin  <rybin@adacore.com>
3578
3579         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3580         the tree structure related to discriminant constraints.
3581         Original_Discriminant cannot be used any more for computing the
3582         defining name for the reference to a discriminant.
3583
3584 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3585
3586         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
3587         function is not visibly tagged, this is not a dispatching call and
3588         therfore is not Tag_Indeterminate, even if the function is marked as
3589         dispatching on result.
3590
3591 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3592
3593         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
3594         (Expand_N_Free_Statement): Add a guard to protect against run-times
3595         which do not support controlled types.
3596         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
3597         against run-times which do not support controlled types.
3598         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
3599         against run-times which do not support controlled types.
3600         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
3601         against run-times which do not support controlled types.
3602         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
3603         protect against run-times which do not support controlled types.
3604
3605 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3606
3607         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
3608         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
3609
3610 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3611
3612         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
3613         modified in the source, to prevent spurious warnings when compiling
3614         with -gnatg.
3615
3616 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3617
3618         * a-except-2005.adb: Minor reformatting.
3619
3620 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3621
3622         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
3623         is a renaming declaration in the private part of a package, do not emit
3624         a warning that the with_clause could be moved because the renaming may
3625         be used in the body or in a child unit.
3626
3627 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3628
3629         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3630         Propagate the Comes_From_Source attribute from the original return
3631         object to the renaming.
3632
3633 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
3634
3635         * exp_ch7.adb (Build_Raise_Statement): Do not call
3636         Raise_From_Controlled_Operation when this routine is not present in
3637         the run-time library.
3638         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
3639         libraries (Ravenscar), tasks are non-terminating, and protected objects
3640         and tasks can only appear at library level, so we do not want
3641         finalization of protected objects nor tasks.
3642         * exp_intr.adb: Minor clarification in comment.
3643         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
3644         Gen_Output_File_C): Remove references to finalization of library-level
3645         objects when using restricted run-time libraries.
3646
3647 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3648
3649         * sem_ch3.adb (Build_Discriminant_Constraints): Set
3650         Original_Discriminant only if the parent type is a generic formal.
3651
3652 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3653
3654         * exp_ch13.adb: Add with and use clause for Targparm;
3655         (Expand_N_Free_Statement): Prevent the generation of a custom
3656         Deallocate on .NET/JVM targets since this requires pools and address
3657         arithmetic.
3658         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
3659         .NET/JVM targets, attach the newly allocated object to the access
3660         type's finalization collection. Do not generate a call to
3661         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
3662         exist in the runtime.
3663         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
3664         create a custom Allocate for object that do not require initialization.
3665         Attach a newly allocated object to the access type's finalization
3666         collection on .NET/JVM.
3667         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
3668         assignment of controlled types on .NET/JVM. The two hidden pointers
3669         Prev and Next and stored and later restored after the assignment takes
3670         place.
3671         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
3672         kludge for .NET/JVM to recognize a particular piece of code coming from
3673         Heap_Management and change the call to Finalize into Deep_Finalize.
3674         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
3675         finalization collections on .NET/JVM only for types derived from
3676         Controlled. Separate the association of storage pools with a collection
3677         and only allow it on non-.NET/JVM targets.
3678         (Make_Attach_Call): New routine.
3679         (Make_Detach_Call): New routine.
3680         (Process_Object_Declarations): Suppress the generation of
3681         build-in-place return object clean up code on .NET/JVM since it uses
3682         pools.
3683         * exp_ch7.ads (Make_Attach_Call): New routine.
3684         (Make_Detach_Call): New routine.
3685         * exp_intr.adb Add with and use clause for Targparm.
3686         (Expand_Unc_Deallocation): Detach a controlled object from a collection
3687         on .NET/JVM targets.
3688         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
3689         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
3690         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
3691         names used in finalization.
3692
3693 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3694
3695         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
3696         (Attach, Detach): Lock the current task when chaining an object onto a
3697         collection.
3698
3699 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3700
3701         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
3702         Rewritten to create the message strings when the exception is not
3703         raised by an abort during finalization.
3704         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
3705         Raise_From_Controlled_Operation and update its associated comment.
3706         * a-fihema.ads, a-fihema.adb: New GNAT unit.
3707         Ada.Finalization.Heap_Management provides key functionality
3708         associated with controlled objects on the heap, their creation,
3709         finalization and reclamation. Type Finalization_Collection is
3710         effectively a wrapper which sits ontop of a storage pool and performs
3711         all necessary bookkeeping for all the objects it contains. Each
3712         access-to-controlled or access-to-class-wide type receives a collection
3713         as part of its expansion. The compiler generates buffer code and
3714         invokes Allocate / Deallocate to create and destroy allocated
3715         controlled objects.
3716         * a-finali.adb ("="): Removed.
3717         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
3718         fields Prev and Next.
3719         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
3720         A library unit with at least one controlled object on the library level
3721         has a special finalizer which is invoked by the binder. To signal this,
3722         ali files carry field PF.
3723         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
3724         associated comment on field usage.
3725         * a-tags.adb (Get_RC_Offset): Removed.
3726         (Needs_Finalization): New routine.
3727         * a-tags.ads: Update the structure of the GNAT dispatch tables.
3728         Dispatch tables now carry field Needs_Finalization which provides
3729         runtime indication whether a type is controlled or has controlled
3730         components or both. Remove field RC_Offset.
3731         (Get_RC_Offset): Removed along with its associated pragma Export.
3732         Since tagged types with controlled components no longer carry hidden
3733         field _controller, the special mechanism to retrieve its location is no
3734         longer needed.
3735         (Needs_Finalization): New routine.
3736         * atree.ads, atree.adb (Elist24): New routine.
3737         (Set_Elist24): New routine.
3738         * atree.h: Add a define clause for Elist24.
3739         * bindgen.adb New library-level variable Lib_Final_Built.
3740         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
3741         presence of a VM target, the routine generates calls to the proper
3742         library finalization routine.
3743         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
3744         targets. Set the correct library finalization routine depending on
3745         whether the library has controlled objects or this is a VM compilation.
3746         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
3747         to library-level finalizers of compiled units in reverse order of
3748         elaboration. It also produces exception management code and reraises a
3749         potential exception after all units have been finalized.
3750         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
3751         library-level finalizers of compiled units in reverse order of
3752         elaboration.
3753         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
3754         definitions of all library-level finalizers available to the compilation
3755         (Gen_Main_Ada): Directly call Adafinal which now contails all target
3756         dependent code.
3757         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
3758         System.Standard_Library.Adafinal directly. If the library needs
3759         finalization actions, create the sequence of finalization calls.
3760         (Gen_Output_File_Ada): Alphabetize local variables and constants.
3761         Generate a with clause for System.Soft_Links when compiling for a VM.
3762         Remove the code which imports System.Standard_Library.Adafinal as
3763         Do_Finalize. Generate the library finalization routine.
3764         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
3765         If the library needs finalization actions, create all the definitions
3766         of library- level finalizers.
3767         (Has_Finalizer): New routine. Determines whether at least one compiled
3768         unit has a library-level finalizer.
3769         Add type Qualification_Mode.
3770         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
3771         * einfo.adb: New usage of field 15 as Return_Flag.
3772         Remove Finalization_Chain_Entity from the usages of field 19.
3773         Remove Associated_Final_Chain from the usages of field 23.
3774         New usage of field 23 as Associated_Collection.
3775         New usage of field 24 as Finalizer.
3776         New usage of flag 252 as Is_Processed_Transient.
3777         (Associated_Final_Chain): Removed.
3778         (Associated_Collection): New routine.
3779         (Finalization_Chain_Entity): Removed.
3780         (Finalizer): New routine.
3781         (Is_Finalizer): New routine.
3782         (Is_Processed_Transient): New routine.
3783         (Return_Flag): New routine.
3784         (Set_Associated_Final_Chain): Removed.
3785         (Set_Associated_Collection): New routine.
3786         (Set_Finalization_Chain_Entity): Removed.
3787         (Set_Finalizer): New routine.
3788         (Set_Is_Processed_Transient): New routine.
3789         (Set_Return_Flag): New routine.
3790         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
3791         displayed flags.
3792         (Write_Field8_Name): Alphabetize the output.
3793         (Write_Field11_Name): Alphabetize the output.
3794         (Write_Field12_Name): Alphabetize the output.
3795         (Write_Field13_Name): Alphabetize the output.
3796         (Write_Field14_Name): Alphabetize the output.
3797         (Write_Field15_Name): Alphabetize the output.
3798         (Write_Field16_Name): Alphabetize the output.
3799         (Write_Field17_Name): Alphabetize the output.
3800         (Write_Field18_Name): Alphabetize the output.
3801         (Write_Field19_Name): Alphabetize the output. Remove the output of
3802         Finalization_Chain_Entity.
3803         (Write_Field20_Name): Alphabetize the output.
3804         (Write_Field21_Name): Alphabetize the output.
3805         (Write_Field22_Name): Alphabetize the output.
3806         (Write_Field23_Name): Alphabetize the output. Remove the output of
3807         Associated_Final_Chain. Add output for Associated_Collection.
3808         (Write_Field24_Name): Alphabetize the output.
3809         (Write_Field25_Name): Add output for Finalizer.
3810         (Write_Field26_Name): Alphabetize the output.
3811         (Write_Field27_Name): Alphabetize the output.
3812         (Write_Field28_Name): Alphabetize the output.
3813         * einfo.ads: Add new field description for Associated_Collection and
3814         its uses in nodes.
3815         Remove Associated_Final_Chain and its uses in nodes.
3816         Remove Finalization_Chain_Entity and its uses in nodes.
3817         Add new field description for Finalizer and its uses in nodes.
3818         Add new synthesized attribute Is_Finalizer.
3819         Add new flag description for Is_Processed_Transient and its uses in
3820         nodes.
3821         Add new field description for Return_Flag and its uses in nodes.
3822         (Associated_Final_Chain): Removed along with its pragma Inline.
3823         (Associated_Collection): New routine and pragma Inline.
3824         (Finalization_Chain_Entity): Removed along with its pragma Inline.
3825         (Finalizer): New routine and pragma Inline.
3826         (Is_Finalizer): New routine and pragma Inline.
3827         (Is_Processed_Transient): New routine and pragma Inline.
3828         (Return_Flag): New routine and pragma Inline.
3829         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
3830         (Set_Associated_Collection): New routine and pragma Inline.
3831         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
3832         (Set_Finalizer): New routine and pragma Inline.
3833         (Set_Is_Processed_Transient): New routine and pragma Inline.
3834         (Set_Return_Flag): New routine and pragma Inline.
3835         * exp_aggr.adb: Alphabetize subprograms.
3836         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
3837         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
3838         associated comments. Remove local variables External_Final_List and
3839         Attach.
3840         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
3841         Ancestor. Remove the retrieval of finalization lists. Update the call to
3842         Make_Adjust_Call.
3843         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
3844         lists. Update the call to Late_Expansion.
3845         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
3846         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
3847         (Gen_Assign): Remove the retrieval of the finalization list used to
3848         build the assignment. Update the calls to Make_Init_Call and
3849         Make_Adjust_Call.
3850         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
3851         Remove the mechanism to determine attachment levels and finalization
3852         list retrieval. Remove the processing for coextensions.
3853         (Init_Controller): Removed. Controllers no longer exist.
3854         (Late_Expansion): Remove formals Flist and Obj along with their
3855         associated comments. Update the calls to Build_Record_Aggr_Code and
3856         Build_Array_Aggr_Code.
3857         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
3858         (Expand_N_Freeze_Entity): Add special processing for finalizers which
3859         appear in entry bodies, protected subprograms and task bodies.
3860         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
3861         * exp_ch3.adb (Add_Final_Chain): Removed.
3862         (Build_Array_Init_Proc): Alphabetize local variables.
3863         (Build_Assignment): Alphabetize local variables. Update the call to
3864         Maked_Adjust_Call.
3865         (Build_Class_Wide_Master): Rename local variables to better reflect
3866         their role.
3867         (Build_Discriminant_Assignments): Code reformatting.
3868         (Build_Init_Call_Thru): Code reformatting.
3869         (Build_Init_Procedure): Code reformatting. Generate a special version
3870         of Deep_Finalize which is capable of finalizing all initialized
3871         components and ignore the rest.
3872         (Build_Init_Statements): Rename local variables to better reflect their
3873         role.
3874         Reimplement the mechanism to include the creation and update of an index
3875         variable called a "counter". It is used as a bookmark for tracing
3876         initialized and non-initialized components.
3877         (Build_Initialization_Call): Remove local variable Controller_Typ.
3878         Alphabetize all local variables. Remove the initialization of the
3879         record controller and update the call to Make_Init_Call.
3880         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
3881         New local variable Counter.
3882         (Constrain_Array): Alphabetize.
3883         (Expand_Freeze_Array_Type): Create a collection instead of a
3884         finalization list.
3885         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
3886         Finalize_Address which is used in conjunction with allocated controlled
3887         objects.
3888         (Expand_N_Object_Declaration): Remove the creation of a finalization
3889         list for anonymous access types. Update the calls to Make_Init_Call and
3890         Make_Adjust_Call.
3891         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
3892         retrieval of finalization lists. Remove the expansion of the record
3893         controller. Create TSS primitive Finalize_Address used in conjunction
3894         with controlled objects on the heap. Create finalization collections
3895         for access-to-controlled record components.
3896         (Expand_Record_Controller): Removed.
3897         (Freeze_Type): Remove the freezing of record controllers. Freezing of
3898         class-wide types now requires additional processing. Create
3899         finalization collections for access-to-controlled types.
3900         (Increment_Counter): New routine.
3901         (Make_Counter): New routine.
3902         (Make_Eq_If): Remove the mention of Name_uController.
3903         (Make_Predefined_Primitive_Specs): There is no longer need to skip
3904         types coming from System.Finalization_Root.
3905         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
3906         (Predefined_Primitive_Bodies): There is no longer need to skip types
3907         coming from System.Finalization_Root.
3908         (Stream_Operation_OK): Do not generate stream routines for
3909         type Ada.Finalization.Heap_Management.Finalization_Collection.
3910         * exp_ch3.ads: Alphabetize subprograms.
3911         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
3912         Add with and use clause for Lib.
3913         (Complete_Coextension_Finalization): Removed.
3914         (Complete_Controlled_Allocation): New routine. Create a finalization
3915         collection for anonymous access-to-controlled types. Create a custom
3916         Allocate which interfaces with the back end and the machinery in
3917         Heap_Management.
3918         (Expand_Allocator_Expression): Add necessary calls to
3919         Complete_Controlled_Allocation. Remove the retrieval of finalization
3920         lists. Update the calls to Make_Adjust_Call. Generate a call to
3921         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3922         the associated collection.
3923         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
3924         Code clean up. Remove the retrieval of finalization lists and
3925         attachment levels.
3926         Update the call to Make_Init_Call. Generate a call to
3927         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3928         the associated collection.
3929         (Get_Allocator_Final_List): Removed. Finalization lists are not
3930         available.
3931         (Suitable_Element): Remove the mention of Name_uController.
3932         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
3933         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
3934         the left hand side, carry out the assignment and adjust the left hand
3935         side.
3936         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
3937         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
3938         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
3939         BIP_Collection and BIPcollection.
3940         (Build_Heap_Allocator): New routine used to allocate the return object
3941         of a build-in-place function onto a collection.
3942         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
3943         (Expand_Call): Do not replace direct calls to Deep routines with their
3944         aliases.
3945         (Expand_N_Extended_Return_Statement): Give all variables shorter names
3946         and update their occurrences. Add a special return flag to monitor the
3947         [ab]normal execution of the function. The flag is set right before the
3948         return statement.
3949         Rewrite the mechanism used to allocate a build-in-place return object
3950         on the heap or on a storage pool.
3951         (Is_Direct_Deep_Call): New routine.
3952         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3953         build-in-place function call instead of a final list. Build a call to
3954         Set_Finalize_Address_Ptr to decorate the associated collection.
3955         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3956         order to name the build-in-place function call's result for later
3957         finalization. Add a collection to a build-in-place function call
3958         instead of a final list.
3959         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3960         build-in-place function call instead of a final list. Remove the code
3961         which moves one final list and transforms it into the actual in a
3962         nested build-in-place call.
3963         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3964         build-in-place function call instead of a final list.
3965         (Move_Final_List): Removed.
3966         (Needs_BIP_Collection): New routine.
3967         (Needs_BIP_Final_List): Removed.
3968         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3969         enumeration type BIP_Formal_Kind.
3970         Update the related comment.
3971         (Needs_BIP_Collection): New routine.
3972         (Needs_BIP_Final_List): Removed.
3973         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3974         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3975         majority of subprograms in this unit. Add Name_Finalize_Address to
3976         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3977         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3978         statements for an array type.
3979         (Build_Adjust_Statements): Create the adjust statements for a record
3980         type.
3981         (Build_Cleanup_Statements): New routine. A procedure which given any
3982         construct containing asynchronous calls, references to _master, or is a
3983         task body, a task allocation or a protected body produces the necessary
3984         runtime calls to clean up these constructs.
3985         (Build_Exception_Handler): New routine.
3986         (Build_Final_List): Removed.
3987         (Build_Finalization_Collection): New routine. A core procedure which
3988         creates a collection to service heap allocated controlled objects
3989         associated with an access-to-controlled type.
3990         (Build_Finalize_Statements): Create the finalization statements for a
3991         record types.
3992         (Build_Finalizer): New routine. A core procedure which given any
3993         construct with declarations and/or statements detects all objects which
3994         need any type of clean up (controlled objects, protected objects) and
3995         generates all necessary code to clean up the said objects in the proper
3996         order.
3997         (Build_Finalizer_Call): New routine.
3998         (Build_Initialize_Statements): Create the initialization statements for
3999         an array type. The generated routine contains code to finalize partially
4000         initialized arrays.
4001         (Build_Object_Declarations): New routine.
4002         (Build_Raise_Statement): New routine.
4003         (Clean_Simple_Protected_Objects): Removed.
4004         (Controller_Component): Removed.
4005         (Enclosing_Function): New routine.
4006         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
4007         either declarations or statements or both.
4008         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
4009         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
4010         package.
4011         (Find_Final_List): Removed.
4012         (Global_Flist_Ref): Removed.
4013         (In_Finalization_Root): Removed.
4014         (Insert_Actions_In_Scope_Around): Determine the range of the transient
4015         scope in terms of tree nodes. Process all transient variables within
4016         that range.
4017         (Make_Adjust_Call): Rewritten. There is no longer an attach call
4018         generated after the adjust.
4019         (Make_Attach_Call): Removed.
4020         (Make_Call): New routine.
4021         (Make_Clean): Removed.
4022         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
4023         build routines.
4024         (Make_Deep_Proc): Rewritten to generate the new profile signature used
4025         in Deep routines.
4026         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
4027         build routines.
4028         (Make_Final_Call): Modified to simply create a call to either
4029         Deep_Finalize or Finalize.
4030         (Make_Finalize_Address_Body): New routine.
4031         (Make_Finalize_Address_Stmts): New routine. A function which produces
4032         TSS primitive Finalize_Address used in conjunction with heap allocated
4033         controlled objects.
4034         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
4035         (Make_Init_Call): Rewritten. There is no longer an attach call
4036         generated after initialization.
4037         (Make_Local_Deep_Finalize): New routine.
4038         (Make_Set_Finalize_Address_Ptr_Call): New routine.
4039         (Make_Transient_Block): Remove the finalization list retrieval and
4040         manipulation.
4041         (Needs_Finalization): Moved to Exp_Util.
4042         (Parent_Field_Type): New routine.
4043         (Preprocess_Components): New routine.
4044         (Process_Transient_Objects): New routine.
4045         (Wrap_HSS_In_Block): New routine.
4046         (Wrap_Transient_Declaration): Remove finalization list management and
4047         controller insertion.
4048         (Wrap_Transient_Expression): Code reformatting.
4049         (Wrap_Transient_Statement): Code reformatting.
4050         * exp_ch7.ads (Build_Final_List): Removed.
4051         (Build_Finalization_Collection): New routine.
4052         (Build_Raise_Statement): New routine.
4053         (Controller_Component): Removed.
4054         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
4055         (Find_Final_List): Removed.
4056         (In_Finalization_Root): Removed.
4057         (Is_Simple_Protected_Type): Update related comment.
4058         (Make_Adjust_Call): New parameter profile and associated comments.
4059         (Make_Attach_Call): Removed.
4060         (Make_Final_Call): New parameter profile and associated comments.
4061         (Make_Finalize_Address_Body): New routine.
4062         (Make_Init_Call): New parameter profile and associated comments.
4063         (Make_Local_Deep_Finalize): New routine.
4064         (Make_Set_Finalize_Address_Ptr_Call): New routine.
4065         (Needs_Finalization): Moved to Exp_Util.
4066         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
4067         (Expand_N_Protected_Body): Remove the handling of finalization lists.
4068         (Find_Protection_Type): Moved to Exp_Util.
4069         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
4070         (Make_DT): Update sequence of dispatch table initialization. Remove the
4071         initialization of field RC_Offset. Add initialization of field Needs_
4072         Finalization.
4073         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
4074         Reimplement how an object is first finalized, then deallocated.
4075         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4076         Code reformatting.
4077         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
4078         Register TSS_Finalize_Address with type TSS_Names.
4079         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
4080         procedure provides the interface between an allocation / deallocation
4081         and the support machinery in Ada.Finalization.Heap_Management.
4082         (Find_Init_Call): Code reformatting.
4083         (Find_Init_Call_In_List): Code reformatting.
4084         (Find_Protection_Type): Moved from Exp_Ch9.
4085         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
4086         (Has_Controlled_Coextensions): Removed.
4087         (Has_Controlled_Objects): New routine.
4088         (In_Library_Level_Package_Body): New routine.
4089         (Insert_Action_After): New routine.
4090         (Is_Finalizable_Transient): New routine. This predicate determines
4091         whether an object declaration is one of the many variants of controlled
4092         transients.
4093         (Is_Null_Access_BIP_Func_Call): New routine.
4094         (Is_Non_BIP_Func_Call): New routine.
4095         (Is_Related_To_Func_Return): New routine.
4096         (Needs_Finalization): Moved from Exp_Ch7.
4097         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
4098         (Find_Protection_Type): Moved from Exp_Ch9.
4099         (Has_Controlled_Coextensions): Removed.
4100         (Has_Controlled_Objects): New routine.
4101         (In_Library_Level_Package_Body): New routine.
4102         (Insert_Action_After): New routine.
4103         (Is_Finalizable_Transient): New routine.
4104         (Is_Null_Access_BIP_Func_Call): New routine.
4105         (Is_Non_BIP_Func_Call): New routine.
4106         (Is_Related_To_Func_Return): New routine.
4107         (Needs_Finalization): Moved from Exp_ch7.
4108         * expander.adb (Expand): Add a case for N_Free_Statement.
4109         * freeze.adb (Freeze_All): Replace the generation of a finalization
4110         list with a collection for access-to-controlled types.
4111         (Freeze_Entity): Code reformatting.
4112         (Freeze_Record_Type): Remove the freezing of a record controller
4113         component.
4114         (Freeze_Subprogram): Code reformatting.
4115         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
4116         finalization list.
4117         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
4118         has a library-level finalizer.
4119         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
4120         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
4121         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
4122         files. Add a-fihema to the list of object files.
4123         * par-ch4.adb:
4124         Alphabetize the associations in type Is_Parameterless_Attribute.
4125         * rtsfind.ads: Ada.Finalization_List.Controller and
4126         System.Finalization_Implementation are no longer a GNAT unit.
4127         Update the range of type Ada_Finalization_Child. Remove the following
4128         recoverable entities:
4129
4130            RE_Attach_To_Final_List
4131            RE_Deep_Tag_Attach
4132            RE_Finalize_List
4133            RE_Finalize_One
4134            RE_Finalizable_Ptr_Ptr
4135            RE_Global_Final_List
4136            RE_Limited_Record_Controller
4137            RE_List_Controller
4138            RE_Move_Final_List
4139            RE_Record_Controller
4140            RE_Simple_List_Controller
4141
4142         Add the following recoverable entities:
4143
4144            RE_Add_Offset_To_Address
4145            RE_Allocate
4146            RE_Base_Pool
4147            RE_Deallocate
4148            RE_Exception_Identity
4149            RE_Finalization_Collection
4150            RE_Finalization_Collection_Ptr
4151            RE_Needs_Finalization
4152            RE_Save_Library_Occurrence
4153            RE_Set_Finalize_Address_Ptr
4154            RE_Set_Storage_Pool_Ptr
4155            RE_Storage_Count
4156         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
4157         Name_uController.
4158         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
4159         (First_Stored_Discriminant): Remove the mention of Name_uController.
4160         * sem_aux.ads: Comment reformatting.
4161         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
4162         to redecorate an already existing class-wide type.
4163         (Decorate_Tagged_Type): New parameter profile and associated comment.
4164         Create a "shadow class-wide type" for a shadow entity.
4165         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
4166         of the final chain along with the associated comment.
4167         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
4168         Full_Desig and set it to the full view of the designated type.
4169         Initialize the finalization collection to empty.
4170         (Build_Derived_Record_Type): Alphabetize local variables. Code
4171         reformatting.
4172         (Collect_Fixed_Components): Remove the mention of Name_uController.
4173         (Create_Constrained_Components): Remove the mention of Name_uController.
4174         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
4175         class-wide type of a shadow entity.
4176         (Process_Full_View): Update the machinery which marks type
4177         Limited_Controlled's entity as limited.
4178         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
4179         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
4180         list, instead make a collection build-in-place formal.
4181         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
4182         a designated type in order to establish a match between the renaming
4183         and the renamed entity.
4184         (Find_Selected_Component): Add guard to prevent spurious exceptions
4185         from being raised on .NET/JVM.
4186         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
4187         to the list of primitive that need special processing. Update arrays
4188         C_Names and D_Names.
4189         (Replace_Types): Handle class-wide types.
4190         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
4191         different parameter profile, look at the first formal.
4192         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
4193         use clauses for Exp_Util.
4194         * sem_res.adb: Remove with and use clauses for Elists.
4195         (Propagate_Coextensions): Removed.
4196         (Resolve_Allocator): Do not propagate the list of coextensions from one
4197         allocator to another.
4198         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
4199         Deaccessed_T to Desig_Typ.
4200         (Enter_Name): Remove the mention of Name_uController.
4201         (Gather_Components): Remove the mention of Name_uController.
4202         (Incomplete_Or_Private_View): New routine.
4203         (Is_Coextension_Root): Removed.
4204         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
4205         * sem_util.ads (Incomplete_Or_Private_View): New routine.
4206         (Is_Coextension_Root): Removed.
4207         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
4208         Controlled types are now derived from a null tagged record. Remove
4209         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
4210         * sinfo.adb (Coextensions): Removed.
4211         (Set_Coextensions): Removed.
4212         * sinfo.ads: Remove Coextensions from the explanation of node fields
4213         and its uses in nodes.
4214         Update the field usage of N_Allocator.
4215         (Coextensions): Removed along with its pragma Inline.
4216         (Set_Coextensions): Removed along with its pragma Inline.
4217         * snames.ads-tmpl: Remove names
4218
4219           Name_uClean
4220           Name_uController
4221           Name_uFinal_List
4222           Name_uLocal_Final_List
4223           Name_Finalization_Root
4224           Name_Next
4225           Name_Prev
4226
4227         Add names
4228
4229           Name_uFinalizer
4230           Name_Finalize_Address
4231         * s-pooglo.adb (Allocate): Add overriding indicator.
4232         (Deallocate): Add overriding indicator.
4233         (Storage_Size): Add overriding indicator.
4234         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
4235         than Finalize_Global_List.
4236         (Null_Finalize_Global_List): Removed.
4237         (Save_Library_Occurrence): New routine.
4238         * s-soflin.ads: Remove variable Finalize_Global_List along with its
4239         initialization. Add variable Finalize_Library_Objects along with its
4240         pragma Export. Add variables Library_Exception and
4241         Library_Exception_Set along with their pragma Export.
4242         (Null_Finalize_Global_List): Removed.
4243         (Save_Library_Occurrence): New routine.
4244         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
4245         rather than Finalize_Global_List.
4246         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
4247         of the constructed node.
4248
4249 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4250
4251         * link.c: Include "auto-host.h" before system headers.
4252
4253 2011-08-03  Vincent Celier  <celier@adacore.com>
4254
4255         * make.adb (Gnatmake): Add to table Library_Projs only library projects
4256         that are not extended. Do not check if a library project that is
4257         extended should be regenerated. Do not add to table Library_Paths the
4258         libraries that are in extended projects. Link only with libraries that
4259         are in libray projects that are not extended.
4260         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
4261         for a library project that is extended.
4262
4263 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4264
4265         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
4266         conforming subprogram renamings that appear to be completions if they
4267         are not fully conformant.
4268         Such renamings are homographs but not completions.
4269         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
4270         names in a subprogram renaming that appears in an instance.
4271
4272 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4273
4274         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
4275         not immutably limited, build actual subtype from expression to provide
4276         proper bounds to caller.
4277
4278 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4279
4280         * sem_ch8.adb: Minor comment correction.
4281
4282 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4283
4284         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
4285         returning a limited array, use an extended return statement.
4286
4287 2011-08-03  Vincent Celier  <celier@adacore.com>
4288
4289         * make.adb (Initialize): If --subdirs= is used, but no project file is
4290         specified, attempt to create the specify subdir if it does not already
4291         exist and use it as the object directory as if -D had been specified.
4292
4293 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4294
4295         * s-tpopsp-vms.adb: New file.
4296         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4297         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4298
4299 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4300
4301         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4302         package.
4303
4304 2011-08-03  Yannick Moy  <moy@adacore.com>
4305
4306         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4307         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4308         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4309         detect that an array has static bounds.
4310
4311 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4312
4313         * exp_dist.adb: Minor reformatting.
4314
4315 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4316
4317         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4318         (ATCB_Key): Removed, not always used.
4319
4320 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4321
4322         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4323         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4324         most remaining global variables.
4325
4326 2011-08-03  Robert Dewar  <dewar@adacore.com>
4327
4328         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4329         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4330         reformatting.
4331
4332 2011-08-03  Javier Miranda  <miranda@adacore.com>
4333
4334         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
4335         that must be passed by copy in VM targets.
4336
4337 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4338
4339         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4340         duplicates a similar htable now in the project tree.
4341
4342 2011-08-03  Claire Dross  <dross@adacore.com>
4343
4344         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4345         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4346         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4347         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4348         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4349         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4350         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4351         update.
4352
4353 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4354
4355         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4356         (ATCB_Key): Removed, not always used.
4357         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4358         s-taprop-posix.adb.
4359         * s-tpopsp-tls.adb: New file.
4360         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4361         x86/x64/ia64/powerpc/sparc Linux.
4362
4363 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4364
4365         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4366         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4367
4368 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4369
4370         * rtsfind.ads, exp_dist.adb, exp_dist.ads
4371         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4372         Fix type selection for mapping integer types to PolyORB types.
4373
4374 2011-08-03  Bob Duff  <duff@adacore.com>
4375
4376         * sem_ch7.adb: Minor comment clarification.
4377
4378 2011-08-03  Bob Duff  <duff@adacore.com>
4379
4380         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4381         an error analyzing a choice, skip further processing. Further
4382         processing could cause a crash or cascade errors.
4383
4384 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4385
4386         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4387         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4388         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4389         prj-env.ads (Shared_Project_Tree_Data): new type
4390         An aggregate project and its aggregated trees need to share the common
4391         data structures used for lists of strings, packages,... This makes the
4392         code simpler since otherwise we have to pass the root tree (also used
4393         for the configuration file data) in addition to the current project
4394         tree. This also avoids ambiguities as to which tree should be used.
4395         And finally this saves a bit of memory.
4396         (For_Every_Project_Imported): new parameter Tree.
4397         Since aggregated projects are using a different tree, we need to let
4398         the caller know which tree to use to manipulate the returned project.
4399
4400 2011-08-03  Robert Dewar  <dewar@adacore.com>
4401
4402         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4403         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4404         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4405         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4406
4407 2011-08-03  Javier Miranda  <miranda@adacore.com>
4408
4409         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4410         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4411
4412 2011-08-03  Bob Duff  <duff@adacore.com>
4413
4414         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4415         the Base_Type.
4416
4417 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
4418
4419         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4420         g-sehash.ads: Fix typo. Update header.
4421
4422 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4423
4424         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4425         expansion.
4426
4427 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4428
4429         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4430         prefixes of private types along with records, since the selector may be
4431         a discriminant.
4432         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4433         private types along with records, since the selector may be a
4434         discriminant.
4435
4436 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4437
4438         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4439
4440 2011-08-03  Javier Miranda  <miranda@adacore.com>
4441
4442         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4443         Tagged_Type_Expansion.
4444
4445 2011-08-03  Yannick Moy  <moy@adacore.com>
4446
4447         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4448         violation when the argument of concatenation is the name of a
4449         constant.
4450
4451 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4452
4453         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4454         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4455         (Process_Declarative_Items): new parameter Child_Env.
4456
4457 2011-08-03  Yannick Moy  <moy@adacore.com>
4458
4459         * alfa.ads: Update format of ALFA section in ALI file in order to
4460         add a mapping from bodies to specs when both are present.
4461         (ALFA_Scope_Record): Add components for spec file/scope.
4462         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4463         present.
4464         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4465         collected, fill in the spec information when relevant.
4466         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4467         present.
4468
4469 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4470
4471         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4472         code unit to decide whether to add internally generated subprograms.
4473
4474 2011-08-03  Javier Miranda  <miranda@adacore.com>
4475
4476         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4477         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4478         be handled by copy in VM targets.
4479
4480 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4481
4482         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4483         code with Makeutl.Get_Switches.
4484         * prj-tree.adb: Update comment.
4485
4486 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4487
4488         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4489         subprogram with a limited formal that does not support external
4490         streaming.
4491
4492 2011-08-03  Yannick Moy  <moy@adacore.com>
4493
4494         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4495         continuation line
4496         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4497         not from current unit in two phases, because it is not possible to
4498         change the table while iterating over its content.
4499         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4500
4501 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4502
4503         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4504         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4505
4506 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4507
4508         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4509         and the component type is composite, this is ambiguous for predefined
4510         concatenation, but if the node is not overloaded and the entity is a use
4511         -defined function its profile can be used to resolve that aggregate.
4512
4513 2011-08-03  Robert Dewar  <dewar@adacore.com>
4514
4515         * exp_ch4.adb: Minor code cleanup.
4516
4517 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4518
4519         * exp_dist.adb: Do not generate distribution stubs if serious errors
4520         have been diagnosed.
4521
4522 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4523
4524         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4525         the first formal of a primitive operation, go to the base type to
4526         handle properly an access to a derived type with constrained
4527         discriminants.
4528         * sem_type.adb (Disambiguate): an immediately visible operator hides a
4529         user-defined function that is only use-visible.
4530
4531 2011-08-03  Robert Dewar  <dewar@adacore.com>
4532
4533         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4534         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4535         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4536         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4537         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4538         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4539         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4540         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4541
4542 2011-08-03  Robert Dewar  <dewar@adacore.com>
4543
4544         * repinfo.adb (List_Mechanism): Add handling of
4545         Convention_Ada_Pass_By_XXX.
4546         * sem_mech.adb (Set_Mechanism): Ditto.
4547         * sem_prag.adb (Process_Convention): Add entries for
4548         Convention_Ada_Pass_By_XXX.
4549         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4550
4551 2011-08-03  Pascal Obry  <obry@adacore.com>
4552
4553         * makeutl.adb: Minor reformatting.
4554
4555 2011-08-03  Vincent Celier  <celier@adacore.com>
4556
4557         * fname-uf.adb
4558         (Get_File_Name) If the file cannot be found when there are no config
4559         pragmas file and May_Fail is True, return No_File instead of the file
4560         name, to be consistent.
4561
4562 2011-08-03  Pascal Obry  <obry@adacore.com>
4563
4564         * adaint.c (__gnat_is_executable_file_attr): Avoid access
4565         to null pointer.
4566
4567 2011-08-03  Javier Miranda  <miranda@adacore.com>
4568
4569         * sem_ch13.adb
4570         (Same_Representation): In VM targets the representation of arrays with
4571         aliased components differs from arrays with non-aliased components.
4572
4573 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4574
4575         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4576         not systematically lower case attribute indexes that contain no "."
4577         Fix definition of several Naming attributes, which take
4578         a unit name as index and therefore should be case insensitive.
4579         Minor refactoring (reduce length of variable names).
4580
4581 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4582
4583         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
4584
4585 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4586
4587         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
4588         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
4589         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
4590         prj-tree.ads (Prj.Tree.Environment): new type.
4591
4592 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4593
4594         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
4595         prj-tree.adb, prj-tree.ads (Environment): new type.
4596
4597 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4598
4599         * prj-tree.ads: Remove unused variable.
4600
4601 2011-08-03  Yannick Moy  <moy@adacore.com>
4602
4603         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
4604         issuing messages related to SPARK restriction violation.
4605
4606 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4607
4608         * sem_ch6.adb: guard against error nodes in return statements.
4609
4610 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4611
4612         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
4613         a warning can only appear on a configuration file, so emit warning
4614         without further checks.
4615
4616 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4617
4618         * s-interr.ads: add overriding keyword.
4619
4620 2011-08-03  Geert Bosch  <bosch@adacore.com>
4621
4622         * exp_attr.adb: Fix minor typo.
4623
4624 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4625
4626         * par-ch4.adb: improve error recovery.
4627
4628 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4629
4630         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
4631         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
4632         to Errout_Handling.
4633
4634 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4635
4636         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
4637         "external" as an attribute name in aggregate projects.
4638
4639 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4640
4641         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
4642         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
4643         from 0, so we need to adjust.
4644
4645 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4646
4647         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
4648         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
4649
4650 2011-08-03  Yannick Moy  <moy@adacore.com>
4651
4652         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
4653         restriction on overloaded entity if the entity is not an operator.
4654
4655 2011-08-03  Yannick Moy  <moy@adacore.com>
4656
4657         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
4658         restrict.ads: Rename remaining Check_Formal_Restriction* into
4659         Check_SPARK_Restriction*.
4660
4661 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4662
4663         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
4664         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
4665         qualifier.
4666         (Project_Empty): removed
4667         (Empty_Project): new parameter Qualifier
4668         This is used to have fields specific to aggregate projects, cleaner
4669         New field to store the list of aggregated projects.
4670         (Check_Aggregate_Project): removed
4671         (Process_Aggregated_Projects, Free): new subprograms.
4672
4673 2011-08-03  Olivier Hainque  <hainque@adacore.com>
4674
4675         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
4676
4677 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4678
4679         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
4680         explicit dereference of an unconstrained type, create a constrained
4681         subtype for it, as is done for function calls that return an
4682         unconstrained type.
4683
4684 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4685
4686         * g-pehage.adb (Finalize): Avoid possible double-free.
4687
4688 2011-08-03  Steve Baird  <baird@adacore.com>
4689
4690         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
4691         Elab_Spec/Body attrs in CodePeer_Mode.
4692
4693 2011-08-03  Javier Miranda  <miranda@adacore.com>
4694
4695         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
4696         low bound is not known at compile time but they have no others choice.
4697         Done because in this case the bounds can be obtained directly from the
4698         aggregate.
4699
4700 2011-08-03  Ed Falis  <falis@adacore.com>
4701
4702         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
4703         on VxWorks SMP. Remove unusable constant ANY_CPU.
4704
4705 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4706
4707         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4708         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
4709         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
4710         Prj.Env.Initialize_Empty): new subprograms
4711         (Get_Env, Find_Project): remove parameter Target_Name.
4712
4713 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4714
4715         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
4716         as a condition for the delayed call to Derived_Subprograms done for the
4717         case of the rewriting of a derived type that constrains the
4718         discriminants of its parent type.
4719         Avoids redundant subprogram derivations for private subtype derivations.
4720
4721 2011-08-03  Javier Miranda  <miranda@adacore.com>
4722
4723         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
4724         Build_Record_Aggr_Code.
4725         (Build_Record_Aggr_Code): Add missing support to initialize hidden
4726         discriminants in extension aggregates.
4727
4728 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4729
4730         * prj-pp.adb (Print): also output project qualifiers, since in
4731         particular "aggregate" is mandatory in an aggregate project.
4732
4733 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4734
4735         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
4736         (Debug_Output): new function.
4737
4738 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4739
4740         * gnat_ugn.texi: Document -Wstack-usage.
4741         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
4742
4743 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4744
4745         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
4746         have keyword LIMITED.
4747
4748 2011-08-03  Yannick Moy  <moy@adacore.com>
4749
4750         * alfa.adb, alfa.ads, alfa_test.adb: New files.
4751         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
4752         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
4753         section (does not happen in compiler, only if code directly calls
4754         Scan_ALI).
4755         * get_alfa.adb, get_alfa.ads: New files.
4756         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
4757         needed.
4758         * lib-xref-alfa.adb: New file.
4759         * lib-xref.adb, lib-xref.ads
4760         (Xref_Entry): redefine information needed in cross-references for ALFA.
4761         Push ALFA treatments in separated local package.
4762         (Enclosing_Subpragram_Or_Package): treat specially subprogram
4763         identifiers. Return entity of package body instead of spec. Return
4764         Empty for a scope with no location.
4765         (Generate_Reference): adapt to new components for ALFA information.
4766         Remove the need for D references on definitions.
4767         (Is_Local_Reference): moved to ALFA local package
4768         (Output_References): extract subfunction as Extract_Source_Name
4769         (Output_Local_References): remove procedure, replaced by filtering of
4770         cross-references in package ALFA and printing in Put_ALFA.
4771         (Write_Entity_Name): remove procedure
4772         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
4773         print exact name of entity as it appears in source file
4774         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
4775         * put_alfa.adb, put_alfa.ads: New files.
4776         * xref_lib.adb (Search_Xref): protect read of cross-references against
4777         reading other sections of the ALI file, in gnatxref
4778         (Search): protect read of cross-references against reading other
4779         sections of the ALI file, in gnatfind.
4780         * gcc-interface/Make-lang.in: Update dependencies.
4781
4782 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4783
4784         * sem_ch3.adb: Minor reformatting.
4785
4786 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4787
4788         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
4789         raising an exception.
4790
4791 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4792
4793         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
4794         type, always use 1 as the lower bound or string, even if lower bound of
4795         context is not static, to handle properly null strings in a non-static
4796         context.
4797
4798 2011-08-03  Bob Duff  <duff@adacore.com>
4799
4800         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
4801         always legal on the right-hand side of an assignment statement; there
4802         is always an applicable index constraint in this case. Therefore, the
4803         check for Pkind = N_Assignment_Statement is now unconditional -- it
4804         doesn't depend on whether Is_Constrained (Typ).
4805
4806 2011-08-03  Robert Dewar  <dewar@adacore.com>
4807
4808         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
4809
4810 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4811
4812         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
4813         for an itype created within a generic unit.
4814
4815 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4816
4817         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
4818         suppresses all inlining.
4819
4820 2011-08-03  Robert Dewar  <dewar@adacore.com>
4821
4822         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
4823         exp_aggr.adb: Minor reformatting.
4824
4825 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4826
4827         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
4828         tagged assignment when discriminant checks are suppressed. This is
4829         useless and extremely costly in terms of static stack usage.
4830
4831 2011-08-03  Bob Duff  <duff@adacore.com>
4832
4833         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
4834         of generics, because this leads to the wrong entity in the wrong scope,
4835         causing (e.g.) pragma Export_Procedure to get an error if the entity is
4836         an instance.
4837         (Process_Interface_Name): Follow Alias for instances of generics, to
4838         correct for the above change.
4839
4840 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4841
4842         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
4843         is an integer literal it is always safe to replace the reference. In
4844         addition, if the reference appears in the generated code for an object
4845         declaration it is necessary to copy because otherwise the reference
4846         might be to the uninitilized value of the discriminant of the object
4847         itself.
4848
4849 2011-08-03  Pascal Obry  <obry@adacore.com>
4850
4851         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
4852         ACL used, in this case we want to check for ending .exe, not .exe
4853         anywhere in the path.
4854
4855 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4856
4857         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4858         the tree structure (semantic decoration of references to record
4859         discriminants).
4860
4861 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4862
4863         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
4864         choices of a named array aggregate, bail out when any choices are
4865         marked as Errors_Posted.
4866
4867 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4868
4869         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
4870         in which entity is frozen, to handle properly loop variables in
4871         iterators.
4872
4873 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4874
4875         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
4876         subtype is not static, compute the upper bound using attributes, to
4877         handle properly index types that are not integer types.
4878
4879 2011-08-03  Bob Duff  <duff@adacore.com>
4880
4881         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
4882         Update copyright notice.
4883
4884 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4885
4886         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
4887         Original_Discriminant if within an instance.
4888         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4889
4890 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4891
4892         * einfo.ads: Minor reformatting.
4893
4894 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4895
4896         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
4897         composite type with an unfrozen subcomponent, in the profile of a
4898         primitive operation.
4899
4900 2011-08-03  Robert Dewar  <dewar@adacore.com>
4901
4902         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4903
4904 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4905
4906         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
4907         unconstrained type with discriminants is initialized with an aggregate,
4908         use the constrained subtype of the aggregate as the type of the object,
4909         because it is immutable, and this allows the back-end to generate no
4910         code for the object declaration.
4911
4912 2011-08-03  Robert Dewar  <dewar@adacore.com>
4913
4914         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
4915         comparison operand is variable, and turns out to be zero or negative.
4916
4917 2011-08-03  Javier Miranda  <miranda@adacore.com>
4918
4919         * exp_intr.adb
4920         (Expand_Dispatching_Constructor_Call): Disable expansion of
4921         code required for native targets. Done to avoid generating
4922         references to unavailable runtime entities in VM targets.
4923         * exp_ch3.adb
4924         (Expand_N_Object_Declaration): Add missing support to handle
4925         the explicit initialization of class-wide interface objects.
4926         Fix documentation.
4927
4928 2011-08-03  Matthew Heaney  <heaney@adacore.com>
4929
4930         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
4931
4932 2011-08-03  Matthew Heaney  <heaney@adacore.com>
4933
4934         * a-cbdlli.adb (Splice): move source items from first to last
4935
4936 2011-08-03  Yannick Moy  <moy@adacore.com>
4937
4938         * sem_util.ads: comment added.
4939
4940 2011-08-03  Javier Miranda  <miranda@adacore.com>
4941
4942         * exp_aggr.adb
4943         (Expand_Record_Aggregate): In VM targets disable the expansion into
4944         assignments of aggregates whose type is not known at compile time.
4945
4946 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4947
4948         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4949         protected entries and task entries, to build the proper renaming
4950         declaration for entry formals, used in debugging.
4951         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4952         parameters in the same way.
4953
4954 2011-08-02  Robert Dewar  <dewar@adacore.com>
4955
4956         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4957         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4958         code reorganization.
4959
4960 2011-08-02  Robert Dewar  <dewar@adacore.com>
4961
4962         * debug.adb: Debug flag d.P to suppress length comparison optimization
4963         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4964         comparison of Length by comparing First/Last instead.
4965
4966 2011-08-02  Matthew Heaney  <heaney@adacore.com>
4967
4968         * a-cobove.ads: Code clean up.
4969
4970 2011-08-02  Vincent Celier  <celier@adacore.com>
4971
4972         * adaint.c (file_names_case_sensitive_cache): New static int.
4973         (__gnat_get_file_names_case_sensitive): Cache the return value in
4974         file_names_case_sensitive_cache at the first invocation, to avoid
4975         multiple calls to getenv.
4976
4977 2011-08-02  Bob Duff  <duff@adacore.com>
4978
4979         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4980
4981 2011-08-02  Yannick Moy  <moy@adacore.com>
4982
4983         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4984         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4985         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4986         indicate that we are in a precondition or postcondition. This is used in
4987         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4988         decide whether to flag the spec or body of the current subprogram as
4989         not in ALFA.
4990
4991 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
4992
4993         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4994         list.
4995         * a-extiin.ads: New file.
4996
4997 2011-08-02  Bob Duff  <duff@adacore.com>
4998
4999         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
5000         now raises Name_Error instead of Use_Error in certain cases. The other
5001         parts of this AI were already implemented properly.
5002
5003 2011-08-02  Vincent Celier  <celier@adacore.com>
5004
5005         * link.c: Only import "auto-host.h" when building the gnattools.
5006
5007 2011-08-02  Yannick Moy  <moy@adacore.com>
5008
5009         * sem_util.adb: Inter-unit inlining does not work for a subprogram
5010         which calls a local subprogram, so extract subprogram
5011         from Mark_Non_ALFA_Subprogram_Body.
5012
5013 2011-08-02  Javier Miranda  <miranda@adacore.com>
5014
5015         * exp_ch9.adb
5016         (Extract_Dispatching_Call): If the type of the dispatching object is an
5017         access type then return an explicit dereference in the Object out-mode
5018         parameter.
5019
5020 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5021
5022         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
5023         compatibility checks for all indexes of an array subtype, not just the
5024         first. Reset Has_Dynamic_Range_Check on the subtype before each
5025         potential check to ensure that Insert_Range_Checks will not elide any
5026         of the dynamic checks.
5027
5028 2011-08-02  Yannick Moy  <moy@adacore.com>
5029
5030         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
5031         SPARK restriction at parsing time.
5032         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
5033         directive only if the SPARK restriction is set for this unit.
5034
5035 2011-08-02  Yannick Moy  <moy@adacore.com>
5036
5037         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
5038         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
5039         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
5040         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
5041         Mark_Non_ALFA_Subprogram_Body.
5042         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
5043         inlined.
5044
5045 2011-08-02  Yannick Moy  <moy@adacore.com>
5046
5047         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
5048         might be costly.
5049
5050 2011-08-02  Robert Dewar  <dewar@adacore.com>
5051
5052         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
5053         exp_ch3.adb: Minor reformatting.
5054
5055 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5056
5057         * adaint.c (__gnat_locate_exec_on_path): only returns executable
5058         files, not any regular file.
5059         (__gnat_locate_file_with_predicate): new subprogram.
5060
5061 2011-08-02  Yannick Moy  <moy@adacore.com>
5062
5063         * sinfo.adb, sinfo.ads: Restrict the use of flags
5064         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
5065         nodes, plus N_Subtype_Declaration for the 2nd one.
5066
5067 2011-08-02  Sergey Rybin  <rybin@adacore.com>
5068
5069         * gnat_rm.texi: Ramification of pragma Eliminate documentation
5070          - fix bugs in the description of Source_Trace;
5071          - get rid of UNIT_NAME;
5072
5073 2011-08-02  Javier Miranda  <miranda@adacore.com>
5074
5075         * exp_ch9.adb
5076         (Build_Dispatching_Requeue): Adding support for VM targets
5077         since we cannot directly reference the Tag entity.
5078         * exp_sel.adb (Build_K): Adding support for VM targets.
5079         (Build_S_Assignment): Adding support for VM targets.
5080         * exp_disp.adb
5081         (Default_Prim_Op_Position): In VM targets do not restrict availability
5082         of predefined interface primitives to compiling in Ada 2005 mode.
5083         (Is_Predefined_Interface_Primitive): In VM targets this service is not
5084         restricted to compiling in Ada 2005 mode.
5085         (Make_VM_TSD): Generate code that declares and initializes the OSD
5086         record. Needed to support dispatching calls through synchronized
5087         interfaces.
5088         * exp_ch3.adb
5089         (Make_Predefined_Primitive_Specs): Enable generation of predefined
5090         primitives associated with synchronized interfaces.
5091         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5092         primitives associated with synchronized interfaces.
5093
5094 2011-08-02  Yannick Moy  <moy@adacore.com>
5095
5096         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5097         statements hidden in SPARK if preceded by the HIDE directive
5098         (Parse_Exception_Handlers): mark each exception handler in a sequence of
5099         exception handlers as hidden in SPARK if preceded by the HIDE directive
5100         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5101         if starting with the HIDE directive
5102         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5103         starting with the HIDE directive; mark the declarations in a private
5104         part as hidden in SPARK if the private part starts with the HIDE
5105         directive
5106         * restrict.adb, restrict.ads
5107         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5108         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5109         argument node belongs to a part which is hidden in SPARK
5110         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5111         parts in SPARK; protect the possibly costly call to
5112         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5113         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5114         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5115         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5116         Tok_SPARK_Hide.
5117         (Scan): recognize special comment starting with '#' and followed by
5118         SPARK keyword "hide" as a HIDE directive.
5119
5120 2011-08-02  Yannick Moy  <moy@adacore.com>
5121
5122         * types.ads, erroutc.ads: Minor reformatting.
5123
5124 2011-08-02  Vincent Celier  <celier@adacore.com>
5125
5126         * link.c: Add response file support for cross platforms.
5127
5128 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5129
5130         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5131         in an association, set parent field of copy before partial analysis.
5132         * sem_res.adb (Resolve_Slice): create reference to itype only when
5133         expansion is enabled.
5134
5135 2011-08-02  Yannick Moy  <moy@adacore.com>
5136
5137         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5138         for new flag denoting which subprogram bodies are in ALFA
5139         * restrict.adb, sem_ch7.adb: Update comment
5140         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5141         sem_ch9.adb, sem_res.adb: Add calls to
5142         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5143         * sem_ch6.adb (Analyze_Function_Return): add calls to
5144         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5145         middle of the body, and extended return.
5146         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5147         False when missing return.
5148         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5149         to True for subprograms whose spec is in ALFA. Remove later on the flag
5150         on the entity used for a subprogram body when there exists a separate
5151         declaration.
5152         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5153         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5154         False, otherwise do nothing.
5155
5156 2011-08-02  Robert Dewar  <dewar@adacore.com>
5157
5158         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5159
5160 2011-08-02  Yannick Moy  <moy@adacore.com>
5161
5162         * sem_ch4.ads: minor formatting.
5163
5164 2011-08-02  Yannick Moy  <moy@adacore.com>
5165
5166         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5167         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5168         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5169         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5170         opt.ads: cleanup of SPARK mode
5171
5172 2011-08-02  Yannick Moy  <moy@adacore.com>
5173
5174         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5175         types.
5176         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5177         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5178         * sem_ch3.adb
5179         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5180         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5181         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5182         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5183         types.
5184         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5185         non-static range.
5186         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5187         functions whose return type is not in ALFA.
5188         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5189         specifications.
5190         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5191         parameter's type is not in ALFA.
5192         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5193         types are in ALFA.
5194
5195 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5196
5197         * sem_ch6 (Analyze_Expression_Function): treat the function as
5198         Inline_Always, and introduce a subprogram declaration for it when it is
5199         not a completion.
5200         * inline.adb (Add_Inlined_Body): recognize bodies that come from
5201         expression functions, so that the back-end can determine whether they
5202         can in fact be inlined.
5203         * sem_util.adb (Is_Expression_Function): predicate to determine whether
5204         a function body comes from an expression function.
5205
5206 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5207
5208         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5209         null exclusions to test Can_Never_Be_Null on the anonymous access types
5210         of the formals rather than testing the formals themselves. Exclude this
5211         check in cases where the Old_Formal is marked as a controlling formal,
5212         to avoid issuing spurious errors for bodies completing dispatching
5213         operations (due to the flag not getting set on controlling access
5214         formals in body specs).
5215         (Find_Corresponding_Spec): When checking full and subtype conformance of
5216         subprogram bodies in instances, pass Designated and E in that order, for
5217         consistency with the expected order of the formals (New_Id followed by
5218         Old_Id).
5219
5220 2011-08-02  Robert Dewar  <dewar@adacore.com>
5221
5222         * sem_ch8.adb: Minor reformatting.
5223
5224 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5225
5226         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5227         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5228         primitive operations of class-wide actuals.
5229
5230 2011-08-02  Javier Miranda  <miranda@adacore.com>
5231
5232         * exp_atag.ads, exp_atag.adb
5233         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5234         since its value is implicitly passed in argument Typ.
5235         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5236         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5237         Build_Common_Dispatching_Select_Statements.
5238
5239 2011-08-02  Robert Dewar  <dewar@adacore.com>
5240
5241         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5242         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5243         Minor reformatting.
5244
5245 2011-08-02  Robert Dewar  <dewar@adacore.com>
5246
5247         * sem_res.adb: Minor reformatting.
5248         * sem_prag.adb: Minor reformatting.
5249
5250 2011-08-02  Javier Miranda  <miranda@adacore.com>
5251
5252         * exp_atag.adb, exp_atags.ads
5253         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5254         by the tagged type Entity. Required to use this routine in the VM
5255         targets since we do not have available the Tag entity in the VM
5256         platforms.
5257         * exp_ch6.adb
5258         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5259         Ada.Tags has not been previously loaded.
5260         * exp_ch7.adb
5261         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5262         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5263         * sem_aux.adb
5264         (Enclosing_Dynamic_Scope): Add missing support to handle the full
5265         view of enclosing scopes. Required to handle enclosing scopes that
5266         are synchronized types whose full view is a task type.
5267         * exp_disp.adb
5268         (Build_VM_TSDs): Minor code improvement to avoid generating and
5269         analyzing lists with empty nodes.
5270         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5271         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5272         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5273         (Make_Disp_Timed_Select_Body): Add support for VM targets.
5274         (Make_Select_Specific_Data_Table): Add support for VM targets.
5275         (Make_VM_TSD): Generate code to initialize the SSD structure of
5276         the TSD.
5277
5278 2011-08-02  Yannick Moy  <moy@adacore.com>
5279
5280         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5281         cross-references section in ALI.
5282         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5283         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5284         Sub).
5285         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5286         subprogram or package entity of a node
5287         (Is_Local_Reference_Type): new function returns True for references
5288         selected in local cross-references.
5289         (Lt): function extracted from Lt in Output_References
5290         (Write_Entity_Name): function extracted from Output_References
5291         (Generate_Definition): generate reference with type 'D' for definition
5292         of objects (object declaration and parameter specification), with
5293         appropriate locations and units, for use in local cross-references.
5294         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5295         references of type 'I' for initialization in object definition.
5296         (Output_References): move part of function Lt and procedure
5297         Write_Entity_Name outside of the body. Ignore references of types 'D'
5298         and 'I' introduced for local cross-references.
5299         (Output_Local_References): new procedure to output the local
5300         cross-references sections.
5301         (Lref_Entity_Status): new array defining whether an entity is a local
5302         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5303         with 'I' type when initialization expression is present.
5304         * get_scos.adb, get_scos.ads: Correct comments and typos
5305
5306 2011-08-02  Javier Miranda  <miranda@adacore.com>
5307
5308         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5309         the JVM target.
5310         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5311         the JVM target.
5312         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5313         TSD support.
5314
5315 2011-08-02  Vincent Celier  <celier@adacore.com>
5316
5317         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5318         (No_Space_Img): New function
5319         (Find_Excluded_Sources): When reading from a file, record the file name
5320         and the line number for each excluded source.
5321         (Mark_Excluded_Sources): When reporting an error, if the excluded
5322         sources were read from a file, include file name and line number in
5323         the error message.
5324
5325 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5326
5327         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5328
5329 2011-08-02  Robert Dewar  <dewar@adacore.com>
5330
5331         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5332
5333 2011-08-02  Javier Miranda  <miranda@adacore.com>
5334
5335         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5336         generation of TSDs to the DOTNET compiler.
5337         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5338         generation of TSDs to the DOTNET compiler.
5339
5340 2011-08-02  Javier Miranda  <miranda@adacore.com>
5341
5342         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5343         record of all the tagged types declared inside library level package
5344         declarations, library level package bodies or library level subprograms.
5345         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5346         associated with a given tagged type.
5347         (Build_VM_TSDs): New subprogram.
5348         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5349         compilation units that are subprograms.
5350         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5351         compilation units that are package bodies.
5352         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5353         units that are a package declaration or a package instantiation.
5354         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5355         reorganization to improve the error generated by the frontend when the
5356         function Ada.Tags.Secondary_Tag is not available.
5357         * rtsfind.ads (RE_Register_TSD): New runtime entity.
5358         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5359
5360 2011-08-02  Javier Miranda  <miranda@adacore.com>
5361
5362         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5363
5364 2011-08-02  Robert Dewar  <dewar@adacore.com>
5365
5366         * s-imenne.ads: Minor reformatting.
5367
5368 2011-08-02  Robert Dewar  <dewar@adacore.com>
5369
5370         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5371         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5372         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5373
5374 2011-08-02  Robert Dewar  <dewar@adacore.com>
5375
5376         * einfo.ads (Materialize_Entity): Document this is only for renamings
5377         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5378         required debug information in the case where we transform the object
5379         declaration into a renaming declaration.
5380         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5381         object
5382         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5383         Materialize_Entity.
5384
5385 2011-08-02  Robert Dewar  <dewar@adacore.com>
5386
5387         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5388         Suppress_Init_Procs.
5389         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5390         Suppress_Initialization/Initialization_Suppressed.
5391         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5392         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5393         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5394         * sem_prag.adb: New processing for pragma Suppress_Initialization.
5395
5396 2011-08-02  Robert Dewar  <dewar@adacore.com>
5397
5398         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5399         Minor reformatting.
5400
5401 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5402
5403         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5404         only have inheritable classwide pre/postconditions.
5405
5406 2011-08-02  Javier Miranda  <miranda@adacore.com>
5407
5408         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5409         * rtsfind.ads (RE_Check_TSD): New runtime entity.
5410         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5411         checks if the external tag of a type is the same as the external tag
5412         of some other declaration.
5413
5414 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5415
5416         * s-taskin.ads: Minor reformatting.
5417
5418 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5419
5420         * g-comlin.adb (Display_Help): swap the order in which it prints the
5421         short help and the general usage.
5422
5423 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5424
5425         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5426         the aspect declarations and attach them to the generic copy for
5427         subsequent analysis.
5428         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5429         declarations of the generic tree to the new subprogram declarations.
5430         * sem_attr.adb (Check_Precondition_Postcondition): recognize
5431         conditions that apply to a subprogram instance.
5432
5433 2011-08-02  Robert Dewar  <dewar@adacore.com>
5434
5435         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5436
5437 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5438
5439         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5440         private type with a tagged full view is not derived in the immediate
5441         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5442
5443 2011-08-02  Robert Dewar  <dewar@adacore.com>
5444
5445         * exp_ch4.adb: Minor reformatting.
5446
5447 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5448
5449         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
5450         Ada2012 iterator, the loop will be rewritten during expansion into a
5451         while loop with a cursor and an element declaration. Do not analyze the
5452         body in this case, because if the container is for indefinite types the
5453         actual subtype of the elements will only be determined when the cursor
5454         declaration is analyzed.
5455
5456 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5457
5458         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5459         size/alignment related attributes in CodePeer_Mode.
5460
5461 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5462
5463         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5464         Prepend_Element, since this can result in the operation getting the
5465         wrong slot in the full type's dispatch table if the full type has
5466         inherited operations. The incomplete type's operation will get added
5467         to the proper position in the full type's primitives
5468         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5469         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5470         dispatching operations, since there are cases where nonprimitive
5471         subprograms can get added to the list of incomplete dependents (such
5472         as subprograms in nested packages).
5473         * sem_ch6.adb (Process_Formals): First, remove test for being in a
5474         private part when determining whether to add a primitive with a
5475         parameter of a tagged incomplete type to the Private_Dependents list.
5476         Such primitives can also occur in the visible part, and should not have
5477         been excluded from being private dependents.
5478         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5479         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5480         list of a Taft-amendment incomplete type is a primitive before issuing
5481         an error that the full type must appear in the same unit. There are
5482         cases where nonprimitives can be in the list (such as subprograms in
5483         nested packages).
5484         * sem_disp.adb (Derives_From): Use correct condition for checking that
5485         a formal's type is derived from the type of the corresponding formal in
5486         the parent subprogram (the condition was completely wrong). Add
5487         checking that was missing for controlling result types being derived
5488         from the result type of the parent operation.
5489
5490 2011-08-02  Yannick Moy  <moy@adacore.com>
5491
5492         * errout.adb (First_Node): minor renaming
5493         * restrict.adb (Check_Formal_Restriction): put restriction warning on
5494         first node.
5495
5496 2011-08-02  Yannick Moy  <moy@adacore.com>
5497
5498         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5499         before accessing operands.
5500         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5501         decide whether an initialization expression respects SPARK rules, as
5502         the plain node is the expanded one. This allows for more valid warnings
5503         to be issued.
5504         * gnat_rm.texi: Minor update.
5505
5506 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5507
5508         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5509         previous change.
5510
5511 2011-08-02  Robert Dewar  <dewar@adacore.com>
5512
5513         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5514
5515 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5516
5517         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5518         loop statements and the element renaming declaration with a block when
5519         the element type is controlled.
5520
5521 2011-08-02  Yannick Moy  <moy@adacore.com>
5522
5523         * sinfo.ads: Minor formatting.
5524
5525 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5526
5527         * sem_aggr.adb (Add_Association): if the association has a box and no
5528         expression, use the Sloc of the aggregate itself for the new
5529         association.
5530         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5531         the Original_Node.
5532
5533 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5534
5535         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5536         When a container is provided via a function call, generate a renaming
5537         of the function result. This avoids the creation of a transient scope
5538         and the premature finalization of the container.
5539         * exp_ch7.adb (Is_Container_Cursor): Removed.
5540         (Wrap_Transient_Declaration): Remove the supression of the finalization
5541         of the list controller when the declaration denotes a container cursor,
5542         it is not needed.
5543
5544 2011-08-02  Yannick Moy  <moy@adacore.com>
5545
5546         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5547         node is from source, instead of the original node being from source.
5548         * sem_aggr.adb
5549         (Resolve_Array_Aggregate): refine the check for a static expression, to
5550         recognize also static ranges
5551         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5552         Array_Type_Declaration): postpone the test for the type being a subtype
5553         mark after the type has been resolved, so that component-selection and
5554         expanded-name are discriminated.
5555         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5556         to distinguish the case of an iteration scheme, so that an error is
5557         issed on a non-static range in SPARK except in an iteration scheme.
5558         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5559         In_Iter_Schm = True.
5560         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5561         user-defined operators so that they are allowed in renaming
5562         * sem_ch8.adb
5563         (Find_Selected_Component): refine the check for prefixing of operators
5564         so that they are allowed in renaming. Move the checks for restrictions
5565         on selector name after analysis discriminated between
5566         component-selection and expanded-name.
5567         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5568         concatenation argument of string type if it is static.
5569         * sem_util.adb, sem_util.ads
5570         (Check_Later_Vs_Basic_Declarations): add a new function
5571         Is_Later_Declarative_Item to decice which declarations are allowed as
5572         later items, in the two different modes Ada 83 and SPARK. In the SPARK
5573         mode, add that renamings are considered as later items.
5574         (Enclosing_Package): new function to return the enclosing package
5575         (Enter_Name): correct the rule for homonyms in SPARK
5576         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5577         from source (result of expansion) to avoid issuing wrong warnings.
5578
5579 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5580
5581         * errout.adb: On anything but an expression First_Node returns its
5582         argument.
5583
5584 2011-08-02  Pascal Obry  <obry@adacore.com>
5585
5586         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5587
5588 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5589
5590         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5591         Set the associated loop as the related expression of internally
5592         generated cursors.
5593         * exp_ch7.adb (Is_Container_Cursor): New routine.
5594         (Wrap_Transient_Declaration): Supress the finalization of the list
5595         controller when the declaration denotes a container cursor.
5596
5597 2011-08-02  Yannick Moy  <moy@adacore.com>
5598
5599         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5600         command line now.
5601         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5602         expression is a simple expression. This check cannot be performed in
5603         the semantics, so just drop it.
5604         (P_Index_Or_Discriminant_Constraint): move check that the index or
5605         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5606         semantics. Other cases were previously checked in the semantics.
5607         * par-ch4.adb (P_Name): move checks that a selector name is not
5608         character literal or an operator symbol to Find_Selected_Component in
5609         the semantics
5610         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5611         declarations are not placed after later declarations in a separate
5612         procedure in Sem_Util (possibly not the best choice?), to be used both
5613         during parsing, for Ada 83 mode, and during semantic analysis, for
5614         SPARK mode.
5615         * par-endh.adb (Check_End): move check that end label is not missing
5616         to Process_End_Label in the semantics
5617         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5618         the special case for SPARK restriction
5619         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5620         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5621         parameter Force to issue the error message even on internal node (used
5622         for generated end label). Call Check_Restriction to check when an error
5623         must be issued. In SPARK mode, issue an error message even if the
5624         restriction is not set.
5625         (Check_Restriction): new procedure with an additional out parameter to
5626         inform the caller that a message has been issued
5627         * sem_aggr.adb: Minor modification of message
5628         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5629         instead of issuing an error message directly
5630         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5631         declarations are not placed after later declarations, by calling
5632         Check_Later_Vs_Basic_Declarations
5633         (Analyze_Subtype_Declaration): move here the check that an index or
5634         discriminant constraint must be a subtype mark. Change the check that
5635         a subtype of String must start at one so that it works on subtype marks.
5636         * sem_ch4.adb (Analyze_Call): move here the check that a named
5637         association cannot follow a positional one in a call
5638         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5639         instead of issuing an error message directly
5640         * sem_ch8.adb (Find_Selected_Component): move here the check that a
5641         selector name is not a character literal or an operator symbol. Move
5642         here the check that the prefix of an expanded name cannot be a
5643         subprogram or a loop statement.
5644         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5645         procedure called from parsing and semantics to check that basic
5646         declarations are not placed after later declarations
5647         (Process_End_Label): move here the check that end label is not missing
5648
5649 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5650
5651         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5652         representation clause in codepeer mode, since it confuses CodePeer and
5653         does not bring useful info.
5654
5655 2011-08-02  Ed Falis  <falis@adacore.com>
5656
5657         * init.c: initialize fp hw on MILS.
5658
5659 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5660
5661         * errout.adb (First_Node): for bodies, return the node itself (small
5662         optimization). For other nodes, do not check source_unit if the node
5663         comes from Standard.
5664
5665 2011-08-02  Robert Dewar  <dewar@adacore.com>
5666
5667         * exp_ch3.adb: Minor comment additions.
5668         * sem_ch13.adb: Minor reformatting.
5669
5670 2011-08-02  Pascal Obry  <obry@adacore.com>
5671
5672         * make.adb, makeutl.adb: Removes some superfluous directory separator.
5673
5674 2011-08-02  Robert Dewar  <dewar@adacore.com>
5675
5676         * sem_attr.adb: Minor reformatting.
5677
5678 2011-08-02  Robert Dewar  <dewar@adacore.com>
5679
5680         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5681         (Has_Default_Component_Value): Removed
5682         * einfo.ads Comment updates
5683         (Has_Default_Aspect): Replaces Has_Default_Value
5684         (Has_Default_Component_Value): Removed
5685         * exp_ch13.adb
5686         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5687         * exp_ch3.adb
5688         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5689         (Get_Simple_Init_Val): Handle Default_Value aspect
5690         (Needs_Simple_Initialization): Handle Default_Value aspect
5691         * exp_ch3.ads: Needs_Simple_Initialization
5692         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5693         * par-prag.adb (Pragma_Default[_Component]Value) Removed
5694         * sem_ch13.adb
5695         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5696         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5697         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5698
5699 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5700
5701         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5702         package containing iteration primitives.
5703         exp_ch5.adb (Expand_Iterator_Loop): ditto.
5704
5705 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5706
5707         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5708         "of", pre-analyze expression in case it is a function call with
5709         finalization actions that must be placed ahead of the loop.
5710         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5711         on an Ada2012 iterator, insert them ahead of the rewritten loop.
5712
5713 2011-08-02  Geert Bosch  <bosch@adacore.com>
5714
5715         * cstand.adb (Create_Float_Types): Only consider C's long double for
5716         Long_Long_Float, in addition to double.
5717
5718 2011-08-02  Robert Dewar  <dewar@adacore.com>
5719
5720         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5721         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5722         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5723         Minor reformatting.
5724
5725 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5726
5727         * sem_attr.adb: handle properly 'Result when it is a prefix of an
5728         indexed component.
5729
5730 2011-08-02  Javier Miranda  <miranda@adacore.com>
5731
5732         * einfo.ads, einfo.adb
5733         (Original_Access_Type): Move this attribute to Node26 since there was
5734         an undocumented use of Node21 in E_Access_Subprogram_Type entities
5735         which causes conflicts and breaks the generation of the .NET compiler.
5736         (Interface_Name): Add missing documentation on JGNAT only uses of
5737         this attribute.
5738
5739 2011-08-02  Geert Bosch  <bosch@adacore.com>
5740
5741         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5742         (Find_Back_End_Float_Type): Likewise
5743         (Create_Back_End_Float_Types): Likewise
5744         (Create_Float_Types): Likewise
5745         (Register_Float_Type): Likewise
5746         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5747         Nlist and split out type selection in new local Find_Base_Type function.
5748         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5749         Nlist
5750         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5751
5752 2011-08-02  Robert Dewar  <dewar@adacore.com>
5753
5754         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5755         alpha order).
5756         * opt.ads: Minor comment change.
5757         * sem_ch12.adb: Minor code reorganization.
5758
5759 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5760
5761         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5762         subtype's list of rep items to the list on the full subtype in the case
5763         where the lists are the same.
5764
5765 2011-08-02  Geert Bosch  <bosch@adacore.com>
5766
5767         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5768         using the one from System.Strings, which also deallocates all strings.
5769
5770 2011-08-02  Geert Bosch  <bosch@adacore.com>
5771
5772         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5773         function.
5774         * gcc-interface/Make-lang.in: Update dependencies.
5775
5776 2011-08-02  Olivier Hainque  <hainque@adacore.com>
5777
5778         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5779         end_locus.
5780
5781 2011-08-02  Javier Miranda  <miranda@adacore.com>
5782
5783         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5784         associated with anonymous access to subprograms.
5785
5786 2011-08-02  Geert Bosch  <bosch@adacore.com>
5787
5788         * opt.ads
5789         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5790         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5791         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5792         (Add_Symbol_Definition): Move to switch-c.adb
5793         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5794         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5795         (Add_Symbol_Definition): Move to switch-c.adb.
5796         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5797         * sem_warn.adb
5798         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5799         Move to warnsw.adb.
5800         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5801         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5802         Move to warnsw.adb.
5803         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5804         (Add_Symbol_Definition): Moved from Prepcomp.
5805         * switch-c.ads: Update copyright notice. Use String_List instead of
5806         Argument_List, removing dependency on System.OS_Lib.
5807
5808 2011-08-02  Yannick Moy  <moy@adacore.com>
5809
5810         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5811         mode on initialization expression which does not respect SPARK
5812         restrictions.
5813         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5814         if the tree referenced by its argument represents an initialization
5815         expression in SPARK, suitable for initializing an object in an object
5816         declaration.
5817
5818 2011-08-02  Javier Miranda  <miranda@adacore.com>
5819
5820         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5821         internally generated access to subprogram with its associated protected
5822         subprogram type.
5823         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5824
5825 2011-08-02  Geert Bosch  <bosch@adacore.com>
5826
5827         * cstand.adb (Register_Float_Type): Print information about type to
5828         register, if the Debug_Flag_Dot_B is set.
5829         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5830         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5831         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5832         with a requested precision of more than Max_Digits digits and no more
5833         than Max_Base_Digits digits, if a range specification is present and the
5834         Predefined_Float_Types list has a suitable type to derive from.
5835         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5836         case of type completion with pragma Import
5837         * sem_prag.adb
5838         (Process_Import_Predefined_Type): Processing to complete a type
5839         with pragma Import. Currently supports floating point types only.
5840         (Set_Convention_From_Pragma): Do nothing without underlying type.
5841         (Process_Convention): Guard against absence of underlying type,
5842         which may happen when importing incomplete types.
5843         (Process_Import_Or_Interface): Handle case of importing predefined
5844         types. Tweak error message.
5845
5846 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5847
5848         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5849         functions to previous change.  Reorganize code slightly.
5850
5851 2011-08-02  Geert Bosch  <bosch@adacore.com>
5852
5853         * back_end.ads (Register_Type_Proc): New call back procedure type for
5854         allowing the back end to provide information about available types.
5855         (Register_Back_End_Types): New procedure to register back end types.
5856         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5857         available types.
5858         * cstand.adb (Back_End_Float_Types): New list for floating point types
5859         supported by the back end.
5860         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5861         (Copy_Float_Type): New procedure to make new copies of predefined types.
5862         (Register_Float_Type): New call back procedure to populate the BEFT list
5863         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5864         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5865         (Create_Float_Types): New procedure to create entities for floating
5866         point types predefined in Standard, and put these and any remaining
5867         BEFTs on the Predefined_Float_Types list.
5868         * stand.ads (Predefined_Float_Types): New list for predefined floating
5869         point types that do not have declarations in package Standard.
5870
5871 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5872
5873         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
5874         entity node for the unit containing the parameter.
5875         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5876         (Add_Inlined_Subprogram): Likewise.
5877         * gcc-interface/Make-lang.in: Update dependencies.
5878
5879 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5880
5881         * s-stusta.adb (Print): Make sure Pos is always initialized to a
5882         suitable value.
5883
5884 2011-08-02  Geert Bosch  <bosch@adacore.com>
5885
5886         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5887
5888 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5889
5890         * sem_type.adb (Covers): Move trivial case to the top and reuse the
5891         computed value of Base_Type.
5892
5893 2011-08-02  Yannick Moy  <moy@adacore.com>
5894
5895         * restrict.adb (Check_Restriction): issue an error for any use of
5896         class-wide, even if the No_Dispatch restriction is not set.
5897         * sem_aggr.adb: Correct typos in comments and messages in formal mode
5898         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5899         when completing a private extension, the type named in the private part
5900         is not the same as that named in the visible part.
5901         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5902         of an inherited primitive operations of a tagged type or type extension
5903         that returns the tagged type.
5904         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5905         function which returns True for an implicit operation inherited by the
5906         derived type declaration for the argument type.
5907         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5908         order.
5909
5910 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5911
5912         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5913         Process_Bounds, to perform analysis with expansion of a range or an
5914         expression that is the iteration scheme for a loop.
5915         (Analyze_Iterator_Specification): If domain of iteration is given by a
5916         function call with a controlled result, as is the case if call returns
5917         a predefined container, ensure that finalization actions are properly
5918         generated.
5919         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5920
5921 2011-08-02  Javier Miranda  <miranda@adacore.com>
5922
5923         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5924         * gcc-interface/Make-lang.in: Update dependencies.
5925
5926 2011-08-02  Javier Miranda  <miranda@adacore.com>
5927
5928         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5929         determine if the analysis is performed using N or Original_Node (N).
5930         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5931         functionality of routine Is_Variable avoids code duplication.
5932         * checks.adb (Determine_Range): Handle temporaries generated by
5933         Remove_Side_Effects.
5934
5935 2011-08-02  Javier Miranda  <miranda@adacore.com>
5936
5937         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5938         expansion of the condition. Required since the previous analysis was
5939         done with expansion disabled (see Resolve_Quantified_Expression) and
5940         hence checks were not inserted and record comparisons have not been
5941         expanded.
5942
5943 2011-08-02  Ed Falis  <falis@adacore.com>
5944
5945         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5946         Update header.
5947
5948 2011-08-02  Bob Duff  <duff@adacore.com>
5949
5950         * opt.ads: Minor comment fix.
5951
5952 2011-08-02  Bob Duff  <duff@adacore.com>
5953
5954         * sem_ch12.adb (Analyze_Package_Instantiation,
5955         Analyze_Subprogram_Instantiation): Turn off style checking while
5956         analyzing an instance. Whatever style checks that apply to the generic
5957         unit should apply, so it makes no sense to apply them in an instance.
5958         This was causing trouble when compiling an instance of a runtime
5959         unit that violates the -gnatyO switch.
5960         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5961         one of the two case statements, causing spurious errors.
5962
5963 2011-08-02  Robert Dewar  <dewar@adacore.com>
5964
5965         * uname.adb: Minor reformatting.
5966         * gnatcmd.adb: Minor reformatting.
5967         * exp_attr.adb: Minor reformatting.
5968
5969 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5970
5971         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5972         No_Dispatching_Calls, do not look for the Assign primitive, because
5973         predefined primitives are not created in this case.
5974
5975 2011-08-02  Bob Duff  <duff@adacore.com>
5976
5977         * stylesw.ads: Minor comment fixes.
5978
5979 2011-08-02  Robert Dewar  <dewar@adacore.com>
5980
5981         * freeze.adb (Add_To_Result): New procedure.
5982
5983 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
5984
5985         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5986         time, if the specific run-time routines for handling streams of strings
5987         are not available, use the default mechanism.
5988
5989 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5990
5991         * s-regpat.ads: Fix typo.
5992
5993 2011-08-02  Vincent Celier  <celier@adacore.com>
5994
5995         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5996         not null, call it to create the in memory config project file without
5997         parsing an existing default config project file.
5998
5999 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6000
6001         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6002
6003 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6004
6005         * sem_elim.adb: an abstract subprogram does not need an eliminate
6006         pragma for its descendant to be eliminable.
6007
6008 2011-08-02  Ed Falis  <falis@adacore.com>
6009
6010         * init.c: revert to handling before previous checkin for VxWorks
6011         * s-intman-vxworks.adb: delete unnecessary declarations related to
6012         using Ada interrupt facilities for handling signals.
6013         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6014         * s-intman-vxworks.ads: Import __gnat_install_handler as
6015         Initialize_Interrupts.
6016         * s-taprop-vxworks.adb: Delete Signal_Mask.
6017         (Abort_Handler): change construction of mask to unblock exception
6018         signals.
6019
6020 2011-08-02  Jerome Guitton  <guitton@adacore.com>
6021
6022         * a-except-2005.adb (Raise_From_Signal_Handler): Call
6023         Debug_Raise_Exception before propagation starts.
6024
6025 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6026
6027         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6028         to Restriction_Check_Required.
6029         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6030         * sem_res.adb (Resolve_Call): Likewise.
6031         * sem_attr.adb (Check_Stream_Attribute): Likewise.
6032
6033 2011-08-02  Bob Duff  <duff@adacore.com>
6034
6035         * stylesw.ads: Update comment.
6036         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6037         * errout.ads: Remove obsolete comment.
6038
6039 2011-08-02  Javier Miranda  <miranda@adacore.com>
6040
6041         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6042         (Set_Is_Safe_To_Reevaluate): new procedure.
6043         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6044         assignment is allowed on safe-to-reevaluate variables.
6045         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6046         temporary created to remove side effects in expressions that use
6047         the secondary stack as safe-to-reevaluate.
6048         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6049         variables that are not true constants.
6050
6051 2011-08-02  Robert Dewar  <dewar@adacore.com>
6052
6053         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6054         sem_res.adb, sem_ch6.adb: Minor reformatting.
6055
6056 2011-08-02  Jerome Guitton  <guitton@adacore.com>
6057
6058         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6059
6060 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6061
6062         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6063         not set Overridden_Operation if subprogram is an initialization
6064         procedure.
6065
6066 2011-08-02  Yannick Moy  <moy@adacore.com>
6067
6068         * par-ch6.adb: Correct obsolete name in comments
6069         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6070         which takes two message arguments (existing function takes one), with
6071         second message used for continuation.
6072         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6073         block statements that originate from a source block statement, not
6074         generated block statements
6075         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6076         symmetry with procedure case
6077         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6078         function to issue an error in formal mode if a package specification
6079         contains more than one tagged type or type extension.
6080         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6081         parameters matching formals of tagged types are objects (or ancestor
6082         type conversions of objects), not general expressions. Issue an error
6083         on view conversions that are not involving ancestor conversion of an
6084         extended type.
6085         (Resolve_Type_Conversion): in formal mode, issue an error on the
6086         operand of an ancestor type conversion which is not an object
6087         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6088         procedure so that it works also for actuals of function calls
6089         (Is_Actual_Tagged_Parameter): new function which determines if its
6090         argument is an actual parameter of a formal of tagged type in a
6091         subprogram call
6092         (Is_SPARK_Object_Reference): new function which determines if the tree
6093         referenced by its argument represents an object in SPARK
6094
6095 2011-08-02  Robert Dewar  <dewar@adacore.com>
6096
6097         * sem_ch3.adb: Minor reformatting
6098         Minor comment addition
6099         Minor error msg text change
6100
6101 2011-08-02  Javier Miranda  <miranda@adacore.com>
6102
6103         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6104         function. Used to be more precise when we generate a variable plus one
6105         assignment to remove side effects in the evaluation of the Bound
6106         expressions.
6107         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6108         of the bound expression to force its re-analysis and thus expand the
6109         associated transient scope (if required). Code cleanup replacing the
6110         previous code that declared the constant entity by an invocation to
6111         routine Force_Evaluation which centralizes this work in the frontend.
6112
6113 2011-08-02  Robert Dewar  <dewar@adacore.com>
6114
6115         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6116         (Base_Type): Now uses improved Is_Base_Type function
6117         * einfo.ads (Base_Type): Inline this function
6118
6119 2011-08-02  Robert Dewar  <dewar@adacore.com>
6120
6121         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6122         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6123
6124 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6125
6126         * gcc-interface/Make-lang.in: Update dependencies.
6127         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6128         targets.
6129
6130 2011-08-02  Yannick Moy  <moy@adacore.com>
6131
6132         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6133         non-simple expression used in delta constraint
6134         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6135         index constraint which is not a subtype mark
6136         * par.adb: With and use Restrict
6137         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6138         mode on component type which is not a subtype mark and default
6139         expression on component
6140         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6141         of string which does not have a lower index bound equal to 1
6142         (Array_Type_Declaration): issue an error in formal mode on index or
6143         component type which is not a subtype mark, and on aliased keyword on
6144         component
6145         (Derived_Type_Declaration): issue an error in formal mode on interface,
6146         limited or abstract type
6147         (Record_Type_Declaration): issue an error in formal mode on interface
6148         (Record_Type_Definition): issue an error in formal mode on tagged types
6149         and type extensions not declared in the specification of a library unit
6150         package; on null non-tagged record; on variant part
6151
6152 2011-08-02  Vincent Celier  <celier@adacore.com>
6153
6154         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6155         not declared for qualified library project when Library_Name is not
6156         declared, but Library_Dir is.
6157
6158 2011-08-02  Robert Dewar  <dewar@adacore.com>
6159
6160         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6161         pragmas (affects aspects [Component_]Default_Value
6162         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6163         component type for the resolution
6164
6165 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6166
6167         * einfo.adb (Base_Type): Tune implementation for speed.
6168
6169 2011-08-02  Robert Dewar  <dewar@adacore.com>
6170
6171         * freeze.adb: Minor reformatting.
6172
6173 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6174
6175         * scos.ads: Update comments.
6176
6177 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6178
6179         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6180         base type, because the parent may be a subtype of a private type whose
6181         convention is established in a private part.
6182
6183 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6184
6185         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6186         statement in a block when the expansion of the return expression has
6187         created a finalization chain.
6188         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6189         with the parent node.
6190         Add N_Extended_Return_Statement to handle the case where a transient
6191         object declaration appears in the Return_Object_Declarations list of
6192         an extended return statement.
6193
6194 2011-08-02  Matthew Gingell  <gingell@adacore.com>
6195
6196         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6197         unused parameter 'name'.
6198
6199 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6200
6201         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6202         inherited operation, check whether its alias, which is the source
6203         operastion that it renames, has been marked eliminated.
6204
6205 2011-08-02  Javier Miranda  <miranda@adacore.com>
6206
6207         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6208         in-mode parameter whose type is an access type since it can be used to
6209         modify its designated object. Enforce code that handles as safe an
6210         access type that is not access-to-constant but it is the result of a
6211         previous removal of side-effects.
6212         (Remove_Side_Effects): Minor code reorganization of cases which require
6213         no action. Done to incorporate documentation on new cases uncovered
6214         working in this ticket: no action needed if this routine was invoked
6215         too early and the nodes are not yet decorated.
6216         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6217         to routine Remove_Side_Effects by calls to Force_Evaluation since they
6218         were issued with actuals that are implicitly provided by
6219         Force_Evaluation.
6220
6221 2011-08-02  Robert Dewar  <dewar@adacore.com>
6222
6223         * sem_ch3.adb, sem_res.adb: Minor reformatting.
6224
6225 2011-08-02  Yannick Moy  <moy@adacore.com>
6226
6227         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6228         to issue an error in formal mode on attribute not supported in this mode
6229         (Analyze_Attribute): issue errors on standard attributes not supported
6230         in formal mode.
6231         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6232         comment, and issue error in formal mode on modulus which is not a power
6233         of 2.
6234         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6235         range.
6236         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6237         subtype mark.
6238         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6239         operator on modular type (except 'not').
6240
6241 2011-08-02  Robert Dewar  <dewar@adacore.com>
6242
6243         * gnat_rm.texi: Minor reformatting.
6244
6245 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6246
6247         * s-osinte-linux.ads: Minor comment update and reformatting.
6248         * i-cexten.ads: Make this unit pure, as for its parent.
6249         Will allow its usage in more contexts if needed.
6250
6251 2011-08-02  Robert Dewar  <dewar@adacore.com>
6252
6253         * s-utf_32.ads: Minor comment fix.
6254
6255 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6256
6257         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6258         operation of a tagged synchronized type, handle the case where the
6259         controlling argument is overloaded.
6260
6261 2011-08-02  Yannick Moy  <moy@adacore.com>
6262
6263         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6264         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6265         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6266         SPARK mode and formal verification mode on processing SPARK restriction
6267         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6268         requiring consistency checking.
6269
6270 2011-08-02  Robert Dewar  <dewar@adacore.com>
6271
6272         * sem_res.adb: Minor reformatting.
6273
6274 2011-08-02  Robert Dewar  <dewar@adacore.com>
6275
6276         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6277         a-cforse.ads: Remove unneeded with of Ada.Containers
6278         Remove commented out pragma Inline's
6279         Move specifications of new subprograms to the actual specs
6280
6281 2011-08-02  Yannick Moy  <moy@adacore.com>
6282
6283         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6284         a-cforse.ads: Update comments.
6285
6286 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6287
6288         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6289
6290 2011-08-02  Robert Dewar  <dewar@adacore.com>
6291
6292         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6293         a-cforse.ads, a-cofove.ads: Minor reformatting.
6294
6295 2011-08-02  Claire Dross  <dross@adacore.com>
6296
6297         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6298         a-cofove.ads: Add comments.
6299
6300 2011-08-02  Yannick Moy  <moy@adacore.com>
6301
6302         * gnat_rm.texi: Document formal containers.
6303
6304 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6305
6306         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6307         are empty sections.
6308
6309 2011-08-02  Robert Dewar  <dewar@adacore.com>
6310
6311         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6312         reformatting.
6313
6314 2011-08-02  Robert Dewar  <dewar@adacore.com>
6315
6316         * aspects.adb: New aspects Default_Value and Default_Component_Value
6317         New format of Aspect_Names table checks for omitted entries
6318         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6319         handling of boolean aspects for derived types.
6320         New aspects Default_Value and Default_Component_Value
6321         New format of Aspect_Names table checks for omitted entries
6322         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6323         (Has_Default_Value): New flag
6324         (Has_Default_Component_Value): New flag
6325         (Has_Default_Value): New flag
6326         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6327         table.
6328         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6329         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6330         Default_Value and Default_Component_Value
6331         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6332         New aspects Default_Value and Default_Component_Value
6333         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6334         * sprint.adb: Print N_Aspect_Specification node when called from gdb
6335
6336 2011-08-02  Vincent Celier  <celier@adacore.com>
6337
6338         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6339         inherit library kind.
6340
6341 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6342
6343         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6344         Minor reformatting.
6345
6346 2011-08-02  Robert Dewar  <dewar@adacore.com>
6347
6348         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6349
6350 2011-08-02  Yannick Moy  <moy@adacore.com>
6351
6352         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6353
6354 2011-08-02  Robert Dewar  <dewar@adacore.com>
6355
6356         * impunit.adb: Add comment.
6357
6358 2011-08-02  Yannick Moy  <moy@adacore.com>
6359
6360         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6361         qualification of aggregates in formal mode
6362         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6363         another aggregate
6364         (Resolve_Aggregate): complete the test that an aggregate is adequately
6365         qualified in formal mode
6366
6367 2011-08-02  Pascal Obry  <obry@adacore.com>
6368
6369         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6370         * mlib-prj.adb: Supress warning when compiling binder generated file.
6371         (Build_Library): Supress all warnings when compiling the binder
6372         generated file.
6373
6374 2011-08-02  Yannick Moy  <moy@adacore.com>
6375
6376         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6377         from here...
6378         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6379         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6380         Add with/use clauses to make Check_Formal_Restriction visible
6381
6382 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6383
6384         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6385         in-parameters when type of the generic formal is private in the generic
6386         spec and non-private in the body.
6387
6388 2011-08-02  Claire Dross  <dross@adacore.com>
6389
6390         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6391         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6392         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6393         * impunit.adb, Makefile.rtl: Take new files into account.
6394
6395 2011-08-02  Robert Dewar  <dewar@adacore.com>
6396
6397         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6398         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6399
6400 2011-08-02  Yannick Moy  <moy@adacore.com>
6401
6402         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6403         formal mode
6404         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6405         matching static array bounds, taking into account the special case of
6406         string literals
6407         * sem_ch3.adb: Typo in comment.
6408
6409 2011-08-02  Yannick Moy  <moy@adacore.com>
6410
6411         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6412         which issues an error in formal mode if its argument node is originally
6413         from source
6414         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6415         has a discriminant specification so that it does not include the case
6416         of derived types
6417         (Derived_Type_Declaration): move here the test that a derived type has a
6418         discriminant specification
6419         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6420         first element of a component association before accessing its choices
6421         (presence of component association is not enough)
6422         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6423         declaration is a library item before accessing the next element in a
6424         list, as library items are not member of lists
6425         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6426         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6427         Check_Formal_Restriction whenever possible.
6428
6429 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6430
6431         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6432         reference when needed.
6433
6434 2011-08-02  Bob Duff  <duff@adacore.com>
6435
6436         * gnat_ugn.texi: Fix typo.
6437
6438 2011-08-02  Vincent Celier  <celier@adacore.com>
6439
6440         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6441         archive file name. Do not use the full path name of archives for Open
6442         VMS.
6443
6444 2011-08-02  Robert Dewar  <dewar@adacore.com>
6445
6446         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6447         Analyze_Aspect_Specifications
6448         * sem_ch13.adb
6449         (Analyze_Aspect_Specifications): New handling for boolean aspects
6450         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6451         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6452         sequence for Analyze_Aspect_Specifications
6453         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6454         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6455
6456 2011-08-02  Robert Dewar  <dewar@adacore.com>
6457
6458         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6459         aspects, since these no longer exist.
6460
6461 2011-08-02  Robert Dewar  <dewar@adacore.com>
6462
6463         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6464         semicolon, do not try to see if there are aspects following it.
6465         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6466         aspect spec.
6467
6468 2011-08-02  Robert Dewar  <dewar@adacore.com>
6469
6470         * sem_ch8.adb, aspects.ads: Minor reformatting.
6471
6472 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6473
6474         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6475         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6476         extracted from...
6477         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
6478
6479 2011-08-02  Yannick Moy  <moy@adacore.com>
6480
6481         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6482         mode on subprogram declaration outside of package specification, unless
6483         it is followed by a pragma Import
6484         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6485         Access_Type_Declaration): issue error in formal mode on access type
6486         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6487         incomplete type
6488         (Analyze_Object_Declaration): issue error in formal mode on object
6489         declaration which does not respect SPARK restrictions
6490         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6491         declaration which does not respect SPARK restrictions
6492         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6493         error in formal mode on digits or delta constraint
6494         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6495         decimal fixed point type
6496         (Derived_Type_Declaration): issue error in formal mode on derived type
6497         other than type extensions of tagged record types
6498         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6499         with check on access definition
6500         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6501         mode on protected definition.
6502         (Analyze_Task_Definition): issue error in formal mode on task definition
6503
6504 2011-08-02  Robert Dewar  <dewar@adacore.com>
6505
6506         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6507
6508 2011-08-02  Javier Miranda  <miranda@adacore.com>
6509
6510         * sem_ch6.adb (Can_Override_Operator): New function.
6511         (Verify_Overriding_Indicator): Add missing code to check overriding
6512         indicator in operators. Fixes regression.
6513         (Check_Overriding_Indicator): Minor reformating after replacing the
6514         code that evaluates if the subprogram can override an operator by
6515         invocations to the above new function.
6516         * einfo.adb
6517         (Write_Field26_Name): Add missing code to ensure that, following
6518         the documentation in einfo.ads, this field is not shown as attribute
6519         "Static_Initialization" on non-dispatching functions.
6520
6521 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6522
6523         * sem_res.adb (Resolve_Call): A call to
6524         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6525         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6526         i.e., when the second parameter is of type Time_Span.
6527
6528 2011-08-02  Vincent Celier  <celier@adacore.com>
6529
6530         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6531         with an archive instead of -L<library dir> -l<library name>.
6532
6533 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6534
6535         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6536         mark the base types In_Use in addition to making the operations
6537         use_visible.
6538
6539 2011-08-02  Ed Falis  <falis@adacore.com>
6540
6541         * init.c: add and setup __gnat_signal_mask for the exception signals
6542         * s-inmaop-vxworks.adb: new file.
6543         * s-intman-vxworks.adb: remove unnecessary initializations and
6544         simplify remaining
6545         * s-intman-vxworks.ads: remove unnecessary variable
6546         * s-taprop-vxworks.adb: simplify signal initialization
6547
6548 2011-08-02  Robert Dewar  <dewar@adacore.com>
6549
6550         * sem_ch8.adb: Minor code reorganization, comment updates.
6551
6552 2011-08-02  Robert Dewar  <dewar@adacore.com>
6553
6554         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6555         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6556         here from Sem_Res.
6557         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6558         (Matching_Static_Array_Bounds): Moved here from Sem_Res
6559
6560 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6561
6562         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6563         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6564         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6565         use_type_clauses, to handle more efficiently use_type and use_all_type
6566         constructs.
6567         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6568         Ada2012 Use_All_Type clause.
6569         (Use_Class_Wide_Operations): new procedure.
6570
6571 2011-08-02  Robert Dewar  <dewar@adacore.com>
6572
6573         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6574         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6575         expression to expression function.
6576
6577 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6578
6579         * sem_ch4.adb: transform simple Ada2012 membership into equality only
6580         if types are compatible.
6581
6582 2011-08-02  Yannick Moy  <moy@adacore.com>
6583
6584         * sem_res.adb (Matching_Static_Array_Bounds): new function which
6585         returns True if its argument array types have same dimension and same
6586         static bounds at each index.
6587         (Resolve_Actuals): issue an error in formal mode on actuals passed as
6588         OUT or IN OUT paramaters which are not view conversions in SPARK.
6589         (Resolve_Arithmetic_Op): issue an error in formal mode on
6590         multiplication or division with operands of fixed point types which are
6591         not qualified or explicitly converted.
6592         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6593         Boolean or array type (except String) operands.
6594         (Resolve_Equality_Op): issue an error in formal mode on equality
6595         operators for array types other than String with non-matching static
6596         bounds.
6597         (Resolve_Logical_Op): issue an error in formal mode on logical operators
6598         for array types with non-matching static bounds. Factorize the code in
6599         Matching_Static_Array_Bounds.
6600         (Resolve_Qualified_Expression): issue an error in formal mode on
6601         qualified expressions for array types with non-matching static bounds.
6602         (Resolve_Type_Conversion): issue an error in formal mode on type
6603         conversion for array types with non-matching static bounds
6604
6605 2011-08-02  Robert Dewar  <dewar@adacore.com>
6606
6607         * par-ch10.adb: Minor code reorganization (use Nkind_In).
6608
6609 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6610
6611         * par-ch9.adb: save location of entry for proper error message.
6612
6613 2011-08-02  Javier Miranda  <miranda@adacore.com>
6614
6615         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6616         (Use_Full_View) which permits this routine to climb through the
6617         ancestors using the full-view of private parents.
6618         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6619         Use_Full_View to true in calls to Is_Ancestor.
6620         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6621         true in call to Is_Ancestor.
6622         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6623         Use_Full_View to true in call to Is_Ancestor.
6624         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6625         call to Is_Ancestor.
6626         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6627         Use_Full_View to true in calls to Is_Ancestor.
6628         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6629         Make_Select_Specific_Data_Table, Register_Primitive,
6630         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6631         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6632         to true in call to Is_Ancestor.
6633         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6634         Use_Full_View to true in calls to Is_Ancestor.
6635         * exp_cg.adb
6636         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6637         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6638
6639 2011-08-02  Robert Dewar  <dewar@adacore.com>
6640
6641         * gnat_rm.texi: Minor reformatting.
6642         * sem_prag.adb: Minor reformatting.
6643
6644 2011-08-02  Tristan Gingold  <gingold@adacore.com>
6645
6646         * vms_data.ads: Add VMS qualifier for -gnateP.
6647
6648 2011-08-02  Robert Dewar  <dewar@adacore.com>
6649
6650         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6651         * par-ch7.adb (P_Package): Proper placement of aspects for package
6652         decl/instantiation.
6653         * par-endh.adb (Check_End): Ad Is_Sloc parameter
6654         (End_Statements): Add Is_Sloc parameterr
6655         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6656         (Check_End): Ad Is_Sloc parameter
6657         (End_Statements): Add Is_Sloc parameterr
6658
6659 2011-08-02  Vincent Celier  <celier@adacore.com>
6660
6661         * ug_words: Add VMS qualifier equivalent to -gnateP:
6662         /SYMBOL_PREPROCESSING.
6663
6664 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6665
6666         * gnat-style.texi: For hexadecimal numeric literals the typical
6667         grouping of digits is 4 to represent 2 bytes.
6668         A procedure spec which is split into several lines is indented two
6669         characters.
6670
6671 2011-08-02  Yannick Moy  <moy@adacore.com>
6672
6673         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6674         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6675         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6676         properly qualified
6677         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6678         choice in array aggregate
6679         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6680         mark as ancestor
6681         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6682         positional and named aggregate for record, or others in record
6683         aggregate, or multiple choice in record aggregate
6684         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6685         array operands to logical operations AND, OR and XOR do not have the
6686         same static lower and higher bounds
6687         * sem_ch5.adb, sinfo.ads: Correct typos in comments
6688
6689 2011-08-01  Robert Dewar  <dewar@adacore.com>
6690
6691         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6692         Replaces Last_Source_Node_In_Sequence.
6693         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6694         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6695         parens and blank in string (this was inconsistently implemented).
6696         * errout.ads
6697         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6698         blank in string (this was inconsistently implemented).
6699         * gnat1drv.adb
6700         (Set_Global_Switches): Set formal mode switches appropriately
6701         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6702         * par-prag.adb
6703         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6704         call Set_Error_Msg_Lang to set "spark" as language name.
6705         * par.adb: Remove unnecessary call to set formal language for errout
6706         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6707         appropriately and call Set_Error_Msg_Lang to set "spark" as language
6708         name.
6709         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6710         calls to it, moved after resolution so that types are known
6711         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6712         result of concatenation is not of type String
6713         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6714         concatenation is not properly restricted
6715         * gnat_rm.texi: Add doc on pragma Spark_95.
6716         * gcc-interface/Makefile.in: Remove obsolete target pairs for
6717         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6718         * gcc-interface/Make-lang.in: Update dependencies.
6719
6720 2011-08-01  Javier Miranda  <miranda@adacore.com>
6721
6722         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6723         condition that detects if the overridden operation must replace an
6724         existing entity.
6725
6726 2011-08-01  Javier Miranda  <miranda@adacore.com>
6727
6728         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6729         code declarations inserted by Insert_Actions in each alternative of the
6730         N_Case_Expression node.
6731
6732 2011-08-01  Robert Dewar  <dewar@adacore.com>
6733
6734         * sem_ch6.adb: Minor code reorganization.
6735         * sem_util.adb: Minor reformatting.
6736
6737 2011-08-01  Pascal Obry  <obry@adacore.com>
6738
6739         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6740         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6741
6742 2011-08-01  Yannick Moy  <moy@adacore.com>
6743
6744         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6745         literal or operator symbol which is prefixed
6746         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6747         mode on access attributes.
6748         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6749         that concatenation operands are properly restricted in formal mode
6750         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6751         Analyze_Concatenation_Operand. Issue an error in formal mode if the
6752         result of the concatenation has a type different from String.
6753         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6754         Analyze_Quantified_Expression, Analyze_Slice,
6755         Analyze_Null): issue an error in formal mode on unsupported constructs
6756         * sem_ch5.adb
6757         (Analyze_Block_Statement): only issue error on source block statement
6758         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6759         function which returns the last node in a list of nodes for which
6760         Comes_From_Source returns True, if any
6761         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6762         Last_Source_Node_In_Sequence
6763         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6764         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6765         mode on unsupported constructs
6766         * sem_ch9.adb Do not return after issuing error in formal mode, as the
6767         rest of the actions may be needed later on since the error is marked as
6768         not serious.
6769         * sinfo.ads: Typos in comments.
6770
6771 2011-08-01  Pascal Obry  <obry@adacore.com>
6772
6773         * projects.texi: Minor editing.
6774
6775 2011-08-01  Yannick Moy  <moy@adacore.com>
6776
6777         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6778         insertion character ~~
6779         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6780         (Set_Error_Msg_Lang): new procedure which fixes the language for use
6781         with insertion character ~~
6782         (Set_Msg_Text): treat insertion character ~~
6783         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6784         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6785         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6786         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6787         errors related to the formal language restriction not serious
6788         (insertion character |).
6789         * par.adb (Par): set formal language for error messages if needed
6790         * sem_ch6.adb (Check_Missing_Return): take into account possible
6791         generated statements at the end of the function
6792         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6793         enumeration value to define a new pragma SPARK_95
6794         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6795         SPARK_Version): new type and variables to store the SPARK version
6796         (none by default).
6797         (SPARK_Mode): return True when SPARK_Version is set
6798         * par-prag.adb: Correct indentation
6799         (Prag): take Pragma_SPARK_95 into account
6800         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6801         into account.
6802
6803 2011-08-01  Robert Dewar  <dewar@adacore.com>
6804
6805         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6806         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6807         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6808
6809 2011-08-01  Pascal Obry  <obry@adacore.com>
6810
6811         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6812         Target_Name to Get_Path call.
6813         (Parse_Single_Project): Likewise.
6814         (Post_Parse_Context_Clause): Likewise.
6815         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6816         Call Initialise_Project_Path with the proper Target_Name.
6817         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6818         search path.
6819         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6820         with the proper Target_Name.
6821         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6822         Part.Parse routine.
6823         (Parse_Project_And_Apply_Config): Likewise.
6824         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6825         This is fine as this part of the code is supporting only native
6826         compilation.
6827         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6828         is fine as this part of the code is supporting only native compilation.
6829
6830 2011-08-01  Yannick Moy  <moy@adacore.com>
6831
6832         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6833         of homonym, unless the homonym is one of the cases allowed in SPARK
6834         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6835         package declaration occurring after a body.
6836
6837 2011-08-01  Robert Dewar  <dewar@adacore.com>
6838
6839         * checks.adb, exp_ch4.adb: Minor reformatting.
6840
6841 2011-08-01  Javier Miranda  <miranda@adacore.com>
6842
6843         * einfo.ads (Access_Disp_Table): Fix documentation.
6844         (Dispatch_Table_Wrappers): Fix documentation.
6845
6846 2011-08-01  Pascal Obry  <obry@adacore.com>
6847
6848         * prj-env.adb, prj-env.ads: Minor reformatting.
6849
6850 2011-08-01  Yannick Moy  <moy@adacore.com>
6851
6852         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6853         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6854         procedures out of these packages.
6855         * errout.ads, errout.adb
6856         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6857         procedures in of this package
6858         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6859         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6860         on misplaced later vs initial declarations, like in Ada 83
6861         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6862         formal mode on attribute of private type whose full type declaration
6863         is not visible
6864         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6865         package declaration inside a package specification
6866         (Analyze_Full_Type_Declaration): issue error in formal mode on
6867         controlled type or discriminant type
6868         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6869         user-defined operator means that it should come from the source
6870         (New_Overloaded_Entity): issue error in formal mode on overloaded
6871         entity.
6872         * sem_ch6.ads, sem_ch13.ads: typos in comments.
6873
6874 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6875
6876         * atree.adb: Minor reformatting.
6877         * checks.adb: Minor reformatting.
6878
6879 2011-08-01  Vincent Celier  <celier@adacore.com>
6880
6881         * s-parame-vms-ia64.ads: Fix typo in comment
6882         Minor reformatting
6883         * s-parame-vms-restrict.ads: Removed, unused.
6884
6885 2011-08-01  Javier Miranda  <miranda@adacore.com>
6886
6887         * exp_ch3.adb
6888         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6889         * sem_ch3.adb
6890         (Constrain_Index): Remove side effects in the evaluation of the bounds.
6891         * sem_ch3.ads, sem_ch3.adb
6892         (Is_Constant_Bound): New extended version of the subprogram that was
6893         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6894         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6895         * sem_aux.ads (Constant_Value): Fix typo in comment.
6896         * checks.adb (Generate_Index_Checks): New implementation which, for
6897         array objects with constant bounds, generates the runtime check
6898         referencing the bounds of the array type. For other cases this routine
6899         provides its previous behavior obtaining such values from the array
6900         object.
6901         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6902         parent type.
6903         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6904         we cannot have semantic interpretations of the new node.
6905
6906 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6907
6908         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6909         expressions.
6910
6911 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6912
6913         * sem_ch8.adb: Minor code editing.
6914         * s-vxwext.adb: Remove trailing space.
6915         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6916         consistency with other files.
6917
6918 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6919
6920         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6921
6922 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6923
6924         * par-ch10.adb: reject parameterized expressions as compilation unit.
6925         * sem_ch4.adb: handle properly conditional expression with overloaded
6926         then_clause and no else_clause.
6927
6928 2011-08-01  Tristan Gingold  <gingold@adacore.com>
6929
6930         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6931         like done by System.Aux_DEC.
6932         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6933
6934 2011-08-01  Yannick Moy  <moy@adacore.com>
6935
6936         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6937         missing label at end of declaration (subprogram or package)
6938         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6939         of positional and named parameter association
6940         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6941         Error_Msg_SP which adds a prefix to the error message giving the name
6942         of the formal language analyzed
6943         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6944         access result type in subprogram, unconstrained array as result type,.
6945         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6946         procedure
6947         * sem_ch8.adb: Code clean up.
6948
6949 2011-08-01  Javier Miranda  <miranda@adacore.com>
6950
6951         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6952         * einfo.ads (Access_Disp_Table): Fix documentation.
6953         (Dispatch_Table_Wrappers): Fix documentation.
6954         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6955         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6956         to enforce the documentation of this attribute.
6957         (Set_Is_Interface): Cleanup the assertion.
6958         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6959         the Underlying_Type entity before reading attribute Access_Disp_Table.
6960         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6961         Locate the Underlying_Type before reading attribute Access_Disp_Table.
6962         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6963         the Underlying_Type entity before reading attribute Access_Disp_Table.
6964         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6965         Locate the Underlying_Type entity before reading attribute
6966         Access_Disp_Table.
6967
6968 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6969
6970         * s-poosiz.ads: Additional overriding indicators.
6971
6972 2011-08-01  Yannick Moy  <moy@adacore.com>
6973
6974         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6975         formal mode.
6976         (Analyze_Iteration_Scheme): issue error in formal mode when loop
6977         parameter specification does not include a subtype mark.
6978         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6979         formal mode on abstract subprogram.
6980         (Analyze_Subprogram_Specification): issue error in formal mode on
6981         user-defined operator.
6982         (Process_Formals): issue error in formal mode on access parameter and
6983         default expression.
6984         * sem_ch9.adb (Analyze_Abort_Statement,
6985         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6986         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6987         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6988         Analyze_Requeue, Analyze_Selective_Accept,
6989         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6990         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6991         issue error in formal mode on user-defined raise statement.
6992
6993 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6994
6995         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6996         declaration being hidden when overriding an implicit inherited
6997         subprogram.
6998         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6999         (-gnats), do not complain about a source file that contains only a
7000         pragma No_Body.
7001
7002 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7003
7004         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7005         variable if already set.
7006
7007 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7008
7009         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7010         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7011         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7012         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7013         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7014         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7015         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7016         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7017         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7018         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7019         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7020         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7021         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7022         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7023         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7024         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7025         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7026         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7027         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7028         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7029         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7030         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7031         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7032         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7033         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7034         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7035         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7036         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7037         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7038         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7039         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7040         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7041         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7042         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7043         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7044         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7045         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7046         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7047         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7048         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7049         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7050         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7051         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7052         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7053         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7054         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7055         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7056         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7057         s-osinte-mingw.ads: Update to GPLv3 run-time license.
7058         Use GNAT instead of GNARL.
7059
7060 2011-08-01  Bob Duff  <duff@adacore.com>
7061
7062         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7063         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7064         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7065         reformatting.
7066
7067 2011-08-01  Yannick Moy  <moy@adacore.com>
7068
7069         * debug.adb (d.D) reverve flag for the SPARK mode
7070         (d.E) reverve flag for SPARK generation mode
7071         (d.F) reverve flag for Why generation mode
7072         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
7073         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
7074         functions which return True when the corresponding modes are set
7075         (Formal_Language): return "spark" or "alfa" when in formal verification
7076         mode.
7077         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7078         Error_Msg to prefix the error message with a tag giving the formal
7079         language
7080         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7081         message with a tag giving the formal language
7082         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7083         block statement
7084         (Analyze_Case_Statement): issue error in formal mode on case statement
7085         with a single "others" case alternative
7086         (Analyze_Exit_Statement): issue errors in formal mode on exit
7087         statements which do not respect SPARK restrictions
7088         (Analyze_Goto_Statement): issue error in formal mode on goto statement
7089         (Check_Unreachable_Code): always issue an error (not a warning) in
7090         formal mode on unreachable code (concerns both code after an infinite
7091         loop and after an unconditional jump, both not allowed in SPARK)
7092         * sem_ch6.adb (Analyze_Return_Statement): add call to
7093         Set_Return_Present for a procedure containing a return statement
7094         (already done for functions in Analyze_Function_Return)
7095         (Analyze_Function_Return): issue error in formal mode on extended
7096         return or if return is not last statement in function
7097         (Check_Missing_Return): issue error in formal mode if function does
7098         not end with return or if procedure contains a return
7099         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7100         function to detect if there is an inner scope of its parameter S which
7101         is a loop.
7102
7103 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7104
7105         * sem_ch6.ads: Minor reformatting.
7106
7107 2011-08-01  Javier Miranda  <miranda@adacore.com>
7108
7109         * sem_util.adb (Abstract_Interface_List): Complete condition when
7110         processing private type declarations to avoid reading unavailable
7111         attribute.
7112         (Is_Synchronized_Tagged_Type): Complete condition when processing
7113         private extension declaration nodes to avoid reading unavailable
7114         attribute.
7115
7116 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7117
7118         * sem_ch3.adb: Minor reformatting.
7119
7120 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7121
7122         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7123         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7124         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7125         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7126         for VMS, instead parametrize the common implementation with
7127         System.Parameters declarations.
7128
7129 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
7130
7131         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7132
7133 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7134
7135         * seh_init.c: Fix SEH handler installation on win64.
7136
7137 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7138
7139         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7140         double analysis of an anonymous access to subprogram, because it can
7141         lead to improper sharing of profiles and a back-end crash.
7142
7143 2011-08-01  Robert Dewar  <dewar@adacore.com>
7144
7145         * make.adb, sem_ch4.adb: Minor reformatting.
7146         * gcc-interface/Make-lang.in: Update dependencies.
7147         * sem_util.adb, exp_ch5.adb: Minor reformatting.
7148
7149 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7150
7151         * gnat_rm.texi: Fix definition of Long_Integer.
7152
7153 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7154
7155         * exp_aggr.adb: check limit size of static aggregate unconditionally,
7156         to prevent storage exhaustion.
7157         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7158         finalized is a function body, insert the cleanup code before the final
7159         return statement, to prevent spurious warnings.
7160         * s-pooglo.ads: add overriding indicator.
7161
7162 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7163
7164         * sem_ch4.adb (Operator_Check): improve error message when both a
7165         with_clause and a use_clause are needed to make operator usage legal.
7166         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7167         determine whether a compilation unit is visible within an other,
7168         either through a with_clause in the current unit, or a with_clause in
7169         its library unit or one one of its parents.
7170
7171 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7172
7173         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7174         over an arbitrary expression of an array or container type.
7175         * lib-xref.adb: clarify comment.
7176
7177 2011-08-01  Bob Duff  <duff@adacore.com>
7178
7179         * einfo.ads: Minor reformatting.
7180         * debug.adb: Minor comment improvement.
7181
7182 2011-08-01  Javier Miranda  <miranda@adacore.com>
7183
7184         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7185         consider hidden subprograms as valid candidates.
7186
7187 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7188
7189         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7190
7191 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
7192
7193         * gnat_ugn.texi: Fix typo.
7194
7195 2011-08-01  Robert Dewar  <dewar@adacore.com>
7196
7197         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7198         lib-xref.adb: Minor reformatting
7199
7200 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7201
7202         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7203         when to generate a call to Move_Final_List.
7204         (Has_Controlled_Parts): Remove this function.
7205
7206 2011-08-01  Geert Bosch  <bosch@adacore.com>
7207
7208         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7209         "," in choice list.
7210
7211 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7212
7213         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7214         explicit raise of a predefined exception as Comes_From_Source if the
7215         original N_Raise_Statement comes from source.
7216
7217 2011-08-01  Robert Dewar  <dewar@adacore.com>
7218
7219         * sinfo.ads: Add comment.
7220         * sem_ch6.adb: Minor reformatting.
7221
7222 2011-08-01  Robert Dewar  <dewar@adacore.com>
7223
7224         * freeze.adb (Freeze_Entity): Refine check for bad component size
7225         clause to avoid rejecting confirming clause when atomic/aliased present.
7226
7227 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7228
7229         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7230         better determine whether an entity reference is a write.
7231         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7232         subcomponent.
7233         * lib-xref.adb (Output_References): Do no suppress a read reference at
7234         the same location as an immediately preceeding modify-reference, to
7235         handle properly in-out actuals.
7236
7237 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7238
7239         * env.c (__gnat_setenv) [VMS]: Refine previous change.
7240
7241 2011-08-01  Quentin Ochem  <ochem@adacore.com>
7242
7243         * i-cstrin.adb (New_String): Changed implementation, now uses only the
7244         heap to compute the result.
7245
7246 2011-08-01  Robert Dewar  <dewar@adacore.com>
7247
7248         * atree.ads: Minor reformatting.
7249
7250 2011-08-01  Emmanuel Briot  <briot@adacore.com>
7251
7252         * g-expect.adb (Get_Command_Output): Fix memory leak.
7253
7254 2011-08-01  Geert Bosch  <bosch@adacore.com>
7255
7256         * cstand.adb (P_Float_Type): New procedure to print the definition of
7257         predefined fpt types.
7258         (P_Mixed_Name): New procedure to print a name using mixed case
7259         (Print_Standard): Use P_Float_Type for printing floating point types
7260         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7261         precision IEEE float.
7262
7263 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7264
7265         * sem_ch3.adb: Minor reformatting.
7266
7267 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7268
7269         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7270         the completion of a generic function, insert the new body rather than
7271         rewriting the original.
7272
7273 2011-08-01  Yannick Moy  <moy@adacore.com>
7274
7275         * sinfo.ads, errout.ads: Typos in comments.
7276
7277 2011-08-01  Robert Dewar  <dewar@adacore.com>
7278
7279         * par-endh.adb: Minor reformatting.
7280
7281 2011-08-01  Robert Dewar  <dewar@adacore.com>
7282
7283         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7284         (Pre_Post_Aspects): New subtype.
7285         * par-ch12.adb (P_Generic): New syntax for aspects in packages
7286         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7287         * par-ch7.adb (P_Package): Remove Decl parameter
7288         (P_Package): Handle new syntax for aspects (before IS)
7289         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7290         new aspect syntax
7291         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7292         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7293         (P_Package): Remove Decl parameter
7294         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7295         aspects
7296         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7297         specs
7298         * sem_util.ads, sem_util.adb (Static_Boolean): New function
7299         * sinfo.ads: Document new syntax for aspects in packages etc.
7300         * sprint.adb: Handle new syntax of aspects before IS in package
7301
7302 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7303
7304         * atree.ads: Minor reformatting.
7305         * sem_prag.adb: Minor reformatting.
7306
7307 2011-08-01  Robert Dewar  <dewar@adacore.com>
7308
7309         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7310         case expr alternative.
7311
7312 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7313
7314         * sem_ch12.adb: Fix typo.
7315
7316 2011-08-01  Geert Bosch  <bosch@adacore.com>
7317
7318         * sem_prag.adb (Check_No_Link_Name): New procedure.
7319         (Process_Import_Or_Interface): Use Check_No_Link_Name.
7320         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7321         instead of Standard_Long_Long_Float_Size global. Preparation for
7322         eventual removal of per type constants.
7323         * exp_util.ads (Get_Stream_Size): New function returning the stream
7324         size value of subtype E.
7325         * exp_util.adb (Get_Stream_Size): Implement new function.
7326         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7327         function.
7328         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7329         * einfo.adb:
7330         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7331
7332 2011-08-01  Geert Bosch  <bosch@adacore.com>
7333
7334         * cstand.adb: Fix comments.
7335         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7336         count of arguments.
7337
7338 2011-08-01  Robert Dewar  <dewar@adacore.com>
7339
7340         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7341
7342 2011-08-01  Geert Bosch  <bosch@adacore.com>
7343
7344         * atree.ads: Fix comment.
7345
7346 2011-08-01  Robert Dewar  <dewar@adacore.com>
7347
7348         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7349         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7350         * par.adb: Add with for Namet.Sp.
7351         * par-tchk.adb: Minor reformatting.
7352
7353 2011-08-01  Vincent Celier  <celier@adacore.com>
7354
7355         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7356         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7357         of the init procedure of a SAL.
7358         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7359         New procedure.
7360
7361 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7362
7363         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7364         reformatting.
7365
7366 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7367
7368         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7369
7370 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7371
7372         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7373         conformant with its spec (return True only for types that have
7374         an overriding Initialize primitive operation that prevents them from
7375         having preelaborable initialization).
7376         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7377         initialization for controlled types in Ada 2005 or later mode.
7378
7379 2011-08-01  Robert Dewar  <dewar@adacore.com>
7380
7381         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7382         Postcondition.
7383         (Same_Aspect): New function.
7384         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7385         Type_Invariant, Precondition, Postcondition.
7386         * snames.ads-tmpl: Add Name_Type_Invariant.
7387
7388 2011-08-01  Robert Dewar  <dewar@adacore.com>
7389
7390         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7391         here.
7392         (Freeze_All_Ent): Fix error in handling inherited aspects.
7393         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7394         already analyzed, but don't skip entire processing of a declaration,
7395         that's wrong in some cases of declarations being rewritten.
7396         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7397         Don't delay for integer, string literals
7398         Treat predicates in usual manner for delay, remove special case code,
7399         not needed.
7400         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7401         (Build_Predicate_Function): Update saved expression in aspect
7402         (Build_Invariant_Procedure): Update saved expression in aspect
7403         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7404         of replacement of discriminant references if the reference is simple.
7405
7406 2011-08-01  Robert Dewar  <dewar@adacore.com>
7407
7408         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7409         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7410         Static_Predicate and Dynamic_Predicate.
7411         (Build_Predicate_Function): Add processing for Static_Predicate
7412         and Dynamic_Predicate.
7413         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7414         (From_Static_Predicate): New flag
7415         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7416
7417 2011-08-01  Robert Dewar  <dewar@adacore.com>
7418
7419         * usage.adb: Documentation cleanup for Ada version modes in usage.
7420         * expander.adb: Minor reformatting.
7421
7422 2011-08-01  Robert Dewar  <dewar@adacore.com>
7423
7424         * atree.ads: Minor comment fix.
7425         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7426         a-witeio.ads, sem_prag.adb: Minor reformatting.
7427
7428 2011-08-01  Doug Rupp  <rupp@adacore.com>
7429
7430         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7431         pointers. Use descrip.h header file for convenience. Add some
7432         comments.
7433
7434 2011-08-01  Robert Dewar  <dewar@adacore.com>
7435
7436         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7437         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7438         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7439         New procedure.
7440         (Check_Aspect_At_End_Of_Declarations): New procedure
7441         (Analye_Aspect_Specification): Minor changes for above procedures
7442         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7443         specification node as well.
7444
7445 2011-08-01  Pascal Obry  <obry@adacore.com>
7446
7447         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7448         Windows files. Use GetFilesAttributes() in this case to check for file
7449         existence instead of returning with an error code.
7450
7451 2011-08-01  Vincent Celier  <celier@adacore.com>
7452
7453         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7454         High is above Source length.
7455
7456 2011-08-01  Robert Dewar  <dewar@adacore.com>
7457
7458         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7459
7460 2011-08-01  Robert Dewar  <dewar@adacore.com>
7461
7462         * aspects.ads (Boolean_Aspects): New subtype.
7463         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7464         for derived types in cases where the parent type and derived type have
7465         aspects.
7466         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7467         with aspects when parent type also has aspects.
7468         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7469         boolean expression at this point).
7470         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7471         accordance with final decision on the Ada 2012 feature.
7472         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7473
7474 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7475
7476         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7477
7478 2011-08-01  Pascal Obry  <obry@adacore.com>
7479
7480         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7481         Fix Replace_Slice when High is above current string size.
7482         (Replace_Slice): Fix DL computation when High is above current
7483         string length.
7484
7485 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7486
7487         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7488
7489 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7490
7491         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7492         of node.
7493
7494 2011-08-01  Pascal Obry  <obry@adacore.com>
7495
7496         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7497         reformatting.
7498
7499 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7500
7501         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7502         access to protected subprograms in generic bodies.
7503         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7504         protected type, indicate that the convention of the subprogram is
7505         Convention_Protected, because it may be used in subsequent declarations
7506         within the protected declaration.
7507
7508 2011-08-01  Vincent Celier  <celier@adacore.com>
7509
7510         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7511         and "final" procedures when the name of the library is "ada", to avoid
7512         duplicate symbols "adainit" and "adafinal" in executables.
7513
7514 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7515
7516         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7517         quantified expression that appears within a postcondition and uses the
7518         Ada2012 'Result attribute.
7519
7520 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7521
7522         * init.c (__gnat_error_handler): Cast reason to int.
7523         (__gnat_install_handler): Explain sa_sigaction use.
7524
7525 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7526
7527         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7528         subprogram has copy-in copy-out parameters, try to promote the mode of
7529         the return type if it is passed in registers.
7530
7531 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7532
7533         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7534         left operand as addressable.
7535
7536 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7537
7538         * gcc-interface/gigi.h (build_function_stub): Remove.
7539         (build_return_expr): Likewise.
7540         (convert_vms_descriptor): Declare.
7541         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7542         (build_function_stub): Move to...
7543         * gcc-interface/utils2.c (build_return_expr): Move to...
7544         * gcc-interface/trans.c (build_function_stub): ...here.
7545         (build_return_expr): ...here.
7546         (Subprogram_Body_to_gnu): Add local variable for language_function.
7547         Disconnect the parameter attributes cache, if any, once done with it.
7548         Call end_subprog_body only after setting the end_locus.
7549         Build the stub associated with the function, if any, at the very end.
7550         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7551         variables and streamline control flow.
7552
7553 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
7554
7555         PR ada/49819
7556         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7557         g-trasym-dwarf.adb.
7558
7559 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7560
7561         PR bootstrap/49794
7562         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7563         Assign to act.sa_sigaction.
7564         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7565         current->return_address to char * before arithmetic.
7566
7567 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7568
7569         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7570         Correct argument types.
7571         Extract code from reason.
7572         (__gnat_install_handler): Assign to act.sa_sigaction.
7573
7574 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
7575
7576         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7577         (GNAT1_OBJS): ...here.
7578
7579 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
7580
7581         PR ada/48711
7582         * g-socthi-mingw.adb (Fill): Fix formatting.
7583
7584         * gcc-interface/gigi.h: Move around comment.
7585
7586 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7587
7588         PR ada/46350
7589         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7590
7591 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
7592
7593         PR ada/48711
7594         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7595
7596 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
7597
7598         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7599         range comparison if Pmode is SImode.
7600
7601 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
7602             Eric Botcazou  <ebotcazou@adacore.com>
7603
7604         * adadecode.c: Wrap up in extern "C" block.
7605         * adadecode.h: Likewise.
7606         * adaint.c: Likewise.  Remove 'const' keyword.
7607         * adaint.h: Likewise.
7608         * argv.c: Likewise.
7609         * atree.h: Likewise.
7610         * cio.c: Likewise.
7611         * cstreams.c: Likewise.
7612         * env.c: Likewise.
7613         * exit.c: Likewise.
7614         * fe.h: Likewise.
7615         * final.c: Likewise.
7616         * init.c: Likewise.
7617         * initialize.c: Likewise.
7618         * link.c: Likewise.
7619         * namet.h: Likewise.
7620         * nlists.h: Likewise.
7621         * raise.c: Likewise.
7622         * raise.h: Likewise.
7623         * repinfo.h: Likewise.
7624         * seh_init.c: Likewise.
7625         * targext.c: Likewise.
7626         * tracebak.c: Likewise.
7627         * uintp.h: Likewise.
7628         * urealp.h: Likewise.
7629         * xeinfo.adb: Wrap up generated C code in extern "C" block.
7630         * xsinfo.adb: Likewise.
7631         * xsnamest.adb: Likewise.
7632         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7633         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7634         * gcc-interface/misc.c: Likewise.
7635         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7636         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
7637         ada/targext.o here...
7638         (GNAT_ADA_OBJS): ...and not here.
7639         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7640         (GNATBIND_OBJS): Reorder.
7641
7642 2011-07-07  Richard Henderson  <rth@redhat.com>
7643
7644         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7645         dwarf2out_frame_init.
7646
7647 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
7648
7649         * gcc-interface/misc.c (gnat_init): Tweak previous change.
7650
7651 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7652
7653         PR target/39150
7654         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7655
7656 2011-07-06  Richard Guenther  <rguenther@suse.de>
7657
7658         * gcc-interface/misc.c (gnat_init): Merge calls to
7659         build_common_tree_nodes and build_common_tree_nodes_2.
7660         Re-initialize boolean_false_node.
7661
7662 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
7663             Olivier Hainque  <hainque@adacore.com>
7664             Nicolas Setton  <setton@adacore.com>
7665
7666         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7667         the type according to the ARTIFICIAL_P parameter.
7668         (create_type_decl): Likewise.
7669         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7670
7671 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
7672
7673         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7674         (gnatbind): Likewise.
7675
7676 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7677
7678         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7679
7680 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7681
7682         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7683         local variable throughout.  Remove useless call to Base_Type.
7684         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7685         Take it also into account for the volatileness of the field.  Set the
7686         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
7687
7688 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7689
7690         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7691         on a dereference built for a by-ref object if it has an address clause.
7692
7693 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7694
7695         * einfo.ads (Address_Taken): Document use for the second argument of
7696         Asm_Input and Asm_Output attributes.
7697         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7698         argument is an entity name, then set Address_Taken on it.
7699         <Attribute_Asm_Output>: Likewise.
7700         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7701         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7702         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7703         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7704
7705 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
7706
7707         PR middle-end/46500
7708         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7709
7710 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
7711
7712         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7713         (ada/utils.o): Update dependencies.
7714         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7715         ../../../libcpp/libcpp.a.
7716         * gcc-interface/utils.c: Include common/common-target.h.
7717         (process_attributes): Use targetm_common.have_named_sections.
7718
7719 2011-06-07  Richard Guenther  <rguenther@suse.de>
7720
7721         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7722         set_sizetype.
7723
7724 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7725
7726         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7727         TREE_THIS_NOTRAP flag.
7728
7729 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7730
7731         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7732         Fix thinko.
7733
7734 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7735
7736         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7737         constants whose full view has discriminants specially.
7738
7739 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7740
7741         * gcc-interface/utils.c: Include diagnostic.h.
7742         (gnat_write_global_declarations): Output debug information for all
7743         global type declarations before finalizing the compilation unit.
7744         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7745
7746 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
7747
7748         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7749
7750 2011-05-25  Kai Tietz  <ktietz@redhat.com>
7751
7752         * adaint.c (__gnat_to_canonical_file_list_next): Use array
7753         initialization instead of const/none-const pointer assignment.
7754
7755 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
7756
7757         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7758         $(EXTRA_GNAT1_OBJS).
7759         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7760         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7761         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7762         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7763         libcommon-target.a instead of prefix.o.
7764
7765 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
7766
7767         PR ada/49097
7768         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7769
7770 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
7771
7772         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7773         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7774         instead of version.o.
7775
7776 2011-05-18  Kai Tietz <ktietz@redhat.com>
7777
7778         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7779         boolean_false_node instead of integer_zero_node.
7780         (convert_with_check): Likewise.
7781         * gcc-interface/decl.c (choices_to_gnu): Likewise.
7782
7783 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
7784
7785         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7786         type of the parameter is an unconstrained array, convert the actual to
7787         the type of the formal in the In Out and Out cases as well.
7788
7789 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
7790
7791         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7792         call build_function_type_array or build_varargs_function_type_array
7793         instead.
7794         (create_subprog_type): Don't call build_function_type; call
7795         build_function_type_vec instead.
7796
7797 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
7798
7799         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7800         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7801         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7802
7803 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
7804
7805         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7806
7807         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7808         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7809
7810 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
7811
7812         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7813
7814 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
7815
7816         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7817         instead of accessing TYPE_ARG_TYPES directly.
7818         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7819
7820 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
7821
7822         PR ada/48844
7823         * gcc-interface/gigi.h (get_variant_part): Declare.
7824         * gcc-interface/decl.c (get_variant_part): Make global.
7825         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7826         types have the same constant size, are record types and T1 has a
7827         variant part while T2 doesn't.
7828
7829 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
7830
7831         * gcc-interface/utils.c (begin_subprog_body): Do not call
7832         get_pending_sizes.
7833         (end_subprog_body): Likewise.
7834
7835 2011-05-04  Richard Guenther  <rguenther@suse.de>
7836
7837         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7838         int_const_binop.
7839         (pos_to_constructor): Likewise.
7840
7841 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
7842             Eric Botcazou  <ebotcazou@adacore.com>
7843
7844         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7845         of build_function_type.  Adjust calls to...
7846         (build_raise_check): ...this.  Do not take a void_tree parameter.
7847         Call build_function_type_list instead of build_function_type.
7848         Fix head comment and swap couple of conditional blocks.
7849
7850 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
7851
7852         * gnatvsn.ads (Library_Version): Bump to 4.7.
7853         (Current_Year): Bump to 2011.
7854
7855 2011-04-29  Michael Matz  <matz@suse.de>
7856
7857         * gcc-interface/misc.c (gnat_handle_option): Set
7858         warn_maybe_uninitialized.
7859
7860 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
7861
7862         * gnat_ugn.texi (Complexity Metrics Control): Update link to
7863         the Watson/McCabe paper.
7864
7865 2011-04-23  Jim Meyering  <meyering@redhat.com>
7866
7867         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7868
7869 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7870
7871         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7872         onto the new type.
7873
7874 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7875
7876         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7877         parameter.
7878         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
7879         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7880         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7881         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7882         <all>: Do not set flags on the reused DECL node coming from an alias.
7883         Set DECL_IGNORED_P on the DECL node built for subprograms if they
7884         don't need debug info here...
7885         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7886         (gigi): Adjust calls to create_subprog_decl.
7887         (build_raise_check): Likewise.
7888         (establish_gnat_vms_condition_handler): Likewise.
7889         (Compilation_Unit_to_gnu): Likewise.
7890         (gnat_to_gnu): Likewise.
7891
7892 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
7893
7894         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7895         (NO_REORDER_ADAFLAGS): New variable.
7896         (EXTRA_GNATTOOLS): Always define.
7897         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7898         Clean up and adjust list of files compiled with special options.
7899         * gcc-interface/Make-lang.in: Likewise.
7900         (ada/decl.o): Cosmetical change.
7901         (ada/misc.o): Remove dependency on $(PLUGIN_H).
7902
7903 2011-04-20  Jim Meyering  <meyering@redhat.com>
7904
7905         * initialize.c (__gnat_initialize): Remove useless if-before-free.
7906
7907 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
7908
7909         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7910         $(CFLAGS) on the link line.
7911
7912 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
7913
7914         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7915         padded type built for the return type if it is unconstrained.
7916
7917 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
7918
7919         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7920
7921 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
7922
7923         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7924         before calling TREE_CHAIN.
7925         * gcc-interface/misc.c (gnat_init_ts): New function.
7926         (LANG_HOOKS_INIT_TS): Define.
7927
7928 2011-04-12  Martin Jambor  <mjambor@suse.cz>
7929
7930         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7931         instead of cgraph_node.
7932
7933 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7934
7935         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7936         alignment on fields of the RETURN type built for the Copy-In Copy-Out
7937         mechanism.
7938
7939 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7940
7941         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7942         of aggregate types that contain a placeholder.
7943
7944 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
7945
7946         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7947         TYPE_ARG_TYPES.
7948         (handle_type_generic_attribute): Likewise.
7949
7950 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
7951
7952         PR ada/47163
7953         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7954
7955 2011-04-04  Kai Tietz  <ktietz@redhat.com>
7956
7957         PR ada/47163
7958         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7959         to flag value.
7960
7961 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7962
7963         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7964         type case, do not strip a padding type around the array type.
7965
7966 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7967
7968         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7969         types.
7970
7971 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7972
7973         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7974         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7975         code for -feliminate-unused-debug-types.
7976         (gnat_post_options): Likewise.
7977
7978 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7979
7980         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7981         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7982         distinct copy.
7983
7984 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7985
7986         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7987         DECL_ARTIFICIAL flag on enumeration types.
7988
7989 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7990
7991         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7992         fat pointer types artificial unconditionally.
7993         <E_Array_Subtype>: Attach the base array type as a parallel type if it
7994         isn't artificial.
7995
7996 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7997
7998         * gcc-interface/gigi.h (get_dummy_type): Declare.
7999         (build_dummy_unc_pointer_types): Likewise.
8000         (finish_fat_pointer_type): Likewise.
8001         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8002         fat pointer type has been built, complete it in place.
8003         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8004         and thin pointers.  Remove useless variable.
8005         (finish_fat_pointer_type): Make global and move to...
8006         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8007         (get_dummy_type): New function.
8008         (build_dummy_unc_pointer_types): Likewise.
8009         (gnat_pushdecl): Propage the name to the anonymous variants only.
8010         (update_pointer_to): Only adjust the pointer types in the unconstrained
8011         array case.
8012
8013 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8014
8015         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8016         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8017         if this is a Taft amendment type and the full declaration is available.
8018         * gcc-interface/trans.c (process_type): Likewise.
8019         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8020         (process_freeze_entity): Likewise.
8021         * gcc-interface/utils.c (dummy_global): New static variable.
8022         (gnat_write_global_declarations): If there are types declared as used
8023         at the global level, insert them in the global hash table.
8024
8025 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8026
8027         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8028         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8029         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8030         copy.
8031         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
8032         flag of the type accordingly.
8033         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8034
8035 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8036
8037         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8038         finalizing types when updating the pointers to the designated type.
8039         <all>: Finalize the deferred types even if we didn't defer processing
8040         of incomplete types in this invocation.
8041
8042 2011-04-01  Olivier Hainque  <hainque@adacore.com>
8043             Nicolas Setton  <setton@adacore.com>
8044             Eric Botcazou  <ebotcazou@adacore.com>
8045
8046         * gcc-interface/misc.c (gnat_descriptive_type): New function.
8047         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8048
8049 2011-03-28  Kai Tietz  <ktietz@redhat.com>
8050
8051         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8052         Windows targets.
8053         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8054         * system-mingw.ads (System): Change ZCX_By_Default default to True.
8055
8056         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8057
8058 2011-03-28  Tristan Gingold  <gingold@adacore.com>
8059
8060         PR ada/44431
8061         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8062         Use ada output of gnatbind.
8063         (ada/b_gnatb.adb): Ditto.
8064         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8065         (ada.mostlyclean, ada.stage1)
8066         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8067         (ada.stagefeedback): Adjust.
8068         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8069         Use ada output of gnatbind.
8070         (b_gnatm.adb): Ditto.
8071         (b_gnatl.o, b_gnatm.o): New rules.
8072
8073 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8074
8075         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8076         for the padded type built to support a specified size or alignment.
8077
8078 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8079
8080         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8081         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8082         unconditionally to the end of the unit when the designated type is
8083         limited_with'ed.
8084         <all>: Rename local variable.  Attempt to un-defer types only and do it
8085         for limited_with'ed types as well.
8086         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
8087         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8088         consistently and remove redundant call to finalize_from_with_types.
8089
8090 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8091
8092         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8093         subprograms without a previous spec declared in the same unit.
8094         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8095         subprograms at the end of the unit instead of at the beginning.
8096         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8097         isn't public for the special handling of non-inline functions nested
8098         inside inline external functions.
8099
8100 2011-03-25  Jeff Law  <law@redhat.com>
8101
8102         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8103
8104 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
8105
8106         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8107         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8108         to compute Set_Size_Depends_On_Discriminant.
8109         (Layout_Type): Call it on array types in back-end layout mode.
8110         * sem_util.adb (Requires_Transient_Scope): Return true for array
8111         types only if the size depends on the value of discriminants.
8112         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8113         type if the RHS is a call to a function that returns an unconstrained
8114         type with default discriminant.
8115
8116 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
8117
8118         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8119         non-conversion to the nominal result type at the end.
8120
8121 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8122
8123         * gcc-interface/trans.c (create_temporary): New function taken from...
8124         (create_init_temporary): ...here.  Call it.
8125         (call_to_gnu): Create the temporary for the return value early, if any.
8126         Create it for a function with copy-in/copy-out parameters if there is
8127         no target; in other cases of copy-in/copy-out, use another temporary.
8128         Push the new binding level lazily.  Add and rename local variables.
8129
8130 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8131
8132         * gcc-interface/decl.c (validate_size): Improve comments and tweak
8133         error message.
8134         (set_rm_size): Likewise.
8135
8136 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8137
8138         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8139         for the padded type built in order to support a specified alignment.
8140         Fix incorrect formatting.
8141
8142 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8143
8144         PR bootstrap/48216
8145         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8146
8147 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8148
8149         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8150         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8151         to the end of the list.  Adjust recursive call.  Rename local variable.
8152         If REORDER is true, reorder components of the record type.
8153         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8154         components_to_record and adjust the parameter list.
8155
8156 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8157
8158         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8159         disabled, use the variable for bounds of loop iteration scheme.
8160
8161 2011-03-21  Kai Tietz  <ktietz@redhat.com>
8162
8163         PR target/12171
8164         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8165
8166 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8167
8168         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8169         out whether the expression is read-only.  Short-circuit placeholder
8170         case and rename a couple of local variables.
8171
8172 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8173
8174         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8175         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8176         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8177         (convert): Deal with conversions from a smaller form type specially.
8178
8179 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
8180
8181         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8182         its argument, except for the special -I- switch.
8183
8184 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
8185
8186         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8187         "Ada Issues".
8188
8189 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
8190
8191         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8192
8193 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
8194
8195         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8196         GNAT_FORMAL.
8197         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8198         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
8199         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
8200         Do not generate the check directly, instead instantiate the template
8201         check present in the descriptor.
8202         (make_descriptor_field): Move around.
8203         (build_vms_descriptor32): Build a template check in the POINTER field.
8204         (build_vms_descriptor): Remove useless suffixes.
8205         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8206
8207 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
8208
8209         PR bootstrap/47467
8210         * targext.c: Include target files if IN_RTS is defined.
8211
8212 2011-01-26  Richard Guenther  <rguenther@suse.de>
8213
8214         PR bootstrap/47467
8215         * targext.c: Include config.h.
8216         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8217         dependency.
8218
8219 2011-01-04  Pascal Obry  <obry@adacore.com>
8220             Eric Botcazou  <ebotcazou@adacore.com>
8221
8222         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8223
8224 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8225
8226         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8227         end-of-case on the end label and its associated gotos, if any.
8228
8229 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8230
8231         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8232         expressions of the parameter cache within the statement group of
8233         the CICO mechanism.
8234
8235 2011-01-04  Olivier Hainque  <hainque@adacore.com>
8236             Eric Botcazou  <ebotcazou@adacore.com>
8237
8238         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8239         (set_end_locus_from_node): New function.
8240         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8241         make and the function end_locus.
8242         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8243         for the elaboration subprogram.
8244         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8245         set the end_locus of the expression as well.
8246
8247 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8248
8249         PR ada/47131
8250         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8251         variables that are referenced in exception handlers volatile.
8252
8253
8254 \f
8255 Copyright (C) 2011 Free Software Foundation, Inc.
8256
8257 Copying and distribution of this file, with or without modification,
8258 are permitted in any medium without royalty provided the copyright
8259 notice and this notice are preserved.
8260
8261         * gnat_rm.texi: Ramification of pragma Eliminate documentation
8262          - fix bugs in the description of Source_Trace;
8263          - get rid of UNIT_NAME;
8264
8265 2011-08-02  Javier Miranda  <miranda@adacore.com>
8266
8267         * exp_ch9.adb
8268         (Build_Dispatching_Requeue): Adding support for VM targets
8269         since we cannot directly reference the Tag entity.
8270         * exp_sel.adb (Build_K): Adding support for VM targets.
8271         (Build_S_Assignment): Adding support for VM targets.
8272         * exp_disp.adb
8273         (Default_Prim_Op_Position): In VM targets do not restrict availability
8274         of predefined interface primitives to compiling in Ada 2005 mode.
8275         (Is_Predefined_Interface_Primitive): In VM targets this service is not
8276         restricted to compiling in Ada 2005 mode.
8277         (Make_VM_TSD): Generate code that declares and initializes the OSD
8278         record. Needed to support dispatching calls through synchronized
8279         interfaces.
8280         * exp_ch3.adb
8281         (Make_Predefined_Primitive_Specs): Enable generation of predefined
8282         primitives associated with synchronized interfaces.
8283         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8284         primitives associated with synchronized interfaces.
8285
8286 2011-08-02  Yannick Moy  <moy@adacore.com>
8287
8288         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8289         statements hidden in SPARK if preceded by the HIDE directive
8290         (Parse_Exception_Handlers): mark each exception handler in a sequence of
8291         exception handlers as hidden in SPARK if preceded by the HIDE directive
8292         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8293         if starting with the HIDE directive
8294         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8295         starting with the HIDE directive; mark the declarations in a private
8296         part as hidden in SPARK if the private part starts with the HIDE
8297         directive
8298         * restrict.adb, restrict.ads
8299         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8300         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8301         argument node belongs to a part which is hidden in SPARK
8302         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8303         parts in SPARK; protect the possibly costly call to
8304         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8305         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8306         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8307         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8308         Tok_SPARK_Hide.
8309         (Scan): recognize special comment starting with '#' and followed by
8310         SPARK keyword "hide" as a HIDE directive.
8311
8312 2011-08-02  Yannick Moy  <moy@adacore.com>
8313
8314         * types.ads, erroutc.ads: Minor reformatting.
8315
8316 2011-08-02  Vincent Celier  <celier@adacore.com>
8317
8318         * link.c: Add response file support for cross platforms.
8319
8320 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8321
8322         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8323         in an association, set parent field of copy before partial analysis.
8324         * sem_res.adb (Resolve_Slice): create reference to itype only when
8325         expansion is enabled.
8326
8327 2011-08-02  Yannick Moy  <moy@adacore.com>
8328
8329         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8330         for new flag denoting which subprogram bodies are in ALFA
8331         * restrict.adb, sem_ch7.adb: Update comment
8332         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8333         sem_ch9.adb, sem_res.adb: Add calls to
8334         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8335         * sem_ch6.adb (Analyze_Function_Return): add calls to
8336         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8337         middle of the body, and extended return.
8338         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8339         False when missing return.
8340         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8341         to True for subprograms whose spec is in ALFA. Remove later on the flag
8342         on the entity used for a subprogram body when there exists a separate
8343         declaration.
8344         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8345         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8346         False, otherwise do nothing.
8347
8348 2011-08-02  Robert Dewar  <dewar@adacore.com>
8349
8350         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8351
8352 2011-08-02  Yannick Moy  <moy@adacore.com>
8353
8354         * sem_ch4.ads: minor formatting.
8355
8356 2011-08-02  Yannick Moy  <moy@adacore.com>
8357
8358         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8359         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8360         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8361         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8362         opt.ads: cleanup of SPARK mode
8363
8364 2011-08-02  Yannick Moy  <moy@adacore.com>
8365
8366         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8367         types.
8368         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8369         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8370         * sem_ch3.adb
8371         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8372         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8373         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8374         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8375         types.
8376         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8377         non-static range.
8378         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8379         functions whose return type is not in ALFA.
8380         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8381         specifications.
8382         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8383         parameter's type is not in ALFA.
8384         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8385         types are in ALFA.
8386
8387 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8388
8389         * sem_ch6 (Analyze_Expression_Function): treat the function as
8390         Inline_Always, and introduce a subprogram declaration for it when it is
8391         not a completion.
8392         * inline.adb (Add_Inlined_Body): recognize bodies that come from
8393         expression functions, so that the back-end can determine whether they
8394         can in fact be inlined.
8395         * sem_util.adb (Is_Expression_Function): predicate to determine whether
8396         a function body comes from an expression function.
8397
8398 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8399
8400         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8401         null exclusions to test Can_Never_Be_Null on the anonymous access types
8402         of the formals rather than testing the formals themselves. Exclude this
8403         check in cases where the Old_Formal is marked as a controlling formal,
8404         to avoid issuing spurious errors for bodies completing dispatching
8405         operations (due to the flag not getting set on controlling access
8406         formals in body specs).
8407         (Find_Corresponding_Spec): When checking full and subtype conformance of
8408         subprogram bodies in instances, pass Designated and E in that order, for
8409         consistency with the expected order of the formals (New_Id followed by
8410         Old_Id).
8411
8412 2011-08-02  Robert Dewar  <dewar@adacore.com>
8413
8414         * sem_ch8.adb: Minor reformatting.
8415
8416 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8417
8418         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8419         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8420         primitive operations of class-wide actuals.
8421
8422 2011-08-02  Javier Miranda  <miranda@adacore.com>
8423
8424         * exp_atag.ads, exp_atag.adb
8425         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8426         since its value is implicitly passed in argument Typ.
8427         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8428         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8429         Build_Common_Dispatching_Select_Statements.
8430
8431 2011-08-02  Robert Dewar  <dewar@adacore.com>
8432
8433         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8434         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8435         Minor reformatting.
8436
8437 2011-08-02  Robert Dewar  <dewar@adacore.com>
8438
8439         * sem_res.adb: Minor reformatting.
8440         * sem_prag.adb: Minor reformatting.
8441
8442 2011-08-02  Javier Miranda  <miranda@adacore.com>
8443
8444         * exp_atag.adb, exp_atags.ads
8445         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8446         by the tagged type Entity. Required to use this routine in the VM
8447         targets since we do not have available the Tag entity in the VM
8448         platforms.
8449         * exp_ch6.adb
8450         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8451         Ada.Tags has not been previously loaded.
8452         * exp_ch7.adb
8453         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8454         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8455         * sem_aux.adb
8456         (Enclosing_Dynamic_Scope): Add missing support to handle the full
8457         view of enclosing scopes. Required to handle enclosing scopes that
8458         are synchronized types whose full view is a task type.
8459         * exp_disp.adb
8460         (Build_VM_TSDs): Minor code improvement to avoid generating and
8461         analyzing lists with empty nodes.
8462         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8463         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8464         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8465         (Make_Disp_Timed_Select_Body): Add support for VM targets.
8466         (Make_Select_Specific_Data_Table): Add support for VM targets.
8467         (Make_VM_TSD): Generate code to initialize the SSD structure of
8468         the TSD.
8469
8470 2011-08-02  Yannick Moy  <moy@adacore.com>
8471
8472         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8473         cross-references section in ALI.
8474         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8475         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8476         Sub).
8477         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8478         subprogram or package entity of a node
8479         (Is_Local_Reference_Type): new function returns True for references
8480         selected in local cross-references.
8481         (Lt): function extracted from Lt in Output_References
8482         (Write_Entity_Name): function extracted from Output_References
8483         (Generate_Definition): generate reference with type 'D' for definition
8484         of objects (object declaration and parameter specification), with
8485         appropriate locations and units, for use in local cross-references.
8486         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8487         references of type 'I' for initialization in object definition.
8488         (Output_References): move part of function Lt and procedure
8489         Write_Entity_Name outside of the body. Ignore references of types 'D'
8490         and 'I' introduced for local cross-references.
8491         (Output_Local_References): new procedure to output the local
8492         cross-references sections.
8493         (Lref_Entity_Status): new array defining whether an entity is a local
8494         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8495         with 'I' type when initialization expression is present.
8496         * get_scos.adb, get_scos.ads: Correct comments and typos
8497
8498 2011-08-02  Javier Miranda  <miranda@adacore.com>
8499
8500         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8501         the JVM target.
8502         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8503         the JVM target.
8504         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8505         TSD support.
8506
8507 2011-08-02  Vincent Celier  <celier@adacore.com>
8508
8509         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8510         (No_Space_Img): New function
8511         (Find_Excluded_Sources): When reading from a file, record the file name
8512         and the line number for each excluded source.
8513         (Mark_Excluded_Sources): When reporting an error, if the excluded
8514         sources were read from a file, include file name and line number in
8515         the error message.
8516
8517 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8518
8519         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8520
8521 2011-08-02  Robert Dewar  <dewar@adacore.com>
8522
8523         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8524
8525 2011-08-02  Javier Miranda  <miranda@adacore.com>
8526
8527         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8528         generation of TSDs to the DOTNET compiler.
8529         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8530         generation of TSDs to the DOTNET compiler.
8531
8532 2011-08-02  Javier Miranda  <miranda@adacore.com>
8533
8534         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8535         record of all the tagged types declared inside library level package
8536         declarations, library level package bodies or library level subprograms.
8537         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8538         associated with a given tagged type.
8539         (Build_VM_TSDs): New subprogram.
8540         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8541         compilation units that are subprograms.
8542         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8543         compilation units that are package bodies.
8544         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8545         units that are a package declaration or a package instantiation.
8546         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8547         reorganization to improve the error generated by the frontend when the
8548         function Ada.Tags.Secondary_Tag is not available.
8549         * rtsfind.ads (RE_Register_TSD): New runtime entity.
8550         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8551
8552 2011-08-02  Javier Miranda  <miranda@adacore.com>
8553
8554         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8555
8556 2011-08-02  Robert Dewar  <dewar@adacore.com>
8557
8558         * s-imenne.ads: Minor reformatting.
8559
8560 2011-08-02  Robert Dewar  <dewar@adacore.com>
8561
8562         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8563         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8564         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8565
8566 2011-08-02  Robert Dewar  <dewar@adacore.com>
8567
8568         * einfo.ads (Materialize_Entity): Document this is only for renamings
8569         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8570         required debug information in the case where we transform the object
8571         declaration into a renaming declaration.
8572         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8573         object
8574         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8575         Materialize_Entity.
8576
8577 2011-08-02  Robert Dewar  <dewar@adacore.com>
8578
8579         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8580         Suppress_Init_Procs.
8581         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8582         Suppress_Initialization/Initialization_Suppressed.
8583         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8584         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8585         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8586         * sem_prag.adb: New processing for pragma Suppress_Initialization.
8587
8588 2011-08-02  Robert Dewar  <dewar@adacore.com>
8589
8590         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8591         Minor reformatting.
8592
8593 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8594
8595         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8596         only have inheritable classwide pre/postconditions.
8597
8598 2011-08-02  Javier Miranda  <miranda@adacore.com>
8599
8600         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8601         * rtsfind.ads (RE_Check_TSD): New runtime entity.
8602         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8603         checks if the external tag of a type is the same as the external tag
8604         of some other declaration.
8605
8606 2011-08-02  Thomas Quinot  <quinot@adacore.com>
8607
8608         * s-taskin.ads: Minor reformatting.
8609
8610 2011-08-02  Emmanuel Briot  <briot@adacore.com>
8611
8612         * g-comlin.adb (Display_Help): swap the order in which it prints the
8613         short help and the general usage.
8614
8615 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8616
8617         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8618         the aspect declarations and attach them to the generic copy for
8619         subsequent analysis.
8620         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8621         declarations of the generic tree to the new subprogram declarations.
8622         * sem_attr.adb (Check_Precondition_Postcondition): recognize
8623         conditions that apply to a subprogram instance.
8624
8625 2011-08-02  Robert Dewar  <dewar@adacore.com>
8626
8627         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8628
8629 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8630
8631         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8632         private type with a tagged full view is not derived in the immediate
8633         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8634
8635 2011-08-02  Robert Dewar  <dewar@adacore.com>
8636
8637         * exp_ch4.adb: Minor reformatting.
8638
8639 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8640
8641         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
8642         Ada2012 iterator, the loop will be rewritten during expansion into a
8643         while loop with a cursor and an element declaration. Do not analyze the
8644         body in this case, because if the container is for indefinite types the
8645         actual subtype of the elements will only be determined when the cursor
8646         declaration is analyzed.
8647
8648 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8649
8650         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8651         size/alignment related attributes in CodePeer_Mode.
8652
8653 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8654
8655         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8656         Prepend_Element, since this can result in the operation getting the
8657         wrong slot in the full type's dispatch table if the full type has
8658         inherited operations. The incomplete type's operation will get added
8659         to the proper position in the full type's primitives
8660         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8661         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8662         dispatching operations, since there are cases where nonprimitive
8663         subprograms can get added to the list of incomplete dependents (such
8664         as subprograms in nested packages).
8665         * sem_ch6.adb (Process_Formals): First, remove test for being in a
8666         private part when determining whether to add a primitive with a
8667         parameter of a tagged incomplete type to the Private_Dependents list.
8668         Such primitives can also occur in the visible part, and should not have
8669         been excluded from being private dependents.
8670         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8671         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8672         list of a Taft-amendment incomplete type is a primitive before issuing
8673         an error that the full type must appear in the same unit. There are
8674         cases where nonprimitives can be in the list (such as subprograms in
8675         nested packages).
8676         * sem_disp.adb (Derives_From): Use correct condition for checking that
8677         a formal's type is derived from the type of the corresponding formal in
8678         the parent subprogram (the condition was completely wrong). Add
8679         checking that was missing for controlling result types being derived
8680         from the result type of the parent operation.
8681
8682 2011-08-02  Yannick Moy  <moy@adacore.com>
8683
8684         * errout.adb (First_Node): minor renaming
8685         * restrict.adb (Check_Formal_Restriction): put restriction warning on
8686         first node.
8687
8688 2011-08-02  Yannick Moy  <moy@adacore.com>
8689
8690         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8691         before accessing operands.
8692         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8693         decide whether an initialization expression respects SPARK rules, as
8694         the plain node is the expanded one. This allows for more valid warnings
8695         to be issued.
8696         * gnat_rm.texi: Minor update.
8697
8698 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8699
8700         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8701         previous change.
8702
8703 2011-08-02  Robert Dewar  <dewar@adacore.com>
8704
8705         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8706
8707 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8708
8709         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8710         loop statements and the element renaming declaration with a block when
8711         the element type is controlled.
8712
8713 2011-08-02  Yannick Moy  <moy@adacore.com>
8714
8715         * sinfo.ads: Minor formatting.
8716
8717 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8718
8719         * sem_aggr.adb (Add_Association): if the association has a box and no
8720         expression, use the Sloc of the aggregate itself for the new
8721         association.
8722         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8723         the Original_Node.
8724
8725 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8726
8727         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8728         When a container is provided via a function call, generate a renaming
8729         of the function result. This avoids the creation of a transient scope
8730         and the premature finalization of the container.
8731         * exp_ch7.adb (Is_Container_Cursor): Removed.
8732         (Wrap_Transient_Declaration): Remove the supression of the finalization
8733         of the list controller when the declaration denotes a container cursor,
8734         it is not needed.
8735
8736 2011-08-02  Yannick Moy  <moy@adacore.com>
8737
8738         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8739         node is from source, instead of the original node being from source.
8740         * sem_aggr.adb
8741         (Resolve_Array_Aggregate): refine the check for a static expression, to
8742         recognize also static ranges
8743         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8744         Array_Type_Declaration): postpone the test for the type being a subtype
8745         mark after the type has been resolved, so that component-selection and
8746         expanded-name are discriminated.
8747         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8748         to distinguish the case of an iteration scheme, so that an error is
8749         issed on a non-static range in SPARK except in an iteration scheme.
8750         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8751         In_Iter_Schm = True.
8752         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8753         user-defined operators so that they are allowed in renaming
8754         * sem_ch8.adb
8755         (Find_Selected_Component): refine the check for prefixing of operators
8756         so that they are allowed in renaming. Move the checks for restrictions
8757         on selector name after analysis discriminated between
8758         component-selection and expanded-name.
8759         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8760         concatenation argument of string type if it is static.
8761         * sem_util.adb, sem_util.ads
8762         (Check_Later_Vs_Basic_Declarations): add a new function
8763         Is_Later_Declarative_Item to decice which declarations are allowed as
8764         later items, in the two different modes Ada 83 and SPARK. In the SPARK
8765         mode, add that renamings are considered as later items.
8766         (Enclosing_Package): new function to return the enclosing package
8767         (Enter_Name): correct the rule for homonyms in SPARK
8768         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8769         from source (result of expansion) to avoid issuing wrong warnings.
8770
8771 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8772
8773         * errout.adb: On anything but an expression First_Node returns its
8774         argument.
8775
8776 2011-08-02  Pascal Obry  <obry@adacore.com>
8777
8778         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8779
8780 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8781
8782         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8783         Set the associated loop as the related expression of internally
8784         generated cursors.
8785         * exp_ch7.adb (Is_Container_Cursor): New routine.
8786         (Wrap_Transient_Declaration): Supress the finalization of the list
8787         controller when the declaration denotes a container cursor.
8788
8789 2011-08-02  Yannick Moy  <moy@adacore.com>
8790
8791         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8792         command line now.
8793         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8794         expression is a simple expression. This check cannot be performed in
8795         the semantics, so just drop it.
8796         (P_Index_Or_Discriminant_Constraint): move check that the index or
8797         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8798         semantics. Other cases were previously checked in the semantics.
8799         * par-ch4.adb (P_Name): move checks that a selector name is not
8800         character literal or an operator symbol to Find_Selected_Component in
8801         the semantics
8802         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8803         declarations are not placed after later declarations in a separate
8804         procedure in Sem_Util (possibly not the best choice?), to be used both
8805         during parsing, for Ada 83 mode, and during semantic analysis, for
8806         SPARK mode.
8807         * par-endh.adb (Check_End): move check that end label is not missing
8808         to Process_End_Label in the semantics
8809         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8810         the special case for SPARK restriction
8811         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8812         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8813         parameter Force to issue the error message even on internal node (used
8814         for generated end label). Call Check_Restriction to check when an error
8815         must be issued. In SPARK mode, issue an error message even if the
8816         restriction is not set.
8817         (Check_Restriction): new procedure with an additional out parameter to
8818         inform the caller that a message has been issued
8819         * sem_aggr.adb: Minor modification of message
8820         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8821         instead of issuing an error message directly
8822         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8823         declarations are not placed after later declarations, by calling
8824         Check_Later_Vs_Basic_Declarations
8825         (Analyze_Subtype_Declaration): move here the check that an index or
8826         discriminant constraint must be a subtype mark. Change the check that
8827         a subtype of String must start at one so that it works on subtype marks.
8828         * sem_ch4.adb (Analyze_Call): move here the check that a named
8829         association cannot follow a positional one in a call
8830         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8831         instead of issuing an error message directly
8832         * sem_ch8.adb (Find_Selected_Component): move here the check that a
8833         selector name is not a character literal or an operator symbol. Move
8834         here the check that the prefix of an expanded name cannot be a
8835         subprogram or a loop statement.
8836         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8837         procedure called from parsing and semantics to check that basic
8838         declarations are not placed after later declarations
8839         (Process_End_Label): move here the check that end label is not missing
8840
8841 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8842
8843         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8844         representation clause in codepeer mode, since it confuses CodePeer and
8845         does not bring useful info.
8846
8847 2011-08-02  Ed Falis  <falis@adacore.com>
8848
8849         * init.c: initialize fp hw on MILS.
8850
8851 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8852
8853         * errout.adb (First_Node): for bodies, return the node itself (small
8854         optimization). For other nodes, do not check source_unit if the node
8855         comes from Standard.
8856
8857 2011-08-02  Robert Dewar  <dewar@adacore.com>
8858
8859         * exp_ch3.adb: Minor comment additions.
8860         * sem_ch13.adb: Minor reformatting.
8861
8862 2011-08-02  Pascal Obry  <obry@adacore.com>
8863
8864         * make.adb, makeutl.adb: Removes some superfluous directory separator.
8865
8866 2011-08-02  Robert Dewar  <dewar@adacore.com>
8867
8868         * sem_attr.adb: Minor reformatting.
8869
8870 2011-08-02  Robert Dewar  <dewar@adacore.com>
8871
8872         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8873         (Has_Default_Component_Value): Removed
8874         * einfo.ads Comment updates
8875         (Has_Default_Aspect): Replaces Has_Default_Value
8876         (Has_Default_Component_Value): Removed
8877         * exp_ch13.adb
8878         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8879         * exp_ch3.adb
8880         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8881         (Get_Simple_Init_Val): Handle Default_Value aspect
8882         (Needs_Simple_Initialization): Handle Default_Value aspect
8883         * exp_ch3.ads: Needs_Simple_Initialization
8884         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8885         * par-prag.adb (Pragma_Default[_Component]Value) Removed
8886         * sem_ch13.adb
8887         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8888         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8889         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8890
8891 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8892
8893         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8894         package containing iteration primitives.
8895         exp_ch5.adb (Expand_Iterator_Loop): ditto.
8896
8897 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8898
8899         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8900         "of", pre-analyze expression in case it is a function call with
8901         finalization actions that must be placed ahead of the loop.
8902         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8903         on an Ada2012 iterator, insert them ahead of the rewritten loop.
8904
8905 2011-08-02  Geert Bosch  <bosch@adacore.com>
8906
8907         * cstand.adb (Create_Float_Types): Only consider C's long double for
8908         Long_Long_Float, in addition to double.
8909
8910 2011-08-02  Robert Dewar  <dewar@adacore.com>
8911
8912         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8913         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8914         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8915         Minor reformatting.
8916
8917 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8918
8919         * sem_attr.adb: handle properly 'Result when it is a prefix of an
8920         indexed component.
8921
8922 2011-08-02  Javier Miranda  <miranda@adacore.com>
8923
8924         * einfo.ads, einfo.adb
8925         (Original_Access_Type): Move this attribute to Node26 since there was
8926         an undocumented use of Node21 in E_Access_Subprogram_Type entities
8927         which causes conflicts and breaks the generation of the .NET compiler.
8928         (Interface_Name): Add missing documentation on JGNAT only uses of
8929         this attribute.
8930
8931 2011-08-02  Geert Bosch  <bosch@adacore.com>
8932
8933         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8934         (Find_Back_End_Float_Type): Likewise
8935         (Create_Back_End_Float_Types): Likewise
8936         (Create_Float_Types): Likewise
8937         (Register_Float_Type): Likewise
8938         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8939         Nlist and split out type selection in new local Find_Base_Type function.
8940         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8941         Nlist
8942         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8943
8944 2011-08-02  Robert Dewar  <dewar@adacore.com>
8945
8946         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8947         alpha order).
8948         * opt.ads: Minor comment change.
8949         * sem_ch12.adb: Minor code reorganization.
8950
8951 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8952
8953         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8954         subtype's list of rep items to the list on the full subtype in the case
8955         where the lists are the same.
8956
8957 2011-08-02  Geert Bosch  <bosch@adacore.com>
8958
8959         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8960         using the one from System.Strings, which also deallocates all strings.
8961
8962 2011-08-02  Geert Bosch  <bosch@adacore.com>
8963
8964         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8965         function.
8966         * gcc-interface/Make-lang.in: Update dependencies.
8967
8968 2011-08-02  Olivier Hainque  <hainque@adacore.com>
8969
8970         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8971         end_locus.
8972
8973 2011-08-02  Javier Miranda  <miranda@adacore.com>
8974
8975         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8976         associated with anonymous access to subprograms.
8977
8978 2011-08-02  Geert Bosch  <bosch@adacore.com>
8979
8980         * opt.ads
8981         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8982         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8983         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8984         (Add_Symbol_Definition): Move to switch-c.adb
8985         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8986         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8987         (Add_Symbol_Definition): Move to switch-c.adb.
8988         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8989         * sem_warn.adb
8990         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8991         Move to warnsw.adb.
8992         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8993         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8994         Move to warnsw.adb.
8995         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8996         (Add_Symbol_Definition): Moved from Prepcomp.
8997         * switch-c.ads: Update copyright notice. Use String_List instead of
8998         Argument_List, removing dependency on System.OS_Lib.
8999
9000 2011-08-02  Yannick Moy  <moy@adacore.com>
9001
9002         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9003         mode on initialization expression which does not respect SPARK
9004         restrictions.
9005         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9006         if the tree referenced by its argument represents an initialization
9007         expression in SPARK, suitable for initializing an object in an object
9008         declaration.
9009
9010 2011-08-02  Javier Miranda  <miranda@adacore.com>
9011
9012         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9013         internally generated access to subprogram with its associated protected
9014         subprogram type.
9015         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9016
9017 2011-08-02  Geert Bosch  <bosch@adacore.com>
9018
9019         * cstand.adb (Register_Float_Type): Print information about type to
9020         register, if the Debug_Flag_Dot_B is set.
9021         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9022         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9023         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9024         with a requested precision of more than Max_Digits digits and no more
9025         than Max_Base_Digits digits, if a range specification is present and the
9026         Predefined_Float_Types list has a suitable type to derive from.
9027         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9028         case of type completion with pragma Import
9029         * sem_prag.adb
9030         (Process_Import_Predefined_Type): Processing to complete a type
9031         with pragma Import. Currently supports floating point types only.
9032         (Set_Convention_From_Pragma): Do nothing without underlying type.
9033         (Process_Convention): Guard against absence of underlying type,
9034         which may happen when importing incomplete types.
9035         (Process_Import_Or_Interface): Handle case of importing predefined
9036         types. Tweak error message.
9037
9038 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9039
9040         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9041         functions to previous change.  Reorganize code slightly.
9042
9043 2011-08-02  Geert Bosch  <bosch@adacore.com>
9044
9045         * back_end.ads (Register_Type_Proc): New call back procedure type for
9046         allowing the back end to provide information about available types.
9047         (Register_Back_End_Types): New procedure to register back end types.
9048         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9049         available types.
9050         * cstand.adb (Back_End_Float_Types): New list for floating point types
9051         supported by the back end.
9052         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9053         (Copy_Float_Type): New procedure to make new copies of predefined types.
9054         (Register_Float_Type): New call back procedure to populate the BEFT list
9055         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9056         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9057         (Create_Float_Types): New procedure to create entities for floating
9058         point types predefined in Standard, and put these and any remaining
9059         BEFTs on the Predefined_Float_Types list.
9060         * stand.ads (Predefined_Float_Types): New list for predefined floating
9061         point types that do not have declarations in package Standard.
9062
9063 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9064
9065         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
9066         entity node for the unit containing the parameter.
9067         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
9068         (Add_Inlined_Subprogram): Likewise.
9069         * gcc-interface/Make-lang.in: Update dependencies.
9070
9071 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9072
9073         * s-stusta.adb (Print): Make sure Pos is always initialized to a
9074         suitable value.
9075
9076 2011-08-02  Geert Bosch  <bosch@adacore.com>
9077
9078         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
9079
9080 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9081
9082         * sem_type.adb (Covers): Move trivial case to the top and reuse the
9083         computed value of Base_Type.
9084
9085 2011-08-02  Yannick Moy  <moy@adacore.com>
9086
9087         * restrict.adb (Check_Restriction): issue an error for any use of
9088         class-wide, even if the No_Dispatch restriction is not set.
9089         * sem_aggr.adb: Correct typos in comments and messages in formal mode
9090         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
9091         when completing a private extension, the type named in the private part
9092         is not the same as that named in the visible part.
9093         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
9094         of an inherited primitive operations of a tagged type or type extension
9095         that returns the tagged type.
9096         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
9097         function which returns True for an implicit operation inherited by the
9098         derived type declaration for the argument type.
9099         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
9100         order.
9101
9102 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9103
9104         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
9105         Process_Bounds, to perform analysis with expansion of a range or an
9106         expression that is the iteration scheme for a loop.
9107         (Analyze_Iterator_Specification): If domain of iteration is given by a
9108         function call with a controlled result, as is the case if call returns
9109         a predefined container, ensure that finalization actions are properly
9110         generated.
9111         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
9112
9113 2011-08-02  Javier Miranda  <miranda@adacore.com>
9114
9115         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9116         * gcc-interface/Make-lang.in: Update dependencies.
9117
9118 2011-08-02  Javier Miranda  <miranda@adacore.com>
9119
9120         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9121         determine if the analysis is performed using N or Original_Node (N).
9122         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9123         functionality of routine Is_Variable avoids code duplication.
9124         * checks.adb (Determine_Range): Handle temporaries generated by
9125         Remove_Side_Effects.
9126
9127 2011-08-02  Javier Miranda  <miranda@adacore.com>
9128
9129         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9130         expansion of the condition. Required since the previous analysis was
9131         done with expansion disabled (see Resolve_Quantified_Expression) and
9132         hence checks were not inserted and record comparisons have not been
9133         expanded.
9134
9135 2011-08-02  Ed Falis  <falis@adacore.com>
9136
9137         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9138         Update header.
9139
9140 2011-08-02  Bob Duff  <duff@adacore.com>
9141
9142         * opt.ads: Minor comment fix.
9143
9144 2011-08-02  Bob Duff  <duff@adacore.com>
9145
9146         * sem_ch12.adb (Analyze_Package_Instantiation,
9147         Analyze_Subprogram_Instantiation): Turn off style checking while
9148         analyzing an instance. Whatever style checks that apply to the generic
9149         unit should apply, so it makes no sense to apply them in an instance.
9150         This was causing trouble when compiling an instance of a runtime
9151         unit that violates the -gnatyO switch.
9152         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9153         one of the two case statements, causing spurious errors.
9154
9155 2011-08-02  Robert Dewar  <dewar@adacore.com>
9156
9157         * uname.adb: Minor reformatting.
9158         * gnatcmd.adb: Minor reformatting.
9159         * exp_attr.adb: Minor reformatting.
9160
9161 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9162
9163         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9164         No_Dispatching_Calls, do not look for the Assign primitive, because
9165         predefined primitives are not created in this case.
9166
9167 2011-08-02  Bob Duff  <duff@adacore.com>
9168
9169         * stylesw.ads: Minor comment fixes.
9170
9171 2011-08-02  Robert Dewar  <dewar@adacore.com>
9172
9173         * freeze.adb (Add_To_Result): New procedure.
9174
9175 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9176
9177         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9178         time, if the specific run-time routines for handling streams of strings
9179         are not available, use the default mechanism.
9180
9181 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9182
9183         * s-regpat.ads: Fix typo.
9184
9185 2011-08-02  Vincent Celier  <celier@adacore.com>
9186
9187         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9188         not null, call it to create the in memory config project file without
9189         parsing an existing default config project file.
9190
9191 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9192
9193         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9194
9195 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9196
9197         * sem_elim.adb: an abstract subprogram does not need an eliminate
9198         pragma for its descendant to be eliminable.
9199
9200 2011-08-02  Ed Falis  <falis@adacore.com>
9201
9202         * init.c: revert to handling before previous checkin for VxWorks
9203         * s-intman-vxworks.adb: delete unnecessary declarations related to
9204         using Ada interrupt facilities for handling signals.
9205         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9206         * s-intman-vxworks.ads: Import __gnat_install_handler as
9207         Initialize_Interrupts.
9208         * s-taprop-vxworks.adb: Delete Signal_Mask.
9209         (Abort_Handler): change construction of mask to unblock exception
9210         signals.
9211
9212 2011-08-02  Jerome Guitton  <guitton@adacore.com>
9213
9214         * a-except-2005.adb (Raise_From_Signal_Handler): Call
9215         Debug_Raise_Exception before propagation starts.
9216
9217 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9218
9219         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9220         to Restriction_Check_Required.
9221         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9222         * sem_res.adb (Resolve_Call): Likewise.
9223         * sem_attr.adb (Check_Stream_Attribute): Likewise.
9224
9225 2011-08-02  Bob Duff  <duff@adacore.com>
9226
9227         * stylesw.ads: Update comment.
9228         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9229         * errout.ads: Remove obsolete comment.
9230
9231 2011-08-02  Javier Miranda  <miranda@adacore.com>
9232
9233         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9234         (Set_Is_Safe_To_Reevaluate): new procedure.
9235         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9236         assignment is allowed on safe-to-reevaluate variables.
9237         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9238         temporary created to remove side effects in expressions that use
9239         the secondary stack as safe-to-reevaluate.
9240         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9241         variables that are not true constants.
9242
9243 2011-08-02  Robert Dewar  <dewar@adacore.com>
9244
9245         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9246         sem_res.adb, sem_ch6.adb: Minor reformatting.
9247
9248 2011-08-02  Jerome Guitton  <guitton@adacore.com>
9249
9250         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9251
9252 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9253
9254         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9255         not set Overridden_Operation if subprogram is an initialization
9256         procedure.
9257
9258 2011-08-02  Yannick Moy  <moy@adacore.com>
9259
9260         * par-ch6.adb: Correct obsolete name in comments
9261         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9262         which takes two message arguments (existing function takes one), with
9263         second message used for continuation.
9264         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9265         block statements that originate from a source block statement, not
9266         generated block statements
9267         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9268         symmetry with procedure case
9269         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9270         function to issue an error in formal mode if a package specification
9271         contains more than one tagged type or type extension.
9272         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9273         parameters matching formals of tagged types are objects (or ancestor
9274         type conversions of objects), not general expressions. Issue an error
9275         on view conversions that are not involving ancestor conversion of an
9276         extended type.
9277         (Resolve_Type_Conversion): in formal mode, issue an error on the
9278         operand of an ancestor type conversion which is not an object
9279         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9280         procedure so that it works also for actuals of function calls
9281         (Is_Actual_Tagged_Parameter): new function which determines if its
9282         argument is an actual parameter of a formal of tagged type in a
9283         subprogram call
9284         (Is_SPARK_Object_Reference): new function which determines if the tree
9285         referenced by its argument represents an object in SPARK
9286
9287 2011-08-02  Robert Dewar  <dewar@adacore.com>
9288
9289         * sem_ch3.adb: Minor reformatting
9290         Minor comment addition
9291         Minor error msg text change
9292
9293 2011-08-02  Javier Miranda  <miranda@adacore.com>
9294
9295         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9296         function. Used to be more precise when we generate a variable plus one
9297         assignment to remove side effects in the evaluation of the Bound
9298         expressions.
9299         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9300         of the bound expression to force its re-analysis and thus expand the
9301         associated transient scope (if required). Code cleanup replacing the
9302         previous code that declared the constant entity by an invocation to
9303         routine Force_Evaluation which centralizes this work in the frontend.
9304
9305 2011-08-02  Robert Dewar  <dewar@adacore.com>
9306
9307         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9308         (Base_Type): Now uses improved Is_Base_Type function
9309         * einfo.ads (Base_Type): Inline this function
9310
9311 2011-08-02  Robert Dewar  <dewar@adacore.com>
9312
9313         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9314         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9315
9316 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9317
9318         * gcc-interface/Make-lang.in: Update dependencies.
9319         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9320         targets.
9321
9322 2011-08-02  Yannick Moy  <moy@adacore.com>
9323
9324         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9325         non-simple expression used in delta constraint
9326         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9327         index constraint which is not a subtype mark
9328         * par.adb: With and use Restrict
9329         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9330         mode on component type which is not a subtype mark and default
9331         expression on component
9332         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9333         of string which does not have a lower index bound equal to 1
9334         (Array_Type_Declaration): issue an error in formal mode on index or
9335         component type which is not a subtype mark, and on aliased keyword on
9336         component
9337         (Derived_Type_Declaration): issue an error in formal mode on interface,
9338         limited or abstract type
9339         (Record_Type_Declaration): issue an error in formal mode on interface
9340         (Record_Type_Definition): issue an error in formal mode on tagged types
9341         and type extensions not declared in the specification of a library unit
9342         package; on null non-tagged record; on variant part
9343
9344 2011-08-02  Vincent Celier  <celier@adacore.com>
9345
9346         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9347         not declared for qualified library project when Library_Name is not
9348         declared, but Library_Dir is.
9349
9350 2011-08-02  Robert Dewar  <dewar@adacore.com>
9351
9352         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9353         pragmas (affects aspects [Component_]Default_Value
9354         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9355         component type for the resolution
9356
9357 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9358
9359         * einfo.adb (Base_Type): Tune implementation for speed.
9360
9361 2011-08-02  Robert Dewar  <dewar@adacore.com>
9362
9363         * freeze.adb: Minor reformatting.
9364
9365 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9366
9367         * scos.ads: Update comments.
9368
9369 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9370
9371         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9372         base type, because the parent may be a subtype of a private type whose
9373         convention is established in a private part.
9374
9375 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9376
9377         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9378         statement in a block when the expansion of the return expression has
9379         created a finalization chain.
9380         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9381         with the parent node.
9382         Add N_Extended_Return_Statement to handle the case where a transient
9383         object declaration appears in the Return_Object_Declarations list of
9384         an extended return statement.
9385
9386 2011-08-02  Matthew Gingell  <gingell@adacore.com>
9387
9388         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9389         unused parameter 'name'.
9390
9391 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9392
9393         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9394         inherited operation, check whether its alias, which is the source
9395         operastion that it renames, has been marked eliminated.
9396
9397 2011-08-02  Javier Miranda  <miranda@adacore.com>
9398
9399         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9400         in-mode parameter whose type is an access type since it can be used to
9401         modify its designated object. Enforce code that handles as safe an
9402         access type that is not access-to-constant but it is the result of a
9403         previous removal of side-effects.
9404         (Remove_Side_Effects): Minor code reorganization of cases which require
9405         no action. Done to incorporate documentation on new cases uncovered
9406         working in this ticket: no action needed if this routine was invoked
9407         too early and the nodes are not yet decorated.
9408         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9409         to routine Remove_Side_Effects by calls to Force_Evaluation since they
9410         were issued with actuals that are implicitly provided by
9411         Force_Evaluation.
9412
9413 2011-08-02  Robert Dewar  <dewar@adacore.com>
9414
9415         * sem_ch3.adb, sem_res.adb: Minor reformatting.
9416
9417 2011-08-02  Yannick Moy  <moy@adacore.com>
9418
9419         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9420         to issue an error in formal mode on attribute not supported in this mode
9421         (Analyze_Attribute): issue errors on standard attributes not supported
9422         in formal mode.
9423         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9424         comment, and issue error in formal mode on modulus which is not a power
9425         of 2.
9426         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9427         range.
9428         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9429         subtype mark.
9430         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9431         operator on modular type (except 'not').
9432
9433 2011-08-02  Robert Dewar  <dewar@adacore.com>
9434
9435         * gnat_rm.texi: Minor reformatting.
9436
9437 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9438
9439         * s-osinte-linux.ads: Minor comment update and reformatting.
9440         * i-cexten.ads: Make this unit pure, as for its parent.
9441         Will allow its usage in more contexts if needed.
9442
9443 2011-08-02  Robert Dewar  <dewar@adacore.com>
9444
9445         * s-utf_32.ads: Minor comment fix.
9446
9447 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9448
9449         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9450         operation of a tagged synchronized type, handle the case where the
9451         controlling argument is overloaded.
9452
9453 2011-08-02  Yannick Moy  <moy@adacore.com>
9454
9455         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9456         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9457         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9458         SPARK mode and formal verification mode on processing SPARK restriction
9459         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9460         requiring consistency checking.
9461
9462 2011-08-02  Robert Dewar  <dewar@adacore.com>
9463
9464         * sem_res.adb: Minor reformatting.
9465
9466 2011-08-02  Robert Dewar  <dewar@adacore.com>
9467
9468         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9469         a-cforse.ads: Remove unneeded with of Ada.Containers
9470         Remove commented out pragma Inline's
9471         Move specifications of new subprograms to the actual specs
9472
9473 2011-08-02  Yannick Moy  <moy@adacore.com>
9474
9475         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9476         a-cforse.ads: Update comments.
9477
9478 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9479
9480         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9481
9482 2011-08-02  Robert Dewar  <dewar@adacore.com>
9483
9484         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9485         a-cforse.ads, a-cofove.ads: Minor reformatting.
9486
9487 2011-08-02  Claire Dross  <dross@adacore.com>
9488
9489         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9490         a-cofove.ads: Add comments.
9491
9492 2011-08-02  Yannick Moy  <moy@adacore.com>
9493
9494         * gnat_rm.texi: Document formal containers.
9495
9496 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9497
9498         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9499         are empty sections.
9500
9501 2011-08-02  Robert Dewar  <dewar@adacore.com>
9502
9503         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9504         reformatting.
9505
9506 2011-08-02  Robert Dewar  <dewar@adacore.com>
9507
9508         * aspects.adb: New aspects Default_Value and Default_Component_Value
9509         New format of Aspect_Names table checks for omitted entries
9510         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9511         handling of boolean aspects for derived types.
9512         New aspects Default_Value and Default_Component_Value
9513         New format of Aspect_Names table checks for omitted entries
9514         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9515         (Has_Default_Value): New flag
9516         (Has_Default_Component_Value): New flag
9517         (Has_Default_Value): New flag
9518         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9519         table.
9520         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9521         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9522         Default_Value and Default_Component_Value
9523         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9524         New aspects Default_Value and Default_Component_Value
9525         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9526         * sprint.adb: Print N_Aspect_Specification node when called from gdb
9527
9528 2011-08-02  Vincent Celier  <celier@adacore.com>
9529
9530         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9531         inherit library kind.
9532
9533 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9534
9535         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9536         Minor reformatting.
9537
9538 2011-08-02  Robert Dewar  <dewar@adacore.com>
9539
9540         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9541
9542 2011-08-02  Yannick Moy  <moy@adacore.com>
9543
9544         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9545
9546 2011-08-02  Robert Dewar  <dewar@adacore.com>
9547
9548         * impunit.adb: Add comment.
9549
9550 2011-08-02  Yannick Moy  <moy@adacore.com>
9551
9552         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9553         qualification of aggregates in formal mode
9554         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9555         another aggregate
9556         (Resolve_Aggregate): complete the test that an aggregate is adequately
9557         qualified in formal mode
9558
9559 2011-08-02  Pascal Obry  <obry@adacore.com>
9560
9561         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9562         * mlib-prj.adb: Supress warning when compiling binder generated file.
9563         (Build_Library): Supress all warnings when compiling the binder
9564         generated file.
9565
9566 2011-08-02  Yannick Moy  <moy@adacore.com>
9567
9568         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9569         from here...
9570         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9571         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9572         Add with/use clauses to make Check_Formal_Restriction visible
9573
9574 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9575
9576         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9577         in-parameters when type of the generic formal is private in the generic
9578         spec and non-private in the body.
9579
9580 2011-08-02  Claire Dross  <dross@adacore.com>
9581
9582         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9583         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9584         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9585         * impunit.adb, Makefile.rtl: Take new files into account.
9586
9587 2011-08-02  Robert Dewar  <dewar@adacore.com>
9588
9589         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9590         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9591
9592 2011-08-02  Yannick Moy  <moy@adacore.com>
9593
9594         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9595         formal mode
9596         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9597         matching static array bounds, taking into account the special case of
9598         string literals
9599         * sem_ch3.adb: Typo in comment.
9600
9601 2011-08-02  Yannick Moy  <moy@adacore.com>
9602
9603         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9604         which issues an error in formal mode if its argument node is originally
9605         from source
9606         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9607         has a discriminant specification so that it does not include the case
9608         of derived types
9609         (Derived_Type_Declaration): move here the test that a derived type has a
9610         discriminant specification
9611         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9612         first element of a component association before accessing its choices
9613         (presence of component association is not enough)
9614         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9615         declaration is a library item before accessing the next element in a
9616         list, as library items are not member of lists
9617         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9618         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9619         Check_Formal_Restriction whenever possible.
9620
9621 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9622
9623         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9624         reference when needed.
9625
9626 2011-08-02  Bob Duff  <duff@adacore.com>
9627
9628         * gnat_ugn.texi: Fix typo.
9629
9630 2011-08-02  Vincent Celier  <celier@adacore.com>
9631
9632         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9633         archive file name. Do not use the full path name of archives for Open
9634         VMS.
9635
9636 2011-08-02  Robert Dewar  <dewar@adacore.com>
9637
9638         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9639         Analyze_Aspect_Specifications
9640         * sem_ch13.adb
9641         (Analyze_Aspect_Specifications): New handling for boolean aspects
9642         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9643         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9644         sequence for Analyze_Aspect_Specifications
9645         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9646         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9647
9648 2011-08-02  Robert Dewar  <dewar@adacore.com>
9649
9650         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9651         aspects, since these no longer exist.
9652
9653 2011-08-02  Robert Dewar  <dewar@adacore.com>
9654
9655         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9656         semicolon, do not try to see if there are aspects following it.
9657         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9658         aspect spec.
9659
9660 2011-08-02  Robert Dewar  <dewar@adacore.com>
9661
9662         * sem_ch8.adb, aspects.ads: Minor reformatting.
9663
9664 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9665
9666         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9667         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9668         extracted from...
9669         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
9670
9671 2011-08-02  Yannick Moy  <moy@adacore.com>
9672
9673         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9674         mode on subprogram declaration outside of package specification, unless
9675         it is followed by a pragma Import
9676         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9677         Access_Type_Declaration): issue error in formal mode on access type
9678         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9679         incomplete type
9680         (Analyze_Object_Declaration): issue error in formal mode on object
9681         declaration which does not respect SPARK restrictions
9682         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9683         declaration which does not respect SPARK restrictions
9684         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9685         error in formal mode on digits or delta constraint
9686         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9687         decimal fixed point type
9688         (Derived_Type_Declaration): issue error in formal mode on derived type
9689         other than type extensions of tagged record types
9690         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9691         with check on access definition
9692         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9693         mode on protected definition.
9694         (Analyze_Task_Definition): issue error in formal mode on task definition
9695
9696 2011-08-02  Robert Dewar  <dewar@adacore.com>
9697
9698         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9699
9700 2011-08-02  Javier Miranda  <miranda@adacore.com>
9701
9702         * sem_ch6.adb (Can_Override_Operator): New function.
9703         (Verify_Overriding_Indicator): Add missing code to check overriding
9704         indicator in operators. Fixes regression.
9705         (Check_Overriding_Indicator): Minor reformating after replacing the
9706         code that evaluates if the subprogram can override an operator by
9707         invocations to the above new function.
9708         * einfo.adb
9709         (Write_Field26_Name): Add missing code to ensure that, following
9710         the documentation in einfo.ads, this field is not shown as attribute
9711         "Static_Initialization" on non-dispatching functions.
9712
9713 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9714
9715         * sem_res.adb (Resolve_Call): A call to
9716         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9717         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9718         i.e., when the second parameter is of type Time_Span.
9719
9720 2011-08-02  Vincent Celier  <celier@adacore.com>
9721
9722         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9723         with an archive instead of -L<library dir> -l<library name>.
9724
9725 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9726
9727         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9728         mark the base types In_Use in addition to making the operations
9729         use_visible.
9730
9731 2011-08-02  Ed Falis  <falis@adacore.com>
9732
9733         * init.c: add and setup __gnat_signal_mask for the exception signals
9734         * s-inmaop-vxworks.adb: new file.
9735         * s-intman-vxworks.adb: remove unnecessary initializations and
9736         simplify remaining
9737         * s-intman-vxworks.ads: remove unnecessary variable
9738         * s-taprop-vxworks.adb: simplify signal initialization
9739
9740 2011-08-02  Robert Dewar  <dewar@adacore.com>
9741
9742         * sem_ch8.adb: Minor code reorganization, comment updates.
9743
9744 2011-08-02  Robert Dewar  <dewar@adacore.com>
9745
9746         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9747         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9748         here from Sem_Res.
9749         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9750         (Matching_Static_Array_Bounds): Moved here from Sem_Res
9751
9752 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9753
9754         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9755         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9756         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9757         use_type_clauses, to handle more efficiently use_type and use_all_type
9758         constructs.
9759         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9760         Ada2012 Use_All_Type clause.
9761         (Use_Class_Wide_Operations): new procedure.
9762
9763 2011-08-02  Robert Dewar  <dewar@adacore.com>
9764
9765         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9766         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9767         expression to expression function.
9768
9769 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9770
9771         * sem_ch4.adb: transform simple Ada2012 membership into equality only
9772         if types are compatible.
9773
9774 2011-08-02  Yannick Moy  <moy@adacore.com>
9775
9776         * sem_res.adb (Matching_Static_Array_Bounds): new function which
9777         returns True if its argument array types have same dimension and same
9778         static bounds at each index.
9779         (Resolve_Actuals): issue an error in formal mode on actuals passed as
9780         OUT or IN OUT paramaters which are not view conversions in SPARK.
9781         (Resolve_Arithmetic_Op): issue an error in formal mode on
9782         multiplication or division with operands of fixed point types which are
9783         not qualified or explicitly converted.
9784         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9785         Boolean or array type (except String) operands.
9786         (Resolve_Equality_Op): issue an error in formal mode on equality
9787         operators for array types other than String with non-matching static
9788         bounds.
9789         (Resolve_Logical_Op): issue an error in formal mode on logical operators
9790         for array types with non-matching static bounds. Factorize the code in
9791         Matching_Static_Array_Bounds.
9792         (Resolve_Qualified_Expression): issue an error in formal mode on
9793         qualified expressions for array types with non-matching static bounds.
9794         (Resolve_Type_Conversion): issue an error in formal mode on type
9795         conversion for array types with non-matching static bounds
9796
9797 2011-08-02  Robert Dewar  <dewar@adacore.com>
9798
9799         * par-ch10.adb: Minor code reorganization (use Nkind_In).
9800
9801 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9802
9803         * par-ch9.adb: save location of entry for proper error message.
9804
9805 2011-08-02  Javier Miranda  <miranda@adacore.com>
9806
9807         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9808         (Use_Full_View) which permits this routine to climb through the
9809         ancestors using the full-view of private parents.
9810         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9811         Use_Full_View to true in calls to Is_Ancestor.
9812         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9813         true in call to Is_Ancestor.
9814         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9815         Use_Full_View to true in call to Is_Ancestor.
9816         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9817         call to Is_Ancestor.
9818         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9819         Use_Full_View to true in calls to Is_Ancestor.
9820         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9821         Make_Select_Specific_Data_Table, Register_Primitive,
9822         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9823         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9824         to true in call to Is_Ancestor.
9825         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9826         Use_Full_View to true in calls to Is_Ancestor.
9827         * exp_cg.adb
9828         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9829         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9830
9831 2011-08-02  Robert Dewar  <dewar@adacore.com>
9832
9833         * gnat_rm.texi: Minor reformatting.
9834         * sem_prag.adb: Minor reformatting.
9835
9836 2011-08-02  Tristan Gingold  <gingold@adacore.com>
9837
9838         * vms_data.ads: Add VMS qualifier for -gnateP.
9839
9840 2011-08-02  Robert Dewar  <dewar@adacore.com>
9841
9842         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9843         * par-ch7.adb (P_Package): Proper placement of aspects for package
9844         decl/instantiation.
9845         * par-endh.adb (Check_End): Ad Is_Sloc parameter
9846         (End_Statements): Add Is_Sloc parameterr
9847         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9848         (Check_End): Ad Is_Sloc parameter
9849         (End_Statements): Add Is_Sloc parameterr
9850
9851 2011-08-02  Vincent Celier  <celier@adacore.com>
9852
9853         * ug_words: Add VMS qualifier equivalent to -gnateP:
9854         /SYMBOL_PREPROCESSING.
9855
9856 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9857
9858         * gnat-style.texi: For hexadecimal numeric literals the typical
9859         grouping of digits is 4 to represent 2 bytes.
9860         A procedure spec which is split into several lines is indented two
9861         characters.
9862
9863 2011-08-02  Yannick Moy  <moy@adacore.com>
9864
9865         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9866         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9867         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9868         properly qualified
9869         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9870         choice in array aggregate
9871         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9872         mark as ancestor
9873         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9874         positional and named aggregate for record, or others in record
9875         aggregate, or multiple choice in record aggregate
9876         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9877         array operands to logical operations AND, OR and XOR do not have the
9878         same static lower and higher bounds
9879         * sem_ch5.adb, sinfo.ads: Correct typos in comments
9880
9881 2011-08-01  Robert Dewar  <dewar@adacore.com>
9882
9883         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9884         Replaces Last_Source_Node_In_Sequence.
9885         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9886         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9887         parens and blank in string (this was inconsistently implemented).
9888         * errout.ads
9889         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9890         blank in string (this was inconsistently implemented).
9891         * gnat1drv.adb
9892         (Set_Global_Switches): Set formal mode switches appropriately
9893         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9894         * par-prag.adb
9895         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9896         call Set_Error_Msg_Lang to set "spark" as language name.
9897         * par.adb: Remove unnecessary call to set formal language for errout
9898         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9899         appropriately and call Set_Error_Msg_Lang to set "spark" as language
9900         name.
9901         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9902         calls to it, moved after resolution so that types are known
9903         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9904         result of concatenation is not of type String
9905         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9906         concatenation is not properly restricted
9907         * gnat_rm.texi: Add doc on pragma Spark_95.
9908         * gcc-interface/Makefile.in: Remove obsolete target pairs for
9909         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9910         * gcc-interface/Make-lang.in: Update dependencies.
9911
9912 2011-08-01  Javier Miranda  <miranda@adacore.com>
9913
9914         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9915         condition that detects if the overridden operation must replace an
9916         existing entity.
9917
9918 2011-08-01  Javier Miranda  <miranda@adacore.com>
9919
9920         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9921         code declarations inserted by Insert_Actions in each alternative of the
9922         N_Case_Expression node.
9923
9924 2011-08-01  Robert Dewar  <dewar@adacore.com>
9925
9926         * sem_ch6.adb: Minor code reorganization.
9927         * sem_util.adb: Minor reformatting.
9928
9929 2011-08-01  Pascal Obry  <obry@adacore.com>
9930
9931         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9932         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9933
9934 2011-08-01  Yannick Moy  <moy@adacore.com>
9935
9936         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9937         literal or operator symbol which is prefixed
9938         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9939         mode on access attributes.
9940         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9941         that concatenation operands are properly restricted in formal mode
9942         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9943         Analyze_Concatenation_Operand. Issue an error in formal mode if the
9944         result of the concatenation has a type different from String.
9945         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9946         Analyze_Quantified_Expression, Analyze_Slice,
9947         Analyze_Null): issue an error in formal mode on unsupported constructs
9948         * sem_ch5.adb
9949         (Analyze_Block_Statement): only issue error on source block statement
9950         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9951         function which returns the last node in a list of nodes for which
9952         Comes_From_Source returns True, if any
9953         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9954         Last_Source_Node_In_Sequence
9955         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9956         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9957         mode on unsupported constructs
9958         * sem_ch9.adb Do not return after issuing error in formal mode, as the
9959         rest of the actions may be needed later on since the error is marked as
9960         not serious.
9961         * sinfo.ads: Typos in comments.
9962
9963 2011-08-01  Pascal Obry  <obry@adacore.com>
9964
9965         * projects.texi: Minor editing.
9966
9967 2011-08-01  Yannick Moy  <moy@adacore.com>
9968
9969         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9970         insertion character ~~
9971         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9972         (Set_Error_Msg_Lang): new procedure which fixes the language for use
9973         with insertion character ~~
9974         (Set_Msg_Text): treat insertion character ~~
9975         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9976         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9977         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9978         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9979         errors related to the formal language restriction not serious
9980         (insertion character |).
9981         * par.adb (Par): set formal language for error messages if needed
9982         * sem_ch6.adb (Check_Missing_Return): take into account possible
9983         generated statements at the end of the function
9984         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9985         enumeration value to define a new pragma SPARK_95
9986         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9987         SPARK_Version): new type and variables to store the SPARK version
9988         (none by default).
9989         (SPARK_Mode): return True when SPARK_Version is set
9990         * par-prag.adb: Correct indentation
9991         (Prag): take Pragma_SPARK_95 into account
9992         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9993         into account.
9994
9995 2011-08-01  Robert Dewar  <dewar@adacore.com>
9996
9997         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9998         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9999         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10000
10001 2011-08-01  Pascal Obry  <obry@adacore.com>
10002
10003         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10004         Target_Name to Get_Path call.
10005         (Parse_Single_Project): Likewise.
10006         (Post_Parse_Context_Clause): Likewise.
10007         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10008         Call Initialise_Project_Path with the proper Target_Name.
10009         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10010         search path.
10011         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10012         with the proper Target_Name.
10013         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10014         Part.Parse routine.
10015         (Parse_Project_And_Apply_Config): Likewise.
10016         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10017         This is fine as this part of the code is supporting only native
10018         compilation.
10019         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10020         is fine as this part of the code is supporting only native compilation.
10021
10022 2011-08-01  Yannick Moy  <moy@adacore.com>
10023
10024         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10025         of homonym, unless the homonym is one of the cases allowed in SPARK
10026         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10027         package declaration occurring after a body.
10028
10029 2011-08-01  Robert Dewar  <dewar@adacore.com>
10030
10031         * checks.adb, exp_ch4.adb: Minor reformatting.
10032
10033 2011-08-01  Javier Miranda  <miranda@adacore.com>
10034
10035         * einfo.ads (Access_Disp_Table): Fix documentation.
10036         (Dispatch_Table_Wrappers): Fix documentation.
10037
10038 2011-08-01  Pascal Obry  <obry@adacore.com>
10039
10040         * prj-env.adb, prj-env.ads: Minor reformatting.
10041
10042 2011-08-01  Yannick Moy  <moy@adacore.com>
10043
10044         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10045         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10046         procedures out of these packages.
10047         * errout.ads, errout.adb
10048         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10049         procedures in of this package
10050         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10051         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10052         on misplaced later vs initial declarations, like in Ada 83
10053         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10054         formal mode on attribute of private type whose full type declaration
10055         is not visible
10056         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10057         package declaration inside a package specification
10058         (Analyze_Full_Type_Declaration): issue error in formal mode on
10059         controlled type or discriminant type
10060         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10061         user-defined operator means that it should come from the source
10062         (New_Overloaded_Entity): issue error in formal mode on overloaded
10063         entity.
10064         * sem_ch6.ads, sem_ch13.ads: typos in comments.
10065
10066 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10067
10068         * atree.adb: Minor reformatting.
10069         * checks.adb: Minor reformatting.
10070
10071 2011-08-01  Vincent Celier  <celier@adacore.com>
10072
10073         * s-parame-vms-ia64.ads: Fix typo in comment
10074         Minor reformatting
10075         * s-parame-vms-restrict.ads: Removed, unused.
10076
10077 2011-08-01  Javier Miranda  <miranda@adacore.com>
10078
10079         * exp_ch3.adb
10080         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
10081         * sem_ch3.adb
10082         (Constrain_Index): Remove side effects in the evaluation of the bounds.
10083         * sem_ch3.ads, sem_ch3.adb
10084         (Is_Constant_Bound): New extended version of the subprogram that was
10085         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
10086         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
10087         * sem_aux.ads (Constant_Value): Fix typo in comment.
10088         * checks.adb (Generate_Index_Checks): New implementation which, for
10089         array objects with constant bounds, generates the runtime check
10090         referencing the bounds of the array type. For other cases this routine
10091         provides its previous behavior obtaining such values from the array
10092         object.
10093         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
10094         parent type.
10095         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
10096         we cannot have semantic interpretations of the new node.
10097
10098 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10099
10100         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
10101         expressions.
10102
10103 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10104
10105         * sem_ch8.adb: Minor code editing.
10106         * s-vxwext.adb: Remove trailing space.
10107         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
10108         consistency with other files.
10109
10110 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10111
10112         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
10113
10114 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10115
10116         * par-ch10.adb: reject parameterized expressions as compilation unit.
10117         * sem_ch4.adb: handle properly conditional expression with overloaded
10118         then_clause and no else_clause.
10119
10120 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10121
10122         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10123         like done by System.Aux_DEC.
10124         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10125
10126 2011-08-01  Yannick Moy  <moy@adacore.com>
10127
10128         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10129         missing label at end of declaration (subprogram or package)
10130         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10131         of positional and named parameter association
10132         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10133         Error_Msg_SP which adds a prefix to the error message giving the name
10134         of the formal language analyzed
10135         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10136         access result type in subprogram, unconstrained array as result type,.
10137         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10138         procedure
10139         * sem_ch8.adb: Code clean up.
10140
10141 2011-08-01  Javier Miranda  <miranda@adacore.com>
10142
10143         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10144         * einfo.ads (Access_Disp_Table): Fix documentation.
10145         (Dispatch_Table_Wrappers): Fix documentation.
10146         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10147         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10148         to enforce the documentation of this attribute.
10149         (Set_Is_Interface): Cleanup the assertion.
10150         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10151         the Underlying_Type entity before reading attribute Access_Disp_Table.
10152         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10153         Locate the Underlying_Type before reading attribute Access_Disp_Table.
10154         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10155         the Underlying_Type entity before reading attribute Access_Disp_Table.
10156         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10157         Locate the Underlying_Type entity before reading attribute
10158         Access_Disp_Table.
10159
10160 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10161
10162         * s-poosiz.ads: Additional overriding indicators.
10163
10164 2011-08-01  Yannick Moy  <moy@adacore.com>
10165
10166         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10167         formal mode.
10168         (Analyze_Iteration_Scheme): issue error in formal mode when loop
10169         parameter specification does not include a subtype mark.
10170         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10171         formal mode on abstract subprogram.
10172         (Analyze_Subprogram_Specification): issue error in formal mode on
10173         user-defined operator.
10174         (Process_Formals): issue error in formal mode on access parameter and
10175         default expression.
10176         * sem_ch9.adb (Analyze_Abort_Statement,
10177         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10178         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10179         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10180         Analyze_Requeue, Analyze_Selective_Accept,
10181         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10182         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10183         issue error in formal mode on user-defined raise statement.
10184
10185 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10186
10187         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10188         declaration being hidden when overriding an implicit inherited
10189         subprogram.
10190         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10191         (-gnats), do not complain about a source file that contains only a
10192         pragma No_Body.
10193
10194 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10195
10196         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10197         variable if already set.
10198
10199 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10200
10201         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10202         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10203         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10204         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10205         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10206         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10207         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10208         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10209         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10210         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10211         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10212         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10213         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10214         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10215         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10216         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10217         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10218         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10219         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10220         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10221         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10222         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10223         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10224         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10225         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10226         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10227         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10228         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10229         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10230         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10231         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10232         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10233         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10234         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10235         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10236         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10237         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10238         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10239         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10240         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10241         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10242         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10243         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10244         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10245         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10246         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10247         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10248         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10249         s-osinte-mingw.ads: Update to GPLv3 run-time license.
10250         Use GNAT instead of GNARL.
10251
10252 2011-08-01  Bob Duff  <duff@adacore.com>
10253
10254         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10255         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10256         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10257         reformatting.
10258
10259 2011-08-01  Yannick Moy  <moy@adacore.com>
10260
10261         * debug.adb (d.D) reverve flag for the SPARK mode
10262         (d.E) reverve flag for SPARK generation mode
10263         (d.F) reverve flag for Why generation mode
10264         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10265         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
10266         functions which return True when the corresponding modes are set
10267         (Formal_Language): return "spark" or "alfa" when in formal verification
10268         mode.
10269         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10270         Error_Msg to prefix the error message with a tag giving the formal
10271         language
10272         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10273         message with a tag giving the formal language
10274         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10275         block statement
10276         (Analyze_Case_Statement): issue error in formal mode on case statement
10277         with a single "others" case alternative
10278         (Analyze_Exit_Statement): issue errors in formal mode on exit
10279         statements which do not respect SPARK restrictions
10280         (Analyze_Goto_Statement): issue error in formal mode on goto statement
10281         (Check_Unreachable_Code): always issue an error (not a warning) in
10282         formal mode on unreachable code (concerns both code after an infinite
10283         loop and after an unconditional jump, both not allowed in SPARK)
10284         * sem_ch6.adb (Analyze_Return_Statement): add call to
10285         Set_Return_Present for a procedure containing a return statement
10286         (already done for functions in Analyze_Function_Return)
10287         (Analyze_Function_Return): issue error in formal mode on extended
10288         return or if return is not last statement in function
10289         (Check_Missing_Return): issue error in formal mode if function does
10290         not end with return or if procedure contains a return
10291         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10292         function to detect if there is an inner scope of its parameter S which
10293         is a loop.
10294
10295 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10296
10297         * sem_ch6.ads: Minor reformatting.
10298
10299 2011-08-01  Javier Miranda  <miranda@adacore.com>
10300
10301         * sem_util.adb (Abstract_Interface_List): Complete condition when
10302         processing private type declarations to avoid reading unavailable
10303         attribute.
10304         (Is_Synchronized_Tagged_Type): Complete condition when processing
10305         private extension declaration nodes to avoid reading unavailable
10306         attribute.
10307
10308 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10309
10310         * sem_ch3.adb: Minor reformatting.
10311
10312 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10313
10314         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10315         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10316         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10317         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10318         for VMS, instead parametrize the common implementation with
10319         System.Parameters declarations.
10320
10321 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
10322
10323         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10324
10325 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10326
10327         * seh_init.c: Fix SEH handler installation on win64.
10328
10329 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10330
10331         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10332         double analysis of an anonymous access to subprogram, because it can
10333         lead to improper sharing of profiles and a back-end crash.
10334
10335 2011-08-01  Robert Dewar  <dewar@adacore.com>
10336
10337         * make.adb, sem_ch4.adb: Minor reformatting.
10338         * gcc-interface/Make-lang.in: Update dependencies.
10339         * sem_util.adb, exp_ch5.adb: Minor reformatting.
10340
10341 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10342
10343         * gnat_rm.texi: Fix definition of Long_Integer.
10344
10345 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10346
10347         * exp_aggr.adb: check limit size of static aggregate unconditionally,
10348         to prevent storage exhaustion.
10349         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10350         finalized is a function body, insert the cleanup code before the final
10351         return statement, to prevent spurious warnings.
10352         * s-pooglo.ads: add overriding indicator.
10353
10354 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10355
10356         * sem_ch4.adb (Operator_Check): improve error message when both a
10357         with_clause and a use_clause are needed to make operator usage legal.
10358         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10359         determine whether a compilation unit is visible within an other,
10360         either through a with_clause in the current unit, or a with_clause in
10361         its library unit or one one of its parents.
10362
10363 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10364
10365         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10366         over an arbitrary expression of an array or container type.
10367         * lib-xref.adb: clarify comment.
10368
10369 2011-08-01  Bob Duff  <duff@adacore.com>
10370
10371         * einfo.ads: Minor reformatting.
10372         * debug.adb: Minor comment improvement.
10373
10374 2011-08-01  Javier Miranda  <miranda@adacore.com>
10375
10376         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10377         consider hidden subprograms as valid candidates.
10378
10379 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10380
10381         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10382
10383 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
10384
10385         * gnat_ugn.texi: Fix typo.
10386
10387 2011-08-01  Robert Dewar  <dewar@adacore.com>
10388
10389         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10390         lib-xref.adb: Minor reformatting
10391
10392 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
10393
10394         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10395         when to generate a call to Move_Final_List.
10396         (Has_Controlled_Parts): Remove this function.
10397
10398 2011-08-01  Geert Bosch  <bosch@adacore.com>
10399
10400         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10401         "," in choice list.
10402
10403 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10404
10405         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10406         explicit raise of a predefined exception as Comes_From_Source if the
10407         original N_Raise_Statement comes from source.
10408
10409 2011-08-01  Robert Dewar  <dewar@adacore.com>
10410
10411         * sinfo.ads: Add comment.
10412         * sem_ch6.adb: Minor reformatting.
10413
10414 2011-08-01  Robert Dewar  <dewar@adacore.com>
10415
10416         * freeze.adb (Freeze_Entity): Refine check for bad component size
10417         clause to avoid rejecting confirming clause when atomic/aliased present.
10418
10419 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10420
10421         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10422         better determine whether an entity reference is a write.
10423         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10424         subcomponent.
10425         * lib-xref.adb (Output_References): Do no suppress a read reference at
10426         the same location as an immediately preceeding modify-reference, to
10427         handle properly in-out actuals.
10428
10429 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10430
10431         * env.c (__gnat_setenv) [VMS]: Refine previous change.
10432
10433 2011-08-01  Quentin Ochem  <ochem@adacore.com>
10434
10435         * i-cstrin.adb (New_String): Changed implementation, now uses only the
10436         heap to compute the result.
10437
10438 2011-08-01  Robert Dewar  <dewar@adacore.com>
10439
10440         * atree.ads: Minor reformatting.
10441
10442 2011-08-01  Emmanuel Briot  <briot@adacore.com>
10443
10444         * g-expect.adb (Get_Command_Output): Fix memory leak.
10445
10446 2011-08-01  Geert Bosch  <bosch@adacore.com>
10447
10448         * cstand.adb (P_Float_Type): New procedure to print the definition of
10449         predefined fpt types.
10450         (P_Mixed_Name): New procedure to print a name using mixed case
10451         (Print_Standard): Use P_Float_Type for printing floating point types
10452         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10453         precision IEEE float.
10454
10455 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10456
10457         * sem_ch3.adb: Minor reformatting.
10458
10459 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10460
10461         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10462         the completion of a generic function, insert the new body rather than
10463         rewriting the original.
10464
10465 2011-08-01  Yannick Moy  <moy@adacore.com>
10466
10467         * sinfo.ads, errout.ads: Typos in comments.
10468
10469 2011-08-01  Robert Dewar  <dewar@adacore.com>
10470
10471         * par-endh.adb: Minor reformatting.
10472
10473 2011-08-01  Robert Dewar  <dewar@adacore.com>
10474
10475         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10476         (Pre_Post_Aspects): New subtype.
10477         * par-ch12.adb (P_Generic): New syntax for aspects in packages
10478         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10479         * par-ch7.adb (P_Package): Remove Decl parameter
10480         (P_Package): Handle new syntax for aspects (before IS)
10481         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10482         new aspect syntax
10483         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10484         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10485         (P_Package): Remove Decl parameter
10486         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10487         aspects
10488         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10489         specs
10490         * sem_util.ads, sem_util.adb (Static_Boolean): New function
10491         * sinfo.ads: Document new syntax for aspects in packages etc.
10492         * sprint.adb: Handle new syntax of aspects before IS in package
10493
10494 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10495
10496         * atree.ads: Minor reformatting.
10497         * sem_prag.adb: Minor reformatting.
10498
10499 2011-08-01  Robert Dewar  <dewar@adacore.com>
10500
10501         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10502         case expr alternative.
10503
10504 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10505
10506         * sem_ch12.adb: Fix typo.
10507
10508 2011-08-01  Geert Bosch  <bosch@adacore.com>
10509
10510         * sem_prag.adb (Check_No_Link_Name): New procedure.
10511         (Process_Import_Or_Interface): Use Check_No_Link_Name.
10512         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10513         instead of Standard_Long_Long_Float_Size global. Preparation for
10514         eventual removal of per type constants.
10515         * exp_util.ads (Get_Stream_Size): New function returning the stream
10516         size value of subtype E.
10517         * exp_util.adb (Get_Stream_Size): Implement new function.
10518         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10519         function.
10520         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10521         * einfo.adb:
10522         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10523
10524 2011-08-01  Geert Bosch  <bosch@adacore.com>
10525
10526         * cstand.adb: Fix comments.
10527         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10528         count of arguments.
10529
10530 2011-08-01  Robert Dewar  <dewar@adacore.com>
10531
10532         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10533
10534 2011-08-01  Geert Bosch  <bosch@adacore.com>
10535
10536         * atree.ads: Fix comment.
10537
10538 2011-08-01  Robert Dewar  <dewar@adacore.com>
10539
10540         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10541         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10542         * par.adb: Add with for Namet.Sp.
10543         * par-tchk.adb: Minor reformatting.
10544
10545 2011-08-01  Vincent Celier  <celier@adacore.com>
10546
10547         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10548         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10549         of the init procedure of a SAL.
10550         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10551         New procedure.
10552
10553 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10554
10555         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10556         reformatting.
10557
10558 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10559
10560         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10561
10562 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10563
10564         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10565         conformant with its spec (return True only for types that have
10566         an overriding Initialize primitive operation that prevents them from
10567         having preelaborable initialization).
10568         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10569         initialization for controlled types in Ada 2005 or later mode.
10570
10571 2011-08-01  Robert Dewar  <dewar@adacore.com>
10572
10573         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10574         Postcondition.
10575         (Same_Aspect): New function.
10576         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10577         Type_Invariant, Precondition, Postcondition.
10578         * snames.ads-tmpl: Add Name_Type_Invariant.
10579
10580 2011-08-01  Robert Dewar  <dewar@adacore.com>
10581
10582         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10583         here.
10584         (Freeze_All_Ent): Fix error in handling inherited aspects.
10585         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10586         already analyzed, but don't skip entire processing of a declaration,
10587         that's wrong in some cases of declarations being rewritten.
10588         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10589         Don't delay for integer, string literals
10590         Treat predicates in usual manner for delay, remove special case code,
10591         not needed.
10592         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10593         (Build_Predicate_Function): Update saved expression in aspect
10594         (Build_Invariant_Procedure): Update saved expression in aspect
10595         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10596         of replacement of discriminant references if the reference is simple.
10597
10598 2011-08-01  Robert Dewar  <dewar@adacore.com>
10599
10600         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10601         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10602         Static_Predicate and Dynamic_Predicate.
10603         (Build_Predicate_Function): Add processing for Static_Predicate
10604         and Dynamic_Predicate.
10605         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10606         (From_Static_Predicate): New flag
10607         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10608
10609 2011-08-01  Robert Dewar  <dewar@adacore.com>
10610
10611         * usage.adb: Documentation cleanup for Ada version modes in usage.
10612         * expander.adb: Minor reformatting.
10613
10614 2011-08-01  Robert Dewar  <dewar@adacore.com>
10615
10616         * atree.ads: Minor comment fix.
10617         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10618         a-witeio.ads, sem_prag.adb: Minor reformatting.
10619
10620 2011-08-01  Doug Rupp  <rupp@adacore.com>
10621
10622         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10623         pointers. Use descrip.h header file for convenience. Add some
10624         comments.
10625
10626 2011-08-01  Robert Dewar  <dewar@adacore.com>
10627
10628         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10629         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10630         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10631         New procedure.
10632         (Check_Aspect_At_End_Of_Declarations): New procedure
10633         (Analye_Aspect_Specification): Minor changes for above procedures
10634         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10635         specification node as well.
10636
10637 2011-08-01  Pascal Obry  <obry@adacore.com>
10638
10639         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10640         Windows files. Use GetFilesAttributes() in this case to check for file
10641         existence instead of returning with an error code.
10642
10643 2011-08-01  Vincent Celier  <celier@adacore.com>
10644
10645         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10646         High is above Source length.
10647
10648 2011-08-01  Robert Dewar  <dewar@adacore.com>
10649
10650         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10651
10652 2011-08-01  Robert Dewar  <dewar@adacore.com>
10653
10654         * aspects.ads (Boolean_Aspects): New subtype.
10655         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10656         for derived types in cases where the parent type and derived type have
10657         aspects.
10658         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10659         with aspects when parent type also has aspects.
10660         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10661         boolean expression at this point).
10662         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10663         accordance with final decision on the Ada 2012 feature.
10664         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10665
10666 2011-08-01  Matthew Heaney  <heaney@adacore.com>
10667
10668         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10669
10670 2011-08-01  Pascal Obry  <obry@adacore.com>
10671
10672         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10673         Fix Replace_Slice when High is above current string size.
10674         (Replace_Slice): Fix DL computation when High is above current
10675         string length.
10676
10677 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
10678
10679         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10680
10681 2011-08-01  Matthew Heaney  <heaney@adacore.com>
10682
10683         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10684         of node.
10685
10686 2011-08-01  Pascal Obry  <obry@adacore.com>
10687
10688         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10689         reformatting.
10690
10691 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10692
10693         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10694         access to protected subprograms in generic bodies.
10695         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10696         protected type, indicate that the convention of the subprogram is
10697         Convention_Protected, because it may be used in subsequent declarations
10698         within the protected declaration.
10699
10700 2011-08-01  Vincent Celier  <celier@adacore.com>
10701
10702         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10703         and "final" procedures when the name of the library is "ada", to avoid
10704         duplicate symbols "adainit" and "adafinal" in executables.
10705
10706 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10707
10708         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10709         quantified expression that appears within a postcondition and uses the
10710         Ada2012 'Result attribute.
10711
10712 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10713
10714         * init.c (__gnat_error_handler): Cast reason to int.
10715         (__gnat_install_handler): Explain sa_sigaction use.
10716
10717 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10718
10719         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10720         subprogram has copy-in copy-out parameters, try to promote the mode of
10721         the return type if it is passed in registers.
10722
10723 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10724
10725         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10726         left operand as addressable.
10727
10728 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10729
10730         * gcc-interface/gigi.h (build_function_stub): Remove.
10731         (build_return_expr): Likewise.
10732         (convert_vms_descriptor): Declare.
10733         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10734         (build_function_stub): Move to...
10735         * gcc-interface/utils2.c (build_return_expr): Move to...
10736         * gcc-interface/trans.c (build_function_stub): ...here.
10737         (build_return_expr): ...here.
10738         (Subprogram_Body_to_gnu): Add local variable for language_function.
10739         Disconnect the parameter attributes cache, if any, once done with it.
10740         Call end_subprog_body only after setting the end_locus.
10741         Build the stub associated with the function, if any, at the very end.
10742         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10743         variables and streamline control flow.
10744
10745 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
10746
10747         PR ada/49819
10748         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10749         g-trasym-dwarf.adb.
10750
10751 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10752
10753         PR bootstrap/49794
10754         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10755         Assign to act.sa_sigaction.
10756         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10757         current->return_address to char * before arithmetic.
10758
10759 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10760
10761         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10762         Correct argument types.
10763         Extract code from reason.
10764         (__gnat_install_handler): Assign to act.sa_sigaction.
10765
10766 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
10767
10768         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10769         (GNAT1_OBJS): ...here.
10770
10771 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
10772
10773         PR ada/48711
10774         * g-socthi-mingw.adb (Fill): Fix formatting.
10775
10776         * gcc-interface/gigi.h: Move around comment.
10777
10778 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
10779
10780         PR ada/46350
10781         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10782
10783 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
10784
10785         PR ada/48711
10786         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10787
10788 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
10789
10790         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10791         range comparison if Pmode is SImode.
10792
10793 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
10794             Eric Botcazou  <ebotcazou@adacore.com>
10795
10796         * adadecode.c: Wrap up in extern "C" block.
10797         * adadecode.h: Likewise.
10798         * adaint.c: Likewise.  Remove 'const' keyword.
10799         * adaint.h: Likewise.
10800         * argv.c: Likewise.
10801         * atree.h: Likewise.
10802         * cio.c: Likewise.
10803         * cstreams.c: Likewise.
10804         * env.c: Likewise.
10805         * exit.c: Likewise.
10806         * fe.h: Likewise.
10807         * final.c: Likewise.
10808         * init.c: Likewise.
10809         * initialize.c: Likewise.
10810         * link.c: Likewise.
10811         * namet.h: Likewise.
10812         * nlists.h: Likewise.
10813         * raise.c: Likewise.
10814         * raise.h: Likewise.
10815         * repinfo.h: Likewise.
10816         * seh_init.c: Likewise.
10817         * targext.c: Likewise.
10818         * tracebak.c: Likewise.
10819         * uintp.h: Likewise.
10820         * urealp.h: Likewise.
10821         * xeinfo.adb: Wrap up generated C code in extern "C" block.
10822         * xsinfo.adb: Likewise.
10823         * xsnamest.adb: Likewise.
10824         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10825         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10826         * gcc-interface/misc.c: Likewise.
10827         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10828         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
10829         ada/targext.o here...
10830         (GNAT_ADA_OBJS): ...and not here.
10831         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10832         (GNATBIND_OBJS): Reorder.
10833
10834 2011-07-07  Richard Henderson  <rth@redhat.com>
10835
10836         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10837         dwarf2out_frame_init.
10838
10839 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
10840
10841         * gcc-interface/misc.c (gnat_init): Tweak previous change.
10842
10843 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10844
10845         PR target/39150
10846         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10847
10848 2011-07-06  Richard Guenther  <rguenther@suse.de>
10849
10850         * gcc-interface/misc.c (gnat_init): Merge calls to
10851         build_common_tree_nodes and build_common_tree_nodes_2.
10852         Re-initialize boolean_false_node.
10853
10854 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
10855             Olivier Hainque  <hainque@adacore.com>
10856             Nicolas Setton  <setton@adacore.com>
10857
10858         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10859         the type according to the ARTIFICIAL_P parameter.
10860         (create_type_decl): Likewise.
10861         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10862
10863 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
10864
10865         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10866         (gnatbind): Likewise.
10867
10868 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10869
10870         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10871
10872 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10873
10874         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10875         local variable throughout.  Remove useless call to Base_Type.
10876         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10877         Take it also into account for the volatileness of the field.  Set the
10878         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
10879
10880 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10881
10882         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10883         on a dereference built for a by-ref object if it has an address clause.
10884
10885 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10886
10887         * einfo.ads (Address_Taken): Document use for the second argument of
10888         Asm_Input and Asm_Output attributes.
10889         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10890         argument is an entity name, then set Address_Taken on it.
10891         <Attribute_Asm_Output>: Likewise.
10892         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10893         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10894         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10895         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10896
10897 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
10898
10899         PR middle-end/46500
10900         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10901
10902 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
10903
10904         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10905         (ada/utils.o): Update dependencies.
10906         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10907         ../../../libcpp/libcpp.a.
10908         * gcc-interface/utils.c: Include common/common-target.h.
10909         (process_attributes): Use targetm_common.have_named_sections.
10910
10911 2011-06-07  Richard Guenther  <rguenther@suse.de>
10912
10913         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10914         set_sizetype.
10915
10916 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10917
10918         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10919         TREE_THIS_NOTRAP flag.
10920
10921 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10922
10923         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10924         Fix thinko.
10925
10926 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10927
10928         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10929         constants whose full view has discriminants specially.
10930
10931 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10932
10933         * gcc-interface/utils.c: Include diagnostic.h.
10934         (gnat_write_global_declarations): Output debug information for all
10935         global type declarations before finalizing the compilation unit.
10936         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10937
10938 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
10939
10940         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10941
10942 2011-05-25  Kai Tietz  <ktietz@redhat.com>
10943
10944         * adaint.c (__gnat_to_canonical_file_list_next): Use array
10945         initialization instead of const/none-const pointer assignment.
10946
10947 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
10948
10949         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10950         $(EXTRA_GNAT1_OBJS).
10951         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10952         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10953         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10954         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10955         libcommon-target.a instead of prefix.o.
10956
10957 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
10958
10959         PR ada/49097
10960         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10961
10962 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
10963
10964         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10965         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10966         instead of version.o.
10967
10968 2011-05-18  Kai Tietz <ktietz@redhat.com>
10969
10970         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10971         boolean_false_node instead of integer_zero_node.
10972         (convert_with_check): Likewise.
10973         * gcc-interface/decl.c (choices_to_gnu): Likewise.
10974
10975 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
10976
10977         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10978         type of the parameter is an unconstrained array, convert the actual to
10979         the type of the formal in the In Out and Out cases as well.
10980
10981 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
10982
10983         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10984         call build_function_type_array or build_varargs_function_type_array
10985         instead.
10986         (create_subprog_type): Don't call build_function_type; call
10987         build_function_type_vec instead.
10988
10989 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
10990
10991         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10992         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10993         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10994
10995 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
10996
10997         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10998
10999         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11000         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11001
11002 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
11003
11004         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11005
11006 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
11007
11008         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11009         instead of accessing TYPE_ARG_TYPES directly.
11010         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11011
11012 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
11013
11014         PR ada/48844
11015         * gcc-interface/gigi.h (get_variant_part): Declare.
11016         * gcc-interface/decl.c (get_variant_part): Make global.
11017         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11018         types have the same constant size, are record types and T1 has a
11019         variant part while T2 doesn't.
11020
11021 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
11022
11023         * gcc-interface/utils.c (begin_subprog_body): Do not call
11024         get_pending_sizes.
11025         (end_subprog_body): Likewise.
11026
11027 2011-05-04  Richard Guenther  <rguenther@suse.de>
11028
11029         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11030         int_const_binop.
11031         (pos_to_constructor): Likewise.
11032
11033 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
11034             Eric Botcazou  <ebotcazou@adacore.com>
11035
11036         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11037         of build_function_type.  Adjust calls to...
11038         (build_raise_check): ...this.  Do not take a void_tree parameter.
11039         Call build_function_type_list instead of build_function_type.
11040         Fix head comment and swap couple of conditional blocks.
11041
11042 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
11043
11044         * gnatvsn.ads (Library_Version): Bump to 4.7.
11045         (Current_Year): Bump to 2011.
11046
11047 2011-04-29  Michael Matz  <matz@suse.de>
11048
11049         * gcc-interface/misc.c (gnat_handle_option): Set
11050         warn_maybe_uninitialized.
11051
11052 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
11053
11054         * gnat_ugn.texi (Complexity Metrics Control): Update link to
11055         the Watson/McCabe paper.
11056
11057 2011-04-23  Jim Meyering  <meyering@redhat.com>
11058
11059         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11060
11061 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
11062
11063         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11064         onto the new type.
11065
11066 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
11067
11068         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
11069         parameter.
11070         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
11071         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
11072         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
11073         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
11074         <all>: Do not set flags on the reused DECL node coming from an alias.
11075         Set DECL_IGNORED_P on the DECL node built for subprograms if they
11076         don't need debug info here...
11077         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
11078         (gigi): Adjust calls to create_subprog_decl.
11079         (build_raise_check): Likewise.
11080         (establish_gnat_vms_condition_handler): Likewise.
11081         (Compilation_Unit_to_gnu): Likewise.
11082         (gnat_to_gnu): Likewise.
11083
11084 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
11085
11086         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
11087         (NO_REORDER_ADAFLAGS): New variable.
11088         (EXTRA_GNATTOOLS): Always define.
11089         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
11090         Clean up and adjust list of files compiled with special options.
11091         * gcc-interface/Make-lang.in: Likewise.
11092         (ada/decl.o): Cosmetical change.
11093         (ada/misc.o): Remove dependency on $(PLUGIN_H).
11094
11095 2011-04-20  Jim Meyering  <meyering@redhat.com>
11096
11097         * initialize.c (__gnat_initialize): Remove useless if-before-free.
11098
11099 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
11100
11101         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
11102         $(CFLAGS) on the link line.
11103
11104 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
11105
11106         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
11107         padded type built for the return type if it is unconstrained.
11108
11109 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
11110
11111         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
11112
11113 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
11114
11115         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11116         before calling TREE_CHAIN.
11117         * gcc-interface/misc.c (gnat_init_ts): New function.
11118         (LANG_HOOKS_INIT_TS): Define.
11119
11120 2011-04-12  Martin Jambor  <mjambor@suse.cz>
11121
11122         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11123         instead of cgraph_node.
11124
11125 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
11126
11127         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11128         alignment on fields of the RETURN type built for the Copy-In Copy-Out
11129         mechanism.
11130
11131 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
11132
11133         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11134         of aggregate types that contain a placeholder.
11135
11136 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
11137
11138         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11139         TYPE_ARG_TYPES.
11140         (handle_type_generic_attribute): Likewise.
11141
11142 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
11143
11144         PR ada/47163
11145         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11146
11147 2011-04-04  Kai Tietz  <ktietz@redhat.com>
11148
11149         PR ada/47163
11150         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11151         to flag value.
11152
11153 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11154
11155         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11156         type case, do not strip a padding type around the array type.
11157
11158 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11159
11160         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11161         types.
11162
11163 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11164
11165         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11166         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11167         code for -feliminate-unused-debug-types.
11168         (gnat_post_options): Likewise.
11169
11170 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11171
11172         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11173         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11174         distinct copy.
11175
11176 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11177
11178         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11179         DECL_ARTIFICIAL flag on enumeration types.
11180
11181 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11182
11183         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11184         fat pointer types artificial unconditionally.
11185         <E_Array_Subtype>: Attach the base array type as a parallel type if it
11186         isn't artificial.
11187
11188 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11189
11190         * gcc-interface/gigi.h (get_dummy_type): Declare.
11191         (build_dummy_unc_pointer_types): Likewise.
11192         (finish_fat_pointer_type): Likewise.
11193         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11194         fat pointer type has been built, complete it in place.
11195         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11196         and thin pointers.  Remove useless variable.
11197         (finish_fat_pointer_type): Make global and move to...
11198         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11199         (get_dummy_type): New function.
11200         (build_dummy_unc_pointer_types): Likewise.
11201         (gnat_pushdecl): Propage the name to the anonymous variants only.
11202         (update_pointer_to): Only adjust the pointer types in the unconstrained
11203         array case.
11204
11205 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11206
11207         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11208         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11209         if this is a Taft amendment type and the full declaration is available.
11210         * gcc-interface/trans.c (process_type): Likewise.
11211         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11212         (process_freeze_entity): Likewise.
11213         * gcc-interface/utils.c (dummy_global): New static variable.
11214         (gnat_write_global_declarations): If there are types declared as used
11215         at the global level, insert them in the global hash table.
11216
11217 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11218
11219         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11220         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11221         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11222         copy.
11223         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
11224         flag of the type accordingly.
11225         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11226
11227 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11228
11229         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11230         finalizing types when updating the pointers to the designated type.
11231         <all>: Finalize the deferred types even if we didn't defer processing
11232         of incomplete types in this invocation.
11233
11234 2011-04-01  Olivier Hainque  <hainque@adacore.com>
11235             Nicolas Setton  <setton@adacore.com>
11236             Eric Botcazou  <ebotcazou@adacore.com>
11237
11238         * gcc-interface/misc.c (gnat_descriptive_type): New function.
11239         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11240
11241 2011-03-28  Kai Tietz  <ktietz@redhat.com>
11242
11243         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11244         Windows targets.
11245         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11246         * system-mingw.ads (System): Change ZCX_By_Default default to True.
11247
11248         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11249
11250 2011-03-28  Tristan Gingold  <gingold@adacore.com>
11251
11252         PR ada/44431
11253         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11254         Use ada output of gnatbind.
11255         (ada/b_gnatb.adb): Ditto.
11256         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11257         (ada.mostlyclean, ada.stage1)
11258         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11259         (ada.stagefeedback): Adjust.
11260         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11261         Use ada output of gnatbind.
11262         (b_gnatm.adb): Ditto.
11263         (b_gnatl.o, b_gnatm.o): New rules.
11264
11265 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11266
11267         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11268         for the padded type built to support a specified size or alignment.
11269
11270 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11271
11272         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11273         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11274         unconditionally to the end of the unit when the designated type is
11275         limited_with'ed.
11276         <all>: Rename local variable.  Attempt to un-defer types only and do it
11277         for limited_with'ed types as well.
11278         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
11279         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11280         consistently and remove redundant call to finalize_from_with_types.
11281
11282 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11283
11284         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11285         subprograms without a previous spec declared in the same unit.
11286         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11287         subprograms at the end of the unit instead of at the beginning.
11288         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11289         isn't public for the special handling of non-inline functions nested
11290         inside inline external functions.
11291
11292 2011-03-25  Jeff Law  <law@redhat.com>
11293
11294         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11295
11296 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11297
11298         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11299         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11300         to compute Set_Size_Depends_On_Discriminant.
11301         (Layout_Type): Call it on array types in back-end layout mode.
11302         * sem_util.adb (Requires_Transient_Scope): Return true for array
11303         types only if the size depends on the value of discriminants.
11304         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11305         type if the RHS is a call to a function that returns an unconstrained
11306         type with default discriminant.
11307
11308 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11309
11310         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11311         non-conversion to the nominal result type at the end.
11312
11313 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11314
11315         * gcc-interface/trans.c (create_temporary): New function taken from...
11316         (create_init_temporary): ...here.  Call it.
11317         (call_to_gnu): Create the temporary for the return value early, if any.
11318         Create it for a function with copy-in/copy-out parameters if there is
11319         no target; in other cases of copy-in/copy-out, use another temporary.
11320         Push the new binding level lazily.  Add and rename local variables.
11321
11322 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11323
11324         * gcc-interface/decl.c (validate_size): Improve comments and tweak
11325         error message.
11326         (set_rm_size): Likewise.
11327
11328 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11329
11330         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11331         for the padded type built in order to support a specified alignment.
11332         Fix incorrect formatting.
11333
11334 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11335
11336         PR bootstrap/48216
11337         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11338
11339 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11340
11341         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11342         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11343         to the end of the list.  Adjust recursive call.  Rename local variable.
11344         If REORDER is true, reorder components of the record type.
11345         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11346         components_to_record and adjust the parameter list.
11347
11348 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11349
11350         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11351         disabled, use the variable for bounds of loop iteration scheme.
11352
11353 2011-03-21  Kai Tietz  <ktietz@redhat.com>
11354
11355         PR target/12171
11356         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11357
11358 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
11359
11360         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11361         out whether the expression is read-only.  Short-circuit placeholder
11362         case and rename a couple of local variables.
11363
11364 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
11365
11366         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11367         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11368         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11369         (convert): Deal with conversions from a smaller form type specially.
11370
11371 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
11372
11373         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11374         its argument, except for the special -I- switch.
11375
11376 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
11377
11378         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11379         "Ada Issues".
11380
11381 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
11382
11383         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11384
11385 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
11386
11387         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11388         GNAT_FORMAL.
11389         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11390         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
11391         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
11392         Do not generate the check directly, instead instantiate the template
11393         check present in the descriptor.
11394         (make_descriptor_field): Move around.
11395         (build_vms_descriptor32): Build a template check in the POINTER field.
11396         (build_vms_descriptor): Remove useless suffixes.
11397         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11398
11399 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
11400
11401         PR bootstrap/47467
11402         * targext.c: Include target files if IN_RTS is defined.
11403
11404 2011-01-26  Richard Guenther  <rguenther@suse.de>
11405
11406         PR bootstrap/47467
11407         * targext.c: Include config.h.
11408         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11409         dependency.
11410
11411 2011-01-04  Pascal Obry  <obry@adacore.com>
11412             Eric Botcazou  <ebotcazou@adacore.com>
11413
11414         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11415
11416 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11417
11418         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11419         end-of-case on the end label and its associated gotos, if any.
11420
11421 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11422
11423         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11424         expressions of the parameter cache within the statement group of
11425         the CICO mechanism.
11426
11427 2011-01-04  Olivier Hainque  <hainque@adacore.com>
11428             Eric Botcazou  <ebotcazou@adacore.com>
11429
11430         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11431         (set_end_locus_from_node): New function.
11432         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11433         make and the function end_locus.
11434         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11435         for the elaboration subprogram.
11436         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11437         set the end_locus of the expression as well.
11438
11439 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11440
11441         PR ada/47131
11442         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11443         variables that are referenced in exception handlers volatile.
11444
11445
11446 \f
11447 Copyright (C) 2011 Free Software Foundation, Inc.
11448
11449 Copying and distribution of this file, with or without modification,
11450 are permitted in any medium without royalty provided the copyright
11451 notice and this notice are preserved.