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         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
4         where an anonymous access discriminant of a limited designated type
5         appears in a non-immutably limited discriminated type and issue an
6         error message. Add local variable Desig_T and replace all occurrences
7         of Designated_Type.
8
9 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
10
11         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
12         implementation is compliant to RM D.15(15/2) after the modification
13         imposed by AI05-0094-1 (binding interpretation).
14
15 2011-08-29  Robert Dewar  <dewar@adacore.com>
16
17         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
18         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
19
20 2011-08-29  Thomas Quinot  <quinot@adacore.com>
21
22         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
23         the scope name, do not report a missing label as a style violation (it
24         will be diagnosed as an illegality).
25         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
26         variant records: Get_Enum_Lit_From_Pos already returns a usage
27         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
28         on Expr in Integer_Literal case so that it can be used by
29         Build_To_Any_Call.
30
31 2011-08-29  Tristan Gingold  <gingold@adacore.com>
32
33         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
34         Adjust comment.
35         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
36         (Build_Abort_Block_Handler): New function to build an Abort_Signal
37         exception handler.
38         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
39         Build_Abort_Block_Handler to build the exception handler. Do not
40         undefer aborts for the Abort_Signal exception handler if back-end
41         exception mechanism.
42         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
43         back_end exceptions for all others and abort_signal.
44         * s-except.ads (ZCX_By_Default): New constant.
45         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
46         (Raise_Exception_Always): Ditto.
47         (Raise_From_Signal_Handler): Ditto.
48         (Raise_With_Location_And_Msg): Ditto.
49         (Raise_With_Msg): Ditto.
50         (Reraise): Ditto.
51         (Reraise_Occurence): Ditto.
52         (Reraise_Occurrence_Always): Ditto.
53         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
54         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
55         * s-interr-hwint.adb (Interrupt_Manager): Defer abort if ZCX.
56
57 2011-08-29  Thomas Quinot  <quinot@adacore.com>
58
59         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
60
61 2011-08-29  Robert Dewar  <dewar@adacore.com>
62
63         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
64         Minor code reorganization.
65
66 2011-08-29  Bob Duff  <duff@adacore.com>
67
68         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
69         2012, not just Ada 2005.
70
71 2011-08-29  Vincent Celier  <celier@adacore.com>
72
73         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
74         with a project file or with gprbuid, if -gnatep= is specified, the
75         builder may need to be invoked with -x.
76
77 2011-08-29  Tristan Gingold  <gingold@adacore.com>
78
79         * a-exexpr-gcc.adb: Minor comment fix.
80
81 2011-08-29  Robert Dewar  <dewar@adacore.com>
82
83         * sem_ch8.adb: Minor reformatting.
84
85 2011-08-29  Bob Duff  <duff@adacore.com>
86
87         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
88         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
89         treating "some" as unreserved in earlier Ada versions. This is now
90         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
91         rather than Name_Some, since Tok_Some is now recognized as reserved.
92         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
93         reserved word.
94         * scans.ads: Minor comment fixes.
95         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
96         for other language versions.
97         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
98         treating "some" as unreserved in earlier Ada versions. This is now
99         handled in Snames.Is_Keyword_Name.
100         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
101         Ada 2012.
102         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
103         unreserved in earlier Ada versions. This is now handled in
104         Snames.Is_Keyword_Name.
105         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
106         words as for other language versions.
107         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
108         Ada 2012, not just Ada 2005.
109
110 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
111
112         * sem_ch13.adb: Additional semantic checks for aspects involved in
113         iterators.
114
115 2011-08-29  Matthew Heaney  <heaney@adacore.com>
116
117         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
118         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
119         Container parameter.
120         (Ancestor_Find): ditto.
121
122 2011-08-29  Thomas Quinot  <quinot@adacore.com>
123
124         * par-endh.adb: Minor reformatting.
125
126 2011-08-29  Tristan Gingold  <gingold@adacore.com>
127
128         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
129         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
130         (Adjust_N_CLeanups_For): Remove.
131         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
132         stack is reached.
133         (Propgate_Exception): Adjust.
134         * raise-gcc.c: Add a few static/const.
135         (Adjust_N_Cleanups_For): Remove declaration.
136         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
137
138 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
139
140         * sem_ch8.adb: Use type of function return when rewriting as object
141         declaration.
142
143 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
144
145         * sem_type.adb: Minor reformatting.
146
147 2011-08-29  Robert Dewar  <dewar@adacore.com>
148
149         * makeutl.adb: Minor reformatting.
150
151 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
152
153         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
154         function call of a limited type, the expansion of the renaming is
155         complicated by the presence of various temporaries and subtypes that
156         capture constraints of the renamed object.
157         Rewrite node as an object declaration, whose expansion is simpler.
158         Given that the object is limited there is no copy involved and no
159         performance hit.
160
161 2011-08-29  Robert Dewar  <dewar@adacore.com>
162
163         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
164         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
165
166 2011-08-29  Tristan Gingold  <gingold@adacore.com>
167
168         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
169         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
170         system-linux-hppa.ads, system-linux-s390.ads,
171         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
172         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
173         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
174         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
175         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
176         system-solaris-sparc.ads, system-lynxos-x86.ads,
177         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
178         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
179         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
180         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
181         system-vxworks-x86.ads: Remove GCC_ZCX_Support
182         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
183         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
184         * opt.ads: Adjust comment.
185         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
186         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
187         * system.ads: Move GCC_ZCX_Support to obsolete entries.
188
189 2011-08-29  Emmanuel Briot  <briot@adacore.com>
190
191         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
192         file name is specified on the gnatmake or gprbuild command line, and
193         before we search for that file in the project.
194
195 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
196
197         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
198         used to determine whether a possible interpretation for an overloadable
199         entity is declared within the current instantiation and should be
200         included in the candidate set.
201
202 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
203
204         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
205
206 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
207
208         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
209         access subtype is access_to_subprogram, when applying checks for
210         RM 3.10.2 (27).
211
212 2011-08-29  Matthew Heaney  <heaney@adacore.com>
213
214         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
215         for sibling when common parent.
216
217 2011-08-29  Thomas Quinot  <quinot@adacore.com>
218
219         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
220         "pragma_".
221
222 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
223
224         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
225         for the return type when in ASIS mode.
226
227 2011-08-29  Vincent Celier  <celier@adacore.com>
228
229         * make.adb (Gnatmake): Get the default search dirs, then the target
230         parameters after getting the Builder switches, as the Builder switches
231         may include --RTS= and that could change the default search dirs.
232
233 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
234
235         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
236         Make_Final_Call. Move the processing for class-wide types before the
237         processing for derivations from [Limited_]Controlled.
238         (Make_Final_Call): Move the processing for class-wide types before the
239         processing for derivations from [Limited_]Controlled.
240         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
241         Add code to account for alignments larger than the list header. Add a
242         comment illustrating the structure of the allocated object + padding +
243         header.
244         (Deallocate_Any_Controlled): Add code to account for alignments larger
245         than the list header.
246
247 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
248
249         * sinfo.ads, sinfo.adb: New node kind
250         N_Formal_Incomplete_Type_Definition, related flags.
251         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
252         Parse formal incomplete types.
253         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
254         sem_ch12.
255         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
256         Formal incomplete types do not need completion.
257         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
258         Validate_Incomplete_Type_Instance): New procedures to handle formal
259         incomplete types.
260         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
261         that corresponds to a formal incomplete type.
262         * sprint.adb: Handle formal incomplete type declarations.
263         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
264         an insertion point.
265
266 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
267
268         * a-fihema.ads, a-fihema.adb: Unit removed.
269         * a-undesu.ads, a-undesu.adb: New unit implementing
270         Ada.Unchecked_Deallocate_Subpool.
271         * einfo.adb: Remove Associated_Collection from the node usage.
272         Add Finalization_Master to the node usage.
273         (Associated_Collection): Removed.
274         (Finalization_Master): New routine.
275         (Set_Associated_Collection): Removed.
276         (Set_Finalization_Master): New routine.
277         (Write_Field23_Name): Remove Associated_Collection from the output. Add
278         Finalization_Master to the output.
279         * einfo.ads: Remove attribute Associated_Collection and its uses in
280         entities.
281         Add new attribute Finalization_Master along with its uses in entitites.
282         (Associated_Collection): Removed along with its pragma import.
283         (Finalization_Master): New routine along with a pragma import.
284         (Set_Associated_Collection): Removed along with its pragma import.
285         (Set_Finalization_Master): New routine along with a pragma import.
286         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
287         Build_Finalization_Collection with Build_Finalization_Master.
288         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
289         before the bodies of the predefined routines. Add comment explaining
290         this. Replace call to Build_Finalization_Collection with
291         Build_Finalization_Master.
292         (Freeze_Type): Replace call to Build_Finalization_Collection with
293         Build_Finalization_Master.
294         (Make_Finalize_Address_Body): Comment reformatting.
295         (Make_Predefined_Primitive_Specs): Code reformatting.
296         (Stream_Operation_OK): Update comment mentioning finalization
297         collections. Replace RE_Finalization_Collection with
298         RE_Finalization_Master.
299         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
300         Associated_Collection with Finalization_Master. Replace call to
301         Build_Finalization_Collection with Build_Finalization_Master.
302         (Expand_Allocator_Expression): Replace call to Associated_Collection
303         with Finalization_Master. Replace call to Set_Associated_Collection with
304         Set_Finalization_Master. Remove the generation of
305         Set_Finalize_Address_Ptr.
306         (Expand_N_Allocator): Replace call to Associated_Collection with
307         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
308         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
309         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
310         comment on usage. Replace call to Needs_BIP_Collection with
311         Needs_BIP_Finalization_Master Remplace BIP_Collection with
312         BIP_Finalization_Master. Update all comments which mention finalization
313         collections. Replace Associated_Collection with
314         Finalization_Master. Replace Build_Finalization_Collection with
315         Build_Finalization_Master.
316         (BIP_Formal_Suffix): Update BIP_Collection's case.
317         (Build_Heap_Allocator): Update the related comment. Rename local
318         variable Collect to Fin_Mas_Id and update its occurrences. Update
319         comments which mention finalization collections. Replace
320         Set_Associated_Collection with Set_Finalization_Master.
321         (Expand_Call): Update the code which detects a special piece of library
322         code for .NET/JVM.
323         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
324         Add_Collection_Actual_To_Build_In_Place_Call with
325         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
326         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
327         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
328         Add_Collection_Actual_To_Build_In_Place_Call with
329         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
330         (Make_Build_In_Place_Call_In_Assignment): Replace call to
331         Add_Collection_Actual_To_Build_In_Place_Call with
332         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
333         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
334         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
335         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
336         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
337         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
338         Replace call to Set_Associated_Collection with Set_Finalization_Master.
339         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
340         Replace the call to Associated_Collection with Finalization_Master.
341         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
342         Update the way finalization master names are generated. Update the
343         retrieval of the correct access type which will carry the pool and
344         master attributes.
345         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
346         (Make_Finalize_Address_Body): Abstract types do not need
347         Finalize_Address. Code reformatting.
348         (Make_Finalize_Address_Stmts): Update comment on usage.
349         (Make_Set_Finalize_Address_Ptr_Call): Removed.
350         (Process_Declarations): Update comments.
351         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
352         Build_Finalization_Master. Update associated comment.
353         (Make_Set_Finalize_Address_Ptr_Call): Removed.
354         * exp_ch13.adb: Update comments which mention finalization collections.
355         (Expand_N_Free_Statement): Replace the call to Associated_Collection
356         with Finalization_Master.
357         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
358         create calls to routines Allocate_Any_Controlled and
359         Deallocate_Any_Controlled.
360         (Find_Finalize_Address): New routine.
361         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
362         comparison.
363         (Requires_Cleanup_Actions): Update the comment on freeze node
364         inspection.
365         * exp_util.ads: Remove comment on generated code for
366         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
367         is better to simply look in the body.
368         * freeze.adb (Freeze_All): Update the comment of finalization
369         collections. Replace the call to Associated_Collection with
370         Finalization_Master. Replace the call to Build_Finalization_Collection
371         with Build_Finalization_Master.
372         * impunit.adb: Add a-undesu and s-stposu to the list of units.
373         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
374         a-fihema.
375         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
376         Ada.Finalization. Add processing for children of System.Storage_Pools.
377         * rtsfind.ads: Remove the naming of second level children of
378         Ada.Finalization.
379         Remove Ada_Finalization_Heap_Management from the list of units.
380         Remove subtype Ada_Finalization_Child.
381         Remove the following subprogram entities:
382         
383            RE_Allocate
384            RE_Deallocate
385            RE_Finalization_Collection
386            RE_Finalization_Collection_Ptr
387            RE_Set_Finalize_Address_Ptr
388         
389         Add the naming of second level children of System.Storage_Pools.
390         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
391         the list of units.
392         Add subtype System_Storage_Pools_Child.
393         Add the following subprogram entities to System.Finalization_Masters:
394         
395            RE_Finalization_Master
396            RE_Finalization_Master_Ptr
397         
398         Add the following subprogram entities to System.Storage_Pools.Subpools:
399         
400            RE_Allocate_Any_Controlled
401            RE_Deallocate_Any_Controlled
402            RE_Root_Storage_Pool_With_Subpools
403            RE_Root_Subpool
404            RE_Subpool_Handle
405         
406         Move the following subprogram entities from
407         Ada.Finalization.Heap_Management to System.Finalization_Masters:
408         
409            RE_Add_Offset_To_Address
410            RE_Attach
411            RE_Base_Pool
412            RE_Detach
413         
414         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
415         Set_Associated_Collection with Set_Finalization_Master.
416         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
417         BIP_Finalization_Master is created.
418         * s-finmas.adb: New unit System.Finalization_Masters.
419         * s-finmas.ads: New unit System.Finalization_Masters.
420         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
421         * s-stposu.ads, s-stposu.adb: New unit implementing
422         System.Storage_Pools.Subpools.
423
424 2011-08-29  Bob Duff  <duff@adacore.com>
425
426         * tbuild.adb: Add assertion.
427
428 2011-08-29  Thomas Quinot  <quinot@adacore.com>
429
430         * s-pooglo.adb: Minor reformatting.
431
432 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
433
434         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
435         an indexed component of a packed array whose element type is a record
436         with a representation clause different from that of the right-hand
437         side, generate a temporary to minimuze the number of bit-field
438         operations generated.
439
440 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
441
442         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
443         declarations, and thus are likely insertion points for actions.
444
445 2011-08-29  Bob Duff  <duff@adacore.com>
446
447         * einfo.ads: Minor comment fix.
448
449 2011-08-29  Robert Dewar  <dewar@adacore.com>
450
451         * frontend.adb, gnat1drv.adb: Minor reformatting.
452
453 2011-08-29  Tristan Gingold  <gingold@adacore.com>
454
455         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
456         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
457         space in front of the header.
458
459 2011-08-29  Johannes Kanig  <kanig@adacore.com>
460
461         * frontend.adb (Frontend): Exit after creating Standard package when
462         -gnatd.H is present.
463         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
464         present.
465
466 2011-08-29  Robert Dewar  <dewar@adacore.com>
467
468         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
469         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
470         snames.ads-tmpl: Minor reformatting.
471
472 2011-08-29  Philippe Gil  <gil@adacore.com>
473
474         * prj.adb (Reset_Units_In_Table): New procedure.
475         Reset units to avoid access to freed memory.
476
477 2011-08-29  Thomas Quinot  <quinot@adacore.com>
478
479         * get_scos.adb: When reading a P statement SCO without a pragma name
480         (from an older ALI file), ensure that the Pragma_Name component is set
481         to Unknown_Pragma (not left uninitialized).
482
483 2011-08-29  Vincent Celier  <celier@adacore.com>
484
485         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
486         modified to compute correctly the object path of a SAL project that is
487         extending another library project.
488         (Write_Path_File): New procedure.
489         * makeutl.ads (Directories): New table moved from Buildgpr
490         (Get_Directories): New procedure moved from Buildgpr
491         (Write_Path_File): New procedure
492         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
493         paths before binding SALs, instead of Set_Ada_Paths.
494         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
495         Prj.
496         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
497         (Current_Source_Path_File_Of): New function
498         (Set_Current_Object_Path_File_Of): New procedure
499         (Current_Source_Object_File_Of): New function
500         (Set_Current_Object_Path_File_Of): New procedure
501         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
502         (Current_Source_Path_File_Of): New function
503         (Set_Current_Object_Path_File_Of): New procedure
504         (Current_Source_Object_File_Of): New function
505         (Set_Current_Object_Path_File_Of): New procedure
506
507 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
508
509         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
510         packed entity, use a bit-field assignment only if there is no change of
511         representation.
512
513 2011-08-29  Thomas Quinot  <quinot@adacore.com>
514
515         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
516         Is_RTU instead of using Chars comparisons.
517
518 2011-08-29  Thomas Quinot  <quinot@adacore.com>
519
520         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
521         temporary object if the actual is constrained, and the discriminants
522         read from the stream don't match.
523
524 2011-08-29  Tristan Gingold  <gingold@adacore.com>
525
526         * sem_attr.adb, exp_attr.adb: Add handling of
527         Attribute_System_Allocator_Alignment
528         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
529         Attribute_System_Allocator_Alignment.
530         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
531         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
532         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
533         get_target_system_allocator_alignment.
534
535 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
536
537         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
538         dependencies.
539
540 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
541
542         * exp_ch3.adb (In_Runtime): Fix typo.
543
544 2011-08-29  Bob Duff  <duff@adacore.com>
545
546         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
547
548 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
549
550         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
551         and a separate tag assignment is generated, ensure that the tag
552         assignment is analyzed.
553
554 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
555
556         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
557         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
558         of statement lists that may contain local declarations.
559         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
560         duplicate the triggering statements needed for the expansion of this
561         construct, when the trigger is a dispatching call to a synchronized
562         primitive.
563
564 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
565
566         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
567         * bindgen.adb: Add comments.
568         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
569         in CodePeer mode.
570
571 2011-08-29  Robert Dewar  <dewar@adacore.com>
572
573         * exp_attr.adb: Minor reformatting.
574         Minor code reorganization and commenting.
575         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
576         reformatting.
577
578 2011-08-29  Thomas Quinot  <quinot@adacore.com>
579
580         * get_scos.adb: Ignore chaining indicators not currently supported
581         by Ada.
582
583 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
584
585         * system.ads: Minor editing.
586
587 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
588
589         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
590         CodePeer mode.
591         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
592         Attribute_Elab_Subp_Body.
593         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
594         * sem_util.adb: Update comments.
595
596 2011-08-29  Thomas Quinot  <quinot@adacore.com>
597
598         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
599         pragma name for each SCO statement corresponding to a pragma.
600
601 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
602
603         * opt.ads: Minor editing.
604
605 2011-08-29  Yannick Moy  <moy@adacore.com>
606
607         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
608         that only made sense for CodePeer mode.
609
610 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
611
612         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
613         which is no longer used.
614         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
615         handling of the 64-bit division check.
616         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
617         division available.
618         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
619         longer used.
620
621 2011-08-29  Thomas Quinot  <quinot@adacore.com>
622
623         * get_scos.adb: Minor reformatting.
624
625 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
626
627         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
628         statement list is wrapped in a block, the block is explicitly analyzed
629         in order to properly redecorate the entities and create a servicing
630         finalizer.
631
632 2011-08-29  Tristan Gingold  <gingold@adacore.com>
633
634         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
635         (Set_Zero_Cost_Handling): Remove.
636
637 2011-08-29  Thomas Quinot  <quinot@adacore.com>
638
639         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
640
641 2011-08-29  Geert Bosch  <bosch@adacore.com>
642
643         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
644         instruction, as the latter may produce -0.0, which is not a valid VAX
645         F float number.
646         (Neg_G): Likewise for VAX F float.
647
648 2011-08-29  Robert Dewar  <dewar@adacore.com>
649
650         * exp_util.adb: Minor reformatting.
651
652 2011-08-29  Yannick Moy  <moy@adacore.com>
653
654         * sem_ch3.adb: Minor comment update.
655
656 2011-08-29  Thomas Quinot  <quinot@adacore.com>
657
658         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
659         the operand type.
660
661 2011-08-29  Thomas Quinot  <quinot@adacore.com>
662
663         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
664         current statement sequence on a generic instantiation or a subprogram
665         declaration.
666
667 2011-08-29  Robert Dewar  <dewar@adacore.com>
668
669         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
670         Minor reformatting.
671
672 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
673
674         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
675         Correct the check which involves the freeze node of a controlled or
676         access-to-controlled type.
677
678 2011-08-29  Geert Bosch  <bosch@adacore.com>
679
680         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
681         statements.
682         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
683         Asm statements.
684
685 2011-08-29  Yannick Moy  <moy@adacore.com>
686
687         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
688         for every index type and component type that is not a subtype_mark.
689         (Process_Subtype): Set Etype of subtype.
690
691 2011-08-29  Robert Dewar  <dewar@adacore.com>
692
693         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
694         reorganization.  Minor reformatting.
695
696 2011-08-29  Steve Baird  <baird@adacore.com>
697
698         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
699         for CodePeer and ALFA modes.
700
701 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
702
703         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
704         that comes from an enclosing scope if it is not the renaming of an
705         actual, to handle properly a spurious ambiguity in an instance.
706
707 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
708
709         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
710         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
711         use it instead of the Esize of the first parameter.
712         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
713         above change.
714         <Size>: Likewise.  Call it for composite types on the RM size.
715
716 2011-08-29  Yannick Moy  <moy@adacore.com>
717
718         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
719         * sem_util.adb (Unique_Name): Correct behaviour for names of
720         compilation units.
721
722 2011-08-29  Yannick Moy  <moy@adacore.com>
723
724         * sem_prag.adb (Check_Precondition_Postcondition): In formal
725         verification mode, analyze pragma expression for correctness, for
726         pre/post on library-level subprogram, as it is not expanded later.
727
728 2011-08-29  Yannick Moy  <moy@adacore.com>
729
730         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
731         in formal verification.
732
733 2011-08-29  Thomas Quinot  <quinot@adacore.com>
734
735         * sem_util.adb: Minor reformatting.
736         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
737         there's no pragma.
738         * par_sco.ads, par_sco.adb: Update comments.
739
740 2011-08-29  Yannick Moy  <moy@adacore.com>
741
742         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
743         associated getter/setter.
744         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
745
746 2011-08-29  Vincent Celier  <celier@adacore.com>
747
748         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
749         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
750         with declarations for Language_Kind and Dependency_Kind for Ada.
751         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
752         (Process_Compiler): Take into account the new attributes Dependency_Kind
753         and Language_Kind.
754         (Check_Configuration): Check if language kind is unit based, not if the
755         language name is Ada.
756         (Process_Exceptions_Unit_Based): Ditto
757         (Add_Language): Remove default additions of language and dependency kind
758         * prj.ads: Minor comment change
759         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
760
761 2011-08-29  Johannes Kanig  <kanig@adacore.com>
762
763         * debug.adb: Update comments.
764
765 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
766
767         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
768         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
769         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
770         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
771         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
772
773 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
774
775         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
776         (GNATLIBCFLAGS_FOR_C): Replace
777         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
778         (gnatlib-shared-default, gnatlib-shared-dual-win32)
779         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
780         (gnatlib-sjlj, gnatlib-zcx): Likewise.
781
782 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
783
784         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
785
786         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
787
788         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
789
790 2011-08-05  Nicolas Roche  <roche@adacore.com>
791
792         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
793         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
794         canadian cross.
795         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
796
797 2011-08-05  Matthew Heaney  <heaney@adacore.com>
798
799         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
800         subprogram bodies declared out-of-order.
801
802 2011-08-05  Yannick Moy  <moy@adacore.com>
803
804         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
805         entities directly in package Standard, otherwise skip the standard
806         prefix.
807
808 2011-08-05  Robert Dewar  <dewar@adacore.com>
809
810         * a-cbmutr.adb: Minor reformatting
811         (Allocate_Node): refactor node allocation algorithm
812
813 2011-08-05  Robert Dewar  <dewar@adacore.com>
814
815         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
816         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
817         mode.
818         (Analyze_Pragma, case Check_Policy): Ditto.
819         * sem_prag.ads (Check_Disabled): New function
820         * snames.ads-tmpl: Add Name_Disable.
821
822 2011-08-05  Robert Dewar  <dewar@adacore.com>
823
824         * gnat_rm.texi: Document implementation-defined policy DISABLE for
825         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
826
827 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
828
829         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
830         that appears in a generic formal part and applies to a formal
831         subprogram.
832
833 2011-08-05  Robert Dewar  <dewar@adacore.com>
834
835         * a-cbmutr.ads: Minor reformatting.
836
837 2011-08-05  Matthew Heaney  <heaney@adacore.com>
838
839         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
840         to check count, check sign of value instead.
841         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
842         (Copy_Subtree): allocate copy of source element
843         (Equal_Subtree): compare elements, not access objects
844
845 2011-08-05  Vincent Celier  <celier@adacore.com>
846
847         * gnat_ugn.texi: Fix VMS alternative.
848
849 2011-08-05  Thomas Quinot  <quinot@adacore.com>
850
851         * sem_ch11.adb: Add comment.
852
853 2011-08-05  Robert Dewar  <dewar@adacore.com>
854
855         * exp_util.adb: Minor comment fix.
856
857 2011-08-05  Robert Dewar  <dewar@adacore.com>
858
859         * scng.adb (Error_Unterminated_String): Improve flag position when
860         comma present.
861
862 2011-08-05  Matthew Heaney  <heaney@adacore.com>
863
864         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
865         tree containers).
866         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
867         multiway tree containers.
868
869 2011-08-05  Robert Dewar  <dewar@adacore.com>
870
871         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
872         * stylesw.adb: Implement -gnatyC to control comment spacing
873         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
874         -gnatyc/C).
875         * usage.adb: Add line for -gnatyC.
876
877 2011-08-05  Robert Dewar  <dewar@adacore.com>
878
879         * gnat_ugn.texi: Document -gnatyC.
880         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
881         synonym for COMMENTS2).
882
883 2011-08-05  Robert Dewar  <dewar@adacore.com>
884
885         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
886         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
887         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
888         a-comutr.ads, lib-xref.adb: Minor reformatting.
889
890 2011-08-05  Robert Dewar  <dewar@adacore.com>
891
892         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
893         warning if there is an exception handler present.
894
895 2011-08-05  Pascal Obry  <obry@adacore.com>
896
897         * a-iteint.ads: Fix copyright year.
898
899 2011-08-05  Thomas Quinot  <quinot@adacore.com>
900
901         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
902         statement SCO for a USE clause or a representation clause.
903
904 2011-08-05  Yannick Moy  <moy@adacore.com>
905
906         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
907         between body and spec for stub.
908         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
909         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
910         pragma precondition or postcondition, for which the enclosing
911         subprogram or package in the AST is not the desired one, return empty.
912
913 2011-08-05  Thomas Quinot  <quinot@adacore.com>
914
915         * g-expect.adb: Minor reformatting.
916
917 2011-08-05  Bob Duff  <duff@adacore.com>
918
919         * a-fihema.adb: Comment out OS_Lib.
920
921 2011-08-05  Matthew Heaney  <heaney@adacore.com>
922
923         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
924         (unbounded multiway tree containers) and a-iteint.ads.
925         * a-comutr.ads, a-comutr.adb:
926         This is the new Ada 2012 unit for unbounded multiway tree containers
927         * a-cimutr.ads, a-cimutr.adb
928         This is the new Ada 2012 unit for indefinite multiway tree containers
929         * a-iteint.ads: New file.
930
931 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
932
933         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
934
935 2011-08-05  Bob Duff  <duff@adacore.com>
936
937         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
938         subpools.
939         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
940
941 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
942
943         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
944         general indexing aspects of Ada2012. Called when analyzing indexed
945         components when other interpretations fail.
946         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
947         in an expression context where overloading is meaningful. This excludes
948         the occurrence in an aspect specification (efficiency only).
949         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
950         related to iterators can be set by an attribute specification, but
951         cannot be queried.
952         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
953         Constant_Indexing and Variable_Indexing.
954         (Check_Indexing_Functions): New procedure to perform legality checks.
955         Additional semantic checks at end of declarations.
956
957 2011-08-05  Sergey Rybin  <rybin@adacore.com>
958
959         * tree_io.ads: Update ASIS_Version_Number because of the change of the
960         order of calling Tree_Write/Tree_Read routines made for aspects.
961
962 2011-08-05  Bob Duff  <duff@adacore.com>
963
964         * a-fihema.adb (Finalize): Fix race condition.
965
966 2011-08-05  Yannick Moy  <moy@adacore.com>
967
968         * sem_ch12.adb (Analyze_Package_Instantiation,
969         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
970         mode.
971
972 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
973
974         * sem_type.adb (Specific_Type): in an instance, the type-specific
975         operand of an equality check that involves null may have a private
976         type. Use full view to determine legality of construct.
977
978 2011-08-05  Vincent Celier  <celier@adacore.com>
979
980         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
981         delete or close the file when the call to gnatmake was successful.
982
983 2011-08-05  Yannick Moy  <moy@adacore.com>
984
985         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
986         Global_Discard_Names.
987
988 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
989
990         * sinfo.ads: comments on use of entity field for aspect specifications.
991
992 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
993
994         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
995         node is not itself an entity but a selected component, it is a
996         rewritten parameterless call to an en enclosing synchronized operation,
997         and this expansion will be performed again in the instance, so there is
998         no global information to preserve.
999
1000 2011-08-05  Javier Miranda  <miranda@adacore.com>
1001
1002         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1003         for renamings of predefined primitives.
1004         (In_Predef_Prims_DT): New subprogram.
1005
1006 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1007
1008         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1009         possible interpretation of name is a reference type, add an
1010         interpretation that is the designated type of the reference
1011         discriminant of that type.
1012         * sem_res.adb (resolve): If the interpretation imposed by context is an
1013         implicit dereference, rewrite the node as the deference of the
1014         reference discriminant.
1015         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1016         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1017         parent type or base type.
1018         * sem_ch4.adb (Process_Indexed_Component,
1019         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1020         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1021         Check for implicit dereference.
1022         (List_Operand_Interps): Indicate when an implicit dereference is
1023         ambiguous.
1024         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1025
1026 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1027
1028         * scos.ads: Update documentation of SCO table. Pragma statements can now
1029         be marked as disabled (using 'p' instead of 'P' as the statement kind).
1030         * par_sco.ads, par_sco.adb: Implement the above change.
1031         (Process_Decisions_Defer): Generate a P decision for the first parameter
1032         of a dyadic pragma Debug.
1033         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1034         necessary.
1035         * put_scos.adb: Code simplification based on above change.
1036
1037 2011-08-05  Robert Dewar  <dewar@adacore.com>
1038
1039         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1040         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1041         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1042         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1043
1044 2011-08-05  Bob Duff  <duff@adacore.com>
1045
1046         * a-stunau.ads, g-spipat.adb: Update comments.
1047
1048 2011-08-05  Bob Duff  <duff@adacore.com>
1049
1050         * a-fihema.ads: Minor comment fix.
1051         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1052         correct.
1053         (Attach, Detach): Remove some unnecessary code.
1054         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1055
1056 2011-08-05  Bob Duff  <duff@adacore.com>
1057
1058         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1059         allocation for Objects component. This simplifies the code somewhat. It
1060         is also a little more efficient in the not-so-unusual case where there
1061         are no controlled objects allocated.
1062         Make Finalization_Started flag atomic.
1063         (Finalize): Avoid unnecessary detachment of items from the list.
1064         (pcol): Minor cleanup.
1065
1066 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1067
1068         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1069         package whose name is the same as that of the generic unit, or its
1070         ultimate prefix.
1071
1072 2011-08-05  Bob Duff  <duff@adacore.com>
1073
1074         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1075         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1076         Minor comment fixes.
1077
1078 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
1079
1080         * make.adb (Linking_Phase): No longer need to set source search path
1081         before calling gnatlink in CodePeer mode.
1082         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1083         gcc in CodePeer mode, since the binder generated file no longer has a
1084         'with Main'.
1085         * switch.ads, switch.adb (Is_Language_Switch): Removed.
1086         * switch-c.adb: Update comment.
1087
1088 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1089
1090         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1091
1092 2011-08-05  Nicolas Roche  <roche@adacore.com>
1093
1094         * gnat_ugn.texi: Fix minor syntax error issue.
1095
1096 2011-08-05  Vincent Celier  <celier@adacore.com>
1097
1098         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1099         delete or close the file when the call to gnatmake returns a non
1100         successful return code.
1101
1102 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1103
1104         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1105         check, indicate that the copy of the original node does not come from
1106         source, to prevent an infinite recursion of the expansion.
1107
1108 2011-08-05  Johannes Kanig  <kanig@adacore.com>
1109
1110         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1111         VC generation for subprogram bodies.
1112
1113 2011-08-05  Yannick Moy  <moy@adacore.com>
1114
1115         * einfo.ads: Typo.
1116         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1117         the base type with the smallest allowed base type.
1118
1119 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1120
1121         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1122         aspects.
1123
1124 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1125
1126         * sem_ch12.ads: minor comment updates.
1127
1128 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1129
1130         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1131         instantiation and a formal package the compiler generates a package
1132         renaming declaration so that the generic name within the declaration
1133         is interpreted as a renaming of the instance. At the end of a formal
1134         package declaration, this renaming must become invisible.
1135
1136 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1137
1138         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1139         comparison and rely on concrete entities instead.
1140
1141 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1142
1143         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1144         and discriminants, to indicate that the type has an access discriminant
1145         that supports implicit dereference.
1146         * snames.ads-tmpl: Add names of aspects and attributes related to
1147         Ada2012 iterators: constant_indexing, default_iterator,
1148         iterator_element, implicit_dereference, variable_indexing.
1149         * aspects.ads, aspects.adb: entries for iterator-related aspects.
1150         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1151         iterator-related aspects.
1152         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1153
1154 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1155
1156         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1157         metrics in gnatmetric to cover new kinds of coupling mentrics.
1158
1159 2011-08-05  Steve Baird  <baird@adacore.com>
1160
1161         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1162         of calling the user-defined main subprogram.
1163         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
1164         is set) Call_Main_Subprogram ahead of, as opposed to
1165         inside of, Main.
1166         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1167         generation of a "with" of the user-defined main subprogram.
1168         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1169         (which is now called from Gen_Main instead).
1170
1171 2011-08-05  Emmanuel Briot  <briot@adacore.com>
1172
1173         * projects.texi: Added reference to the Makefile package.
1174
1175 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1176
1177         * exp_ch7.adb: Minor comment rewording.
1178
1179 2011-08-05  Ed Falis  <falis@adacore.com>
1180
1181         * env.c: Fix comment.
1182
1183 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1184
1185         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1186         character comparison and rely on concrete entities instead.
1187
1188 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1189
1190         * sem_ch3.adb: (Check_Private_Overriding): better error message,
1191         suggested by AI95-0068.
1192
1193 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1194
1195         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1196         the two potential initialization calls. This accounts for any
1197         access-before-elaboration checks which may precede the initialization
1198         calls.
1199         (Next_Suitable_Statement): New routine. Returns the next real statement
1200         after the input node while skipping generated checks.
1201         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1202         with comment on usage.
1203         Do not generate Elaborate_All when the trigger is a finalization call
1204         coming from a type init proc.
1205         (Check_Elab_Call): Propagate the initialization procedure context to
1206         subsequent calls to Check_A_Call.
1207         (Check_Internal_Call_Continue): Propagate the initialization procedure
1208         context to subsequent calls to Check_Elab_Call.
1209         (Is_Finalization_Procedure): New routine. Returns True if the input
1210         entity denotes a [Deep_]Finalize routine.
1211         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1212         along with comment on usage.
1213
1214 2011-08-05  Vadim Godunko  <godunko@adacore.com>
1215
1216         * s-atocou.ads: Add list of supported platforms.
1217
1218 2011-08-05  Yannick Moy  <moy@adacore.com>
1219
1220         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
1221
1222         * opt.ads (Disable_ALI_File): new Boolean flag
1223         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
1224
1225 2011-08-05  Ed Falis  <falis@adacore.com>
1226
1227         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
1228         environ is properly defined.
1229
1230 2011-08-05  Vincent Celier  <celier@adacore.com>
1231
1232         * make.adb (Compilation_Phase): Exit immediately when all objects have
1233         been found up to date, to avoid multiple exit messages.
1234         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
1235         same project for languages with no compiler.
1236         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
1237         -eI.
1238 2011-08-05  Robert Dewar  <dewar@adacore.com>
1239
1240         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
1241         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
1242         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
1243         s-atocou-builtin.adb: Minor reformatting.
1244
1245 2011-08-05  Yannick Moy  <moy@adacore.com>
1246
1247         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
1248         if the node to wrap is a pragma check, this node and enclosed
1249         expression are not expanded, so do not apply any transformations here.
1250         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
1251         introducing transient scopes.
1252
1253 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
1254
1255         * adaint.c (__gnat_set_writable, __gnat_set_readable,
1256         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
1257         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
1258         routine is available, so we use the default implementation of these
1259         functions.
1260         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
1261         support for copying attributes on VxWorks 6.
1262
1263 2011-08-05  Yannick Moy  <moy@adacore.com>
1264
1265         * debug.adb: Remove use of -gnatd.D.
1266         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
1267         * opt.ads: Simplify variables for ALFA mode, to keep one only
1268         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
1269         to ALFA mode.
1270
1271 2011-08-05  Vincent Celier  <celier@adacore.com>
1272
1273         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
1274         Builder'Default_Switches.
1275
1276 2011-08-05  Vincent Celier  <celier@adacore.com>
1277
1278         * makeusg.adb: Add lines for --create-map-file switches.
1279
1280 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1281
1282         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
1283         profile is incomplete and the full view is available, replace it with
1284         the full view.
1285         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
1286         incomplete, freezing the subprogram is delayed until the full view is
1287         frozen.
1288         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
1289         fixed-point multiplication operator and the predefined operator is
1290         resolved in favor of the user-defined one.
1291
1292 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1293
1294         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
1295         CONST_CAST.
1296
1297 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1298
1299         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
1300         whether a type lacks user-defined Read or Write operations, or has a
1301         component that lacks them.
1302         * sem_attr.adb (Check_Stream_Attribute): if restriction
1303         No_Default_Stream_Attributes is active, verify that all subcomponent
1304         types of the target have user-defined stream operations, and report
1305         error otherwise.
1306         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
1307         * exp_strm.adb: Build_Elementary_Input_Call,
1308         Build_Elementary_Write_Call): remove checks for restriction
1309         No_Default_Stream_Attributes, now checked in semantics.
1310
1311 2011-08-04  Vincent Celier  <celier@adacore.com>
1312
1313         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
1314         switches on the command line, look for all valid --RTS switches in the
1315         Builder switches and for each language use the first runtime name found
1316         to invoke gprconfig.
1317         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
1318         command line and there is no auto-configuration.
1319         (Runtime_Name_Set_For): New function.
1320
1321 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1322
1323         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
1324         elaborate initialization expression for variable Abort when processing
1325         a package body or a declaration.
1326         (Create_Finalizer): Propagate the package context when creating the
1327         exception-related variables.
1328         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
1329         For_Package along with usage comment.
1330
1331 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1332
1333         * gcc-interface/Makefile.in: Clean up targets.
1334         Enable new package for atomic counters and copy-on-write implementation
1335         of unbounded strings on x86 platforms.
1336         * gcc-interface/Make-lang.in: Update dependencies.
1337
1338 2011-08-04  Robert Dewar  <dewar@adacore.com>
1339
1340         * exp_ch7.adb: Minor reformatting.
1341
1342 2011-08-04  Robert Dewar  <dewar@adacore.com>
1343
1344         * exp_strm.adb: Minor reformatting.
1345
1346 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1347
1348         * s-atocou.adb: Replace by dummy version and use on targets where atomic
1349         operations are not supported.
1350         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
1351         * s-atocou-x86.adb: New file.
1352         * Makefile.rtl: Add s-atocou.o file
1353
1354 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1355
1356         * make.adb (Compile): Move setting of CodePeer_Mode to ...
1357         (Compilation_Phase): ... here.
1358         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
1359
1360 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1361
1362         * Make-generated.in: Fix minor typo in comment.
1363
1364 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1365
1366         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
1367         the project path.
1368
1369 2011-08-04  Robert Dewar  <dewar@adacore.com>
1370
1371         * a-coinho.adb: Minor reformatting.
1372
1373 2011-08-04  Robert Dewar  <dewar@adacore.com>
1374
1375         * a-coinho.ads: Minor reformatting.
1376
1377 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1378
1379         * s-atocou.ads, s-atocou.adb: New files.
1380         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
1381         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
1382         direct use of GCC's atomic builtins and replace them by use of new
1383         atomic counter package.
1384
1385 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1386
1387         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
1388
1389 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1390
1391         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
1392         with a call to Get_External_Tag.
1393         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
1394         subprogram usage. Remove the guard against package declarations and
1395         bodies since Build_Cleanup_Statements is no longer invoked in that
1396         context.
1397         (Build_Components): Initialize Tagged_Type_Stmts when the context
1398         contains at least one library-level tagged type.
1399         (Build_Finalizer): New local variables Has_Tagged_Types and
1400         Tagged_Type_Stmts along with associated comments on usage. Update the
1401         logic to include tagged type processing.
1402         (Create_Finalizer): Insert all library-level tagged type unregistration
1403         code before the jump block circuitry.
1404         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
1405         (Expand_N_Package_Declaration): Remove the call to
1406         Build_Cleanup_Statements.
1407         (Process_Tagged_Type_Declaration): New routine. Generate a call to
1408         unregister the external tag of a tagged type.
1409         (Processing_Actions): Reimplemented to handle tagged types.
1410         (Process_Declarations): Detect the declaration of a library-level
1411         tagged type and carry out the appropriate actions.
1412         (Unregister_Tagged_Types): Removed. The machinery has been directly
1413         merged with Build_Finalizer.
1414
1415 2011-08-04  Robert Dewar  <dewar@adacore.com>
1416
1417         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
1418         gnatls.adb, exp_ch3.adb: Minor reformatting.
1419
1420 2011-08-04  Marc Sango  <sango@adacore.com>
1421
1422         * sem_attr.adb (Analyze_Attribute): Replace the message
1423         "invisible attribute of}" of the spark restriction violation in
1424         attribute reference by the simple message "invisible attribute of type".
1425         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
1426         two insertion characters: '&' and '}'.
1427
1428 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1429
1430         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
1431         * a-coinho.ads, a-coinho.adb: New file.
1432         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
1433
1434 2011-08-04  Nicolas Roche  <roche@adacore.com>
1435
1436         * alfa_test.adb: Not all ali files are containing alfa information even
1437         if compiled with -gnatd.F. So suppress warning about missing ALFA
1438         information.
1439
1440 2011-08-04  Yannick Moy  <moy@adacore.com>
1441
1442         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
1443         scope.
1444         * put_alfa.adb: Check that scope name is not empty.
1445
1446 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1447
1448         * exp_ch3.adb (Stream_Operation_Ok): new predicate
1449         Needs_Elementary_Stream_Operation, to determine whether user-defined
1450         Read and Write attributes are available for the elementary components
1451         of the given type. If only the predefined attributes are available,
1452         then when restriction No_Default_Stream_Attributes is active the
1453         predefined stream attributes for the composite type cannot be created.
1454
1455 2011-08-04  Robert Dewar  <dewar@adacore.com>
1456
1457         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
1458         Put routines in alpha order
1459
1460 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
1461
1462         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
1463         * gcc-interface/Make-lang.in: Update dependencies.
1464
1465 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1466
1467         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
1468         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
1469         gnat1why).
1470
1471 2011-08-04  Robert Dewar  <dewar@adacore.com>
1472
1473         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
1474         lib-xref-alfa.adb: Minor reformatting.
1475
1476 2011-08-04  Marc Sango  <sango@adacore.com>
1477
1478         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1479         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
1480         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
1481         mode.
1482
1483 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1484
1485         * bindgen.adb (Gen_Adainit_C): Remove.
1486         (Gen_Adafinal_C): Ditto.
1487         (Gen_Elab_Externals_C): Ditto.
1488         (Gen_Elab_Calls_C): Ditto.
1489         (Gen_Elab_Order_C): Ditto.
1490         (Gen_Elab_Defs_C): Ditto.
1491         (Gen_Finalize_Library_C): Ditto.
1492         (Gen_Finalize_Library_Defs_C): Ditto.
1493         (Gen_Main_C): Ditto.
1494         (Gen_Output_File_C): Ditto.
1495         (Gen_Restrictions_C): Ditto.
1496         (Gen_Versions_C): Ditto.
1497         (Write_Info_Ada_C): Ditto.
1498         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
1499         (Gen_Output_File): Do not force Ada_Bind_File anymore.
1500         Always call Gen_Output_File_Ada.
1501         * gnatlink.adb (Begin_Info): Now a constant.
1502         (End_Info): Ditto.
1503         (Ada_Bind_File): Remove
1504         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
1505         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
1506         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
1507         * opt.ads (Ada_Bind_File): Remove.
1508
1509 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1510
1511         * projects.texi: Document target-specific directory in default project
1512         path for gnatmake.
1513
1514 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1515
1516         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
1517         path in all cases .
1518
1519 2011-08-04  Yannick Moy  <moy@adacore.com>
1520
1521         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
1522         opt.ads, lib-xref.ads: Code clean up.
1523
1524 2011-08-04  Yannick Moy  <moy@adacore.com>
1525
1526         * gnat_rm.texi: Update description of Test_Case
1527         * gnat_ugn.texi: Typo.
1528
1529 2011-08-04  Ed Falis  <falis@adacore.com>
1530
1531         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
1532
1533 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1534
1535         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
1536         it is of type Root_Controlled. This action eliminates fields Prev and
1537         Next from type equality.
1538
1539 2011-08-04  Yannick Moy  <moy@adacore.com>
1540
1541         * lib-xref-alfa.adb: Correct typo.
1542
1543 2011-08-04  Matthew Heaney  <heaney@adacore.com>
1544
1545         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
1546         component.
1547
1548 2011-08-04  Yannick Moy  <moy@adacore.com>
1549
1550         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
1551         (Analyze_Pragma): allow static string expression for name of Test_Case,
1552         instead of simply string literals.
1553         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
1554         expressions.
1555
1556 2011-08-04  Vincent Celier  <celier@adacore.com>
1557
1558         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
1559         case suffixes to find truncated main sources.
1560
1561 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1562
1563         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
1564         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
1565         (Compute_Current_Task): Ditto.
1566
1567 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1568
1569         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
1570
1571 2011-08-04  Yannick Moy  <moy@adacore.com>
1572
1573         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
1574         library-level constant.
1575         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
1576         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1577         used as selector of parameter association, in ALFA mode.
1578
1579 2011-08-04  Robert Dewar  <dewar@adacore.com>
1580
1581         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1582         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1583         reformatting.
1584
1585 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1586
1587         * make.adb (Linking_Phase): Set source search path before calling
1588         gnatlink in CodePeer mode.
1589
1590 2011-08-04  Javier Miranda  <miranda@adacore.com>
1591
1592         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1593         Remove code which takes care of building TSDs.
1594         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1595         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1596         the accessibility check in VM targets.
1597         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1598         (Building_Static_DT): Now returns false for VM targets.
1599         (Build_VM_TSDs): Removed.
1600         (Expand_Interface_Conversion): Generate missing runtime check for
1601         conversions to interface types whose target type is unknown at compile
1602         time.
1603         (Make_VM_TSD): Add missing code to disable the generation of calls to
1604         Check_TSD if the tagged type is not defined at library level, or not
1605         has a representation clause specifying its external tag, or -gnatdQ is
1606         active.
1607         * exp_disp.ads (Build_VM_TSDs): Removed.
1608         (Make_VM_TSDs): Spec relocated from exp_disp.adb
1609         * sem_disp.adb (Check_Dispatching_Operation): No code required to
1610         register primitives in the dispatch tables in VM targets.
1611         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1612         initialization of class-wide interface objects in VM targets.
1613         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1614         of Make_DT).
1615
1616 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
1617
1618         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1619         when dotnet-ld cannot be found.
1620
1621 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1622
1623         * bindgen.adb: Simplify significantly generation of binder body file in
1624         CodePeer mode.
1625         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1626         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1627         not expanded).
1628
1629 2011-08-04  Yannick Moy  <moy@adacore.com>
1630
1631         * sem_prag.adb, sem.ads: Code cleanup.
1632
1633 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1634
1635         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
1636         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
1637         results if possible.
1638         * s-stusta.adb (Print): Adjust after changes in s-stausa.
1639         * gnat_ugn.texi: Update dynamic stack usage section.
1640
1641 2011-08-04  Steve Baird  <baird@adacore.com>
1642
1643         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
1644         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
1645         contains only a call to the user-defined main subprogram.
1646         (Gen_Main_Ada) - If CodePeer_Mode is set, then
1647         call the "wrapper" subprogram instead of directly
1648         calling the user-defined main subprogram.
1649
1650 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1651
1652         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
1653         alternatives of a case statement for controlled objects. Rename local
1654         variable A to Dead_Alt.
1655         (Expand_N_If_Statement): Check the then and else statements of an if
1656         statement for controlled objects. Check the then statements of all
1657         elsif parts of an if statement for controlled objects.
1658         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
1659         objects.
1660         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
1661         detects a loop associated with the expansion of an array object.
1662         Augment the processing of the loop statements to account for a possible
1663         wrap done by Process_Statements_For_Controlled_Objects.
1664         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
1665         statements and abortable part of an asynchronous select for controlled
1666         objects.
1667         (Expand_N_Conditional_Entry_Call): Check the else statements of a
1668         conditional entry call for controlled objects.
1669         (Expand_N_Selective_Accept): Check the alternatives of a selective
1670         accept for controlled objects.
1671         (Expand_N_Timed_Entry_Call): Check the entry call and delay
1672         alternatives of a timed entry call for controlled objects.
1673         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
1674         exception handler for controlled objects.
1675         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1676         Add formal parameter Nested_Constructs along with its associated
1677         comment.
1678         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
1679         Requires_Cleanup_Actions.
1680         (Process_Statements_For_Controlled_Objects): New routine.
1681         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
1682         routine. Inspect a node which contains a non-handled sequence of
1683         statements for controlled objects. If such an object is found, the
1684         statements are wrapped in a block.
1685
1686 2011-08-04  Bob Duff  <duff@adacore.com>
1687
1688         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
1689         need to compare with Class_Wide_Type (T2), in order to get at the
1690         original class-wide type node.
1691         * sem_type.ads (Covers): Improve the comment.
1692         * einfo.ads (Class_Wide_Type): Improve the comment.
1693         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
1694         the type of the Deref.
1695
1696 2011-08-04  Yannick Moy  <moy@adacore.com>
1697
1698         * gnat_rm.texi: Document that Test_Case pragma can only appear on
1699         separate declarations.
1700         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
1701         check identifier of pragma argument.
1702         (Chain_TC): check that no other test case associated to the same entity
1703         share the same name.
1704         (Check_Test_Case): disallow test case inside subprogram body
1705         (Analyze_Pragma): correct call to check identifier and not argument
1706         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
1707         function gets name from test case pragma.
1708
1709 2011-08-04  Yannick Moy  <moy@adacore.com>
1710
1711         * gnat_rm.texi: Document new pragma and aspect.
1712         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
1713         (No_Duplicates_Allowed): new constant array defining whether duplicates
1714         aspects of each kind can appear on the same declaration.
1715         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
1716         field, which points to a node holding the previous Spec_PPC_List.
1717         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
1718         through the indirection with Contract.
1719         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
1720         * par-prag.adb (Prag): do nothing on Test_Case pragma
1721         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
1722         be called directly.
1723         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
1724         component Ensures of Test_Case.
1725         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
1726         (Analyze_Generic_Subprogram_Declaration,
1727         Analyze_Subprogram_Instantiation,
1728         Analyze_Abstract_Subprogram_Declaration,
1729         Analyze_Subprogram_Body_Helper,
1730         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
1731         insert contract in subprogram node at point of definition
1732         * sem_ch13.adb
1733         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
1734         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
1735         corresponding pragma
1736         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
1737         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
1738         similar to the analysis of pre/post
1739         (Derive_Subprogram): insert contract in subprogram node at point of
1740         derivation.
1741         * sem_prag.adb, sem_prag.ads
1742         (Check_Arg_Is_String_Literal, Check_Identifier):
1743         new checking procedures to be called in treatment of pragmas
1744         (Check_Test_Case): new procedure to check that a Test_Case aspect or
1745         pragma is well-formed. This does not check currently that 'Result is
1746         used only in the Ensures component of a Test_Case.
1747         (Analyze_Pragma): add case for Test_Case
1748         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
1749         components of a Test_Case.
1750         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
1751         expressions in the 3rd (and 4th if present) arguments of a Test_Case
1752         pragma, treated as spec expressions.
1753         (Sig_Flags): add value -1 for Test_Case.
1754         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
1755         Get_Requires_From_Test_Case_Pragma): getters for both expression
1756         components of a Test_Case.
1757         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
1758         indirection between an entry or [generic] subprogram entity and its
1759         pre/post + test-cases.
1760         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
1761         get/set for fields of an N_Contract node.
1762         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
1763         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1764         names and pragma for Test_Case.
1765         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1766
1767 2011-08-04  Vincent Celier  <celier@adacore.com>
1768
1769         * gnat_ugn.texi: Improve documentation of gnatmake switch
1770         --source-info-file=.
1771
1772 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1773
1774         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
1775         type). Initialize Atyp to the appropriate type which is later checked
1776         for completion. Rewrite the assertion associated with private type
1777         completion.
1778
1779 2011-08-04  Ed Falis  <falis@adacore.com>
1780
1781         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1782         initialize the number of CPUs.
1783
1784 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1785
1786         * sem_type.adb (Disambiguate): New subsidiary routine
1787         In_Same_Declaration_List, to implement AI05-0020: a user-defined
1788         equality on an anonymous access type whose designated type is private
1789         does not lead to an ambiguity with the universal access equality
1790         operator in the body or child units of the defining package. The same
1791         is true for a multiplication operator on a private type completed with
1792         a fixed-point-type.
1793
1794 2011-08-04  Javier Miranda  <miranda@adacore.com>
1795
1796         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1797         (Normalize_Scalars_Config): Removed.
1798         * opt.adb
1799         (Register_Opt_Config_Switches): Remove registering config values of
1800         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1801         (Restore_Opt_Config_Switches): Remove code which restores the values of
1802         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1803         Init_Or_Norm_Scalars.
1804         (Save_Opt_Config_Switches): Remove code which saves values of
1805         Init_Or_Norm_Scalars and Normalize_Scalars.
1806         (Set_Opt_Config_Switches): Remove code which restores config values of
1807         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1808         Init_Or_Norm_Scalars.
1809
1810 2011-08-04  Yannick Moy  <moy@adacore.com>
1811
1812         * frontend.adb (Frontend): remove previous patch to avoid full
1813         qualification in ALFA mode.
1814         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1815         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1816         unique name for an entity, which could be used to identify the entity
1817         across compilation units.
1818
1819 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1820
1821         * prj-env.adb
1822         (Initialize_Default_Project_Path): Add target specific directory
1823         ($prefix/$target/lib/gnat) in front of project path in all cases
1824         (making gnatmake's behaviour consistent with gprbuild).
1825         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1826         Pass target name from Sdefault to project subsystem.
1827         * gnatls.adb: Show new target specific default project directory.
1828
1829 2011-08-04  Johannes Kanig  <kanig@adacore.com>
1830
1831         * cstand.adb: Add Information to Identifier in Standard
1832         (Identifer_For): Set Entity to the corresponding entity
1833
1834 2011-08-04  Sergey Rybin  <rybin@adacore.com>
1835
1836         * gnat_ugn.texi: Update doc on gnatcheck.
1837
1838 2011-08-04  Yannick Moy  <moy@adacore.com>
1839
1840         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1841         xrefs in a scope.
1842
1843 2011-08-04  Yannick Moy  <moy@adacore.com>
1844
1845         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1846         performing expansion.
1847         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1848         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1849         it is not called in ALFA mode.
1850
1851 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1852
1853         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1854         after all, so removed.
1855
1856 2011-08-04  Sergey Rybin  <rybin@adacore.com>
1857
1858         * vms_data.ads: Add missing VMS qualifiers.
1859
1860 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1861
1862         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1863         the list of files on the command line after processing it through
1864         Complete_Mains.
1865
1866 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1867
1868         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1869         processing for .NET/JVM. These targets can now benefit from
1870         Raise_From_Controlled_Operation and they share the same processing with
1871         standard targets.
1872         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1873         These targets need transient scopes in order to properly finalize short
1874         lived controlled objects.
1875         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1876          NET/JVM. These targets can now benefit from
1877         Raise_From_Controlled_Operation and they share the same processing with
1878         standard targets.
1879
1880 2011-08-04  Geert Bosch  <bosch@adacore.com>
1881
1882         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1883
1884 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1885
1886         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1887         Expand_Record_Aggregate, to determine whether aggregate must be
1888         expanded into assignments. This is the case if the ancestor part is
1889         private, regarless of the setting of the flag Has_Private_Ancestor.
1890
1891 2011-08-04  Ed Falis  <falis@adacore.com>
1892
1893         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1894
1895 2011-08-04  Bob Duff  <duff@adacore.com>
1896
1897         * sinfo.ads: Fix comment.
1898
1899 2011-08-04  Steve Baird  <baird@adacore.com>
1900
1901         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1902         choose a package name in much the same way as is
1903         done for JGNAT when VM_Target /= No_VM, except that
1904         a slightly more distinctive prefix string is used.
1905
1906 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1907
1908         * makeutl.adb (Complete_Mains): no longer accept unit names on the
1909         gnatmake command line.
1910         This behavior was never documented (and was supported only because of
1911         an early bug in the code). This case might lead to ambiguous cases
1912         (between unit names and truncated base names without suffixes).
1913
1914 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1915
1916         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1917         Remove the external tag of a tagged type from the internal hash table.
1918         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1919         expanded usage of the routine. Strenghten the check for Is_Master. Add
1920         processing for tagged types.
1921         (Build_Finalizer): Create all the necessary lists used in finalizer
1922         creation when the processed context is a package that may contain
1923         tagged types.
1924         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1925         Requires_Cleanup_Actions.
1926         (Expand_N_Package_Body): Package bodies may need clean up code
1927         depending on whether they contain tagged types.
1928         (Expand_N_Package_Declaration): Package declarations may need clean up
1929         code depending on whether they contain tagged types.
1930         (Unregister_Tagged_Types): New routine. Search through a list of
1931         declarations or statements, looking for non-abstract Ada tagged types.
1932         For each such type, generate code to unregister the external tag.
1933         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1934         Requires_Cleanup_Actions.
1935         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1936         through a list of declarations or statements looking for non-abstract
1937         Ada tagged types or controlled objects.
1938         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1939         Requires_Cleanup_Actions.
1940         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1941         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1942         RE_Unit_Table.
1943
1944 2011-08-04  Vincent Celier  <celier@adacore.com>
1945
1946         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1947         has Ada sources, not project Project, because if the root project
1948         Project has no sources of its own, all projects will be deemed without
1949         sources.
1950
1951 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
1952
1953         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1954         of the No_Param_Proc acc-to-subp type used for initialization of
1955         __gnat_finalize_library_objects so that it's declared at library level
1956         rather than nested inside of the adainit routine.
1957
1958 2011-08-04  Javier Miranda  <miranda@adacore.com>
1959
1960         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1961         if the tagged type has a representation clause which specifies its
1962         external tag.
1963
1964 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1965
1966         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1967         Remove previous procedure with that name.
1968         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1969         when appropriate.
1970         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1971         subtype mark, the ancestor cannot have unknown discriminants.
1972         (Resolve_Record_Aggregate): if the type has invisible components
1973         because of a private ancestor, the aggregate is illegal.
1974
1975 2011-08-04  Vincent Celier  <celier@adacore.com>
1976
1977         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1978         account switches -gnat2005, -gnat12 and -gnat2012.
1979
1980 2011-08-04  Bob Duff  <duff@adacore.com>
1981
1982         * s-tasdeb.ads: Minor comment fix.
1983
1984 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1985
1986         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1987         CodePeer mode.
1988         * switch.ads, switch.adb (Is_Language_Switch): New function.
1989
1990 2011-08-04  Vincent Celier  <celier@adacore.com>
1991
1992         * switch-c.adb: Minor comment addition.
1993
1994 2011-08-04  Vincent Celier  <celier@adacore.com>
1995
1996         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1997         ending with '=' is followed by a space (missing file name).
1998
1999 2011-08-04  Pascal Obry  <obry@adacore.com>
2000
2001         * g-regist.ads: Fix size of HKEY on x86_64-windows.
2002
2003 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2004
2005         * sem_ch12.adb (Analyze_Associations): New routine
2006         Check_Overloaded_Formal_Subprogram to reject a formal package when
2007         there is a named association or a box initialisation for an overloaded
2008         formal subprogram of the corresponding generic.
2009
2010 2011-08-04  Yannick Moy  <moy@adacore.com>
2011
2012         * alfa.ads (ALFA_Xref_Record): add component for type of entity
2013         * get_alfa.adb, put_alfa.adb: Read and write new component of
2014         cross-reference.
2015         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2016
2017 2011-08-04  Pascal Obry  <obry@adacore.com>
2018
2019         * urealp.adb: Minor reformatting.
2020
2021 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2022
2023         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2024         Handle the case when Cleanup_Protected_Object returns Empty.
2025
2026 2011-08-04  Yannick Moy  <moy@adacore.com>
2027
2028         * frontend.adb (Frontend): only qualify names in non-ALFA mode
2029
2030 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2031
2032         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2033         call, ignore functions.
2034
2035 2011-08-04  Geert Bosch  <bosch@adacore.com>
2036
2037         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2038         point.
2039
2040 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2041
2042         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2043         as an index for Builder'Switches. This conforms to the documentation.
2044         * make.adb (Insert_Project_Sources): avoid duplicate code
2045
2046 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2047
2048         * makeutl.adb (Complete_Mains): if the user has passed a relative file
2049         name on the command line (for instance "../dummy"), never assume it can
2050         be a unit name.
2051
2052 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2053
2054         * bindgen.adb: Remove code the reference or create the
2055         Break_Start/__gnat_break_start procedure.
2056         * s-stalib.adb (Break_Start): Removed.
2057
2058 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2059
2060         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2061         shared with gprbuild.
2062
2063 2011-08-04  Yannick Moy  <moy@adacore.com>
2064
2065         * par-ch4.adb (P_Primary): preferentially issue an error message about
2066         a missing parenthesis arount a conditional or case expression in Ada
2067         2012 mode, if we detect that the alignment is not correct for a
2068         statement.
2069
2070 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2071
2072         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2073         tag-to-class-wide conversion as needing finalization actions.
2074         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2075         a tag-to-class-wide conversion as needing finalization actions.
2076         (Is_Finalizable_Transient): The result of a tag-to-class-wide
2077         conversion does not need finalization actions.
2078         (Is_Tag_To_CW_Conversion): New routine.
2079         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2080         whether an object is the result of a tag-to-class-wide conversion.
2081
2082 2011-08-04  Yannick Moy  <moy@adacore.com>
2083
2084         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2085         the left-hand-side and right-hand-side of a conjunct are inserted when
2086         translating a pre- or postcondition
2087         * sem_ch6.adb: Correct typo in comment
2088
2089 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2090
2091         * gnat_rm.texi: Ravenscar does not prohibit dependence on
2092         Unchecked_Conversion and Unchecked_Deallocation.
2093
2094 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2095
2096         * make.adb: Minor reformatting.
2097
2098 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2099
2100         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2101         sources in the project and its imported projects, but not in the whole
2102         tree.
2103
2104 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2105
2106         * make.adb: Remove debug trace.
2107
2108 2011-08-04  Vincent Celier  <celier@adacore.com>
2109
2110         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2111         path in canonical form, to be able to compare path names on platforms
2112         such as Windows or Darwin.
2113
2114 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2115
2116         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2117         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2118         * scos.ads: Update documentation accordingly.
2119         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2120         pragmas.
2121
2122 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2123
2124         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2125         attribute only if prefix type is scalar.
2126
2127 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2128
2129         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2130         in gnatmake for specifying mains on the command line that do not belong
2131         to the main project. These mains must currently all belong to the same
2132         project, though.
2133         (Ultimate_Extension_Of): removed, since duplicated
2134         Ultimate_Extending_Project.
2135
2136 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2137
2138         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2139         instead.
2140         (CodePeer_Mode_String): New.
2141         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2142         CodePeer mode.
2143         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2144         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2145         mode, since no useful elaboration subprogram is needed by CodePeer.
2146         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2147         In this mode, compile binder file with -gnatC and do stop after this
2148         step.
2149
2150 2011-08-04  Vincent Celier  <celier@adacore.com>
2151
2152         * exp_ch7.adb: Minor comment fix.
2153
2154 2011-08-04  Robert Dewar  <dewar@adacore.com>
2155
2156         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2157         exp_ch4.adb, makeutl.adb: Minor reformatting.
2158
2159 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2160
2161         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2162         Create several new subprograms to move code out of Make. This makes the
2163         code more readable, removes code duplication, and is a preparation work
2164         for adding support for aggregate projects.
2165
2166 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2167
2168         * s-po32gl.ads, s-po32gl.adb: New files.
2169         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2170         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2171         (Build_Finalization_Collection): Use it.
2172         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2173         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2174         literals.
2175         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2176         * gcc-interface/Make-lang.in: Update dependencies.
2177
2178 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2179
2180         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2181         the command line.
2182
2183 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2184
2185         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2186         command line is not a file name, also check whether it could be a unit
2187         name.
2188
2189 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2190
2191         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2192         the header of the finalization routine.
2193         If the unit has no finalizer but is a body whose spec has one, then
2194         generate the decrement of the elaboration entity only.
2195         If the unit has a finalizer and is a spec, then do not generate the
2196         decrement of the elaboration entity.
2197         (Gen_Finalize_Library_C): Likewise.
2198
2199 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2200
2201         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2202         (Bounds_Size_Expression): Removed.
2203         (Double_Alignment_Of): New subsidiary routine.
2204         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2205         for a hole in the dope vector of unconstrained arrays due to different
2206         index and element alignments.
2207
2208 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2209
2210         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2211         raise program_error because body has not been seen yet.
2212
2213 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2214
2215         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
2216         an unresolved name.
2217
2218 2011-08-04  Vincent Celier  <celier@adacore.com>
2219
2220         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
2221
2222 2011-08-04  Yannick Moy  <moy@adacore.com>
2223
2224         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
2225         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
2226
2227 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2228
2229         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
2230         instantiation in RCI.
2231
2232 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2233
2234         * make.adb: Share more code with gprbuild
2235
2236 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2237
2238         * projects.texi: Added documentation for the IDE'Gnat project file
2239         attribute.
2240
2241 2011-08-04  Nicolas Roche  <roche@adacore.com>
2242
2243         * gnat_rm.texi: Minor editing.
2244
2245 2011-08-04  Javier Miranda  <miranda@adacore.com>
2246
2247         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
2248         and the library case for VM targets.
2249         (Gen_Adainit_Ada): Likewise.
2250
2251 2011-08-04  Robert Dewar  <dewar@adacore.com>
2252
2253         * g-altive.ads: Minor comment updates.
2254         * prj-nmsc.adb: Minor reformatting.
2255
2256 2011-08-04  Javier Miranda  <miranda@adacore.com>
2257
2258         * opt.ads
2259         (Normalize_Scalars_Config): Value of the configuration switch set by
2260         pragma Normalize_Scalars when it appears in the gnat.adc file.
2261         (Normalize_Scalars): New field for record Config_Switches_Type. Used
2262         to save and restore settings of this pragma.
2263         * opt.adb
2264         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
2265         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
2266
2267 2011-08-04  Vincent Celier  <celier@adacore.com>
2268
2269         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
2270
2271 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2272
2273         * makeutl.adb: Minor reformatting.
2274
2275 2011-08-04  Olivier Hainque  <hainque@adacore.com>
2276
2277         * g-altive.ads: Update comments to reflect that only the soft
2278         binding is available today.
2279
2280 2011-08-04  Robert Dewar  <dewar@adacore.com>
2281
2282         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
2283         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
2284         * gcc-interface/Make-lang.in: Update dependencies.
2285
2286 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2287
2288         * prj-env.adb: Remove local debug traces.
2289
2290 2011-08-04  Yannick Moy  <moy@adacore.com>
2291
2292         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
2293         was used instead of Hi_OK, which could cause a read of an uninitialized
2294         value later on. Detected while working on the new warning.
2295         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
2296         to local variable.
2297         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
2298         in more cases, in order to detect more unreferenced values.
2299         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
2300         object for expression, if any.
2301
2302 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2303
2304         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
2305         the operand types instead of the Esize.
2306
2307 2011-08-04  Steve Baird  <baird@adacore.com>
2308
2309         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
2310         enable CodePeer_Mode.
2311         * bindusg.adb (Display): Add help message describing -P binder switch.
2312         * gnat_ugn.texi: Document -P binder switch.
2313         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
2314         user-defined main program directly.
2315         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
2316         user-defined main program in the context clause of the package body.
2317
2318 2011-08-04  Yannick Moy  <moy@adacore.com>
2319
2320         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
2321         duplicate of Defining_Entity
2322         (Get_Unique_Entity_For_Decl): rename function into
2323         Unique_Defining_Entity
2324         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
2325         (Formal_Proof_On): remove synthesized flag
2326         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2327         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
2328         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
2329         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
2330         Annotate (Formal_Proof)
2331
2332 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2333
2334         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
2335         source files with non-standard naming schemes, in imported projects
2336
2337 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2338
2339         * makeutl.adb (Complete_Mains): when a multi-unit source file is
2340         specified on the gprbuild command line, we need to compile all units
2341         within that file, not just the first one we find
2342         Fix error message for mains that are not found.
2343
2344 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2345
2346         * sem_ch6.adb: Update comment.
2347         * sem_ch12.adb: Minor reformatting.
2348
2349 2011-08-04  Bob Duff  <duff@adacore.com>
2350
2351         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
2352         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
2353         race condition whose symptom is to fail to lock Parent. That, in turn,
2354         causes Parent.Awake_Count to be accessed without locking Parent, which
2355         causes another race condition whose symptom is that Parent.Awake_Count
2356         can be off by 1 (either too high or too low). The solution is to lock
2357         Parent unconditionally, and then lock Acceptor, before reading
2358         Acceptor.Terminate_Alternative.
2359
2360 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2361
2362         * debug.adb: Update comment.
2363
2364 2011-08-04  Robert Dewar  <dewar@adacore.com>
2365
2366         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
2367         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
2368         exp_ch6.adb: Minor reformatting.
2369
2370 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2371
2372         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
2373         checks for -gnateE.
2374
2375 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2376
2377         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
2378
2379 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2380
2381         * sinfo.ads: Minor reformatting.
2382
2383 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2384
2385         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
2386         even if there is no location.
2387
2388 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2389
2390         * sem_res.adb, sem_ch4.adb: move check for restriction
2391         No_Task_Hierarchy to resolve_allocator.
2392
2393 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2394
2395         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
2396         This flag of N_Pragma nodes is not used, remove it as well as all of
2397         the associated circuitry.
2398
2399 2011-08-04  Javier Miranda  <miranda@adacore.com>
2400
2401         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
2402         runtime check on duplicated externa tags
2403         * debug.adb Document switch -gnatdQ.
2404
2405 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2406
2407         * a-fihema.ads: Minor typo fix.
2408
2409 2011-08-04  Yannick Moy  <moy@adacore.com>
2410
2411         * sem_ch10.adb: Minor comment update.
2412
2413 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2414
2415         * einfo.adb: Update the node field usage to reflect the renaming of
2416         Return_Flag to Return_ Flag_Or_Transient_Decl.
2417         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
2418         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
2419         (Write_Field15_Name): Change Return_Flag to
2420         Return_Flag_Or_Transient_Decl.
2421         * einfo.ads: Rename node field Return_Flag to
2422         Return_Flag_Or_Transient_Decl. Update the associated comment and all
2423         occurrences in entities.
2424         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
2425         associated Inline pragma.
2426         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
2427         associated Inline pragma.
2428         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
2429         routine.
2430         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
2431         Return_Flag and Set_Return_Flag.
2432         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
2433         objects generated for controlled transients declared inside an
2434         Exception_With_Actions. Update the calls to Return_Flag.
2435         (Process_Object_Declaration): Add code to add a null guard for hook
2436         objects generated for controlled transients declared inside an
2437         Exception_With_Actions. Update related comment.
2438         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
2439         objects generated for controlled transients declared inside an
2440         Exception_With_Actions. Update the calls to Return_Flag.
2441         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
2442
2443 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2444
2445         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
2446         positional aggregate.
2447
2448 2011-08-04  Vincent Celier  <celier@adacore.com>
2449
2450         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
2451         SLOC only for pragmas.
2452
2453 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2454
2455         * projects.texi: Minor typo fix.
2456
2457 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2458
2459         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
2460         on case-sensitive file systems.
2461
2462 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2463
2464         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
2465         nested in a disabled pragma.
2466         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
2467         enclosing pragma, if any, for X decisions.
2468
2469 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2470
2471         * sem_prag.adb: Minor reformatting.
2472
2473 2011-08-04  Vincent Celier  <celier@adacore.com>
2474
2475         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
2476         allowed in no run time mode.
2477
2478 2011-08-04  Vincent Celier  <celier@adacore.com>
2479
2480         * make.adb (Check): When -gnatc is used, check for the source file
2481         inside the ALI file with a canonical case file name.
2482
2483 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2484
2485         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
2486         overriding the separator.
2487
2488 2011-08-04  Robert Dewar  <dewar@adacore.com>
2489
2490         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
2491         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
2492
2493 2011-08-04  Robert Dewar  <dewar@adacore.com>
2494
2495         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
2496
2497 2011-08-04  Yannick Moy  <moy@adacore.com>
2498
2499         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
2500         'Result only appears in postcondition of function.
2501
2502 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2503
2504         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
2505         external tag, include the value of the external tag in the exception
2506         message.
2507
2508 2011-08-04  Yannick Moy  <moy@adacore.com>
2509
2510         * sem_attr.adb (Result): modify error message for misplaced 'Result
2511
2512 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2513
2514         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
2515         clear that the second argument must be an identifier.
2516
2517 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2518
2519         * exp_ch9.adb (Build_Barrier_Function): When compiling with
2520         -fpreserve-control-flow, insert an IF statement on the barrier
2521         condition to ensure that a conditional branch instruction is generated.
2522
2523 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2524
2525         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
2526         (Processing_Flags.Ignore_Missing_With): new flag.
2527
2528 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2529
2530         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
2531         Source_List_File on case-insensitive systems where the file is actually
2532         on a case-sensitive file system (NFS,...).
2533
2534 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2535
2536         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
2537         function return contains a controlled [extension] aggregate and the
2538         return statement is not part of a handled sequence of statements, wrap
2539         the return in a block. This ensures that all controlled temporaries
2540         generated during aggregate resolution will be picked up by the
2541         finalization machinery.
2542
2543 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2544
2545         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
2546         components, freeze type before resolution, to ensure that default
2547         initializations are present for all components.
2548         * sem_res.adb (Resolve_Actuals): the designated object of an
2549         accces-to-constant type is a legal actual in a call to an
2550         initialization procedure.
2551
2552 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2553
2554         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
2555         N_Unchecked_Type_Conversion to the possible containers of a renamed
2556         transient variable.
2557
2558 2011-08-04  Yannick Moy  <moy@adacore.com>
2559
2560         * par-ch13.adb (Aspect_Specifications_Present): recognize
2561         "with Identifier'Class =>" as an aspect, so that a meaningful warning
2562         is issued in Strict mode.
2563         * par.adb: Fix typos in comments.
2564
2565 2011-08-04  Yannick Moy  <moy@adacore.com>
2566
2567         * sem_attr.adb (Result): modify error message to take into account Post
2568         aspect when compiling Ada 2012 (or newer) code.
2569
2570 2011-08-04  Nicolas Roche  <roche@adacore.com>
2571
2572         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2573         remove need for GCC exceptions.
2574
2575 2011-08-04  Vincent Celier  <celier@adacore.com>
2576
2577         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2578         project, not the source file name.
2579         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2580         excluded, continue looking. This excluded source will only be returned
2581         if there is no other source with the same base name that is not locally
2582         removed.
2583
2584 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2585
2586         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2587         private and one of the operands is a real literal, use a qualified
2588         expression rather than a conversion which is not meaningful to the
2589         back-end.
2590
2591 2011-08-04  Yannick Moy  <moy@adacore.com>
2592
2593         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2594         corresponding aspect X'Class are allowed, proceed with analysis of the
2595         aspect instead of skipping it.
2596
2597 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2598
2599         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2600         This will allow to have an Ada implementation for the subprogram.
2601
2602 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2603
2604         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2605         completion and aspects are present, apply them to the entity for the
2606         type which is currently the partial view, but which is the one that
2607         will be frozen.
2608         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2609         applies to a partial view, indicate that the full view has predicates
2610         and delayed aspects.
2611         (Replace_Type_Reference): Handle properly predicates that apply to the
2612         full view of a private completion.
2613
2614 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2615
2616         * layout.adb (Layout_Type): For composite types, do not set Esize.
2617         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2618         set Esize.
2619         (Size_Known): Look at the RM size of components instead of the Esize.
2620         (Freeze_Record_Type): Look at the RM size instead of the Esize to
2621         issue warning and activate Implicit_Packing.
2622         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
2623         if the Esize is not known.
2624         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2625         for elementary types only.
2626         (Analyze_Record_Representation_Clause): Look at the RM size instead
2627         of the Esize to issue errors.
2628         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2629         is not known.
2630         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
2631         obsolete block.
2632         Look at the RM size instead of the Esize for types if the latter is
2633         not known.
2634         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
2635
2636 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2637
2638         * sem_type.adb: proper handling of equality not involving anonymous
2639         access types.
2640
2641 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2642
2643         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
2644         Vis_Decls. When creating a library-level finalizer for a package spec,
2645         both the declaration and body of the finalizer are inserted either in
2646         the visible or private declarations of the package spec.
2647
2648 2011-08-04  Javier Miranda  <miranda@adacore.com>
2649
2650         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
2651         use of the full-view of a type when invoking Is_Ancestor.
2652         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
2653         the full-view of private parents is requested, then use also the
2654         full-view of the parent of the first derivation.
2655
2656 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2657
2658         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
2659         instead of the locally imported procedure.
2660         * s-taprop-mingw.adb (Enter_Task): Ditto.
2661         * s-valrea.adb (Scan_Real): Ditto.
2662         * s-imgrea.adb (Set_Image_Real): Ditto.
2663         * s-flocon.ads: Make the package pure.
2664
2665 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2666
2667         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
2668         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
2669         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
2670         New subprogram, moved here from...
2671         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
2672         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
2673         rewriting of the last argument into a procedure call statement here...
2674         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
2675         instead.
2676
2677 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2678
2679         * par_sco.adb: Minor reformatting.
2680
2681 2011-08-04  Robert Dewar  <dewar@adacore.com>
2682
2683         * erroutc.adb: Minor reformatting.
2684
2685 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2686
2687         * par_sco.adb: Comment update.
2688
2689 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2690
2691         * s-flocon.ads: New file.
2692         * g-flocon.ads: Now a renaming of s-flocon.
2693         * Makefile.rtl: Add s-flocon.o
2694
2695 2011-08-04  Javier Miranda  <miranda@adacore.com>
2696
2697         * exp_strm.adb (Build_Array_Input_Function): if the array type is
2698         constrained, do not attempt to build a subtype of it.
2699
2700 2011-08-04  Yannick Moy  <moy@adacore.com>
2701
2702         * errout.ads Change comments: remove 'R'M as an example where quotes
2703         are needed; add ALFA as another case where quotes are not needed
2704         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
2705         case where quotes are not needed.
2706         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2707         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
2708         Remove all occurrences of 'A'L'F'A
2709
2710 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2711
2712         * sem_ch13.adb: check legality of invariant pragma.
2713
2714 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2715
2716         * bindgen.adb: Add comments.
2717
2718 2011-08-04  Yannick Moy  <moy@adacore.com>
2719
2720         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
2721         synthesized flag.
2722         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
2723         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
2724
2725 2011-08-04  Robert Dewar  <dewar@adacore.com>
2726
2727         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
2728         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
2729         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
2730
2731 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2732
2733         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
2734
2735 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2736
2737         PR ada/47880
2738         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
2739         allocated object.
2740
2741 2011-08-04  Robert Dewar  <dewar@adacore.com>
2742
2743         * einfo.ads, exp_ch4.adb: Minor reformatting.
2744
2745 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2746
2747         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
2748
2749 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2750
2751         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
2752         type in all cases to compute list of primitive operations, because full
2753         view may be an itype that is not attached to the list of declarations.
2754
2755 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2756
2757         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
2758         library has already been finalized.
2759         (Gen_Adafinal_C): Likewise.
2760         (Gen_Adainit_Ada): Generate an early return if the library has
2761         already been elaborated.
2762         (Gen_Adainit_C): Likewise.
2763         (Gen_Output_File_Ada): Generate an elaboration flag.
2764         (Gen_Output_File_C): Likewise.
2765
2766 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2767
2768         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2769         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2770         built in the first place.
2771         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2772         for CodePeer because Finalize_Address was not built to begin with.
2773         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
2774
2775 2011-08-04  Pascal Obry  <obry@adacore.com>
2776
2777         * adaint.c (__gnat_tmp_name): Use current process id to create temp
2778         filenames, this ensures unicity of filenames across processes.
2779
2780 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2781
2782         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2783         Raise_Controlled to Raise_From_Controlled_Operation. Update the
2784         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2785         Add False as the actual to From_Abort in the generated call to
2786         Raise_From_Controlled_Operation.
2787
2788 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2789
2790         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2791         so that the ali file name can be retrieved from outside of this package.
2792         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2793         doing nothing in the general case, but used to update the object file
2794         timestamp if directly generated by the backend.
2795         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2796         to a later time than the ali file one.
2797
2798 2011-08-04  Yannick Moy  <moy@adacore.com>
2799
2800         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2801         entities whose body contains an Annotate pragma which forces formal
2802         proof on this body.
2803         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2804         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2805         Mark_Non_ALFA_Subprogram to pass in a message and node.
2806         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2807         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2808         surrounding subprogram.
2809         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2810         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2811         as not in ALFA is annotated with Formal_Proof being On, then an error
2812         is issued based on the additional parameters for message and node.
2813         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2814         * gcc-interface/Make-lang.in: Update dependencies.
2815
2816 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2817
2818         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2819         Finalize_Address when CodePeer is enabled.
2820
2821 2011-08-04  Pascal Obry  <obry@adacore.com>
2822
2823         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2824         the latter returns a pointer to a static buffer which is deallocated
2825         at the end of the routine.
2826
2827 2011-08-04  Yannick Moy  <moy@adacore.com>
2828
2829         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2830         after index creation; mark unconstrained base array type generated as
2831         being in/not in ALFA as well
2832         (Make_Index): mark subtype created as in/not in ALFA
2833         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2834         over a loop as in/not in ALFA, depending on its type and form of loop
2835         iteration.
2836
2837 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2838
2839         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2840         directly to False on .NET and JVM.
2841
2842 2011-08-04  Yannick Moy  <moy@adacore.com>
2843
2844         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2845         constraint that subtype must come from source code to be in ALFA, so
2846         that anonymous subtypes can be in ALFA too.
2847
2848 2011-08-04  Yannick Moy  <moy@adacore.com>
2849
2850         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2851         reference for ALFA mode.
2852         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2853         procedure public so as to use it from formal verification back-end.
2854
2855 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2856
2857         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2858         invalid checks of the Parameter, making Remove_Switch not working
2859         correctly.
2860
2861 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2862
2863         * targparm.ads: Update header: no run-time exception is needed on this
2864         file.
2865
2866 2011-08-04  Vincent Celier  <celier@adacore.com>
2867
2868         * a-fihema.adb: Use System.IO instead of GNAT.IO
2869
2870 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2871
2872         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2873         are forbidden in Compiler_Unit mode.
2874
2875 2011-08-04  Robert Dewar  <dewar@adacore.com>
2876
2877         * sem_util.adb: Minor reformatting.
2878
2879 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2880
2881         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2882         library-level finalizers.
2883         (Gen_Finalize_Library_C): Update the import string for library-level
2884         finalizers.
2885         (Gen_Finalize_Library_Defs_C): Update the definition name of a
2886         library-level finalizer.
2887         * exp_ch7.adb: Remove with and use clauses for Stringt.
2888         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2889         Spec_Decl. Add local variable Body_Id. The names of library-level
2890         finalizers are now manually fully qualified and are no longer external.
2891         A single name is now capable of servicing .NET, JVM and non-VM targets.
2892         Pragma Export is no longer required to provide visibility for the name.
2893         (Create_Finalizer_String): Removed.
2894         (New_Finalizer_Name): New routine which mimics New_..._Name.
2895
2896 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2897
2898         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2899         elaboration counter to Standard_Short_Integer.
2900         * sem_util.adb (Build_Elaboration_Entity): Likewise.
2901         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2902         (Gen_Elab_Externals_C): Likewise.
2903
2904 2011-08-04  Ed Falis  <falis@adacore.com>
2905
2906         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2907         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2908         system-vxworks-mips.ads, system-vxworks-x86.ads
2909         (Always_Compatible_Rep): set to False for all VxWorks targets.
2910
2911 2011-08-04  Robert Dewar  <dewar@adacore.com>
2912
2913         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2914         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2915         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2916         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2917         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2918         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2919         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2920         Minor reformatting and code reorganization.
2921
2922 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2923
2924         * projects.texi: Added doc for aggregate projects.
2925
2926 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2927
2928         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2929         Add support for overriding the Project_Path in aggregate projects.
2930
2931 2011-08-04  Robert Dewar  <dewar@adacore.com>
2932
2933         * a-cofove.ads: Minor reformatting.
2934
2935 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2936
2937         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2938         on the generated code.
2939         (Build_Finalize_Statements): Update the comment on the generated code.
2940         (Build_Initialize_Statements): Update the comment on the generated code.
2941         (Build_Object_Declarations): Add local variable Result. The object
2942         declarations are now built in sequence.
2943         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2944         RE_Unit_Table.
2945
2946 2011-08-04  Robert Dewar  <dewar@adacore.com>
2947
2948         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2949
2950 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2951
2952         * einfo.ads (Elaboration_Entity): Document new definition and use.
2953         (Elaboration_Entity_Required): Adjust to above change.
2954         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2955         * exp_ch12.adb: And with and use for Snames.
2956         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2957         * exp_util.adb (Set_Elaboration_Flag): Likewise.
2958         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2959         <Check_Unit_Name>: Deal with N_Expanded_Name.
2960         <Attribute_Elaborated>: Extend to all unit names.
2961         * sem_elab.adb: And with and use for Uintp.
2962         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2963         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2964         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2965         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2966         from Gen_Adainit_Ada.
2967         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2968         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
2969         case, do not call System.Standard_Library.Adafinal; instead call
2970         finalize_library if needed.
2971         (Gen_Adafinal_C): Likewise.
2972         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2973         non-main program case.
2974         (Gen_Adainit_C): Generate a couple of external declarations here.
2975         In the main program case, set SSL.Finalize_Library_Objects.
2976         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2977         (Gen_Elab_Calls_C): Likewise.
2978         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
2979         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
2980         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2981         objects here.
2982         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2983         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
2984         Gen_Adafinal_Ada.
2985         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2986         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
2987         of external declarations.  Call Gen_Finalize_Library_C.
2988
2989 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2990
2991         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2992         Compute_Compilation_Phases): new subprogram.
2993         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2994         The number of mains as well as the various compilation phases that
2995         need to be run are now project tree specific, since various
2996         aggregated trees might have different requirements. In particular,
2997         they do not all require bind or link phases.
2998
2999 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3000
3001         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3002         (Project_Tree_Appdata): New type.
3003         It is now possible to associate application-specific data to a project
3004         tree. In particular, this is used in the gprbuild builder to avoid a
3005         number of global tables and htables, especially now that there can be
3006         several project trees loaded at once because of aggregate projects.
3007         (Debug_Name): new procedure.
3008         * projects.texi: Clarify syntax of "**" for Source_Dirs
3009
3010 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3011
3012         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3013         the "roots" for a main.
3014         (Fill_From_Project): add support for aggregate projects. Main units
3015         in aggregated projects are now automatically added in the list of
3016         files to build (although this fails later on in gprbuild, because
3017         these files are not using the root proejct tree, so this needs
3018         further cleanup)
3019         * gcc-interface/Make-lang.in: Update dependencies.
3020
3021 2011-08-03  Yannick Moy  <moy@adacore.com>
3022
3023         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3024         conditional expression in ALFA.
3025         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3026         expressions as not in ALFA.
3027
3028 2011-08-03  Robert Dewar  <dewar@adacore.com>
3029
3030         * a-cofove.adb: Minor reformatting.
3031
3032 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3033
3034         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3035         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3036         gprbuild sources.
3037         These packages are more logically placed in the Queue package, since
3038         they manipulate the queue. It is also likely that they can be adapted
3039         for gnatmake, thus sharing more code.
3040         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3041         that we could move the above.
3042
3043 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3044
3045         * errutil.adb (Finalize): clean up the list of error messages on exit.
3046         Calling this subprogram multiple times will no longer show duplicate
3047         error messages on stderr.
3048
3049 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3050
3051         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3052         Getopt_Switches when we have already define a command line
3053         configuration.
3054
3055 2011-08-03  Yannick Moy  <moy@adacore.com>
3056
3057         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3058         in ALFA. Instead, they are considered as assertions to prove.
3059         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3060         nodes as not in ALFA. Instead, include conditional expressions in ALFA
3061         if they have no ELSE part, or if they occur in pre- and postconditions,
3062         where the Condition cannot have side-effects in ALFA
3063         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3064         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3065         Instead, include type conversion between scalar types in ALFA.
3066         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3067         if-and-only-if its type is in ALFA.
3068
3069 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3070
3071         * scos.adb, get_scos.adb, put_scos.adb
3072         New code letter for decisions: G (entry guard)
3073         * par_sco.adb
3074         (Traverse_Subprogram_Body): Rename to...
3075         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3076         (Traverse_Protected_Body): New subprogram
3077         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3078         protected bodies and entry bodies.
3079
3080 2011-08-03  Yannick Moy  <moy@adacore.com>
3081
3082         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3083         entities with get/set subprograms, which is set on procedure entities
3084         generated by the compiler for a postcondition.
3085         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3086         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3087         entity for a declaration
3088         (Get_Unique_Entity_For_Decl): new function returning an entity which
3089         represents a declaration, so that matching spec and body have the same
3090         entity.
3091
3092 2011-08-03  Robert Dewar  <dewar@adacore.com>
3093
3094         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3095         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3096
3097 2011-08-03  Yannick Moy  <moy@adacore.com>
3098
3099         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3100         library-level because retriction No_Implicit_Dynamic_Code in the
3101         front-end prevents its definition as a local subprogram
3102         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3103         for reuse in other contexts
3104         (Traverse_Declarations_Or_Statements,
3105         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3106         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3107         procedures take a callback parameter to be called on all declarations
3108         * lib-xref.ads
3109         (Traverse_All_Compilation_Units): new generic function to traverse a
3110         compilation unit and call a callback parameter on all declarations
3111
3112 2011-08-03  Javier Miranda  <miranda@adacore.com>
3113
3114         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3115         in Java since they are always enclosed in a namespace that
3116         differentiates them, and overloaded entities are supported by the VM.
3117
3118 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3119
3120         * checks.adb (Determine_Range): If a computed bound of an operation is
3121         outside the range of the base type of the expression, and overflow
3122         checks are enabled, the result is unknown and cannot be used for any
3123         subsequent constant folding.
3124         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3125         unknown, so is the result of the comparison.
3126
3127 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3128
3129         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3130         From_Abort. When finalization was triggered by an abort, propagate
3131         Standard'Abort_Signal rather than Program_Error.
3132         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3133         From_Abort.
3134         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3135         From_Abort. When finalization was triggered by an abort, propagate
3136         Standard'Abort_Signal rather than Program_Error.
3137         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3138         From_Abort.
3139         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3140         Abort_Id. Update the calls to Build_Object_Declarations and
3141         Build_Raise_Statement to include Abort_Id.
3142         (Build_Adjust_Statements): New local variable Abort_Id. Update the
3143         calls to Build_Object_Declarations and Build_Raise_Statement to include
3144         Abort_Id.
3145         (Build_Finalize_Statements): New local variable Abort_Id. Update the
3146         calls to Build_Object_Declarations and Build_Raise_Statement to include
3147         Abort_Id.
3148         (Build_Components): Create an entity for Abort_Id when exceptions are
3149         allowed on the target.
3150         (Build_Finalizer): New local variable Abort_Id.
3151         (Build_Initialize_Statements): New local variable Abort_Id. Update the
3152         calls to Build_Object_Declarations and Build_Raise_Statement to include
3153         Abort_Id.
3154         (Build_Object_Declarations): Add new formal Abort_Id. Create the
3155         declaration of flag Abort_Id to preserve the original abort status
3156         before finalization code is executed.
3157         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3158         runtime routine Raise_From_Controlled_Operation.
3159         (Create_Finalizer): Update the call to Build_Raise_Statement to include
3160         Abort_Id. Update the call to Build_Object_Declarations to include
3161         Abort_Id. Update the layout of the finalizer body.
3162         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3163         (Process_Transient_Objects): New local variable Abort_Id. Remove the
3164         clunky code to create all flags and objects related to
3165         exception propagation and replace it with a call to
3166         Build_Object_Declarations. Update the call to Build_Raise_Statement to
3167         include Abort_Id.
3168         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3169         Add new formal Abort_Id and associated comment on its use.
3170         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3171         on its use.
3172         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3173         Remove the clunky code to create all flags and objects related to
3174         exception propagation and replace it with a call to
3175         Build_Object_Declarations. Update the call to Build_Raise_Statement.
3176
3177 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3178
3179         * s-tassta.adb: Fix minor typos.
3180
3181 2011-08-03  Robert Dewar  <dewar@adacore.com>
3182
3183         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3184         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3185
3186 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3187
3188         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3189         to packages. This ensures that the finalizer body will not end up
3190         inside the freeze node.
3191         (Process_Declarations): Add code to detect whether a freeze node has a
3192         nested finalization collection.
3193
3194 2011-08-03  Pascal Obry  <obry@adacore.com>
3195
3196         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3197         (Current_Session): Return a not null access to Session_Type.
3198         (Default_Session): Likewise.
3199
3200 2011-08-03  Robert Dewar  <dewar@adacore.com>
3201
3202         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3203         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3204
3205 2011-08-03  Pascal Obry  <obry@adacore.com>
3206
3207         * g-awk.ads: Minor comment fix.
3208
3209 2011-08-03  Sergey Rybin  <rybin@adacore.com>
3210
3211         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3212         the tree structure related to discriminant constraints.
3213         Original_Discriminant cannot be used any more for computing the
3214         defining name for the reference to a discriminant.
3215
3216 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3217
3218         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
3219         function is not visibly tagged, this is not a dispatching call and
3220         therfore is not Tag_Indeterminate, even if the function is marked as
3221         dispatching on result.
3222
3223 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3224
3225         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
3226         (Expand_N_Free_Statement): Add a guard to protect against run-times
3227         which do not support controlled types.
3228         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
3229         against run-times which do not support controlled types.
3230         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
3231         against run-times which do not support controlled types.
3232         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
3233         against run-times which do not support controlled types.
3234         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
3235         protect against run-times which do not support controlled types.
3236
3237 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3238
3239         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
3240         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
3241
3242 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3243
3244         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
3245         modified in the source, to prevent spurious warnings when compiling
3246         with -gnatg.
3247
3248 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3249
3250         * a-except-2005.adb: Minor reformatting.
3251
3252 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3253
3254         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
3255         is a renaming declaration in the private part of a package, do not emit
3256         a warning that the with_clause could be moved because the renaming may
3257         be used in the body or in a child unit.
3258
3259 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3260
3261         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3262         Propagate the Comes_From_Source attribute from the original return
3263         object to the renaming.
3264
3265 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
3266
3267         * exp_ch7.adb (Build_Raise_Statement): Do not call
3268         Raise_From_Controlled_Operation when this routine is not present in
3269         the run-time library.
3270         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
3271         libraries (Ravenscar), tasks are non-terminating, and protected objects
3272         and tasks can only appear at library level, so we do not want
3273         finalization of protected objects nor tasks.
3274         * exp_intr.adb: Minor clarification in comment.
3275         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
3276         Gen_Output_File_C): Remove references to finalization of library-level
3277         objects when using restricted run-time libraries.
3278
3279 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3280
3281         * sem_ch3.adb (Build_Discriminant_Constraints): Set
3282         Original_Discriminant only if the parent type is a generic formal.
3283
3284 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3285
3286         * exp_ch13.adb: Add with and use clause for Targparm;
3287         (Expand_N_Free_Statement): Prevent the generation of a custom
3288         Deallocate on .NET/JVM targets since this requires pools and address
3289         arithmetic.
3290         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
3291         .NET/JVM targets, attach the newly allocated object to the access
3292         type's finalization collection. Do not generate a call to
3293         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
3294         exist in the runtime.
3295         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
3296         create a custom Allocate for object that do not require initialization.
3297         Attach a newly allocated object to the access type's finalization
3298         collection on .NET/JVM.
3299         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
3300         assignment of controlled types on .NET/JVM. The two hidden pointers
3301         Prev and Next and stored and later restored after the assignment takes
3302         place.
3303         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
3304         kludge for .NET/JVM to recognize a particular piece of code coming from
3305         Heap_Management and change the call to Finalize into Deep_Finalize.
3306         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
3307         finalization collections on .NET/JVM only for types derived from
3308         Controlled. Separate the association of storage pools with a collection
3309         and only allow it on non-.NET/JVM targets.
3310         (Make_Attach_Call): New routine.
3311         (Make_Detach_Call): New routine.
3312         (Process_Object_Declarations): Suppress the generation of
3313         build-in-place return object clean up code on .NET/JVM since it uses
3314         pools.
3315         * exp_ch7.ads (Make_Attach_Call): New routine.
3316         (Make_Detach_Call): New routine.
3317         * exp_intr.adb Add with and use clause for Targparm.
3318         (Expand_Unc_Deallocation): Detach a controlled object from a collection
3319         on .NET/JVM targets.
3320         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
3321         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
3322         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
3323         names used in finalization.
3324
3325 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3326
3327         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
3328         (Attach, Detach): Lock the current task when chaining an object onto a
3329         collection.
3330
3331 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3332
3333         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
3334         Rewritten to create the message strings when the exception is not
3335         raised by an abort during finalization.
3336         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
3337         Raise_From_Controlled_Operation and update its associated comment.
3338         * a-fihema.ads, a-fihema.adb: New GNAT unit.
3339         Ada.Finalization.Heap_Management provides key functionality
3340         associated with controlled objects on the heap, their creation,
3341         finalization and reclamation. Type Finalization_Collection is
3342         effectively a wrapper which sits ontop of a storage pool and performs
3343         all necessary bookkeeping for all the objects it contains. Each
3344         access-to-controlled or access-to-class-wide type receives a collection
3345         as part of its expansion. The compiler generates buffer code and
3346         invokes Allocate / Deallocate to create and destroy allocated
3347         controlled objects.
3348         * a-finali.adb ("="): Removed.
3349         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
3350         fields Prev and Next.
3351         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
3352         A library unit with at least one controlled object on the library level
3353         has a special finalizer which is invoked by the binder. To signal this,
3354         ali files carry field PF.
3355         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
3356         associated comment on field usage.
3357         * a-tags.adb (Get_RC_Offset): Removed.
3358         (Needs_Finalization): New routine.
3359         * a-tags.ads: Update the structure of the GNAT dispatch tables.
3360         Dispatch tables now carry field Needs_Finalization which provides
3361         runtime indication whether a type is controlled or has controlled
3362         components or both. Remove field RC_Offset.
3363         (Get_RC_Offset): Removed along with its associated pragma Export.
3364         Since tagged types with controlled components no longer carry hidden
3365         field _controller, the special mechanism to retrieve its location is no
3366         longer needed.
3367         (Needs_Finalization): New routine.
3368         * atree.ads, atree.adb (Elist24): New routine.
3369         (Set_Elist24): New routine.
3370         * atree.h: Add a define clause for Elist24.
3371         * bindgen.adb New library-level variable Lib_Final_Built.
3372         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
3373         presence of a VM target, the routine generates calls to the proper
3374         library finalization routine.
3375         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
3376         targets. Set the correct library finalization routine depending on
3377         whether the library has controlled objects or this is a VM compilation.
3378         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
3379         to library-level finalizers of compiled units in reverse order of
3380         elaboration. It also produces exception management code and reraises a
3381         potential exception after all units have been finalized.
3382         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
3383         library-level finalizers of compiled units in reverse order of
3384         elaboration.
3385         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
3386         definitions of all library-level finalizers available to the compilation
3387         (Gen_Main_Ada): Directly call Adafinal which now contails all target
3388         dependent code.
3389         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
3390         System.Standard_Library.Adafinal directly. If the library needs
3391         finalization actions, create the sequence of finalization calls.
3392         (Gen_Output_File_Ada): Alphabetize local variables and constants.
3393         Generate a with clause for System.Soft_Links when compiling for a VM.
3394         Remove the code which imports System.Standard_Library.Adafinal as
3395         Do_Finalize. Generate the library finalization routine.
3396         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
3397         If the library needs finalization actions, create all the definitions
3398         of library- level finalizers.
3399         (Has_Finalizer): New routine. Determines whether at least one compiled
3400         unit has a library-level finalizer.
3401         Add type Qualification_Mode.
3402         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
3403         * einfo.adb: New usage of field 15 as Return_Flag.
3404         Remove Finalization_Chain_Entity from the usages of field 19.
3405         Remove Associated_Final_Chain from the usages of field 23.
3406         New usage of field 23 as Associated_Collection.
3407         New usage of field 24 as Finalizer.
3408         New usage of flag 252 as Is_Processed_Transient.
3409         (Associated_Final_Chain): Removed.
3410         (Associated_Collection): New routine.
3411         (Finalization_Chain_Entity): Removed.
3412         (Finalizer): New routine.
3413         (Is_Finalizer): New routine.
3414         (Is_Processed_Transient): New routine.
3415         (Return_Flag): New routine.
3416         (Set_Associated_Final_Chain): Removed.
3417         (Set_Associated_Collection): New routine.
3418         (Set_Finalization_Chain_Entity): Removed.
3419         (Set_Finalizer): New routine.
3420         (Set_Is_Processed_Transient): New routine.
3421         (Set_Return_Flag): New routine.
3422         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
3423         displayed flags.
3424         (Write_Field8_Name): Alphabetize the output.
3425         (Write_Field11_Name): Alphabetize the output.
3426         (Write_Field12_Name): Alphabetize the output.
3427         (Write_Field13_Name): Alphabetize the output.
3428         (Write_Field14_Name): Alphabetize the output.
3429         (Write_Field15_Name): Alphabetize the output.
3430         (Write_Field16_Name): Alphabetize the output.
3431         (Write_Field17_Name): Alphabetize the output.
3432         (Write_Field18_Name): Alphabetize the output.
3433         (Write_Field19_Name): Alphabetize the output. Remove the output of
3434         Finalization_Chain_Entity.
3435         (Write_Field20_Name): Alphabetize the output.
3436         (Write_Field21_Name): Alphabetize the output.
3437         (Write_Field22_Name): Alphabetize the output.
3438         (Write_Field23_Name): Alphabetize the output. Remove the output of
3439         Associated_Final_Chain. Add output for Associated_Collection.
3440         (Write_Field24_Name): Alphabetize the output.
3441         (Write_Field25_Name): Add output for Finalizer.
3442         (Write_Field26_Name): Alphabetize the output.
3443         (Write_Field27_Name): Alphabetize the output.
3444         (Write_Field28_Name): Alphabetize the output.
3445         * einfo.ads: Add new field description for Associated_Collection and
3446         its uses in nodes.
3447         Remove Associated_Final_Chain and its uses in nodes.
3448         Remove Finalization_Chain_Entity and its uses in nodes.
3449         Add new field description for Finalizer and its uses in nodes.
3450         Add new synthesized attribute Is_Finalizer.
3451         Add new flag description for Is_Processed_Transient and its uses in
3452         nodes.
3453         Add new field description for Return_Flag and its uses in nodes.
3454         (Associated_Final_Chain): Removed along with its pragma Inline.
3455         (Associated_Collection): New routine and pragma Inline.
3456         (Finalization_Chain_Entity): Removed along with its pragma Inline.
3457         (Finalizer): New routine and pragma Inline.
3458         (Is_Finalizer): New routine and pragma Inline.
3459         (Is_Processed_Transient): New routine and pragma Inline.
3460         (Return_Flag): New routine and pragma Inline.
3461         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
3462         (Set_Associated_Collection): New routine and pragma Inline.
3463         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
3464         (Set_Finalizer): New routine and pragma Inline.
3465         (Set_Is_Processed_Transient): New routine and pragma Inline.
3466         (Set_Return_Flag): New routine and pragma Inline.
3467         * exp_aggr.adb: Alphabetize subprograms.
3468         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
3469         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
3470         associated comments. Remove local variables External_Final_List and
3471         Attach.
3472         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
3473         Ancestor. Remove the retrieval of finalization lists. Update the call to
3474         Make_Adjust_Call.
3475         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
3476         lists. Update the call to Late_Expansion.
3477         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
3478         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
3479         (Gen_Assign): Remove the retrieval of the finalization list used to
3480         build the assignment. Update the calls to Make_Init_Call and
3481         Make_Adjust_Call.
3482         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
3483         Remove the mechanism to determine attachment levels and finalization
3484         list retrieval. Remove the processing for coextensions.
3485         (Init_Controller): Removed. Controllers no longer exist.
3486         (Late_Expansion): Remove formals Flist and Obj along with their
3487         associated comments. Update the calls to Build_Record_Aggr_Code and
3488         Build_Array_Aggr_Code.
3489         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
3490         (Expand_N_Freeze_Entity): Add special processing for finalizers which
3491         appear in entry bodies, protected subprograms and task bodies.
3492         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
3493         * exp_ch3.adb (Add_Final_Chain): Removed.
3494         (Build_Array_Init_Proc): Alphabetize local variables.
3495         (Build_Assignment): Alphabetize local variables. Update the call to
3496         Maked_Adjust_Call.
3497         (Build_Class_Wide_Master): Rename local variables to better reflect
3498         their role.
3499         (Build_Discriminant_Assignments): Code reformatting.
3500         (Build_Init_Call_Thru): Code reformatting.
3501         (Build_Init_Procedure): Code reformatting. Generate a special version
3502         of Deep_Finalize which is capable of finalizing all initialized
3503         components and ignore the rest.
3504         (Build_Init_Statements): Rename local variables to better reflect their
3505         role.
3506         Reimplement the mechanism to include the creation and update of an index
3507         variable called a "counter". It is used as a bookmark for tracing
3508         initialized and non-initialized components.
3509         (Build_Initialization_Call): Remove local variable Controller_Typ.
3510         Alphabetize all local variables. Remove the initialization of the
3511         record controller and update the call to Make_Init_Call.
3512         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
3513         New local variable Counter.
3514         (Constrain_Array): Alphabetize.
3515         (Expand_Freeze_Array_Type): Create a collection instead of a
3516         finalization list.
3517         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
3518         Finalize_Address which is used in conjunction with allocated controlled
3519         objects.
3520         (Expand_N_Object_Declaration): Remove the creation of a finalization
3521         list for anonymous access types. Update the calls to Make_Init_Call and
3522         Make_Adjust_Call.
3523         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
3524         retrieval of finalization lists. Remove the expansion of the record
3525         controller. Create TSS primitive Finalize_Address used in conjunction
3526         with controlled objects on the heap. Create finalization collections
3527         for access-to-controlled record components.
3528         (Expand_Record_Controller): Removed.
3529         (Freeze_Type): Remove the freezing of record controllers. Freezing of
3530         class-wide types now requires additional processing. Create
3531         finalization collections for access-to-controlled types.
3532         (Increment_Counter): New routine.
3533         (Make_Counter): New routine.
3534         (Make_Eq_If): Remove the mention of Name_uController.
3535         (Make_Predefined_Primitive_Specs): There is no longer need to skip
3536         types coming from System.Finalization_Root.
3537         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
3538         (Predefined_Primitive_Bodies): There is no longer need to skip types
3539         coming from System.Finalization_Root.
3540         (Stream_Operation_OK): Do not generate stream routines for
3541         type Ada.Finalization.Heap_Management.Finalization_Collection.
3542         * exp_ch3.ads: Alphabetize subprograms.
3543         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
3544         Add with and use clause for Lib.
3545         (Complete_Coextension_Finalization): Removed.
3546         (Complete_Controlled_Allocation): New routine. Create a finalization
3547         collection for anonymous access-to-controlled types. Create a custom
3548         Allocate which interfaces with the back end and the machinery in
3549         Heap_Management.
3550         (Expand_Allocator_Expression): Add necessary calls to
3551         Complete_Controlled_Allocation. Remove the retrieval of finalization
3552         lists. Update the calls to Make_Adjust_Call. Generate a call to
3553         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3554         the associated collection.
3555         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
3556         Code clean up. Remove the retrieval of finalization lists and
3557         attachment levels.
3558         Update the call to Make_Init_Call. Generate a call to
3559         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3560         the associated collection.
3561         (Get_Allocator_Final_List): Removed. Finalization lists are not
3562         available.
3563         (Suitable_Element): Remove the mention of Name_uController.
3564         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
3565         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
3566         the left hand side, carry out the assignment and adjust the left hand
3567         side.
3568         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
3569         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
3570         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
3571         BIP_Collection and BIPcollection.
3572         (Build_Heap_Allocator): New routine used to allocate the return object
3573         of a build-in-place function onto a collection.
3574         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
3575         (Expand_Call): Do not replace direct calls to Deep routines with their
3576         aliases.
3577         (Expand_N_Extended_Return_Statement): Give all variables shorter names
3578         and update their occurrences. Add a special return flag to monitor the
3579         [ab]normal execution of the function. The flag is set right before the
3580         return statement.
3581         Rewrite the mechanism used to allocate a build-in-place return object
3582         on the heap or on a storage pool.
3583         (Is_Direct_Deep_Call): New routine.
3584         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3585         build-in-place function call instead of a final list. Build a call to
3586         Set_Finalize_Address_Ptr to decorate the associated collection.
3587         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3588         order to name the build-in-place function call's result for later
3589         finalization. Add a collection to a build-in-place function call
3590         instead of a final list.
3591         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3592         build-in-place function call instead of a final list. Remove the code
3593         which moves one final list and transforms it into the actual in a
3594         nested build-in-place call.
3595         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3596         build-in-place function call instead of a final list.
3597         (Move_Final_List): Removed.
3598         (Needs_BIP_Collection): New routine.
3599         (Needs_BIP_Final_List): Removed.
3600         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3601         enumeration type BIP_Formal_Kind.
3602         Update the related comment.
3603         (Needs_BIP_Collection): New routine.
3604         (Needs_BIP_Final_List): Removed.
3605         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3606         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3607         majority of subprograms in this unit. Add Name_Finalize_Address to
3608         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3609         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3610         statements for an array type.
3611         (Build_Adjust_Statements): Create the adjust statements for a record
3612         type.
3613         (Build_Cleanup_Statements): New routine. A procedure which given any
3614         construct containing asynchronous calls, references to _master, or is a
3615         task body, a task allocation or a protected body produces the necessary
3616         runtime calls to clean up these constructs.
3617         (Build_Exception_Handler): New routine.
3618         (Build_Final_List): Removed.
3619         (Build_Finalization_Collection): New routine. A core procedure which
3620         creates a collection to service heap allocated controlled objects
3621         associated with an access-to-controlled type.
3622         (Build_Finalize_Statements): Create the finalization statements for a
3623         record types.
3624         (Build_Finalizer): New routine. A core procedure which given any
3625         construct with declarations and/or statements detects all objects which
3626         need any type of clean up (controlled objects, protected objects) and
3627         generates all necessary code to clean up the said objects in the proper
3628         order.
3629         (Build_Finalizer_Call): New routine.
3630         (Build_Initialize_Statements): Create the initialization statements for
3631         an array type. The generated routine contains code to finalize partially
3632         initialized arrays.
3633         (Build_Object_Declarations): New routine.
3634         (Build_Raise_Statement): New routine.
3635         (Clean_Simple_Protected_Objects): Removed.
3636         (Controller_Component): Removed.
3637         (Enclosing_Function): New routine.
3638         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
3639         either declarations or statements or both.
3640         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
3641         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
3642         package.
3643         (Find_Final_List): Removed.
3644         (Global_Flist_Ref): Removed.
3645         (In_Finalization_Root): Removed.
3646         (Insert_Actions_In_Scope_Around): Determine the range of the transient
3647         scope in terms of tree nodes. Process all transient variables within
3648         that range.
3649         (Make_Adjust_Call): Rewritten. There is no longer an attach call
3650         generated after the adjust.
3651         (Make_Attach_Call): Removed.
3652         (Make_Call): New routine.
3653         (Make_Clean): Removed.
3654         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
3655         build routines.
3656         (Make_Deep_Proc): Rewritten to generate the new profile signature used
3657         in Deep routines.
3658         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
3659         build routines.
3660         (Make_Final_Call): Modified to simply create a call to either
3661         Deep_Finalize or Finalize.
3662         (Make_Finalize_Address_Body): New routine.
3663         (Make_Finalize_Address_Stmts): New routine. A function which produces
3664         TSS primitive Finalize_Address used in conjunction with heap allocated
3665         controlled objects.
3666         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
3667         (Make_Init_Call): Rewritten. There is no longer an attach call
3668         generated after initialization.
3669         (Make_Local_Deep_Finalize): New routine.
3670         (Make_Set_Finalize_Address_Ptr_Call): New routine.
3671         (Make_Transient_Block): Remove the finalization list retrieval and
3672         manipulation.
3673         (Needs_Finalization): Moved to Exp_Util.
3674         (Parent_Field_Type): New routine.
3675         (Preprocess_Components): New routine.
3676         (Process_Transient_Objects): New routine.
3677         (Wrap_HSS_In_Block): New routine.
3678         (Wrap_Transient_Declaration): Remove finalization list management and
3679         controller insertion.
3680         (Wrap_Transient_Expression): Code reformatting.
3681         (Wrap_Transient_Statement): Code reformatting.
3682         * exp_ch7.ads (Build_Final_List): Removed.
3683         (Build_Finalization_Collection): New routine.
3684         (Build_Raise_Statement): New routine.
3685         (Controller_Component): Removed.
3686         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
3687         (Find_Final_List): Removed.
3688         (In_Finalization_Root): Removed.
3689         (Is_Simple_Protected_Type): Update related comment.
3690         (Make_Adjust_Call): New parameter profile and associated comments.
3691         (Make_Attach_Call): Removed.
3692         (Make_Final_Call): New parameter profile and associated comments.
3693         (Make_Finalize_Address_Body): New routine.
3694         (Make_Init_Call): New parameter profile and associated comments.
3695         (Make_Local_Deep_Finalize): New routine.
3696         (Make_Set_Finalize_Address_Ptr_Call): New routine.
3697         (Needs_Finalization): Moved to Exp_Util.
3698         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
3699         (Expand_N_Protected_Body): Remove the handling of finalization lists.
3700         (Find_Protection_Type): Moved to Exp_Util.
3701         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
3702         (Make_DT): Update sequence of dispatch table initialization. Remove the
3703         initialization of field RC_Offset. Add initialization of field Needs_
3704         Finalization.
3705         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
3706         Reimplement how an object is first finalized, then deallocated.
3707         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3708         Code reformatting.
3709         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
3710         Register TSS_Finalize_Address with type TSS_Names.
3711         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
3712         procedure provides the interface between an allocation / deallocation
3713         and the support machinery in Ada.Finalization.Heap_Management.
3714         (Find_Init_Call): Code reformatting.
3715         (Find_Init_Call_In_List): Code reformatting.
3716         (Find_Protection_Type): Moved from Exp_Ch9.
3717         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
3718         (Has_Controlled_Coextensions): Removed.
3719         (Has_Controlled_Objects): New routine.
3720         (In_Library_Level_Package_Body): New routine.
3721         (Insert_Action_After): New routine.
3722         (Is_Finalizable_Transient): New routine. This predicate determines
3723         whether an object declaration is one of the many variants of controlled
3724         transients.
3725         (Is_Null_Access_BIP_Func_Call): New routine.
3726         (Is_Non_BIP_Func_Call): New routine.
3727         (Is_Related_To_Func_Return): New routine.
3728         (Needs_Finalization): Moved from Exp_Ch7.
3729         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
3730         (Find_Protection_Type): Moved from Exp_Ch9.
3731         (Has_Controlled_Coextensions): Removed.
3732         (Has_Controlled_Objects): New routine.
3733         (In_Library_Level_Package_Body): New routine.
3734         (Insert_Action_After): New routine.
3735         (Is_Finalizable_Transient): New routine.
3736         (Is_Null_Access_BIP_Func_Call): New routine.
3737         (Is_Non_BIP_Func_Call): New routine.
3738         (Is_Related_To_Func_Return): New routine.
3739         (Needs_Finalization): Moved from Exp_ch7.
3740         * expander.adb (Expand): Add a case for N_Free_Statement.
3741         * freeze.adb (Freeze_All): Replace the generation of a finalization
3742         list with a collection for access-to-controlled types.
3743         (Freeze_Entity): Code reformatting.
3744         (Freeze_Record_Type): Remove the freezing of a record controller
3745         component.
3746         (Freeze_Subprogram): Code reformatting.
3747         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
3748         finalization list.
3749         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
3750         has a library-level finalizer.
3751         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
3752         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
3753         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
3754         files. Add a-fihema to the list of object files.
3755         * par-ch4.adb:
3756         Alphabetize the associations in type Is_Parameterless_Attribute.
3757         * rtsfind.ads: Ada.Finalization_List.Controller and
3758         System.Finalization_Implementation are no longer a GNAT unit.
3759         Update the range of type Ada_Finalization_Child. Remove the following
3760         recoverable entities:
3761
3762            RE_Attach_To_Final_List
3763            RE_Deep_Tag_Attach
3764            RE_Finalize_List
3765            RE_Finalize_One
3766            RE_Finalizable_Ptr_Ptr
3767            RE_Global_Final_List
3768            RE_Limited_Record_Controller
3769            RE_List_Controller
3770            RE_Move_Final_List
3771            RE_Record_Controller
3772            RE_Simple_List_Controller
3773
3774         Add the following recoverable entities:
3775
3776            RE_Add_Offset_To_Address
3777            RE_Allocate
3778            RE_Base_Pool
3779            RE_Deallocate
3780            RE_Exception_Identity
3781            RE_Finalization_Collection
3782            RE_Finalization_Collection_Ptr
3783            RE_Needs_Finalization
3784            RE_Save_Library_Occurrence
3785            RE_Set_Finalize_Address_Ptr
3786            RE_Set_Storage_Pool_Ptr
3787            RE_Storage_Count
3788         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3789         Name_uController.
3790         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3791         (First_Stored_Discriminant): Remove the mention of Name_uController.
3792         * sem_aux.ads: Comment reformatting.
3793         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3794         to redecorate an already existing class-wide type.
3795         (Decorate_Tagged_Type): New parameter profile and associated comment.
3796         Create a "shadow class-wide type" for a shadow entity.
3797         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3798         of the final chain along with the associated comment.
3799         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3800         Full_Desig and set it to the full view of the designated type.
3801         Initialize the finalization collection to empty.
3802         (Build_Derived_Record_Type): Alphabetize local variables. Code
3803         reformatting.
3804         (Collect_Fixed_Components): Remove the mention of Name_uController.
3805         (Create_Constrained_Components): Remove the mention of Name_uController.
3806         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3807         class-wide type of a shadow entity.
3808         (Process_Full_View): Update the machinery which marks type
3809         Limited_Controlled's entity as limited.
3810         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3811         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3812         list, instead make a collection build-in-place formal.
3813         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3814         a designated type in order to establish a match between the renaming
3815         and the renamed entity.
3816         (Find_Selected_Component): Add guard to prevent spurious exceptions
3817         from being raised on .NET/JVM.
3818         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3819         to the list of primitive that need special processing. Update arrays
3820         C_Names and D_Names.
3821         (Replace_Types): Handle class-wide types.
3822         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3823         different parameter profile, look at the first formal.
3824         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3825         use clauses for Exp_Util.
3826         * sem_res.adb: Remove with and use clauses for Elists.
3827         (Propagate_Coextensions): Removed.
3828         (Resolve_Allocator): Do not propagate the list of coextensions from one
3829         allocator to another.
3830         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3831         Deaccessed_T to Desig_Typ.
3832         (Enter_Name): Remove the mention of Name_uController.
3833         (Gather_Components): Remove the mention of Name_uController.
3834         (Incomplete_Or_Private_View): New routine.
3835         (Is_Coextension_Root): Removed.
3836         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3837         * sem_util.ads (Incomplete_Or_Private_View): New routine.
3838         (Is_Coextension_Root): Removed.
3839         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3840         Controlled types are now derived from a null tagged record. Remove
3841         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3842         * sinfo.adb (Coextensions): Removed.
3843         (Set_Coextensions): Removed.
3844         * sinfo.ads: Remove Coextensions from the explanation of node fields
3845         and its uses in nodes.
3846         Update the field usage of N_Allocator.
3847         (Coextensions): Removed along with its pragma Inline.
3848         (Set_Coextensions): Removed along with its pragma Inline.
3849         * snames.ads-tmpl: Remove names
3850
3851           Name_uClean
3852           Name_uController
3853           Name_uFinal_List
3854           Name_uLocal_Final_List
3855           Name_Finalization_Root
3856           Name_Next
3857           Name_Prev
3858
3859         Add names
3860
3861           Name_uFinalizer
3862           Name_Finalize_Address
3863         * s-pooglo.adb (Allocate): Add overriding indicator.
3864         (Deallocate): Add overriding indicator.
3865         (Storage_Size): Add overriding indicator.
3866         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3867         than Finalize_Global_List.
3868         (Null_Finalize_Global_List): Removed.
3869         (Save_Library_Occurrence): New routine.
3870         * s-soflin.ads: Remove variable Finalize_Global_List along with its
3871         initialization. Add variable Finalize_Library_Objects along with its
3872         pragma Export. Add variables Library_Exception and
3873         Library_Exception_Set along with their pragma Export.
3874         (Null_Finalize_Global_List): Removed.
3875         (Save_Library_Occurrence): New routine.
3876         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3877         rather than Finalize_Global_List.
3878         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3879         of the constructed node.
3880
3881 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3882
3883         * link.c: Include "auto-host.h" before system headers.
3884
3885 2011-08-03  Vincent Celier  <celier@adacore.com>
3886
3887         * make.adb (Gnatmake): Add to table Library_Projs only library projects
3888         that are not extended. Do not check if a library project that is
3889         extended should be regenerated. Do not add to table Library_Paths the
3890         libraries that are in extended projects. Link only with libraries that
3891         are in libray projects that are not extended.
3892         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3893         for a library project that is extended.
3894
3895 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
3896
3897         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3898         conforming subprogram renamings that appear to be completions if they
3899         are not fully conformant.
3900         Such renamings are homographs but not completions.
3901         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3902         names in a subprogram renaming that appears in an instance.
3903
3904 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3905
3906         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3907         not immutably limited, build actual subtype from expression to provide
3908         proper bounds to caller.
3909
3910 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
3911
3912         * sem_ch8.adb: Minor comment correction.
3913
3914 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3915
3916         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3917         returning a limited array, use an extended return statement.
3918
3919 2011-08-03  Vincent Celier  <celier@adacore.com>
3920
3921         * make.adb (Initialize): If --subdirs= is used, but no project file is
3922         specified, attempt to create the specify subdir if it does not already
3923         exist and use it as the object directory as if -D had been specified.
3924
3925 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3926
3927         * s-tpopsp-vms.adb: New file.
3928         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3929         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3930
3931 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3932
3933         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3934         package.
3935
3936 2011-08-03  Yannick Moy  <moy@adacore.com>
3937
3938         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3939         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3940         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3941         detect that an array has static bounds.
3942
3943 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3944
3945         * exp_dist.adb: Minor reformatting.
3946
3947 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3948
3949         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3950         (ATCB_Key): Removed, not always used.
3951
3952 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3953
3954         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3955         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3956         most remaining global variables.
3957
3958 2011-08-03  Robert Dewar  <dewar@adacore.com>
3959
3960         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3961         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3962         reformatting.
3963
3964 2011-08-03  Javier Miranda  <miranda@adacore.com>
3965
3966         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3967         that must be passed by copy in VM targets.
3968
3969 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3970
3971         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3972         duplicates a similar htable now in the project tree.
3973
3974 2011-08-03  Claire Dross  <dross@adacore.com>
3975
3976         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3977         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3978         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3979         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3980         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3981         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3982         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3983         update.
3984
3985 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3986
3987         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3988         (ATCB_Key): Removed, not always used.
3989         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3990         s-taprop-posix.adb.
3991         * s-tpopsp-tls.adb: New file.
3992         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3993         x86/x64/ia64/powerpc/sparc Linux.
3994
3995 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3996
3997         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3998         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3999
4000 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4001
4002         * rtsfind.ads, exp_dist.adb, exp_dist.ads
4003         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4004         Fix type selection for mapping integer types to PolyORB types.
4005
4006 2011-08-03  Bob Duff  <duff@adacore.com>
4007
4008         * sem_ch7.adb: Minor comment clarification.
4009
4010 2011-08-03  Bob Duff  <duff@adacore.com>
4011
4012         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4013         an error analyzing a choice, skip further processing. Further
4014         processing could cause a crash or cascade errors.
4015
4016 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4017
4018         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4019         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4020         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4021         prj-env.ads (Shared_Project_Tree_Data): new type
4022         An aggregate project and its aggregated trees need to share the common
4023         data structures used for lists of strings, packages,... This makes the
4024         code simpler since otherwise we have to pass the root tree (also used
4025         for the configuration file data) in addition to the current project
4026         tree. This also avoids ambiguities as to which tree should be used.
4027         And finally this saves a bit of memory.
4028         (For_Every_Project_Imported): new parameter Tree.
4029         Since aggregated projects are using a different tree, we need to let
4030         the caller know which tree to use to manipulate the returned project.
4031
4032 2011-08-03  Robert Dewar  <dewar@adacore.com>
4033
4034         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4035         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4036         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4037         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4038
4039 2011-08-03  Javier Miranda  <miranda@adacore.com>
4040
4041         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4042         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4043
4044 2011-08-03  Bob Duff  <duff@adacore.com>
4045
4046         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4047         the Base_Type.
4048
4049 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
4050
4051         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4052         g-sehash.ads: Fix typo. Update header.
4053
4054 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4055
4056         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4057         expansion.
4058
4059 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4060
4061         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4062         prefixes of private types along with records, since the selector may be
4063         a discriminant.
4064         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4065         private types along with records, since the selector may be a
4066         discriminant.
4067
4068 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4069
4070         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4071
4072 2011-08-03  Javier Miranda  <miranda@adacore.com>
4073
4074         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4075         Tagged_Type_Expansion.
4076
4077 2011-08-03  Yannick Moy  <moy@adacore.com>
4078
4079         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4080         violation when the argument of concatenation is the name of a
4081         constant.
4082
4083 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4084
4085         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4086         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4087         (Process_Declarative_Items): new parameter Child_Env.
4088
4089 2011-08-03  Yannick Moy  <moy@adacore.com>
4090
4091         * alfa.ads: Update format of ALFA section in ALI file in order to
4092         add a mapping from bodies to specs when both are present.
4093         (ALFA_Scope_Record): Add components for spec file/scope.
4094         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4095         present.
4096         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4097         collected, fill in the spec information when relevant.
4098         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4099         present.
4100
4101 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4102
4103         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4104         code unit to decide whether to add internally generated subprograms.
4105
4106 2011-08-03  Javier Miranda  <miranda@adacore.com>
4107
4108         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4109         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4110         be handled by copy in VM targets.
4111
4112 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4113
4114         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4115         code with Makeutl.Get_Switches.
4116         * prj-tree.adb: Update comment.
4117
4118 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4119
4120         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4121         subprogram with a limited formal that does not support external
4122         streaming.
4123
4124 2011-08-03  Yannick Moy  <moy@adacore.com>
4125
4126         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4127         continuation line
4128         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4129         not from current unit in two phases, because it is not possible to
4130         change the table while iterating over its content.
4131         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4132
4133 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4134
4135         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4136         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4137
4138 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4139
4140         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4141         and the component type is composite, this is ambiguous for predefined
4142         concatenation, but if the node is not overloaded and the entity is a use
4143         -defined function its profile can be used to resolve that aggregate.
4144
4145 2011-08-03  Robert Dewar  <dewar@adacore.com>
4146
4147         * exp_ch4.adb: Minor code cleanup.
4148
4149 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4150
4151         * exp_dist.adb: Do not generate distribution stubs if serious errors
4152         have been diagnosed.
4153
4154 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4155
4156         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4157         the first formal of a primitive operation, go to the base type to
4158         handle properly an access to a derived type with constrained
4159         discriminants.
4160         * sem_type.adb (Disambiguate): an immediately visible operator hides a
4161         user-defined function that is only use-visible.
4162
4163 2011-08-03  Robert Dewar  <dewar@adacore.com>
4164
4165         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4166         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4167         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4168         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4169         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4170         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4171         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4172         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4173
4174 2011-08-03  Robert Dewar  <dewar@adacore.com>
4175
4176         * repinfo.adb (List_Mechanism): Add handling of
4177         Convention_Ada_Pass_By_XXX.
4178         * sem_mech.adb (Set_Mechanism): Ditto.
4179         * sem_prag.adb (Process_Convention): Add entries for
4180         Convention_Ada_Pass_By_XXX.
4181         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4182
4183 2011-08-03  Pascal Obry  <obry@adacore.com>
4184
4185         * makeutl.adb: Minor reformatting.
4186
4187 2011-08-03  Vincent Celier  <celier@adacore.com>
4188
4189         * fname-uf.adb
4190         (Get_File_Name) If the file cannot be found when there are no config
4191         pragmas file and May_Fail is True, return No_File instead of the file
4192         name, to be consistent.
4193
4194 2011-08-03  Pascal Obry  <obry@adacore.com>
4195
4196         * adaint.c (__gnat_is_executable_file_attr): Avoid access
4197         to null pointer.
4198
4199 2011-08-03  Javier Miranda  <miranda@adacore.com>
4200
4201         * sem_ch13.adb
4202         (Same_Representation): In VM targets the representation of arrays with
4203         aliased components differs from arrays with non-aliased components.
4204
4205 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4206
4207         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4208         not systematically lower case attribute indexes that contain no "."
4209         Fix definition of several Naming attributes, which take
4210         a unit name as index and therefore should be case insensitive.
4211         Minor refactoring (reduce length of variable names).
4212
4213 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4214
4215         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
4216
4217 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4218
4219         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
4220         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
4221         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
4222         prj-tree.ads (Prj.Tree.Environment): new type.
4223
4224 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4225
4226         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
4227         prj-tree.adb, prj-tree.ads (Environment): new type.
4228
4229 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4230
4231         * prj-tree.ads: Remove unused variable.
4232
4233 2011-08-03  Yannick Moy  <moy@adacore.com>
4234
4235         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
4236         issuing messages related to SPARK restriction violation.
4237
4238 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4239
4240         * sem_ch6.adb: guard against error nodes in return statements.
4241
4242 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4243
4244         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
4245         a warning can only appear on a configuration file, so emit warning
4246         without further checks.
4247
4248 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4249
4250         * s-interr.ads: add overriding keyword.
4251
4252 2011-08-03  Geert Bosch  <bosch@adacore.com>
4253
4254         * exp_attr.adb: Fix minor typo.
4255
4256 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4257
4258         * par-ch4.adb: improve error recovery.
4259
4260 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4261
4262         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
4263         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
4264         to Errout_Handling.
4265
4266 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4267
4268         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
4269         "external" as an attribute name in aggregate projects.
4270
4271 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4272
4273         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
4274         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
4275         from 0, so we need to adjust.
4276
4277 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4278
4279         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
4280         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
4281
4282 2011-08-03  Yannick Moy  <moy@adacore.com>
4283
4284         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
4285         restriction on overloaded entity if the entity is not an operator.
4286
4287 2011-08-03  Yannick Moy  <moy@adacore.com>
4288
4289         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
4290         restrict.ads: Rename remaining Check_Formal_Restriction* into
4291         Check_SPARK_Restriction*.
4292
4293 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4294
4295         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
4296         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
4297         qualifier.
4298         (Project_Empty): removed
4299         (Empty_Project): new parameter Qualifier
4300         This is used to have fields specific to aggregate projects, cleaner
4301         New field to store the list of aggregated projects.
4302         (Check_Aggregate_Project): removed
4303         (Process_Aggregated_Projects, Free): new subprograms.
4304
4305 2011-08-03  Olivier Hainque  <hainque@adacore.com>
4306
4307         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
4308
4309 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4310
4311         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
4312         explicit dereference of an unconstrained type, create a constrained
4313         subtype for it, as is done for function calls that return an
4314         unconstrained type.
4315
4316 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4317
4318         * g-pehage.adb (Finalize): Avoid possible double-free.
4319
4320 2011-08-03  Steve Baird  <baird@adacore.com>
4321
4322         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
4323         Elab_Spec/Body attrs in CodePeer_Mode.
4324
4325 2011-08-03  Javier Miranda  <miranda@adacore.com>
4326
4327         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
4328         low bound is not known at compile time but they have no others choice.
4329         Done because in this case the bounds can be obtained directly from the
4330         aggregate.
4331
4332 2011-08-03  Ed Falis  <falis@adacore.com>
4333
4334         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
4335         on VxWorks SMP. Remove unusable constant ANY_CPU.
4336
4337 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4338
4339         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4340         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
4341         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
4342         Prj.Env.Initialize_Empty): new subprograms
4343         (Get_Env, Find_Project): remove parameter Target_Name.
4344
4345 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4346
4347         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
4348         as a condition for the delayed call to Derived_Subprograms done for the
4349         case of the rewriting of a derived type that constrains the
4350         discriminants of its parent type.
4351         Avoids redundant subprogram derivations for private subtype derivations.
4352
4353 2011-08-03  Javier Miranda  <miranda@adacore.com>
4354
4355         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
4356         Build_Record_Aggr_Code.
4357         (Build_Record_Aggr_Code): Add missing support to initialize hidden
4358         discriminants in extension aggregates.
4359
4360 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4361
4362         * prj-pp.adb (Print): also output project qualifiers, since in
4363         particular "aggregate" is mandatory in an aggregate project.
4364
4365 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4366
4367         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
4368         (Debug_Output): new function.
4369
4370 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4371
4372         * gnat_ugn.texi: Document -Wstack-usage.
4373         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
4374
4375 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4376
4377         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
4378         have keyword LIMITED.
4379
4380 2011-08-03  Yannick Moy  <moy@adacore.com>
4381
4382         * alfa.adb, alfa.ads, alfa_test.adb: New files.
4383         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
4384         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
4385         section (does not happen in compiler, only if code directly calls
4386         Scan_ALI).
4387         * get_alfa.adb, get_alfa.ads: New files.
4388         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
4389         needed.
4390         * lib-xref-alfa.adb: New file.
4391         * lib-xref.adb, lib-xref.ads
4392         (Xref_Entry): redefine information needed in cross-references for ALFA.
4393         Push ALFA treatments in separated local package.
4394         (Enclosing_Subpragram_Or_Package): treat specially subprogram
4395         identifiers. Return entity of package body instead of spec. Return
4396         Empty for a scope with no location.
4397         (Generate_Reference): adapt to new components for ALFA information.
4398         Remove the need for D references on definitions.
4399         (Is_Local_Reference): moved to ALFA local package
4400         (Output_References): extract subfunction as Extract_Source_Name
4401         (Output_Local_References): remove procedure, replaced by filtering of
4402         cross-references in package ALFA and printing in Put_ALFA.
4403         (Write_Entity_Name): remove procedure
4404         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
4405         print exact name of entity as it appears in source file
4406         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
4407         * put_alfa.adb, put_alfa.ads: New files.
4408         * xref_lib.adb (Search_Xref): protect read of cross-references against
4409         reading other sections of the ALI file, in gnatxref
4410         (Search): protect read of cross-references against reading other
4411         sections of the ALI file, in gnatfind.
4412         * gcc-interface/Make-lang.in: Update dependencies.
4413
4414 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4415
4416         * sem_ch3.adb: Minor reformatting.
4417
4418 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4419
4420         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
4421         raising an exception.
4422
4423 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4424
4425         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
4426         type, always use 1 as the lower bound or string, even if lower bound of
4427         context is not static, to handle properly null strings in a non-static
4428         context.
4429
4430 2011-08-03  Bob Duff  <duff@adacore.com>
4431
4432         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
4433         always legal on the right-hand side of an assignment statement; there
4434         is always an applicable index constraint in this case. Therefore, the
4435         check for Pkind = N_Assignment_Statement is now unconditional -- it
4436         doesn't depend on whether Is_Constrained (Typ).
4437
4438 2011-08-03  Robert Dewar  <dewar@adacore.com>
4439
4440         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
4441
4442 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4443
4444         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
4445         for an itype created within a generic unit.
4446
4447 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4448
4449         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
4450         suppresses all inlining.
4451
4452 2011-08-03  Robert Dewar  <dewar@adacore.com>
4453
4454         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
4455         exp_aggr.adb: Minor reformatting.
4456
4457 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4458
4459         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
4460         tagged assignment when discriminant checks are suppressed. This is
4461         useless and extremely costly in terms of static stack usage.
4462
4463 2011-08-03  Bob Duff  <duff@adacore.com>
4464
4465         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
4466         of generics, because this leads to the wrong entity in the wrong scope,
4467         causing (e.g.) pragma Export_Procedure to get an error if the entity is
4468         an instance.
4469         (Process_Interface_Name): Follow Alias for instances of generics, to
4470         correct for the above change.
4471
4472 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4473
4474         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
4475         is an integer literal it is always safe to replace the reference. In
4476         addition, if the reference appears in the generated code for an object
4477         declaration it is necessary to copy because otherwise the reference
4478         might be to the uninitilized value of the discriminant of the object
4479         itself.
4480
4481 2011-08-03  Pascal Obry  <obry@adacore.com>
4482
4483         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
4484         ACL used, in this case we want to check for ending .exe, not .exe
4485         anywhere in the path.
4486
4487 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4488
4489         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4490         the tree structure (semantic decoration of references to record
4491         discriminants).
4492
4493 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4494
4495         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
4496         choices of a named array aggregate, bail out when any choices are
4497         marked as Errors_Posted.
4498
4499 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4500
4501         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
4502         in which entity is frozen, to handle properly loop variables in
4503         iterators.
4504
4505 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4506
4507         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
4508         subtype is not static, compute the upper bound using attributes, to
4509         handle properly index types that are not integer types.
4510
4511 2011-08-03  Bob Duff  <duff@adacore.com>
4512
4513         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
4514         Update copyright notice.
4515
4516 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4517
4518         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
4519         Original_Discriminant if within an instance.
4520         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4521
4522 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4523
4524         * einfo.ads: Minor reformatting.
4525
4526 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4527
4528         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
4529         composite type with an unfrozen subcomponent, in the profile of a
4530         primitive operation.
4531
4532 2011-08-03  Robert Dewar  <dewar@adacore.com>
4533
4534         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4535
4536 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4537
4538         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
4539         unconstrained type with discriminants is initialized with an aggregate,
4540         use the constrained subtype of the aggregate as the type of the object,
4541         because it is immutable, and this allows the back-end to generate no
4542         code for the object declaration.
4543
4544 2011-08-03  Robert Dewar  <dewar@adacore.com>
4545
4546         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
4547         comparison operand is variable, and turns out to be zero or negative.
4548
4549 2011-08-03  Javier Miranda  <miranda@adacore.com>
4550
4551         * exp_intr.adb
4552         (Expand_Dispatching_Constructor_Call): Disable expansion of
4553         code required for native targets. Done to avoid generating
4554         references to unavailable runtime entities in VM targets.
4555         * exp_ch3.adb
4556         (Expand_N_Object_Declaration): Add missing support to handle
4557         the explicit initialization of class-wide interface objects.
4558         Fix documentation.
4559
4560 2011-08-03  Matthew Heaney  <heaney@adacore.com>
4561
4562         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
4563
4564 2011-08-03  Matthew Heaney  <heaney@adacore.com>
4565
4566         * a-cbdlli.adb (Splice): move source items from first to last
4567
4568 2011-08-03  Yannick Moy  <moy@adacore.com>
4569
4570         * sem_util.ads: comment added.
4571
4572 2011-08-03  Javier Miranda  <miranda@adacore.com>
4573
4574         * exp_aggr.adb
4575         (Expand_Record_Aggregate): In VM targets disable the expansion into
4576         assignments of aggregates whose type is not known at compile time.
4577
4578 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4579
4580         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4581         protected entries and task entries, to build the proper renaming
4582         declaration for entry formals, used in debugging.
4583         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4584         parameters in the same way.
4585
4586 2011-08-02  Robert Dewar  <dewar@adacore.com>
4587
4588         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4589         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4590         code reorganization.
4591
4592 2011-08-02  Robert Dewar  <dewar@adacore.com>
4593
4594         * debug.adb: Debug flag d.P to suppress length comparison optimization
4595         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4596         comparison of Length by comparing First/Last instead.
4597
4598 2011-08-02  Matthew Heaney  <heaney@adacore.com>
4599
4600         * a-cobove.ads: Code clean up.
4601
4602 2011-08-02  Vincent Celier  <celier@adacore.com>
4603
4604         * adaint.c (file_names_case_sensitive_cache): New static int.
4605         (__gnat_get_file_names_case_sensitive): Cache the return value in
4606         file_names_case_sensitive_cache at the first invocation, to avoid
4607         multiple calls to getenv.
4608
4609 2011-08-02  Bob Duff  <duff@adacore.com>
4610
4611         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4612
4613 2011-08-02  Yannick Moy  <moy@adacore.com>
4614
4615         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4616         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4617         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4618         indicate that we are in a precondition or postcondition. This is used in
4619         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4620         decide whether to flag the spec or body of the current subprogram as
4621         not in ALFA.
4622
4623 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
4624
4625         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4626         list.
4627         * a-extiin.ads: New file.
4628
4629 2011-08-02  Bob Duff  <duff@adacore.com>
4630
4631         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
4632         now raises Name_Error instead of Use_Error in certain cases. The other
4633         parts of this AI were already implemented properly.
4634
4635 2011-08-02  Vincent Celier  <celier@adacore.com>
4636
4637         * link.c: Only import "auto-host.h" when building the gnattools.
4638
4639 2011-08-02  Yannick Moy  <moy@adacore.com>
4640
4641         * sem_util.adb: Inter-unit inlining does not work for a subprogram
4642         which calls a local subprogram, so extract subprogram
4643         from Mark_Non_ALFA_Subprogram_Body.
4644
4645 2011-08-02  Javier Miranda  <miranda@adacore.com>
4646
4647         * exp_ch9.adb
4648         (Extract_Dispatching_Call): If the type of the dispatching object is an
4649         access type then return an explicit dereference in the Object out-mode
4650         parameter.
4651
4652 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
4653
4654         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
4655         compatibility checks for all indexes of an array subtype, not just the
4656         first. Reset Has_Dynamic_Range_Check on the subtype before each
4657         potential check to ensure that Insert_Range_Checks will not elide any
4658         of the dynamic checks.
4659
4660 2011-08-02  Yannick Moy  <moy@adacore.com>
4661
4662         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
4663         SPARK restriction at parsing time.
4664         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
4665         directive only if the SPARK restriction is set for this unit.
4666
4667 2011-08-02  Yannick Moy  <moy@adacore.com>
4668
4669         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
4670         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
4671         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
4672         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
4673         Mark_Non_ALFA_Subprogram_Body.
4674         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
4675         inlined.
4676
4677 2011-08-02  Yannick Moy  <moy@adacore.com>
4678
4679         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
4680         might be costly.
4681
4682 2011-08-02  Robert Dewar  <dewar@adacore.com>
4683
4684         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
4685         exp_ch3.adb: Minor reformatting.
4686
4687 2011-08-02  Emmanuel Briot  <briot@adacore.com>
4688
4689         * adaint.c (__gnat_locate_exec_on_path): only returns executable
4690         files, not any regular file.
4691         (__gnat_locate_file_with_predicate): new subprogram.
4692
4693 2011-08-02  Yannick Moy  <moy@adacore.com>
4694
4695         * sinfo.adb, sinfo.ads: Restrict the use of flags
4696         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
4697         nodes, plus N_Subtype_Declaration for the 2nd one.
4698
4699 2011-08-02  Sergey Rybin  <rybin@adacore.com>
4700
4701         * gnat_rm.texi: Ramification of pragma Eliminate documentation
4702          - fix bugs in the description of Source_Trace;
4703          - get rid of UNIT_NAME;
4704
4705 2011-08-02  Javier Miranda  <miranda@adacore.com>
4706
4707         * exp_ch9.adb
4708         (Build_Dispatching_Requeue): Adding support for VM targets
4709         since we cannot directly reference the Tag entity.
4710         * exp_sel.adb (Build_K): Adding support for VM targets.
4711         (Build_S_Assignment): Adding support for VM targets.
4712         * exp_disp.adb
4713         (Default_Prim_Op_Position): In VM targets do not restrict availability
4714         of predefined interface primitives to compiling in Ada 2005 mode.
4715         (Is_Predefined_Interface_Primitive): In VM targets this service is not
4716         restricted to compiling in Ada 2005 mode.
4717         (Make_VM_TSD): Generate code that declares and initializes the OSD
4718         record. Needed to support dispatching calls through synchronized
4719         interfaces.
4720         * exp_ch3.adb
4721         (Make_Predefined_Primitive_Specs): Enable generation of predefined
4722         primitives associated with synchronized interfaces.
4723         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4724         primitives associated with synchronized interfaces.
4725
4726 2011-08-02  Yannick Moy  <moy@adacore.com>
4727
4728         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4729         statements hidden in SPARK if preceded by the HIDE directive
4730         (Parse_Exception_Handlers): mark each exception handler in a sequence of
4731         exception handlers as hidden in SPARK if preceded by the HIDE directive
4732         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4733         if starting with the HIDE directive
4734         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4735         starting with the HIDE directive; mark the declarations in a private
4736         part as hidden in SPARK if the private part starts with the HIDE
4737         directive
4738         * restrict.adb, restrict.ads
4739         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4740         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4741         argument node belongs to a part which is hidden in SPARK
4742         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4743         parts in SPARK; protect the possibly costly call to
4744         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4745         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
4746         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
4747         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
4748         Tok_SPARK_Hide.
4749         (Scan): recognize special comment starting with '#' and followed by
4750         SPARK keyword "hide" as a HIDE directive.
4751
4752 2011-08-02  Yannick Moy  <moy@adacore.com>
4753
4754         * types.ads, erroutc.ads: Minor reformatting.
4755
4756 2011-08-02  Vincent Celier  <celier@adacore.com>
4757
4758         * link.c: Add response file support for cross platforms.
4759
4760 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4761
4762         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
4763         in an association, set parent field of copy before partial analysis.
4764         * sem_res.adb (Resolve_Slice): create reference to itype only when
4765         expansion is enabled.
4766
4767 2011-08-02  Yannick Moy  <moy@adacore.com>
4768
4769         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4770         for new flag denoting which subprogram bodies are in ALFA
4771         * restrict.adb, sem_ch7.adb: Update comment
4772         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4773         sem_ch9.adb, sem_res.adb: Add calls to
4774         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4775         * sem_ch6.adb (Analyze_Function_Return): add calls to
4776         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4777         middle of the body, and extended return.
4778         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4779         False when missing return.
4780         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4781         to True for subprograms whose spec is in ALFA. Remove later on the flag
4782         on the entity used for a subprogram body when there exists a separate
4783         declaration.
4784         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4785         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4786         False, otherwise do nothing.
4787
4788 2011-08-02  Robert Dewar  <dewar@adacore.com>
4789
4790         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4791
4792 2011-08-02  Yannick Moy  <moy@adacore.com>
4793
4794         * sem_ch4.ads: minor formatting.
4795
4796 2011-08-02  Yannick Moy  <moy@adacore.com>
4797
4798         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4799         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4800         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4801         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4802         opt.ads: cleanup of SPARK mode
4803
4804 2011-08-02  Yannick Moy  <moy@adacore.com>
4805
4806         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4807         types.
4808         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4809         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4810         * sem_ch3.adb
4811         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4812         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4813         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4814         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4815         types.
4816         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4817         non-static range.
4818         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4819         functions whose return type is not in ALFA.
4820         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4821         specifications.
4822         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4823         parameter's type is not in ALFA.
4824         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4825         types are in ALFA.
4826
4827 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4828
4829         * sem_ch6 (Analyze_Expression_Function): treat the function as
4830         Inline_Always, and introduce a subprogram declaration for it when it is
4831         not a completion.
4832         * inline.adb (Add_Inlined_Body): recognize bodies that come from
4833         expression functions, so that the back-end can determine whether they
4834         can in fact be inlined.
4835         * sem_util.adb (Is_Expression_Function): predicate to determine whether
4836         a function body comes from an expression function.
4837
4838 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
4839
4840         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4841         null exclusions to test Can_Never_Be_Null on the anonymous access types
4842         of the formals rather than testing the formals themselves. Exclude this
4843         check in cases where the Old_Formal is marked as a controlling formal,
4844         to avoid issuing spurious errors for bodies completing dispatching
4845         operations (due to the flag not getting set on controlling access
4846         formals in body specs).
4847         (Find_Corresponding_Spec): When checking full and subtype conformance of
4848         subprogram bodies in instances, pass Designated and E in that order, for
4849         consistency with the expected order of the formals (New_Id followed by
4850         Old_Id).
4851
4852 2011-08-02  Robert Dewar  <dewar@adacore.com>
4853
4854         * sem_ch8.adb: Minor reformatting.
4855
4856 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4857
4858         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4859         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4860         primitive operations of class-wide actuals.
4861
4862 2011-08-02  Javier Miranda  <miranda@adacore.com>
4863
4864         * exp_atag.ads, exp_atag.adb
4865         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4866         since its value is implicitly passed in argument Typ.
4867         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4868         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4869         Build_Common_Dispatching_Select_Statements.
4870
4871 2011-08-02  Robert Dewar  <dewar@adacore.com>
4872
4873         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4874         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4875         Minor reformatting.
4876
4877 2011-08-02  Robert Dewar  <dewar@adacore.com>
4878
4879         * sem_res.adb: Minor reformatting.
4880         * sem_prag.adb: Minor reformatting.
4881
4882 2011-08-02  Javier Miranda  <miranda@adacore.com>
4883
4884         * exp_atag.adb, exp_atags.ads
4885         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4886         by the tagged type Entity. Required to use this routine in the VM
4887         targets since we do not have available the Tag entity in the VM
4888         platforms.
4889         * exp_ch6.adb
4890         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4891         Ada.Tags has not been previously loaded.
4892         * exp_ch7.adb
4893         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4894         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4895         * sem_aux.adb
4896         (Enclosing_Dynamic_Scope): Add missing support to handle the full
4897         view of enclosing scopes. Required to handle enclosing scopes that
4898         are synchronized types whose full view is a task type.
4899         * exp_disp.adb
4900         (Build_VM_TSDs): Minor code improvement to avoid generating and
4901         analyzing lists with empty nodes.
4902         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4903         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4904         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4905         (Make_Disp_Timed_Select_Body): Add support for VM targets.
4906         (Make_Select_Specific_Data_Table): Add support for VM targets.
4907         (Make_VM_TSD): Generate code to initialize the SSD structure of
4908         the TSD.
4909
4910 2011-08-02  Yannick Moy  <moy@adacore.com>
4911
4912         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4913         cross-references section in ALI.
4914         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4915         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4916         Sub).
4917         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4918         subprogram or package entity of a node
4919         (Is_Local_Reference_Type): new function returns True for references
4920         selected in local cross-references.
4921         (Lt): function extracted from Lt in Output_References
4922         (Write_Entity_Name): function extracted from Output_References
4923         (Generate_Definition): generate reference with type 'D' for definition
4924         of objects (object declaration and parameter specification), with
4925         appropriate locations and units, for use in local cross-references.
4926         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4927         references of type 'I' for initialization in object definition.
4928         (Output_References): move part of function Lt and procedure
4929         Write_Entity_Name outside of the body. Ignore references of types 'D'
4930         and 'I' introduced for local cross-references.
4931         (Output_Local_References): new procedure to output the local
4932         cross-references sections.
4933         (Lref_Entity_Status): new array defining whether an entity is a local
4934         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4935         with 'I' type when initialization expression is present.
4936         * get_scos.adb, get_scos.ads: Correct comments and typos
4937
4938 2011-08-02  Javier Miranda  <miranda@adacore.com>
4939
4940         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4941         the JVM target.
4942         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4943         the JVM target.
4944         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4945         TSD support.
4946
4947 2011-08-02  Vincent Celier  <celier@adacore.com>
4948
4949         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4950         (No_Space_Img): New function
4951         (Find_Excluded_Sources): When reading from a file, record the file name
4952         and the line number for each excluded source.
4953         (Mark_Excluded_Sources): When reporting an error, if the excluded
4954         sources were read from a file, include file name and line number in
4955         the error message.
4956
4957 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4958
4959         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4960
4961 2011-08-02  Robert Dewar  <dewar@adacore.com>
4962
4963         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4964
4965 2011-08-02  Javier Miranda  <miranda@adacore.com>
4966
4967         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4968         generation of TSDs to the DOTNET compiler.
4969         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4970         generation of TSDs to the DOTNET compiler.
4971
4972 2011-08-02  Javier Miranda  <miranda@adacore.com>
4973
4974         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4975         record of all the tagged types declared inside library level package
4976         declarations, library level package bodies or library level subprograms.
4977         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4978         associated with a given tagged type.
4979         (Build_VM_TSDs): New subprogram.
4980         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4981         compilation units that are subprograms.
4982         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4983         compilation units that are package bodies.
4984         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4985         units that are a package declaration or a package instantiation.
4986         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4987         reorganization to improve the error generated by the frontend when the
4988         function Ada.Tags.Secondary_Tag is not available.
4989         * rtsfind.ads (RE_Register_TSD): New runtime entity.
4990         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4991
4992 2011-08-02  Javier Miranda  <miranda@adacore.com>
4993
4994         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4995
4996 2011-08-02  Robert Dewar  <dewar@adacore.com>
4997
4998         * s-imenne.ads: Minor reformatting.
4999
5000 2011-08-02  Robert Dewar  <dewar@adacore.com>
5001
5002         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5003         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5004         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5005
5006 2011-08-02  Robert Dewar  <dewar@adacore.com>
5007
5008         * einfo.ads (Materialize_Entity): Document this is only for renamings
5009         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5010         required debug information in the case where we transform the object
5011         declaration into a renaming declaration.
5012         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5013         object
5014         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5015         Materialize_Entity.
5016
5017 2011-08-02  Robert Dewar  <dewar@adacore.com>
5018
5019         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5020         Suppress_Init_Procs.
5021         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5022         Suppress_Initialization/Initialization_Suppressed.
5023         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5024         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5025         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5026         * sem_prag.adb: New processing for pragma Suppress_Initialization.
5027
5028 2011-08-02  Robert Dewar  <dewar@adacore.com>
5029
5030         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5031         Minor reformatting.
5032
5033 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5034
5035         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5036         only have inheritable classwide pre/postconditions.
5037
5038 2011-08-02  Javier Miranda  <miranda@adacore.com>
5039
5040         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5041         * rtsfind.ads (RE_Check_TSD): New runtime entity.
5042         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5043         checks if the external tag of a type is the same as the external tag
5044         of some other declaration.
5045
5046 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5047
5048         * s-taskin.ads: Minor reformatting.
5049
5050 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5051
5052         * g-comlin.adb (Display_Help): swap the order in which it prints the
5053         short help and the general usage.
5054
5055 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5056
5057         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5058         the aspect declarations and attach them to the generic copy for
5059         subsequent analysis.
5060         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5061         declarations of the generic tree to the new subprogram declarations.
5062         * sem_attr.adb (Check_Precondition_Postcondition): recognize
5063         conditions that apply to a subprogram instance.
5064
5065 2011-08-02  Robert Dewar  <dewar@adacore.com>
5066
5067         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5068
5069 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5070
5071         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5072         private type with a tagged full view is not derived in the immediate
5073         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5074
5075 2011-08-02  Robert Dewar  <dewar@adacore.com>
5076
5077         * exp_ch4.adb: Minor reformatting.
5078
5079 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5080
5081         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
5082         Ada2012 iterator, the loop will be rewritten during expansion into a
5083         while loop with a cursor and an element declaration. Do not analyze the
5084         body in this case, because if the container is for indefinite types the
5085         actual subtype of the elements will only be determined when the cursor
5086         declaration is analyzed.
5087
5088 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5089
5090         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5091         size/alignment related attributes in CodePeer_Mode.
5092
5093 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5094
5095         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5096         Prepend_Element, since this can result in the operation getting the
5097         wrong slot in the full type's dispatch table if the full type has
5098         inherited operations. The incomplete type's operation will get added
5099         to the proper position in the full type's primitives
5100         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5101         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5102         dispatching operations, since there are cases where nonprimitive
5103         subprograms can get added to the list of incomplete dependents (such
5104         as subprograms in nested packages).
5105         * sem_ch6.adb (Process_Formals): First, remove test for being in a
5106         private part when determining whether to add a primitive with a
5107         parameter of a tagged incomplete type to the Private_Dependents list.
5108         Such primitives can also occur in the visible part, and should not have
5109         been excluded from being private dependents.
5110         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5111         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5112         list of a Taft-amendment incomplete type is a primitive before issuing
5113         an error that the full type must appear in the same unit. There are
5114         cases where nonprimitives can be in the list (such as subprograms in
5115         nested packages).
5116         * sem_disp.adb (Derives_From): Use correct condition for checking that
5117         a formal's type is derived from the type of the corresponding formal in
5118         the parent subprogram (the condition was completely wrong). Add
5119         checking that was missing for controlling result types being derived
5120         from the result type of the parent operation.
5121
5122 2011-08-02  Yannick Moy  <moy@adacore.com>
5123
5124         * errout.adb (First_Node): minor renaming
5125         * restrict.adb (Check_Formal_Restriction): put restriction warning on
5126         first node.
5127
5128 2011-08-02  Yannick Moy  <moy@adacore.com>
5129
5130         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5131         before accessing operands.
5132         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5133         decide whether an initialization expression respects SPARK rules, as
5134         the plain node is the expanded one. This allows for more valid warnings
5135         to be issued.
5136         * gnat_rm.texi: Minor update.
5137
5138 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5139
5140         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5141         previous change.
5142
5143 2011-08-02  Robert Dewar  <dewar@adacore.com>
5144
5145         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5146
5147 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5148
5149         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5150         loop statements and the element renaming declaration with a block when
5151         the element type is controlled.
5152
5153 2011-08-02  Yannick Moy  <moy@adacore.com>
5154
5155         * sinfo.ads: Minor formatting.
5156
5157 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5158
5159         * sem_aggr.adb (Add_Association): if the association has a box and no
5160         expression, use the Sloc of the aggregate itself for the new
5161         association.
5162         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5163         the Original_Node.
5164
5165 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5166
5167         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5168         When a container is provided via a function call, generate a renaming
5169         of the function result. This avoids the creation of a transient scope
5170         and the premature finalization of the container.
5171         * exp_ch7.adb (Is_Container_Cursor): Removed.
5172         (Wrap_Transient_Declaration): Remove the supression of the finalization
5173         of the list controller when the declaration denotes a container cursor,
5174         it is not needed.
5175
5176 2011-08-02  Yannick Moy  <moy@adacore.com>
5177
5178         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5179         node is from source, instead of the original node being from source.
5180         * sem_aggr.adb
5181         (Resolve_Array_Aggregate): refine the check for a static expression, to
5182         recognize also static ranges
5183         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5184         Array_Type_Declaration): postpone the test for the type being a subtype
5185         mark after the type has been resolved, so that component-selection and
5186         expanded-name are discriminated.
5187         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5188         to distinguish the case of an iteration scheme, so that an error is
5189         issed on a non-static range in SPARK except in an iteration scheme.
5190         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5191         In_Iter_Schm = True.
5192         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5193         user-defined operators so that they are allowed in renaming
5194         * sem_ch8.adb
5195         (Find_Selected_Component): refine the check for prefixing of operators
5196         so that they are allowed in renaming. Move the checks for restrictions
5197         on selector name after analysis discriminated between
5198         component-selection and expanded-name.
5199         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5200         concatenation argument of string type if it is static.
5201         * sem_util.adb, sem_util.ads
5202         (Check_Later_Vs_Basic_Declarations): add a new function
5203         Is_Later_Declarative_Item to decice which declarations are allowed as
5204         later items, in the two different modes Ada 83 and SPARK. In the SPARK
5205         mode, add that renamings are considered as later items.
5206         (Enclosing_Package): new function to return the enclosing package
5207         (Enter_Name): correct the rule for homonyms in SPARK
5208         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5209         from source (result of expansion) to avoid issuing wrong warnings.
5210
5211 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5212
5213         * errout.adb: On anything but an expression First_Node returns its
5214         argument.
5215
5216 2011-08-02  Pascal Obry  <obry@adacore.com>
5217
5218         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5219
5220 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5221
5222         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5223         Set the associated loop as the related expression of internally
5224         generated cursors.
5225         * exp_ch7.adb (Is_Container_Cursor): New routine.
5226         (Wrap_Transient_Declaration): Supress the finalization of the list
5227         controller when the declaration denotes a container cursor.
5228
5229 2011-08-02  Yannick Moy  <moy@adacore.com>
5230
5231         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5232         command line now.
5233         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5234         expression is a simple expression. This check cannot be performed in
5235         the semantics, so just drop it.
5236         (P_Index_Or_Discriminant_Constraint): move check that the index or
5237         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5238         semantics. Other cases were previously checked in the semantics.
5239         * par-ch4.adb (P_Name): move checks that a selector name is not
5240         character literal or an operator symbol to Find_Selected_Component in
5241         the semantics
5242         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5243         declarations are not placed after later declarations in a separate
5244         procedure in Sem_Util (possibly not the best choice?), to be used both
5245         during parsing, for Ada 83 mode, and during semantic analysis, for
5246         SPARK mode.
5247         * par-endh.adb (Check_End): move check that end label is not missing
5248         to Process_End_Label in the semantics
5249         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5250         the special case for SPARK restriction
5251         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5252         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5253         parameter Force to issue the error message even on internal node (used
5254         for generated end label). Call Check_Restriction to check when an error
5255         must be issued. In SPARK mode, issue an error message even if the
5256         restriction is not set.
5257         (Check_Restriction): new procedure with an additional out parameter to
5258         inform the caller that a message has been issued
5259         * sem_aggr.adb: Minor modification of message
5260         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5261         instead of issuing an error message directly
5262         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5263         declarations are not placed after later declarations, by calling
5264         Check_Later_Vs_Basic_Declarations
5265         (Analyze_Subtype_Declaration): move here the check that an index or
5266         discriminant constraint must be a subtype mark. Change the check that
5267         a subtype of String must start at one so that it works on subtype marks.
5268         * sem_ch4.adb (Analyze_Call): move here the check that a named
5269         association cannot follow a positional one in a call
5270         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5271         instead of issuing an error message directly
5272         * sem_ch8.adb (Find_Selected_Component): move here the check that a
5273         selector name is not a character literal or an operator symbol. Move
5274         here the check that the prefix of an expanded name cannot be a
5275         subprogram or a loop statement.
5276         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5277         procedure called from parsing and semantics to check that basic
5278         declarations are not placed after later declarations
5279         (Process_End_Label): move here the check that end label is not missing
5280
5281 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5282
5283         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5284         representation clause in codepeer mode, since it confuses CodePeer and
5285         does not bring useful info.
5286
5287 2011-08-02  Ed Falis  <falis@adacore.com>
5288
5289         * init.c: initialize fp hw on MILS.
5290
5291 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5292
5293         * errout.adb (First_Node): for bodies, return the node itself (small
5294         optimization). For other nodes, do not check source_unit if the node
5295         comes from Standard.
5296
5297 2011-08-02  Robert Dewar  <dewar@adacore.com>
5298
5299         * exp_ch3.adb: Minor comment additions.
5300         * sem_ch13.adb: Minor reformatting.
5301
5302 2011-08-02  Pascal Obry  <obry@adacore.com>
5303
5304         * make.adb, makeutl.adb: Removes some superfluous directory separator.
5305
5306 2011-08-02  Robert Dewar  <dewar@adacore.com>
5307
5308         * sem_attr.adb: Minor reformatting.
5309
5310 2011-08-02  Robert Dewar  <dewar@adacore.com>
5311
5312         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5313         (Has_Default_Component_Value): Removed
5314         * einfo.ads Comment updates
5315         (Has_Default_Aspect): Replaces Has_Default_Value
5316         (Has_Default_Component_Value): Removed
5317         * exp_ch13.adb
5318         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5319         * exp_ch3.adb
5320         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5321         (Get_Simple_Init_Val): Handle Default_Value aspect
5322         (Needs_Simple_Initialization): Handle Default_Value aspect
5323         * exp_ch3.ads: Needs_Simple_Initialization
5324         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5325         * par-prag.adb (Pragma_Default[_Component]Value) Removed
5326         * sem_ch13.adb
5327         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5328         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5329         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5330
5331 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5332
5333         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5334         package containing iteration primitives.
5335         exp_ch5.adb (Expand_Iterator_Loop): ditto.
5336
5337 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5338
5339         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5340         "of", pre-analyze expression in case it is a function call with
5341         finalization actions that must be placed ahead of the loop.
5342         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5343         on an Ada2012 iterator, insert them ahead of the rewritten loop.
5344
5345 2011-08-02  Geert Bosch  <bosch@adacore.com>
5346
5347         * cstand.adb (Create_Float_Types): Only consider C's long double for
5348         Long_Long_Float, in addition to double.
5349
5350 2011-08-02  Robert Dewar  <dewar@adacore.com>
5351
5352         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5353         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5354         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5355         Minor reformatting.
5356
5357 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5358
5359         * sem_attr.adb: handle properly 'Result when it is a prefix of an
5360         indexed component.
5361
5362 2011-08-02  Javier Miranda  <miranda@adacore.com>
5363
5364         * einfo.ads, einfo.adb
5365         (Original_Access_Type): Move this attribute to Node26 since there was
5366         an undocumented use of Node21 in E_Access_Subprogram_Type entities
5367         which causes conflicts and breaks the generation of the .NET compiler.
5368         (Interface_Name): Add missing documentation on JGNAT only uses of
5369         this attribute.
5370
5371 2011-08-02  Geert Bosch  <bosch@adacore.com>
5372
5373         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5374         (Find_Back_End_Float_Type): Likewise
5375         (Create_Back_End_Float_Types): Likewise
5376         (Create_Float_Types): Likewise
5377         (Register_Float_Type): Likewise
5378         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5379         Nlist and split out type selection in new local Find_Base_Type function.
5380         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5381         Nlist
5382         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5383
5384 2011-08-02  Robert Dewar  <dewar@adacore.com>
5385
5386         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5387         alpha order).
5388         * opt.ads: Minor comment change.
5389         * sem_ch12.adb: Minor code reorganization.
5390
5391 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5392
5393         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5394         subtype's list of rep items to the list on the full subtype in the case
5395         where the lists are the same.
5396
5397 2011-08-02  Geert Bosch  <bosch@adacore.com>
5398
5399         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5400         using the one from System.Strings, which also deallocates all strings.
5401
5402 2011-08-02  Geert Bosch  <bosch@adacore.com>
5403
5404         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5405         function.
5406         * gcc-interface/Make-lang.in: Update dependencies.
5407
5408 2011-08-02  Olivier Hainque  <hainque@adacore.com>
5409
5410         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5411         end_locus.
5412
5413 2011-08-02  Javier Miranda  <miranda@adacore.com>
5414
5415         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5416         associated with anonymous access to subprograms.
5417
5418 2011-08-02  Geert Bosch  <bosch@adacore.com>
5419
5420         * opt.ads
5421         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5422         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5423         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5424         (Add_Symbol_Definition): Move to switch-c.adb
5425         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5426         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5427         (Add_Symbol_Definition): Move to switch-c.adb.
5428         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5429         * sem_warn.adb
5430         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5431         Move to warnsw.adb.
5432         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5433         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5434         Move to warnsw.adb.
5435         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5436         (Add_Symbol_Definition): Moved from Prepcomp.
5437         * switch-c.ads: Update copyright notice. Use String_List instead of
5438         Argument_List, removing dependency on System.OS_Lib.
5439
5440 2011-08-02  Yannick Moy  <moy@adacore.com>
5441
5442         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5443         mode on initialization expression which does not respect SPARK
5444         restrictions.
5445         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5446         if the tree referenced by its argument represents an initialization
5447         expression in SPARK, suitable for initializing an object in an object
5448         declaration.
5449
5450 2011-08-02  Javier Miranda  <miranda@adacore.com>
5451
5452         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5453         internally generated access to subprogram with its associated protected
5454         subprogram type.
5455         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5456
5457 2011-08-02  Geert Bosch  <bosch@adacore.com>
5458
5459         * cstand.adb (Register_Float_Type): Print information about type to
5460         register, if the Debug_Flag_Dot_B is set.
5461         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5462         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5463         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5464         with a requested precision of more than Max_Digits digits and no more
5465         than Max_Base_Digits digits, if a range specification is present and the
5466         Predefined_Float_Types list has a suitable type to derive from.
5467         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5468         case of type completion with pragma Import
5469         * sem_prag.adb
5470         (Process_Import_Predefined_Type): Processing to complete a type
5471         with pragma Import. Currently supports floating point types only.
5472         (Set_Convention_From_Pragma): Do nothing without underlying type.
5473         (Process_Convention): Guard against absence of underlying type,
5474         which may happen when importing incomplete types.
5475         (Process_Import_Or_Interface): Handle case of importing predefined
5476         types. Tweak error message.
5477
5478 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5479
5480         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5481         functions to previous change.  Reorganize code slightly.
5482
5483 2011-08-02  Geert Bosch  <bosch@adacore.com>
5484
5485         * back_end.ads (Register_Type_Proc): New call back procedure type for
5486         allowing the back end to provide information about available types.
5487         (Register_Back_End_Types): New procedure to register back end types.
5488         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5489         available types.
5490         * cstand.adb (Back_End_Float_Types): New list for floating point types
5491         supported by the back end.
5492         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5493         (Copy_Float_Type): New procedure to make new copies of predefined types.
5494         (Register_Float_Type): New call back procedure to populate the BEFT list
5495         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5496         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5497         (Create_Float_Types): New procedure to create entities for floating
5498         point types predefined in Standard, and put these and any remaining
5499         BEFTs on the Predefined_Float_Types list.
5500         * stand.ads (Predefined_Float_Types): New list for predefined floating
5501         point types that do not have declarations in package Standard.
5502
5503 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5504
5505         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
5506         entity node for the unit containing the parameter.
5507         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5508         (Add_Inlined_Subprogram): Likewise.
5509         * gcc-interface/Make-lang.in: Update dependencies.
5510
5511 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5512
5513         * s-stusta.adb (Print): Make sure Pos is always initialized to a
5514         suitable value.
5515
5516 2011-08-02  Geert Bosch  <bosch@adacore.com>
5517
5518         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5519
5520 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5521
5522         * sem_type.adb (Covers): Move trivial case to the top and reuse the
5523         computed value of Base_Type.
5524
5525 2011-08-02  Yannick Moy  <moy@adacore.com>
5526
5527         * restrict.adb (Check_Restriction): issue an error for any use of
5528         class-wide, even if the No_Dispatch restriction is not set.
5529         * sem_aggr.adb: Correct typos in comments and messages in formal mode
5530         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5531         when completing a private extension, the type named in the private part
5532         is not the same as that named in the visible part.
5533         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5534         of an inherited primitive operations of a tagged type or type extension
5535         that returns the tagged type.
5536         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5537         function which returns True for an implicit operation inherited by the
5538         derived type declaration for the argument type.
5539         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5540         order.
5541
5542 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5543
5544         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5545         Process_Bounds, to perform analysis with expansion of a range or an
5546         expression that is the iteration scheme for a loop.
5547         (Analyze_Iterator_Specification): If domain of iteration is given by a
5548         function call with a controlled result, as is the case if call returns
5549         a predefined container, ensure that finalization actions are properly
5550         generated.
5551         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5552
5553 2011-08-02  Javier Miranda  <miranda@adacore.com>
5554
5555         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5556         * gcc-interface/Make-lang.in: Update dependencies.
5557
5558 2011-08-02  Javier Miranda  <miranda@adacore.com>
5559
5560         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5561         determine if the analysis is performed using N or Original_Node (N).
5562         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5563         functionality of routine Is_Variable avoids code duplication.
5564         * checks.adb (Determine_Range): Handle temporaries generated by
5565         Remove_Side_Effects.
5566
5567 2011-08-02  Javier Miranda  <miranda@adacore.com>
5568
5569         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5570         expansion of the condition. Required since the previous analysis was
5571         done with expansion disabled (see Resolve_Quantified_Expression) and
5572         hence checks were not inserted and record comparisons have not been
5573         expanded.
5574
5575 2011-08-02  Ed Falis  <falis@adacore.com>
5576
5577         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5578         Update header.
5579
5580 2011-08-02  Bob Duff  <duff@adacore.com>
5581
5582         * opt.ads: Minor comment fix.
5583
5584 2011-08-02  Bob Duff  <duff@adacore.com>
5585
5586         * sem_ch12.adb (Analyze_Package_Instantiation,
5587         Analyze_Subprogram_Instantiation): Turn off style checking while
5588         analyzing an instance. Whatever style checks that apply to the generic
5589         unit should apply, so it makes no sense to apply them in an instance.
5590         This was causing trouble when compiling an instance of a runtime
5591         unit that violates the -gnatyO switch.
5592         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5593         one of the two case statements, causing spurious errors.
5594
5595 2011-08-02  Robert Dewar  <dewar@adacore.com>
5596
5597         * uname.adb: Minor reformatting.
5598         * gnatcmd.adb: Minor reformatting.
5599         * exp_attr.adb: Minor reformatting.
5600
5601 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5602
5603         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5604         No_Dispatching_Calls, do not look for the Assign primitive, because
5605         predefined primitives are not created in this case.
5606
5607 2011-08-02  Bob Duff  <duff@adacore.com>
5608
5609         * stylesw.ads: Minor comment fixes.
5610
5611 2011-08-02  Robert Dewar  <dewar@adacore.com>
5612
5613         * freeze.adb (Add_To_Result): New procedure.
5614
5615 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
5616
5617         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5618         time, if the specific run-time routines for handling streams of strings
5619         are not available, use the default mechanism.
5620
5621 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5622
5623         * s-regpat.ads: Fix typo.
5624
5625 2011-08-02  Vincent Celier  <celier@adacore.com>
5626
5627         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5628         not null, call it to create the in memory config project file without
5629         parsing an existing default config project file.
5630
5631 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5632
5633         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5634
5635 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5636
5637         * sem_elim.adb: an abstract subprogram does not need an eliminate
5638         pragma for its descendant to be eliminable.
5639
5640 2011-08-02  Ed Falis  <falis@adacore.com>
5641
5642         * init.c: revert to handling before previous checkin for VxWorks
5643         * s-intman-vxworks.adb: delete unnecessary declarations related to
5644         using Ada interrupt facilities for handling signals.
5645         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5646         * s-intman-vxworks.ads: Import __gnat_install_handler as
5647         Initialize_Interrupts.
5648         * s-taprop-vxworks.adb: Delete Signal_Mask.
5649         (Abort_Handler): change construction of mask to unblock exception
5650         signals.
5651
5652 2011-08-02  Jerome Guitton  <guitton@adacore.com>
5653
5654         * a-except-2005.adb (Raise_From_Signal_Handler): Call
5655         Debug_Raise_Exception before propagation starts.
5656
5657 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5658
5659         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5660         to Restriction_Check_Required.
5661         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5662         * sem_res.adb (Resolve_Call): Likewise.
5663         * sem_attr.adb (Check_Stream_Attribute): Likewise.
5664
5665 2011-08-02  Bob Duff  <duff@adacore.com>
5666
5667         * stylesw.ads: Update comment.
5668         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5669         * errout.ads: Remove obsolete comment.
5670
5671 2011-08-02  Javier Miranda  <miranda@adacore.com>
5672
5673         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5674         (Set_Is_Safe_To_Reevaluate): new procedure.
5675         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5676         assignment is allowed on safe-to-reevaluate variables.
5677         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5678         temporary created to remove side effects in expressions that use
5679         the secondary stack as safe-to-reevaluate.
5680         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5681         variables that are not true constants.
5682
5683 2011-08-02  Robert Dewar  <dewar@adacore.com>
5684
5685         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5686         sem_res.adb, sem_ch6.adb: Minor reformatting.
5687
5688 2011-08-02  Jerome Guitton  <guitton@adacore.com>
5689
5690         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5691
5692 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5693
5694         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5695         not set Overridden_Operation if subprogram is an initialization
5696         procedure.
5697
5698 2011-08-02  Yannick Moy  <moy@adacore.com>
5699
5700         * par-ch6.adb: Correct obsolete name in comments
5701         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5702         which takes two message arguments (existing function takes one), with
5703         second message used for continuation.
5704         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5705         block statements that originate from a source block statement, not
5706         generated block statements
5707         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5708         symmetry with procedure case
5709         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5710         function to issue an error in formal mode if a package specification
5711         contains more than one tagged type or type extension.
5712         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5713         parameters matching formals of tagged types are objects (or ancestor
5714         type conversions of objects), not general expressions. Issue an error
5715         on view conversions that are not involving ancestor conversion of an
5716         extended type.
5717         (Resolve_Type_Conversion): in formal mode, issue an error on the
5718         operand of an ancestor type conversion which is not an object
5719         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5720         procedure so that it works also for actuals of function calls
5721         (Is_Actual_Tagged_Parameter): new function which determines if its
5722         argument is an actual parameter of a formal of tagged type in a
5723         subprogram call
5724         (Is_SPARK_Object_Reference): new function which determines if the tree
5725         referenced by its argument represents an object in SPARK
5726
5727 2011-08-02  Robert Dewar  <dewar@adacore.com>
5728
5729         * sem_ch3.adb: Minor reformatting
5730         Minor comment addition
5731         Minor error msg text change
5732
5733 2011-08-02  Javier Miranda  <miranda@adacore.com>
5734
5735         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5736         function. Used to be more precise when we generate a variable plus one
5737         assignment to remove side effects in the evaluation of the Bound
5738         expressions.
5739         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5740         of the bound expression to force its re-analysis and thus expand the
5741         associated transient scope (if required). Code cleanup replacing the
5742         previous code that declared the constant entity by an invocation to
5743         routine Force_Evaluation which centralizes this work in the frontend.
5744
5745 2011-08-02  Robert Dewar  <dewar@adacore.com>
5746
5747         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
5748         (Base_Type): Now uses improved Is_Base_Type function
5749         * einfo.ads (Base_Type): Inline this function
5750
5751 2011-08-02  Robert Dewar  <dewar@adacore.com>
5752
5753         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
5754         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
5755
5756 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5757
5758         * gcc-interface/Make-lang.in: Update dependencies.
5759         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
5760         targets.
5761
5762 2011-08-02  Yannick Moy  <moy@adacore.com>
5763
5764         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5765         non-simple expression used in delta constraint
5766         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5767         index constraint which is not a subtype mark
5768         * par.adb: With and use Restrict
5769         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5770         mode on component type which is not a subtype mark and default
5771         expression on component
5772         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5773         of string which does not have a lower index bound equal to 1
5774         (Array_Type_Declaration): issue an error in formal mode on index or
5775         component type which is not a subtype mark, and on aliased keyword on
5776         component
5777         (Derived_Type_Declaration): issue an error in formal mode on interface,
5778         limited or abstract type
5779         (Record_Type_Declaration): issue an error in formal mode on interface
5780         (Record_Type_Definition): issue an error in formal mode on tagged types
5781         and type extensions not declared in the specification of a library unit
5782         package; on null non-tagged record; on variant part
5783
5784 2011-08-02  Vincent Celier  <celier@adacore.com>
5785
5786         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5787         not declared for qualified library project when Library_Name is not
5788         declared, but Library_Dir is.
5789
5790 2011-08-02  Robert Dewar  <dewar@adacore.com>
5791
5792         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5793         pragmas (affects aspects [Component_]Default_Value
5794         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5795         component type for the resolution
5796
5797 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5798
5799         * einfo.adb (Base_Type): Tune implementation for speed.
5800
5801 2011-08-02  Robert Dewar  <dewar@adacore.com>
5802
5803         * freeze.adb: Minor reformatting.
5804
5805 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5806
5807         * scos.ads: Update comments.
5808
5809 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5810
5811         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5812         base type, because the parent may be a subtype of a private type whose
5813         convention is established in a private part.
5814
5815 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5816
5817         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5818         statement in a block when the expansion of the return expression has
5819         created a finalization chain.
5820         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5821         with the parent node.
5822         Add N_Extended_Return_Statement to handle the case where a transient
5823         object declaration appears in the Return_Object_Declarations list of
5824         an extended return statement.
5825
5826 2011-08-02  Matthew Gingell  <gingell@adacore.com>
5827
5828         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5829         unused parameter 'name'.
5830
5831 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5832
5833         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5834         inherited operation, check whether its alias, which is the source
5835         operastion that it renames, has been marked eliminated.
5836
5837 2011-08-02  Javier Miranda  <miranda@adacore.com>
5838
5839         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5840         in-mode parameter whose type is an access type since it can be used to
5841         modify its designated object. Enforce code that handles as safe an
5842         access type that is not access-to-constant but it is the result of a
5843         previous removal of side-effects.
5844         (Remove_Side_Effects): Minor code reorganization of cases which require
5845         no action. Done to incorporate documentation on new cases uncovered
5846         working in this ticket: no action needed if this routine was invoked
5847         too early and the nodes are not yet decorated.
5848         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5849         to routine Remove_Side_Effects by calls to Force_Evaluation since they
5850         were issued with actuals that are implicitly provided by
5851         Force_Evaluation.
5852
5853 2011-08-02  Robert Dewar  <dewar@adacore.com>
5854
5855         * sem_ch3.adb, sem_res.adb: Minor reformatting.
5856
5857 2011-08-02  Yannick Moy  <moy@adacore.com>
5858
5859         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5860         to issue an error in formal mode on attribute not supported in this mode
5861         (Analyze_Attribute): issue errors on standard attributes not supported
5862         in formal mode.
5863         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5864         comment, and issue error in formal mode on modulus which is not a power
5865         of 2.
5866         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5867         range.
5868         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5869         subtype mark.
5870         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5871         operator on modular type (except 'not').
5872
5873 2011-08-02  Robert Dewar  <dewar@adacore.com>
5874
5875         * gnat_rm.texi: Minor reformatting.
5876
5877 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5878
5879         * s-osinte-linux.ads: Minor comment update and reformatting.
5880         * i-cexten.ads: Make this unit pure, as for its parent.
5881         Will allow its usage in more contexts if needed.
5882
5883 2011-08-02  Robert Dewar  <dewar@adacore.com>
5884
5885         * s-utf_32.ads: Minor comment fix.
5886
5887 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5888
5889         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5890         operation of a tagged synchronized type, handle the case where the
5891         controlling argument is overloaded.
5892
5893 2011-08-02  Yannick Moy  <moy@adacore.com>
5894
5895         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5896         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5897         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5898         SPARK mode and formal verification mode on processing SPARK restriction
5899         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5900         requiring consistency checking.
5901
5902 2011-08-02  Robert Dewar  <dewar@adacore.com>
5903
5904         * sem_res.adb: Minor reformatting.
5905
5906 2011-08-02  Robert Dewar  <dewar@adacore.com>
5907
5908         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5909         a-cforse.ads: Remove unneeded with of Ada.Containers
5910         Remove commented out pragma Inline's
5911         Move specifications of new subprograms to the actual specs
5912
5913 2011-08-02  Yannick Moy  <moy@adacore.com>
5914
5915         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5916         a-cforse.ads: Update comments.
5917
5918 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5919
5920         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5921
5922 2011-08-02  Robert Dewar  <dewar@adacore.com>
5923
5924         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5925         a-cforse.ads, a-cofove.ads: Minor reformatting.
5926
5927 2011-08-02  Claire Dross  <dross@adacore.com>
5928
5929         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5930         a-cofove.ads: Add comments.
5931
5932 2011-08-02  Yannick Moy  <moy@adacore.com>
5933
5934         * gnat_rm.texi: Document formal containers.
5935
5936 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5937
5938         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5939         are empty sections.
5940
5941 2011-08-02  Robert Dewar  <dewar@adacore.com>
5942
5943         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5944         reformatting.
5945
5946 2011-08-02  Robert Dewar  <dewar@adacore.com>
5947
5948         * aspects.adb: New aspects Default_Value and Default_Component_Value
5949         New format of Aspect_Names table checks for omitted entries
5950         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5951         handling of boolean aspects for derived types.
5952         New aspects Default_Value and Default_Component_Value
5953         New format of Aspect_Names table checks for omitted entries
5954         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5955         (Has_Default_Value): New flag
5956         (Has_Default_Component_Value): New flag
5957         (Has_Default_Value): New flag
5958         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5959         table.
5960         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5961         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5962         Default_Value and Default_Component_Value
5963         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5964         New aspects Default_Value and Default_Component_Value
5965         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5966         * sprint.adb: Print N_Aspect_Specification node when called from gdb
5967
5968 2011-08-02  Vincent Celier  <celier@adacore.com>
5969
5970         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5971         inherit library kind.
5972
5973 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5974
5975         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5976         Minor reformatting.
5977
5978 2011-08-02  Robert Dewar  <dewar@adacore.com>
5979
5980         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5981
5982 2011-08-02  Yannick Moy  <moy@adacore.com>
5983
5984         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5985
5986 2011-08-02  Robert Dewar  <dewar@adacore.com>
5987
5988         * impunit.adb: Add comment.
5989
5990 2011-08-02  Yannick Moy  <moy@adacore.com>
5991
5992         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5993         qualification of aggregates in formal mode
5994         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5995         another aggregate
5996         (Resolve_Aggregate): complete the test that an aggregate is adequately
5997         qualified in formal mode
5998
5999 2011-08-02  Pascal Obry  <obry@adacore.com>
6000
6001         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6002         * mlib-prj.adb: Supress warning when compiling binder generated file.
6003         (Build_Library): Supress all warnings when compiling the binder
6004         generated file.
6005
6006 2011-08-02  Yannick Moy  <moy@adacore.com>
6007
6008         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6009         from here...
6010         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6011         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6012         Add with/use clauses to make Check_Formal_Restriction visible
6013
6014 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6015
6016         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6017         in-parameters when type of the generic formal is private in the generic
6018         spec and non-private in the body.
6019
6020 2011-08-02  Claire Dross  <dross@adacore.com>
6021
6022         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6023         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6024         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6025         * impunit.adb, Makefile.rtl: Take new files into account.
6026
6027 2011-08-02  Robert Dewar  <dewar@adacore.com>
6028
6029         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6030         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6031
6032 2011-08-02  Yannick Moy  <moy@adacore.com>
6033
6034         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6035         formal mode
6036         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6037         matching static array bounds, taking into account the special case of
6038         string literals
6039         * sem_ch3.adb: Typo in comment.
6040
6041 2011-08-02  Yannick Moy  <moy@adacore.com>
6042
6043         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6044         which issues an error in formal mode if its argument node is originally
6045         from source
6046         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6047         has a discriminant specification so that it does not include the case
6048         of derived types
6049         (Derived_Type_Declaration): move here the test that a derived type has a
6050         discriminant specification
6051         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6052         first element of a component association before accessing its choices
6053         (presence of component association is not enough)
6054         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6055         declaration is a library item before accessing the next element in a
6056         list, as library items are not member of lists
6057         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6058         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6059         Check_Formal_Restriction whenever possible.
6060
6061 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6062
6063         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6064         reference when needed.
6065
6066 2011-08-02  Bob Duff  <duff@adacore.com>
6067
6068         * gnat_ugn.texi: Fix typo.
6069
6070 2011-08-02  Vincent Celier  <celier@adacore.com>
6071
6072         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6073         archive file name. Do not use the full path name of archives for Open
6074         VMS.
6075
6076 2011-08-02  Robert Dewar  <dewar@adacore.com>
6077
6078         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6079         Analyze_Aspect_Specifications
6080         * sem_ch13.adb
6081         (Analyze_Aspect_Specifications): New handling for boolean aspects
6082         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6083         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6084         sequence for Analyze_Aspect_Specifications
6085         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6086         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6087
6088 2011-08-02  Robert Dewar  <dewar@adacore.com>
6089
6090         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6091         aspects, since these no longer exist.
6092
6093 2011-08-02  Robert Dewar  <dewar@adacore.com>
6094
6095         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6096         semicolon, do not try to see if there are aspects following it.
6097         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6098         aspect spec.
6099
6100 2011-08-02  Robert Dewar  <dewar@adacore.com>
6101
6102         * sem_ch8.adb, aspects.ads: Minor reformatting.
6103
6104 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6105
6106         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6107         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6108         extracted from...
6109         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
6110
6111 2011-08-02  Yannick Moy  <moy@adacore.com>
6112
6113         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6114         mode on subprogram declaration outside of package specification, unless
6115         it is followed by a pragma Import
6116         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6117         Access_Type_Declaration): issue error in formal mode on access type
6118         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6119         incomplete type
6120         (Analyze_Object_Declaration): issue error in formal mode on object
6121         declaration which does not respect SPARK restrictions
6122         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6123         declaration which does not respect SPARK restrictions
6124         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6125         error in formal mode on digits or delta constraint
6126         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6127         decimal fixed point type
6128         (Derived_Type_Declaration): issue error in formal mode on derived type
6129         other than type extensions of tagged record types
6130         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6131         with check on access definition
6132         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6133         mode on protected definition.
6134         (Analyze_Task_Definition): issue error in formal mode on task definition
6135
6136 2011-08-02  Robert Dewar  <dewar@adacore.com>
6137
6138         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6139
6140 2011-08-02  Javier Miranda  <miranda@adacore.com>
6141
6142         * sem_ch6.adb (Can_Override_Operator): New function.
6143         (Verify_Overriding_Indicator): Add missing code to check overriding
6144         indicator in operators. Fixes regression.
6145         (Check_Overriding_Indicator): Minor reformating after replacing the
6146         code that evaluates if the subprogram can override an operator by
6147         invocations to the above new function.
6148         * einfo.adb
6149         (Write_Field26_Name): Add missing code to ensure that, following
6150         the documentation in einfo.ads, this field is not shown as attribute
6151         "Static_Initialization" on non-dispatching functions.
6152
6153 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6154
6155         * sem_res.adb (Resolve_Call): A call to
6156         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6157         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6158         i.e., when the second parameter is of type Time_Span.
6159
6160 2011-08-02  Vincent Celier  <celier@adacore.com>
6161
6162         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6163         with an archive instead of -L<library dir> -l<library name>.
6164
6165 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6166
6167         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6168         mark the base types In_Use in addition to making the operations
6169         use_visible.
6170
6171 2011-08-02  Ed Falis  <falis@adacore.com>
6172
6173         * init.c: add and setup __gnat_signal_mask for the exception signals
6174         * s-inmaop-vxworks.adb: new file.
6175         * s-intman-vxworks.adb: remove unnecessary initializations and
6176         simplify remaining
6177         * s-intman-vxworks.ads: remove unnecessary variable
6178         * s-taprop-vxworks.adb: simplify signal initialization
6179
6180 2011-08-02  Robert Dewar  <dewar@adacore.com>
6181
6182         * sem_ch8.adb: Minor code reorganization, comment updates.
6183
6184 2011-08-02  Robert Dewar  <dewar@adacore.com>
6185
6186         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6187         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6188         here from Sem_Res.
6189         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6190         (Matching_Static_Array_Bounds): Moved here from Sem_Res
6191
6192 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6193
6194         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6195         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6196         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6197         use_type_clauses, to handle more efficiently use_type and use_all_type
6198         constructs.
6199         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6200         Ada2012 Use_All_Type clause.
6201         (Use_Class_Wide_Operations): new procedure.
6202
6203 2011-08-02  Robert Dewar  <dewar@adacore.com>
6204
6205         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6206         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6207         expression to expression function.
6208
6209 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6210
6211         * sem_ch4.adb: transform simple Ada2012 membership into equality only
6212         if types are compatible.
6213
6214 2011-08-02  Yannick Moy  <moy@adacore.com>
6215
6216         * sem_res.adb (Matching_Static_Array_Bounds): new function which
6217         returns True if its argument array types have same dimension and same
6218         static bounds at each index.
6219         (Resolve_Actuals): issue an error in formal mode on actuals passed as
6220         OUT or IN OUT paramaters which are not view conversions in SPARK.
6221         (Resolve_Arithmetic_Op): issue an error in formal mode on
6222         multiplication or division with operands of fixed point types which are
6223         not qualified or explicitly converted.
6224         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6225         Boolean or array type (except String) operands.
6226         (Resolve_Equality_Op): issue an error in formal mode on equality
6227         operators for array types other than String with non-matching static
6228         bounds.
6229         (Resolve_Logical_Op): issue an error in formal mode on logical operators
6230         for array types with non-matching static bounds. Factorize the code in
6231         Matching_Static_Array_Bounds.
6232         (Resolve_Qualified_Expression): issue an error in formal mode on
6233         qualified expressions for array types with non-matching static bounds.
6234         (Resolve_Type_Conversion): issue an error in formal mode on type
6235         conversion for array types with non-matching static bounds
6236
6237 2011-08-02  Robert Dewar  <dewar@adacore.com>
6238
6239         * par-ch10.adb: Minor code reorganization (use Nkind_In).
6240
6241 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6242
6243         * par-ch9.adb: save location of entry for proper error message.
6244
6245 2011-08-02  Javier Miranda  <miranda@adacore.com>
6246
6247         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6248         (Use_Full_View) which permits this routine to climb through the
6249         ancestors using the full-view of private parents.
6250         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6251         Use_Full_View to true in calls to Is_Ancestor.
6252         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6253         true in call to Is_Ancestor.
6254         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6255         Use_Full_View to true in call to Is_Ancestor.
6256         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6257         call to Is_Ancestor.
6258         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6259         Use_Full_View to true in calls to Is_Ancestor.
6260         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6261         Make_Select_Specific_Data_Table, Register_Primitive,
6262         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6263         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6264         to true in call to Is_Ancestor.
6265         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6266         Use_Full_View to true in calls to Is_Ancestor.
6267         * exp_cg.adb
6268         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6269         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6270
6271 2011-08-02  Robert Dewar  <dewar@adacore.com>
6272
6273         * gnat_rm.texi: Minor reformatting.
6274         * sem_prag.adb: Minor reformatting.
6275
6276 2011-08-02  Tristan Gingold  <gingold@adacore.com>
6277
6278         * vms_data.ads: Add VMS qualifier for -gnateP.
6279
6280 2011-08-02  Robert Dewar  <dewar@adacore.com>
6281
6282         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6283         * par-ch7.adb (P_Package): Proper placement of aspects for package
6284         decl/instantiation.
6285         * par-endh.adb (Check_End): Ad Is_Sloc parameter
6286         (End_Statements): Add Is_Sloc parameterr
6287         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6288         (Check_End): Ad Is_Sloc parameter
6289         (End_Statements): Add Is_Sloc parameterr
6290
6291 2011-08-02  Vincent Celier  <celier@adacore.com>
6292
6293         * ug_words: Add VMS qualifier equivalent to -gnateP:
6294         /SYMBOL_PREPROCESSING.
6295
6296 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6297
6298         * gnat-style.texi: For hexadecimal numeric literals the typical
6299         grouping of digits is 4 to represent 2 bytes.
6300         A procedure spec which is split into several lines is indented two
6301         characters.
6302
6303 2011-08-02  Yannick Moy  <moy@adacore.com>
6304
6305         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6306         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6307         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6308         properly qualified
6309         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6310         choice in array aggregate
6311         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6312         mark as ancestor
6313         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6314         positional and named aggregate for record, or others in record
6315         aggregate, or multiple choice in record aggregate
6316         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6317         array operands to logical operations AND, OR and XOR do not have the
6318         same static lower and higher bounds
6319         * sem_ch5.adb, sinfo.ads: Correct typos in comments
6320
6321 2011-08-01  Robert Dewar  <dewar@adacore.com>
6322
6323         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6324         Replaces Last_Source_Node_In_Sequence.
6325         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6326         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6327         parens and blank in string (this was inconsistently implemented).
6328         * errout.ads
6329         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6330         blank in string (this was inconsistently implemented).
6331         * gnat1drv.adb
6332         (Set_Global_Switches): Set formal mode switches appropriately
6333         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6334         * par-prag.adb
6335         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6336         call Set_Error_Msg_Lang to set "spark" as language name.
6337         * par.adb: Remove unnecessary call to set formal language for errout
6338         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6339         appropriately and call Set_Error_Msg_Lang to set "spark" as language
6340         name.
6341         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6342         calls to it, moved after resolution so that types are known
6343         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6344         result of concatenation is not of type String
6345         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6346         concatenation is not properly restricted
6347         * gnat_rm.texi: Add doc on pragma Spark_95.
6348         * gcc-interface/Makefile.in: Remove obsolete target pairs for
6349         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6350         * gcc-interface/Make-lang.in: Update dependencies.
6351
6352 2011-08-01  Javier Miranda  <miranda@adacore.com>
6353
6354         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6355         condition that detects if the overridden operation must replace an
6356         existing entity.
6357
6358 2011-08-01  Javier Miranda  <miranda@adacore.com>
6359
6360         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6361         code declarations inserted by Insert_Actions in each alternative of the
6362         N_Case_Expression node.
6363
6364 2011-08-01  Robert Dewar  <dewar@adacore.com>
6365
6366         * sem_ch6.adb: Minor code reorganization.
6367         * sem_util.adb: Minor reformatting.
6368
6369 2011-08-01  Pascal Obry  <obry@adacore.com>
6370
6371         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6372         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6373
6374 2011-08-01  Yannick Moy  <moy@adacore.com>
6375
6376         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6377         literal or operator symbol which is prefixed
6378         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6379         mode on access attributes.
6380         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6381         that concatenation operands are properly restricted in formal mode
6382         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6383         Analyze_Concatenation_Operand. Issue an error in formal mode if the
6384         result of the concatenation has a type different from String.
6385         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6386         Analyze_Quantified_Expression, Analyze_Slice,
6387         Analyze_Null): issue an error in formal mode on unsupported constructs
6388         * sem_ch5.adb
6389         (Analyze_Block_Statement): only issue error on source block statement
6390         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6391         function which returns the last node in a list of nodes for which
6392         Comes_From_Source returns True, if any
6393         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6394         Last_Source_Node_In_Sequence
6395         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6396         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6397         mode on unsupported constructs
6398         * sem_ch9.adb Do not return after issuing error in formal mode, as the
6399         rest of the actions may be needed later on since the error is marked as
6400         not serious.
6401         * sinfo.ads: Typos in comments.
6402
6403 2011-08-01  Pascal Obry  <obry@adacore.com>
6404
6405         * projects.texi: Minor editing.
6406
6407 2011-08-01  Yannick Moy  <moy@adacore.com>
6408
6409         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6410         insertion character ~~
6411         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6412         (Set_Error_Msg_Lang): new procedure which fixes the language for use
6413         with insertion character ~~
6414         (Set_Msg_Text): treat insertion character ~~
6415         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6416         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6417         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6418         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6419         errors related to the formal language restriction not serious
6420         (insertion character |).
6421         * par.adb (Par): set formal language for error messages if needed
6422         * sem_ch6.adb (Check_Missing_Return): take into account possible
6423         generated statements at the end of the function
6424         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6425         enumeration value to define a new pragma SPARK_95
6426         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6427         SPARK_Version): new type and variables to store the SPARK version
6428         (none by default).
6429         (SPARK_Mode): return True when SPARK_Version is set
6430         * par-prag.adb: Correct indentation
6431         (Prag): take Pragma_SPARK_95 into account
6432         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6433         into account.
6434
6435 2011-08-01  Robert Dewar  <dewar@adacore.com>
6436
6437         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6438         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6439         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6440
6441 2011-08-01  Pascal Obry  <obry@adacore.com>
6442
6443         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6444         Target_Name to Get_Path call.
6445         (Parse_Single_Project): Likewise.
6446         (Post_Parse_Context_Clause): Likewise.
6447         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6448         Call Initialise_Project_Path with the proper Target_Name.
6449         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6450         search path.
6451         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6452         with the proper Target_Name.
6453         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6454         Part.Parse routine.
6455         (Parse_Project_And_Apply_Config): Likewise.
6456         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6457         This is fine as this part of the code is supporting only native
6458         compilation.
6459         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6460         is fine as this part of the code is supporting only native compilation.
6461
6462 2011-08-01  Yannick Moy  <moy@adacore.com>
6463
6464         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6465         of homonym, unless the homonym is one of the cases allowed in SPARK
6466         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6467         package declaration occurring after a body.
6468
6469 2011-08-01  Robert Dewar  <dewar@adacore.com>
6470
6471         * checks.adb, exp_ch4.adb: Minor reformatting.
6472
6473 2011-08-01  Javier Miranda  <miranda@adacore.com>
6474
6475         * einfo.ads (Access_Disp_Table): Fix documentation.
6476         (Dispatch_Table_Wrappers): Fix documentation.
6477
6478 2011-08-01  Pascal Obry  <obry@adacore.com>
6479
6480         * prj-env.adb, prj-env.ads: Minor reformatting.
6481
6482 2011-08-01  Yannick Moy  <moy@adacore.com>
6483
6484         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6485         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6486         procedures out of these packages.
6487         * errout.ads, errout.adb
6488         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6489         procedures in of this package
6490         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6491         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6492         on misplaced later vs initial declarations, like in Ada 83
6493         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6494         formal mode on attribute of private type whose full type declaration
6495         is not visible
6496         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6497         package declaration inside a package specification
6498         (Analyze_Full_Type_Declaration): issue error in formal mode on
6499         controlled type or discriminant type
6500         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6501         user-defined operator means that it should come from the source
6502         (New_Overloaded_Entity): issue error in formal mode on overloaded
6503         entity.
6504         * sem_ch6.ads, sem_ch13.ads: typos in comments.
6505
6506 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6507
6508         * atree.adb: Minor reformatting.
6509         * checks.adb: Minor reformatting.
6510
6511 2011-08-01  Vincent Celier  <celier@adacore.com>
6512
6513         * s-parame-vms-ia64.ads: Fix typo in comment
6514         Minor reformatting
6515         * s-parame-vms-restrict.ads: Removed, unused.
6516
6517 2011-08-01  Javier Miranda  <miranda@adacore.com>
6518
6519         * exp_ch3.adb
6520         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6521         * sem_ch3.adb
6522         (Constrain_Index): Remove side effects in the evaluation of the bounds.
6523         * sem_ch3.ads, sem_ch3.adb
6524         (Is_Constant_Bound): New extended version of the subprogram that was
6525         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6526         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6527         * sem_aux.ads (Constant_Value): Fix typo in comment.
6528         * checks.adb (Generate_Index_Checks): New implementation which, for
6529         array objects with constant bounds, generates the runtime check
6530         referencing the bounds of the array type. For other cases this routine
6531         provides its previous behavior obtaining such values from the array
6532         object.
6533         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6534         parent type.
6535         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6536         we cannot have semantic interpretations of the new node.
6537
6538 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6539
6540         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6541         expressions.
6542
6543 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6544
6545         * sem_ch8.adb: Minor code editing.
6546         * s-vxwext.adb: Remove trailing space.
6547         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6548         consistency with other files.
6549
6550 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6551
6552         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6553
6554 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6555
6556         * par-ch10.adb: reject parameterized expressions as compilation unit.
6557         * sem_ch4.adb: handle properly conditional expression with overloaded
6558         then_clause and no else_clause.
6559
6560 2011-08-01  Tristan Gingold  <gingold@adacore.com>
6561
6562         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6563         like done by System.Aux_DEC.
6564         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6565
6566 2011-08-01  Yannick Moy  <moy@adacore.com>
6567
6568         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6569         missing label at end of declaration (subprogram or package)
6570         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6571         of positional and named parameter association
6572         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6573         Error_Msg_SP which adds a prefix to the error message giving the name
6574         of the formal language analyzed
6575         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6576         access result type in subprogram, unconstrained array as result type,.
6577         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6578         procedure
6579         * sem_ch8.adb: Code clean up.
6580
6581 2011-08-01  Javier Miranda  <miranda@adacore.com>
6582
6583         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6584         * einfo.ads (Access_Disp_Table): Fix documentation.
6585         (Dispatch_Table_Wrappers): Fix documentation.
6586         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6587         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6588         to enforce the documentation of this attribute.
6589         (Set_Is_Interface): Cleanup the assertion.
6590         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6591         the Underlying_Type entity before reading attribute Access_Disp_Table.
6592         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6593         Locate the Underlying_Type before reading attribute Access_Disp_Table.
6594         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6595         the Underlying_Type entity before reading attribute Access_Disp_Table.
6596         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6597         Locate the Underlying_Type entity before reading attribute
6598         Access_Disp_Table.
6599
6600 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6601
6602         * s-poosiz.ads: Additional overriding indicators.
6603
6604 2011-08-01  Yannick Moy  <moy@adacore.com>
6605
6606         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6607         formal mode.
6608         (Analyze_Iteration_Scheme): issue error in formal mode when loop
6609         parameter specification does not include a subtype mark.
6610         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6611         formal mode on abstract subprogram.
6612         (Analyze_Subprogram_Specification): issue error in formal mode on
6613         user-defined operator.
6614         (Process_Formals): issue error in formal mode on access parameter and
6615         default expression.
6616         * sem_ch9.adb (Analyze_Abort_Statement,
6617         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6618         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6619         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6620         Analyze_Requeue, Analyze_Selective_Accept,
6621         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6622         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6623         issue error in formal mode on user-defined raise statement.
6624
6625 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6626
6627         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6628         declaration being hidden when overriding an implicit inherited
6629         subprogram.
6630         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6631         (-gnats), do not complain about a source file that contains only a
6632         pragma No_Body.
6633
6634 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6635
6636         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6637         variable if already set.
6638
6639 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6640
6641         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6642         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6643         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6644         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6645         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6646         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6647         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6648         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6649         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6650         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6651         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6652         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6653         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6654         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6655         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6656         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6657         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6658         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6659         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6660         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6661         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6662         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6663         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6664         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6665         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6666         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6667         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6668         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6669         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6670         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6671         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6672         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6673         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6674         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6675         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6676         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6677         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6678         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6679         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6680         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6681         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6682         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6683         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6684         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6685         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6686         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6687         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6688         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6689         s-osinte-mingw.ads: Update to GPLv3 run-time license.
6690         Use GNAT instead of GNARL.
6691
6692 2011-08-01  Bob Duff  <duff@adacore.com>
6693
6694         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6695         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6696         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6697         reformatting.
6698
6699 2011-08-01  Yannick Moy  <moy@adacore.com>
6700
6701         * debug.adb (d.D) reverve flag for the SPARK mode
6702         (d.E) reverve flag for SPARK generation mode
6703         (d.F) reverve flag for Why generation mode
6704         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6705         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
6706         functions which return True when the corresponding modes are set
6707         (Formal_Language): return "spark" or "alfa" when in formal verification
6708         mode.
6709         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6710         Error_Msg to prefix the error message with a tag giving the formal
6711         language
6712         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6713         message with a tag giving the formal language
6714         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6715         block statement
6716         (Analyze_Case_Statement): issue error in formal mode on case statement
6717         with a single "others" case alternative
6718         (Analyze_Exit_Statement): issue errors in formal mode on exit
6719         statements which do not respect SPARK restrictions
6720         (Analyze_Goto_Statement): issue error in formal mode on goto statement
6721         (Check_Unreachable_Code): always issue an error (not a warning) in
6722         formal mode on unreachable code (concerns both code after an infinite
6723         loop and after an unconditional jump, both not allowed in SPARK)
6724         * sem_ch6.adb (Analyze_Return_Statement): add call to
6725         Set_Return_Present for a procedure containing a return statement
6726         (already done for functions in Analyze_Function_Return)
6727         (Analyze_Function_Return): issue error in formal mode on extended
6728         return or if return is not last statement in function
6729         (Check_Missing_Return): issue error in formal mode if function does
6730         not end with return or if procedure contains a return
6731         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6732         function to detect if there is an inner scope of its parameter S which
6733         is a loop.
6734
6735 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6736
6737         * sem_ch6.ads: Minor reformatting.
6738
6739 2011-08-01  Javier Miranda  <miranda@adacore.com>
6740
6741         * sem_util.adb (Abstract_Interface_List): Complete condition when
6742         processing private type declarations to avoid reading unavailable
6743         attribute.
6744         (Is_Synchronized_Tagged_Type): Complete condition when processing
6745         private extension declaration nodes to avoid reading unavailable
6746         attribute.
6747
6748 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6749
6750         * sem_ch3.adb: Minor reformatting.
6751
6752 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6753
6754         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
6755         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
6756         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
6757         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
6758         for VMS, instead parametrize the common implementation with
6759         System.Parameters declarations.
6760
6761 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
6762
6763         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6764
6765 2011-08-01  Tristan Gingold  <gingold@adacore.com>
6766
6767         * seh_init.c: Fix SEH handler installation on win64.
6768
6769 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6770
6771         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6772         double analysis of an anonymous access to subprogram, because it can
6773         lead to improper sharing of profiles and a back-end crash.
6774
6775 2011-08-01  Robert Dewar  <dewar@adacore.com>
6776
6777         * make.adb, sem_ch4.adb: Minor reformatting.
6778         * gcc-interface/Make-lang.in: Update dependencies.
6779         * sem_util.adb, exp_ch5.adb: Minor reformatting.
6780
6781 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6782
6783         * gnat_rm.texi: Fix definition of Long_Integer.
6784
6785 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6786
6787         * exp_aggr.adb: check limit size of static aggregate unconditionally,
6788         to prevent storage exhaustion.
6789         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6790         finalized is a function body, insert the cleanup code before the final
6791         return statement, to prevent spurious warnings.
6792         * s-pooglo.ads: add overriding indicator.
6793
6794 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6795
6796         * sem_ch4.adb (Operator_Check): improve error message when both a
6797         with_clause and a use_clause are needed to make operator usage legal.
6798         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6799         determine whether a compilation unit is visible within an other,
6800         either through a with_clause in the current unit, or a with_clause in
6801         its library unit or one one of its parents.
6802
6803 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6804
6805         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6806         over an arbitrary expression of an array or container type.
6807         * lib-xref.adb: clarify comment.
6808
6809 2011-08-01  Bob Duff  <duff@adacore.com>
6810
6811         * einfo.ads: Minor reformatting.
6812         * debug.adb: Minor comment improvement.
6813
6814 2011-08-01  Javier Miranda  <miranda@adacore.com>
6815
6816         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6817         consider hidden subprograms as valid candidates.
6818
6819 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6820
6821         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6822
6823 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
6824
6825         * gnat_ugn.texi: Fix typo.
6826
6827 2011-08-01  Robert Dewar  <dewar@adacore.com>
6828
6829         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6830         lib-xref.adb: Minor reformatting
6831
6832 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
6833
6834         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6835         when to generate a call to Move_Final_List.
6836         (Has_Controlled_Parts): Remove this function.
6837
6838 2011-08-01  Geert Bosch  <bosch@adacore.com>
6839
6840         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6841         "," in choice list.
6842
6843 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6844
6845         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6846         explicit raise of a predefined exception as Comes_From_Source if the
6847         original N_Raise_Statement comes from source.
6848
6849 2011-08-01  Robert Dewar  <dewar@adacore.com>
6850
6851         * sinfo.ads: Add comment.
6852         * sem_ch6.adb: Minor reformatting.
6853
6854 2011-08-01  Robert Dewar  <dewar@adacore.com>
6855
6856         * freeze.adb (Freeze_Entity): Refine check for bad component size
6857         clause to avoid rejecting confirming clause when atomic/aliased present.
6858
6859 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6860
6861         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6862         better determine whether an entity reference is a write.
6863         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6864         subcomponent.
6865         * lib-xref.adb (Output_References): Do no suppress a read reference at
6866         the same location as an immediately preceeding modify-reference, to
6867         handle properly in-out actuals.
6868
6869 2011-08-01  Tristan Gingold  <gingold@adacore.com>
6870
6871         * env.c (__gnat_setenv) [VMS]: Refine previous change.
6872
6873 2011-08-01  Quentin Ochem  <ochem@adacore.com>
6874
6875         * i-cstrin.adb (New_String): Changed implementation, now uses only the
6876         heap to compute the result.
6877
6878 2011-08-01  Robert Dewar  <dewar@adacore.com>
6879
6880         * atree.ads: Minor reformatting.
6881
6882 2011-08-01  Emmanuel Briot  <briot@adacore.com>
6883
6884         * g-expect.adb (Get_Command_Output): Fix memory leak.
6885
6886 2011-08-01  Geert Bosch  <bosch@adacore.com>
6887
6888         * cstand.adb (P_Float_Type): New procedure to print the definition of
6889         predefined fpt types.
6890         (P_Mixed_Name): New procedure to print a name using mixed case
6891         (Print_Standard): Use P_Float_Type for printing floating point types
6892         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6893         precision IEEE float.
6894
6895 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6896
6897         * sem_ch3.adb: Minor reformatting.
6898
6899 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6900
6901         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6902         the completion of a generic function, insert the new body rather than
6903         rewriting the original.
6904
6905 2011-08-01  Yannick Moy  <moy@adacore.com>
6906
6907         * sinfo.ads, errout.ads: Typos in comments.
6908
6909 2011-08-01  Robert Dewar  <dewar@adacore.com>
6910
6911         * par-endh.adb: Minor reformatting.
6912
6913 2011-08-01  Robert Dewar  <dewar@adacore.com>
6914
6915         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6916         (Pre_Post_Aspects): New subtype.
6917         * par-ch12.adb (P_Generic): New syntax for aspects in packages
6918         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6919         * par-ch7.adb (P_Package): Remove Decl parameter
6920         (P_Package): Handle new syntax for aspects (before IS)
6921         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6922         new aspect syntax
6923         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6924         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6925         (P_Package): Remove Decl parameter
6926         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6927         aspects
6928         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6929         specs
6930         * sem_util.ads, sem_util.adb (Static_Boolean): New function
6931         * sinfo.ads: Document new syntax for aspects in packages etc.
6932         * sprint.adb: Handle new syntax of aspects before IS in package
6933
6934 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6935
6936         * atree.ads: Minor reformatting.
6937         * sem_prag.adb: Minor reformatting.
6938
6939 2011-08-01  Robert Dewar  <dewar@adacore.com>
6940
6941         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6942         case expr alternative.
6943
6944 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6945
6946         * sem_ch12.adb: Fix typo.
6947
6948 2011-08-01  Geert Bosch  <bosch@adacore.com>
6949
6950         * sem_prag.adb (Check_No_Link_Name): New procedure.
6951         (Process_Import_Or_Interface): Use Check_No_Link_Name.
6952         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6953         instead of Standard_Long_Long_Float_Size global. Preparation for
6954         eventual removal of per type constants.
6955         * exp_util.ads (Get_Stream_Size): New function returning the stream
6956         size value of subtype E.
6957         * exp_util.adb (Get_Stream_Size): Implement new function.
6958         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6959         function.
6960         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6961         * einfo.adb:
6962         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6963
6964 2011-08-01  Geert Bosch  <bosch@adacore.com>
6965
6966         * cstand.adb: Fix comments.
6967         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6968         count of arguments.
6969
6970 2011-08-01  Robert Dewar  <dewar@adacore.com>
6971
6972         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6973
6974 2011-08-01  Geert Bosch  <bosch@adacore.com>
6975
6976         * atree.ads: Fix comment.
6977
6978 2011-08-01  Robert Dewar  <dewar@adacore.com>
6979
6980         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6981         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6982         * par.adb: Add with for Namet.Sp.
6983         * par-tchk.adb: Minor reformatting.
6984
6985 2011-08-01  Vincent Celier  <celier@adacore.com>
6986
6987         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6988         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6989         of the init procedure of a SAL.
6990         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6991         New procedure.
6992
6993 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6994
6995         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6996         reformatting.
6997
6998 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6999
7000         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7001
7002 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7003
7004         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7005         conformant with its spec (return True only for types that have
7006         an overriding Initialize primitive operation that prevents them from
7007         having preelaborable initialization).
7008         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7009         initialization for controlled types in Ada 2005 or later mode.
7010
7011 2011-08-01  Robert Dewar  <dewar@adacore.com>
7012
7013         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7014         Postcondition.
7015         (Same_Aspect): New function.
7016         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7017         Type_Invariant, Precondition, Postcondition.
7018         * snames.ads-tmpl: Add Name_Type_Invariant.
7019
7020 2011-08-01  Robert Dewar  <dewar@adacore.com>
7021
7022         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7023         here.
7024         (Freeze_All_Ent): Fix error in handling inherited aspects.
7025         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7026         already analyzed, but don't skip entire processing of a declaration,
7027         that's wrong in some cases of declarations being rewritten.
7028         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7029         Don't delay for integer, string literals
7030         Treat predicates in usual manner for delay, remove special case code,
7031         not needed.
7032         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7033         (Build_Predicate_Function): Update saved expression in aspect
7034         (Build_Invariant_Procedure): Update saved expression in aspect
7035         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7036         of replacement of discriminant references if the reference is simple.
7037
7038 2011-08-01  Robert Dewar  <dewar@adacore.com>
7039
7040         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7041         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7042         Static_Predicate and Dynamic_Predicate.
7043         (Build_Predicate_Function): Add processing for Static_Predicate
7044         and Dynamic_Predicate.
7045         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7046         (From_Static_Predicate): New flag
7047         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7048
7049 2011-08-01  Robert Dewar  <dewar@adacore.com>
7050
7051         * usage.adb: Documentation cleanup for Ada version modes in usage.
7052         * expander.adb: Minor reformatting.
7053
7054 2011-08-01  Robert Dewar  <dewar@adacore.com>
7055
7056         * atree.ads: Minor comment fix.
7057         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7058         a-witeio.ads, sem_prag.adb: Minor reformatting.
7059
7060 2011-08-01  Doug Rupp  <rupp@adacore.com>
7061
7062         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7063         pointers. Use descrip.h header file for convenience. Add some
7064         comments.
7065
7066 2011-08-01  Robert Dewar  <dewar@adacore.com>
7067
7068         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7069         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7070         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7071         New procedure.
7072         (Check_Aspect_At_End_Of_Declarations): New procedure
7073         (Analye_Aspect_Specification): Minor changes for above procedures
7074         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7075         specification node as well.
7076
7077 2011-08-01  Pascal Obry  <obry@adacore.com>
7078
7079         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7080         Windows files. Use GetFilesAttributes() in this case to check for file
7081         existence instead of returning with an error code.
7082
7083 2011-08-01  Vincent Celier  <celier@adacore.com>
7084
7085         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7086         High is above Source length.
7087
7088 2011-08-01  Robert Dewar  <dewar@adacore.com>
7089
7090         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7091
7092 2011-08-01  Robert Dewar  <dewar@adacore.com>
7093
7094         * aspects.ads (Boolean_Aspects): New subtype.
7095         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7096         for derived types in cases where the parent type and derived type have
7097         aspects.
7098         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7099         with aspects when parent type also has aspects.
7100         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7101         boolean expression at this point).
7102         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7103         accordance with final decision on the Ada 2012 feature.
7104         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7105
7106 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7107
7108         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7109
7110 2011-08-01  Pascal Obry  <obry@adacore.com>
7111
7112         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7113         Fix Replace_Slice when High is above current string size.
7114         (Replace_Slice): Fix DL computation when High is above current
7115         string length.
7116
7117 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7118
7119         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7120
7121 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7122
7123         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7124         of node.
7125
7126 2011-08-01  Pascal Obry  <obry@adacore.com>
7127
7128         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7129         reformatting.
7130
7131 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7132
7133         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7134         access to protected subprograms in generic bodies.
7135         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7136         protected type, indicate that the convention of the subprogram is
7137         Convention_Protected, because it may be used in subsequent declarations
7138         within the protected declaration.
7139
7140 2011-08-01  Vincent Celier  <celier@adacore.com>
7141
7142         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7143         and "final" procedures when the name of the library is "ada", to avoid
7144         duplicate symbols "adainit" and "adafinal" in executables.
7145
7146 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7147
7148         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7149         quantified expression that appears within a postcondition and uses the
7150         Ada2012 'Result attribute.
7151
7152 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7153
7154         * init.c (__gnat_error_handler): Cast reason to int.
7155         (__gnat_install_handler): Explain sa_sigaction use.
7156
7157 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7158
7159         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7160         subprogram has copy-in copy-out parameters, try to promote the mode of
7161         the return type if it is passed in registers.
7162
7163 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7164
7165         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7166         left operand as addressable.
7167
7168 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7169
7170         * gcc-interface/gigi.h (build_function_stub): Remove.
7171         (build_return_expr): Likewise.
7172         (convert_vms_descriptor): Declare.
7173         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7174         (build_function_stub): Move to...
7175         * gcc-interface/utils2.c (build_return_expr): Move to...
7176         * gcc-interface/trans.c (build_function_stub): ...here.
7177         (build_return_expr): ...here.
7178         (Subprogram_Body_to_gnu): Add local variable for language_function.
7179         Disconnect the parameter attributes cache, if any, once done with it.
7180         Call end_subprog_body only after setting the end_locus.
7181         Build the stub associated with the function, if any, at the very end.
7182         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7183         variables and streamline control flow.
7184
7185 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
7186
7187         PR ada/49819
7188         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7189         g-trasym-dwarf.adb.
7190
7191 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7192
7193         PR bootstrap/49794
7194         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7195         Assign to act.sa_sigaction.
7196         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7197         current->return_address to char * before arithmetic.
7198
7199 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7200
7201         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7202         Correct argument types.
7203         Extract code from reason.
7204         (__gnat_install_handler): Assign to act.sa_sigaction.
7205
7206 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
7207
7208         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7209         (GNAT1_OBJS): ...here.
7210
7211 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
7212
7213         PR ada/48711
7214         * g-socthi-mingw.adb (Fill): Fix formatting.
7215
7216         * gcc-interface/gigi.h: Move around comment.
7217
7218 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7219
7220         PR ada/46350
7221         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7222
7223 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
7224
7225         PR ada/48711
7226         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7227
7228 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
7229
7230         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7231         range comparison if Pmode is SImode.
7232
7233 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
7234             Eric Botcazou  <ebotcazou@adacore.com>
7235
7236         * adadecode.c: Wrap up in extern "C" block.
7237         * adadecode.h: Likewise.
7238         * adaint.c: Likewise.  Remove 'const' keyword.
7239         * adaint.h: Likewise.
7240         * argv.c: Likewise.
7241         * atree.h: Likewise.
7242         * cio.c: Likewise.
7243         * cstreams.c: Likewise.
7244         * env.c: Likewise.
7245         * exit.c: Likewise.
7246         * fe.h: Likewise.
7247         * final.c: Likewise.
7248         * init.c: Likewise.
7249         * initialize.c: Likewise.
7250         * link.c: Likewise.
7251         * namet.h: Likewise.
7252         * nlists.h: Likewise.
7253         * raise.c: Likewise.
7254         * raise.h: Likewise.
7255         * repinfo.h: Likewise.
7256         * seh_init.c: Likewise.
7257         * targext.c: Likewise.
7258         * tracebak.c: Likewise.
7259         * uintp.h: Likewise.
7260         * urealp.h: Likewise.
7261         * xeinfo.adb: Wrap up generated C code in extern "C" block.
7262         * xsinfo.adb: Likewise.
7263         * xsnamest.adb: Likewise.
7264         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7265         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7266         * gcc-interface/misc.c: Likewise.
7267         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7268         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
7269         ada/targext.o here...
7270         (GNAT_ADA_OBJS): ...and not here.
7271         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7272         (GNATBIND_OBJS): Reorder.
7273
7274 2011-07-07  Richard Henderson  <rth@redhat.com>
7275
7276         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7277         dwarf2out_frame_init.
7278
7279 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
7280
7281         * gcc-interface/misc.c (gnat_init): Tweak previous change.
7282
7283 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7284
7285         PR target/39150
7286         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7287
7288 2011-07-06  Richard Guenther  <rguenther@suse.de>
7289
7290         * gcc-interface/misc.c (gnat_init): Merge calls to
7291         build_common_tree_nodes and build_common_tree_nodes_2.
7292         Re-initialize boolean_false_node.
7293
7294 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
7295             Olivier Hainque  <hainque@adacore.com>
7296             Nicolas Setton  <setton@adacore.com>
7297
7298         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7299         the type according to the ARTIFICIAL_P parameter.
7300         (create_type_decl): Likewise.
7301         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7302
7303 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
7304
7305         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7306         (gnatbind): Likewise.
7307
7308 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7309
7310         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7311
7312 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7313
7314         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7315         local variable throughout.  Remove useless call to Base_Type.
7316         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7317         Take it also into account for the volatileness of the field.  Set the
7318         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
7319
7320 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7321
7322         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7323         on a dereference built for a by-ref object if it has an address clause.
7324
7325 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7326
7327         * einfo.ads (Address_Taken): Document use for the second argument of
7328         Asm_Input and Asm_Output attributes.
7329         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7330         argument is an entity name, then set Address_Taken on it.
7331         <Attribute_Asm_Output>: Likewise.
7332         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7333         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7334         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7335         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7336
7337 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
7338
7339         PR middle-end/46500
7340         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7341
7342 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
7343
7344         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7345         (ada/utils.o): Update dependencies.
7346         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7347         ../../../libcpp/libcpp.a.
7348         * gcc-interface/utils.c: Include common/common-target.h.
7349         (process_attributes): Use targetm_common.have_named_sections.
7350
7351 2011-06-07  Richard Guenther  <rguenther@suse.de>
7352
7353         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7354         set_sizetype.
7355
7356 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7357
7358         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7359         TREE_THIS_NOTRAP flag.
7360
7361 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7362
7363         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7364         Fix thinko.
7365
7366 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7367
7368         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7369         constants whose full view has discriminants specially.
7370
7371 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7372
7373         * gcc-interface/utils.c: Include diagnostic.h.
7374         (gnat_write_global_declarations): Output debug information for all
7375         global type declarations before finalizing the compilation unit.
7376         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7377
7378 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
7379
7380         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7381
7382 2011-05-25  Kai Tietz  <ktietz@redhat.com>
7383
7384         * adaint.c (__gnat_to_canonical_file_list_next): Use array
7385         initialization instead of const/none-const pointer assignment.
7386
7387 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
7388
7389         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7390         $(EXTRA_GNAT1_OBJS).
7391         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7392         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7393         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7394         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7395         libcommon-target.a instead of prefix.o.
7396
7397 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
7398
7399         PR ada/49097
7400         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7401
7402 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
7403
7404         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7405         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7406         instead of version.o.
7407
7408 2011-05-18  Kai Tietz <ktietz@redhat.com>
7409
7410         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7411         boolean_false_node instead of integer_zero_node.
7412         (convert_with_check): Likewise.
7413         * gcc-interface/decl.c (choices_to_gnu): Likewise.
7414
7415 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
7416
7417         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7418         type of the parameter is an unconstrained array, convert the actual to
7419         the type of the formal in the In Out and Out cases as well.
7420
7421 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
7422
7423         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7424         call build_function_type_array or build_varargs_function_type_array
7425         instead.
7426         (create_subprog_type): Don't call build_function_type; call
7427         build_function_type_vec instead.
7428
7429 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
7430
7431         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7432         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7433         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7434
7435 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
7436
7437         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7438
7439         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7440         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7441
7442 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
7443
7444         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7445
7446 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
7447
7448         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7449         instead of accessing TYPE_ARG_TYPES directly.
7450         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7451
7452 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
7453
7454         PR ada/48844
7455         * gcc-interface/gigi.h (get_variant_part): Declare.
7456         * gcc-interface/decl.c (get_variant_part): Make global.
7457         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7458         types have the same constant size, are record types and T1 has a
7459         variant part while T2 doesn't.
7460
7461 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
7462
7463         * gcc-interface/utils.c (begin_subprog_body): Do not call
7464         get_pending_sizes.
7465         (end_subprog_body): Likewise.
7466
7467 2011-05-04  Richard Guenther  <rguenther@suse.de>
7468
7469         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7470         int_const_binop.
7471         (pos_to_constructor): Likewise.
7472
7473 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
7474             Eric Botcazou  <ebotcazou@adacore.com>
7475
7476         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7477         of build_function_type.  Adjust calls to...
7478         (build_raise_check): ...this.  Do not take a void_tree parameter.
7479         Call build_function_type_list instead of build_function_type.
7480         Fix head comment and swap couple of conditional blocks.
7481
7482 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
7483
7484         * gnatvsn.ads (Library_Version): Bump to 4.7.
7485         (Current_Year): Bump to 2011.
7486
7487 2011-04-29  Michael Matz  <matz@suse.de>
7488
7489         * gcc-interface/misc.c (gnat_handle_option): Set
7490         warn_maybe_uninitialized.
7491
7492 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
7493
7494         * gnat_ugn.texi (Complexity Metrics Control): Update link to
7495         the Watson/McCabe paper.
7496
7497 2011-04-23  Jim Meyering  <meyering@redhat.com>
7498
7499         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7500
7501 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7502
7503         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7504         onto the new type.
7505
7506 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7507
7508         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7509         parameter.
7510         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
7511         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7512         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7513         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7514         <all>: Do not set flags on the reused DECL node coming from an alias.
7515         Set DECL_IGNORED_P on the DECL node built for subprograms if they
7516         don't need debug info here...
7517         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7518         (gigi): Adjust calls to create_subprog_decl.
7519         (build_raise_check): Likewise.
7520         (establish_gnat_vms_condition_handler): Likewise.
7521         (Compilation_Unit_to_gnu): Likewise.
7522         (gnat_to_gnu): Likewise.
7523
7524 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
7525
7526         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7527         (NO_REORDER_ADAFLAGS): New variable.
7528         (EXTRA_GNATTOOLS): Always define.
7529         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7530         Clean up and adjust list of files compiled with special options.
7531         * gcc-interface/Make-lang.in: Likewise.
7532         (ada/decl.o): Cosmetical change.
7533         (ada/misc.o): Remove dependency on $(PLUGIN_H).
7534
7535 2011-04-20  Jim Meyering  <meyering@redhat.com>
7536
7537         * initialize.c (__gnat_initialize): Remove useless if-before-free.
7538
7539 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
7540
7541         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7542         $(CFLAGS) on the link line.
7543
7544 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
7545
7546         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7547         padded type built for the return type if it is unconstrained.
7548
7549 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
7550
7551         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7552
7553 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
7554
7555         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7556         before calling TREE_CHAIN.
7557         * gcc-interface/misc.c (gnat_init_ts): New function.
7558         (LANG_HOOKS_INIT_TS): Define.
7559
7560 2011-04-12  Martin Jambor  <mjambor@suse.cz>
7561
7562         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7563         instead of cgraph_node.
7564
7565 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7566
7567         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7568         alignment on fields of the RETURN type built for the Copy-In Copy-Out
7569         mechanism.
7570
7571 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7572
7573         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7574         of aggregate types that contain a placeholder.
7575
7576 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
7577
7578         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7579         TYPE_ARG_TYPES.
7580         (handle_type_generic_attribute): Likewise.
7581
7582 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
7583
7584         PR ada/47163
7585         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7586
7587 2011-04-04  Kai Tietz  <ktietz@redhat.com>
7588
7589         PR ada/47163
7590         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7591         to flag value.
7592
7593 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7594
7595         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7596         type case, do not strip a padding type around the array type.
7597
7598 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7599
7600         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7601         types.
7602
7603 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7604
7605         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7606         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7607         code for -feliminate-unused-debug-types.
7608         (gnat_post_options): Likewise.
7609
7610 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7611
7612         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7613         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7614         distinct copy.
7615
7616 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7617
7618         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7619         DECL_ARTIFICIAL flag on enumeration types.
7620
7621 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7622
7623         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7624         fat pointer types artificial unconditionally.
7625         <E_Array_Subtype>: Attach the base array type as a parallel type if it
7626         isn't artificial.
7627
7628 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7629
7630         * gcc-interface/gigi.h (get_dummy_type): Declare.
7631         (build_dummy_unc_pointer_types): Likewise.
7632         (finish_fat_pointer_type): Likewise.
7633         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7634         fat pointer type has been built, complete it in place.
7635         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7636         and thin pointers.  Remove useless variable.
7637         (finish_fat_pointer_type): Make global and move to...
7638         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7639         (get_dummy_type): New function.
7640         (build_dummy_unc_pointer_types): Likewise.
7641         (gnat_pushdecl): Propage the name to the anonymous variants only.
7642         (update_pointer_to): Only adjust the pointer types in the unconstrained
7643         array case.
7644
7645 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7646
7647         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7648         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7649         if this is a Taft amendment type and the full declaration is available.
7650         * gcc-interface/trans.c (process_type): Likewise.
7651         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7652         (process_freeze_entity): Likewise.
7653         * gcc-interface/utils.c (dummy_global): New static variable.
7654         (gnat_write_global_declarations): If there are types declared as used
7655         at the global level, insert them in the global hash table.
7656
7657 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7658
7659         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7660         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7661         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7662         copy.
7663         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
7664         flag of the type accordingly.
7665         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7666
7667 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7668
7669         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7670         finalizing types when updating the pointers to the designated type.
7671         <all>: Finalize the deferred types even if we didn't defer processing
7672         of incomplete types in this invocation.
7673
7674 2011-04-01  Olivier Hainque  <hainque@adacore.com>
7675             Nicolas Setton  <setton@adacore.com>
7676             Eric Botcazou  <ebotcazou@adacore.com>
7677
7678         * gcc-interface/misc.c (gnat_descriptive_type): New function.
7679         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7680
7681 2011-03-28  Kai Tietz  <ktietz@redhat.com>
7682
7683         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7684         Windows targets.
7685         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7686         * system-mingw.ads (System): Change ZCX_By_Default default to True.
7687
7688         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7689
7690 2011-03-28  Tristan Gingold  <gingold@adacore.com>
7691
7692         PR ada/44431
7693         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7694         Use ada output of gnatbind.
7695         (ada/b_gnatb.adb): Ditto.
7696         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7697         (ada.mostlyclean, ada.stage1)
7698         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7699         (ada.stagefeedback): Adjust.
7700         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7701         Use ada output of gnatbind.
7702         (b_gnatm.adb): Ditto.
7703         (b_gnatl.o, b_gnatm.o): New rules.
7704
7705 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
7706
7707         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7708         for the padded type built to support a specified size or alignment.
7709
7710 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
7711
7712         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7713         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7714         unconditionally to the end of the unit when the designated type is
7715         limited_with'ed.
7716         <all>: Rename local variable.  Attempt to un-defer types only and do it
7717         for limited_with'ed types as well.
7718         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
7719         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7720         consistently and remove redundant call to finalize_from_with_types.
7721
7722 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
7723
7724         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7725         subprograms without a previous spec declared in the same unit.
7726         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7727         subprograms at the end of the unit instead of at the beginning.
7728         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7729         isn't public for the special handling of non-inline functions nested
7730         inside inline external functions.
7731
7732 2011-03-25  Jeff Law  <law@redhat.com>
7733
7734         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7735
7736 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
7737
7738         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7739         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7740         to compute Set_Size_Depends_On_Discriminant.
7741         (Layout_Type): Call it on array types in back-end layout mode.
7742         * sem_util.adb (Requires_Transient_Scope): Return true for array
7743         types only if the size depends on the value of discriminants.
7744         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7745         type if the RHS is a call to a function that returns an unconstrained
7746         type with default discriminant.
7747
7748 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
7749
7750         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
7751         non-conversion to the nominal result type at the end.
7752
7753 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
7754
7755         * gcc-interface/trans.c (create_temporary): New function taken from...
7756         (create_init_temporary): ...here.  Call it.
7757         (call_to_gnu): Create the temporary for the return value early, if any.
7758         Create it for a function with copy-in/copy-out parameters if there is
7759         no target; in other cases of copy-in/copy-out, use another temporary.
7760         Push the new binding level lazily.  Add and rename local variables.
7761
7762 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
7763
7764         * gcc-interface/decl.c (validate_size): Improve comments and tweak
7765         error message.
7766         (set_rm_size): Likewise.
7767
7768 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
7769
7770         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7771         for the padded type built in order to support a specified alignment.
7772         Fix incorrect formatting.
7773
7774 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
7775
7776         PR bootstrap/48216
7777         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7778
7779 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
7780
7781         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7782         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7783         to the end of the list.  Adjust recursive call.  Rename local variable.
7784         If REORDER is true, reorder components of the record type.
7785         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7786         components_to_record and adjust the parameter list.
7787
7788 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
7789
7790         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7791         disabled, use the variable for bounds of loop iteration scheme.
7792
7793 2011-03-21  Kai Tietz  <ktietz@redhat.com>
7794
7795         PR target/12171
7796         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7797
7798 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
7799
7800         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7801         out whether the expression is read-only.  Short-circuit placeholder
7802         case and rename a couple of local variables.
7803
7804 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
7805
7806         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7807         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7808         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7809         (convert): Deal with conversions from a smaller form type specially.
7810
7811 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
7812
7813         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7814         its argument, except for the special -I- switch.
7815
7816 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
7817
7818         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7819         "Ada Issues".
7820
7821 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
7822
7823         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7824
7825 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
7826
7827         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7828         GNAT_FORMAL.
7829         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7830         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
7831         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
7832         Do not generate the check directly, instead instantiate the template
7833         check present in the descriptor.
7834         (make_descriptor_field): Move around.
7835         (build_vms_descriptor32): Build a template check in the POINTER field.
7836         (build_vms_descriptor): Remove useless suffixes.
7837         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7838
7839 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
7840
7841         PR bootstrap/47467
7842         * targext.c: Include target files if IN_RTS is defined.
7843
7844 2011-01-26  Richard Guenther  <rguenther@suse.de>
7845
7846         PR bootstrap/47467
7847         * targext.c: Include config.h.
7848         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7849         dependency.
7850
7851 2011-01-04  Pascal Obry  <obry@adacore.com>
7852             Eric Botcazou  <ebotcazou@adacore.com>
7853
7854         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7855
7856 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
7857
7858         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7859         end-of-case on the end label and its associated gotos, if any.
7860
7861 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
7862
7863         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7864         expressions of the parameter cache within the statement group of
7865         the CICO mechanism.
7866
7867 2011-01-04  Olivier Hainque  <hainque@adacore.com>
7868             Eric Botcazou  <ebotcazou@adacore.com>
7869
7870         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7871         (set_end_locus_from_node): New function.
7872         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7873         make and the function end_locus.
7874         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7875         for the elaboration subprogram.
7876         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7877         set the end_locus of the expression as well.
7878
7879 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
7880
7881         PR ada/47131
7882         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7883         variables that are referenced in exception handlers volatile.
7884
7885
7886 \f
7887 Copyright (C) 2011 Free Software Foundation, Inc.
7888
7889 Copying and distribution of this file, with or without modification,
7890 are permitted in any medium without royalty provided the copyright
7891 notice and this notice are preserved.
7892
7893         * gnat_rm.texi: Ramification of pragma Eliminate documentation
7894          - fix bugs in the description of Source_Trace;
7895          - get rid of UNIT_NAME;
7896
7897 2011-08-02  Javier Miranda  <miranda@adacore.com>
7898
7899         * exp_ch9.adb
7900         (Build_Dispatching_Requeue): Adding support for VM targets
7901         since we cannot directly reference the Tag entity.
7902         * exp_sel.adb (Build_K): Adding support for VM targets.
7903         (Build_S_Assignment): Adding support for VM targets.
7904         * exp_disp.adb
7905         (Default_Prim_Op_Position): In VM targets do not restrict availability
7906         of predefined interface primitives to compiling in Ada 2005 mode.
7907         (Is_Predefined_Interface_Primitive): In VM targets this service is not
7908         restricted to compiling in Ada 2005 mode.
7909         (Make_VM_TSD): Generate code that declares and initializes the OSD
7910         record. Needed to support dispatching calls through synchronized
7911         interfaces.
7912         * exp_ch3.adb
7913         (Make_Predefined_Primitive_Specs): Enable generation of predefined
7914         primitives associated with synchronized interfaces.
7915         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7916         primitives associated with synchronized interfaces.
7917
7918 2011-08-02  Yannick Moy  <moy@adacore.com>
7919
7920         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7921         statements hidden in SPARK if preceded by the HIDE directive
7922         (Parse_Exception_Handlers): mark each exception handler in a sequence of
7923         exception handlers as hidden in SPARK if preceded by the HIDE directive
7924         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7925         if starting with the HIDE directive
7926         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7927         starting with the HIDE directive; mark the declarations in a private
7928         part as hidden in SPARK if the private part starts with the HIDE
7929         directive
7930         * restrict.adb, restrict.ads
7931         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7932         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7933         argument node belongs to a part which is hidden in SPARK
7934         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7935         parts in SPARK; protect the possibly costly call to
7936         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7937         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7938         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7939         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7940         Tok_SPARK_Hide.
7941         (Scan): recognize special comment starting with '#' and followed by
7942         SPARK keyword "hide" as a HIDE directive.
7943
7944 2011-08-02  Yannick Moy  <moy@adacore.com>
7945
7946         * types.ads, erroutc.ads: Minor reformatting.
7947
7948 2011-08-02  Vincent Celier  <celier@adacore.com>
7949
7950         * link.c: Add response file support for cross platforms.
7951
7952 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7953
7954         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7955         in an association, set parent field of copy before partial analysis.
7956         * sem_res.adb (Resolve_Slice): create reference to itype only when
7957         expansion is enabled.
7958
7959 2011-08-02  Yannick Moy  <moy@adacore.com>
7960
7961         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7962         for new flag denoting which subprogram bodies are in ALFA
7963         * restrict.adb, sem_ch7.adb: Update comment
7964         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7965         sem_ch9.adb, sem_res.adb: Add calls to
7966         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7967         * sem_ch6.adb (Analyze_Function_Return): add calls to
7968         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7969         middle of the body, and extended return.
7970         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7971         False when missing return.
7972         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7973         to True for subprograms whose spec is in ALFA. Remove later on the flag
7974         on the entity used for a subprogram body when there exists a separate
7975         declaration.
7976         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7977         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7978         False, otherwise do nothing.
7979
7980 2011-08-02  Robert Dewar  <dewar@adacore.com>
7981
7982         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7983
7984 2011-08-02  Yannick Moy  <moy@adacore.com>
7985
7986         * sem_ch4.ads: minor formatting.
7987
7988 2011-08-02  Yannick Moy  <moy@adacore.com>
7989
7990         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7991         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7992         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7993         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7994         opt.ads: cleanup of SPARK mode
7995
7996 2011-08-02  Yannick Moy  <moy@adacore.com>
7997
7998         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7999         types.
8000         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8001         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8002         * sem_ch3.adb
8003         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8004         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8005         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8006         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8007         types.
8008         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8009         non-static range.
8010         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8011         functions whose return type is not in ALFA.
8012         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8013         specifications.
8014         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8015         parameter's type is not in ALFA.
8016         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8017         types are in ALFA.
8018
8019 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8020
8021         * sem_ch6 (Analyze_Expression_Function): treat the function as
8022         Inline_Always, and introduce a subprogram declaration for it when it is
8023         not a completion.
8024         * inline.adb (Add_Inlined_Body): recognize bodies that come from
8025         expression functions, so that the back-end can determine whether they
8026         can in fact be inlined.
8027         * sem_util.adb (Is_Expression_Function): predicate to determine whether
8028         a function body comes from an expression function.
8029
8030 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8031
8032         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8033         null exclusions to test Can_Never_Be_Null on the anonymous access types
8034         of the formals rather than testing the formals themselves. Exclude this
8035         check in cases where the Old_Formal is marked as a controlling formal,
8036         to avoid issuing spurious errors for bodies completing dispatching
8037         operations (due to the flag not getting set on controlling access
8038         formals in body specs).
8039         (Find_Corresponding_Spec): When checking full and subtype conformance of
8040         subprogram bodies in instances, pass Designated and E in that order, for
8041         consistency with the expected order of the formals (New_Id followed by
8042         Old_Id).
8043
8044 2011-08-02  Robert Dewar  <dewar@adacore.com>
8045
8046         * sem_ch8.adb: Minor reformatting.
8047
8048 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8049
8050         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8051         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8052         primitive operations of class-wide actuals.
8053
8054 2011-08-02  Javier Miranda  <miranda@adacore.com>
8055
8056         * exp_atag.ads, exp_atag.adb
8057         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8058         since its value is implicitly passed in argument Typ.
8059         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8060         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8061         Build_Common_Dispatching_Select_Statements.
8062
8063 2011-08-02  Robert Dewar  <dewar@adacore.com>
8064
8065         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8066         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8067         Minor reformatting.
8068
8069 2011-08-02  Robert Dewar  <dewar@adacore.com>
8070
8071         * sem_res.adb: Minor reformatting.
8072         * sem_prag.adb: Minor reformatting.
8073
8074 2011-08-02  Javier Miranda  <miranda@adacore.com>
8075
8076         * exp_atag.adb, exp_atags.ads
8077         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8078         by the tagged type Entity. Required to use this routine in the VM
8079         targets since we do not have available the Tag entity in the VM
8080         platforms.
8081         * exp_ch6.adb
8082         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8083         Ada.Tags has not been previously loaded.
8084         * exp_ch7.adb
8085         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8086         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8087         * sem_aux.adb
8088         (Enclosing_Dynamic_Scope): Add missing support to handle the full
8089         view of enclosing scopes. Required to handle enclosing scopes that
8090         are synchronized types whose full view is a task type.
8091         * exp_disp.adb
8092         (Build_VM_TSDs): Minor code improvement to avoid generating and
8093         analyzing lists with empty nodes.
8094         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8095         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8096         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8097         (Make_Disp_Timed_Select_Body): Add support for VM targets.
8098         (Make_Select_Specific_Data_Table): Add support for VM targets.
8099         (Make_VM_TSD): Generate code to initialize the SSD structure of
8100         the TSD.
8101
8102 2011-08-02  Yannick Moy  <moy@adacore.com>
8103
8104         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8105         cross-references section in ALI.
8106         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8107         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8108         Sub).
8109         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8110         subprogram or package entity of a node
8111         (Is_Local_Reference_Type): new function returns True for references
8112         selected in local cross-references.
8113         (Lt): function extracted from Lt in Output_References
8114         (Write_Entity_Name): function extracted from Output_References
8115         (Generate_Definition): generate reference with type 'D' for definition
8116         of objects (object declaration and parameter specification), with
8117         appropriate locations and units, for use in local cross-references.
8118         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8119         references of type 'I' for initialization in object definition.
8120         (Output_References): move part of function Lt and procedure
8121         Write_Entity_Name outside of the body. Ignore references of types 'D'
8122         and 'I' introduced for local cross-references.
8123         (Output_Local_References): new procedure to output the local
8124         cross-references sections.
8125         (Lref_Entity_Status): new array defining whether an entity is a local
8126         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8127         with 'I' type when initialization expression is present.
8128         * get_scos.adb, get_scos.ads: Correct comments and typos
8129
8130 2011-08-02  Javier Miranda  <miranda@adacore.com>
8131
8132         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8133         the JVM target.
8134         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8135         the JVM target.
8136         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8137         TSD support.
8138
8139 2011-08-02  Vincent Celier  <celier@adacore.com>
8140
8141         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8142         (No_Space_Img): New function
8143         (Find_Excluded_Sources): When reading from a file, record the file name
8144         and the line number for each excluded source.
8145         (Mark_Excluded_Sources): When reporting an error, if the excluded
8146         sources were read from a file, include file name and line number in
8147         the error message.
8148
8149 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8150
8151         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8152
8153 2011-08-02  Robert Dewar  <dewar@adacore.com>
8154
8155         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8156
8157 2011-08-02  Javier Miranda  <miranda@adacore.com>
8158
8159         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8160         generation of TSDs to the DOTNET compiler.
8161         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8162         generation of TSDs to the DOTNET compiler.
8163
8164 2011-08-02  Javier Miranda  <miranda@adacore.com>
8165
8166         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8167         record of all the tagged types declared inside library level package
8168         declarations, library level package bodies or library level subprograms.
8169         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8170         associated with a given tagged type.
8171         (Build_VM_TSDs): New subprogram.
8172         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8173         compilation units that are subprograms.
8174         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8175         compilation units that are package bodies.
8176         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8177         units that are a package declaration or a package instantiation.
8178         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8179         reorganization to improve the error generated by the frontend when the
8180         function Ada.Tags.Secondary_Tag is not available.
8181         * rtsfind.ads (RE_Register_TSD): New runtime entity.
8182         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8183
8184 2011-08-02  Javier Miranda  <miranda@adacore.com>
8185
8186         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8187
8188 2011-08-02  Robert Dewar  <dewar@adacore.com>
8189
8190         * s-imenne.ads: Minor reformatting.
8191
8192 2011-08-02  Robert Dewar  <dewar@adacore.com>
8193
8194         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8195         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8196         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8197
8198 2011-08-02  Robert Dewar  <dewar@adacore.com>
8199
8200         * einfo.ads (Materialize_Entity): Document this is only for renamings
8201         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8202         required debug information in the case where we transform the object
8203         declaration into a renaming declaration.
8204         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8205         object
8206         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8207         Materialize_Entity.
8208
8209 2011-08-02  Robert Dewar  <dewar@adacore.com>
8210
8211         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8212         Suppress_Init_Procs.
8213         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8214         Suppress_Initialization/Initialization_Suppressed.
8215         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8216         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8217         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8218         * sem_prag.adb: New processing for pragma Suppress_Initialization.
8219
8220 2011-08-02  Robert Dewar  <dewar@adacore.com>
8221
8222         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8223         Minor reformatting.
8224
8225 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8226
8227         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8228         only have inheritable classwide pre/postconditions.
8229
8230 2011-08-02  Javier Miranda  <miranda@adacore.com>
8231
8232         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8233         * rtsfind.ads (RE_Check_TSD): New runtime entity.
8234         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8235         checks if the external tag of a type is the same as the external tag
8236         of some other declaration.
8237
8238 2011-08-02  Thomas Quinot  <quinot@adacore.com>
8239
8240         * s-taskin.ads: Minor reformatting.
8241
8242 2011-08-02  Emmanuel Briot  <briot@adacore.com>
8243
8244         * g-comlin.adb (Display_Help): swap the order in which it prints the
8245         short help and the general usage.
8246
8247 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8248
8249         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8250         the aspect declarations and attach them to the generic copy for
8251         subsequent analysis.
8252         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8253         declarations of the generic tree to the new subprogram declarations.
8254         * sem_attr.adb (Check_Precondition_Postcondition): recognize
8255         conditions that apply to a subprogram instance.
8256
8257 2011-08-02  Robert Dewar  <dewar@adacore.com>
8258
8259         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8260
8261 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8262
8263         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8264         private type with a tagged full view is not derived in the immediate
8265         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8266
8267 2011-08-02  Robert Dewar  <dewar@adacore.com>
8268
8269         * exp_ch4.adb: Minor reformatting.
8270
8271 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8272
8273         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
8274         Ada2012 iterator, the loop will be rewritten during expansion into a
8275         while loop with a cursor and an element declaration. Do not analyze the
8276         body in this case, because if the container is for indefinite types the
8277         actual subtype of the elements will only be determined when the cursor
8278         declaration is analyzed.
8279
8280 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8281
8282         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8283         size/alignment related attributes in CodePeer_Mode.
8284
8285 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8286
8287         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8288         Prepend_Element, since this can result in the operation getting the
8289         wrong slot in the full type's dispatch table if the full type has
8290         inherited operations. The incomplete type's operation will get added
8291         to the proper position in the full type's primitives
8292         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8293         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8294         dispatching operations, since there are cases where nonprimitive
8295         subprograms can get added to the list of incomplete dependents (such
8296         as subprograms in nested packages).
8297         * sem_ch6.adb (Process_Formals): First, remove test for being in a
8298         private part when determining whether to add a primitive with a
8299         parameter of a tagged incomplete type to the Private_Dependents list.
8300         Such primitives can also occur in the visible part, and should not have
8301         been excluded from being private dependents.
8302         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8303         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8304         list of a Taft-amendment incomplete type is a primitive before issuing
8305         an error that the full type must appear in the same unit. There are
8306         cases where nonprimitives can be in the list (such as subprograms in
8307         nested packages).
8308         * sem_disp.adb (Derives_From): Use correct condition for checking that
8309         a formal's type is derived from the type of the corresponding formal in
8310         the parent subprogram (the condition was completely wrong). Add
8311         checking that was missing for controlling result types being derived
8312         from the result type of the parent operation.
8313
8314 2011-08-02  Yannick Moy  <moy@adacore.com>
8315
8316         * errout.adb (First_Node): minor renaming
8317         * restrict.adb (Check_Formal_Restriction): put restriction warning on
8318         first node.
8319
8320 2011-08-02  Yannick Moy  <moy@adacore.com>
8321
8322         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8323         before accessing operands.
8324         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8325         decide whether an initialization expression respects SPARK rules, as
8326         the plain node is the expanded one. This allows for more valid warnings
8327         to be issued.
8328         * gnat_rm.texi: Minor update.
8329
8330 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8331
8332         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8333         previous change.
8334
8335 2011-08-02  Robert Dewar  <dewar@adacore.com>
8336
8337         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8338
8339 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8340
8341         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8342         loop statements and the element renaming declaration with a block when
8343         the element type is controlled.
8344
8345 2011-08-02  Yannick Moy  <moy@adacore.com>
8346
8347         * sinfo.ads: Minor formatting.
8348
8349 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8350
8351         * sem_aggr.adb (Add_Association): if the association has a box and no
8352         expression, use the Sloc of the aggregate itself for the new
8353         association.
8354         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8355         the Original_Node.
8356
8357 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8358
8359         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8360         When a container is provided via a function call, generate a renaming
8361         of the function result. This avoids the creation of a transient scope
8362         and the premature finalization of the container.
8363         * exp_ch7.adb (Is_Container_Cursor): Removed.
8364         (Wrap_Transient_Declaration): Remove the supression of the finalization
8365         of the list controller when the declaration denotes a container cursor,
8366         it is not needed.
8367
8368 2011-08-02  Yannick Moy  <moy@adacore.com>
8369
8370         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8371         node is from source, instead of the original node being from source.
8372         * sem_aggr.adb
8373         (Resolve_Array_Aggregate): refine the check for a static expression, to
8374         recognize also static ranges
8375         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8376         Array_Type_Declaration): postpone the test for the type being a subtype
8377         mark after the type has been resolved, so that component-selection and
8378         expanded-name are discriminated.
8379         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8380         to distinguish the case of an iteration scheme, so that an error is
8381         issed on a non-static range in SPARK except in an iteration scheme.
8382         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8383         In_Iter_Schm = True.
8384         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8385         user-defined operators so that they are allowed in renaming
8386         * sem_ch8.adb
8387         (Find_Selected_Component): refine the check for prefixing of operators
8388         so that they are allowed in renaming. Move the checks for restrictions
8389         on selector name after analysis discriminated between
8390         component-selection and expanded-name.
8391         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8392         concatenation argument of string type if it is static.
8393         * sem_util.adb, sem_util.ads
8394         (Check_Later_Vs_Basic_Declarations): add a new function
8395         Is_Later_Declarative_Item to decice which declarations are allowed as
8396         later items, in the two different modes Ada 83 and SPARK. In the SPARK
8397         mode, add that renamings are considered as later items.
8398         (Enclosing_Package): new function to return the enclosing package
8399         (Enter_Name): correct the rule for homonyms in SPARK
8400         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8401         from source (result of expansion) to avoid issuing wrong warnings.
8402
8403 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8404
8405         * errout.adb: On anything but an expression First_Node returns its
8406         argument.
8407
8408 2011-08-02  Pascal Obry  <obry@adacore.com>
8409
8410         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8411
8412 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8413
8414         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8415         Set the associated loop as the related expression of internally
8416         generated cursors.
8417         * exp_ch7.adb (Is_Container_Cursor): New routine.
8418         (Wrap_Transient_Declaration): Supress the finalization of the list
8419         controller when the declaration denotes a container cursor.
8420
8421 2011-08-02  Yannick Moy  <moy@adacore.com>
8422
8423         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8424         command line now.
8425         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8426         expression is a simple expression. This check cannot be performed in
8427         the semantics, so just drop it.
8428         (P_Index_Or_Discriminant_Constraint): move check that the index or
8429         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8430         semantics. Other cases were previously checked in the semantics.
8431         * par-ch4.adb (P_Name): move checks that a selector name is not
8432         character literal or an operator symbol to Find_Selected_Component in
8433         the semantics
8434         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8435         declarations are not placed after later declarations in a separate
8436         procedure in Sem_Util (possibly not the best choice?), to be used both
8437         during parsing, for Ada 83 mode, and during semantic analysis, for
8438         SPARK mode.
8439         * par-endh.adb (Check_End): move check that end label is not missing
8440         to Process_End_Label in the semantics
8441         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8442         the special case for SPARK restriction
8443         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8444         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8445         parameter Force to issue the error message even on internal node (used
8446         for generated end label). Call Check_Restriction to check when an error
8447         must be issued. In SPARK mode, issue an error message even if the
8448         restriction is not set.
8449         (Check_Restriction): new procedure with an additional out parameter to
8450         inform the caller that a message has been issued
8451         * sem_aggr.adb: Minor modification of message
8452         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8453         instead of issuing an error message directly
8454         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8455         declarations are not placed after later declarations, by calling
8456         Check_Later_Vs_Basic_Declarations
8457         (Analyze_Subtype_Declaration): move here the check that an index or
8458         discriminant constraint must be a subtype mark. Change the check that
8459         a subtype of String must start at one so that it works on subtype marks.
8460         * sem_ch4.adb (Analyze_Call): move here the check that a named
8461         association cannot follow a positional one in a call
8462         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8463         instead of issuing an error message directly
8464         * sem_ch8.adb (Find_Selected_Component): move here the check that a
8465         selector name is not a character literal or an operator symbol. Move
8466         here the check that the prefix of an expanded name cannot be a
8467         subprogram or a loop statement.
8468         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8469         procedure called from parsing and semantics to check that basic
8470         declarations are not placed after later declarations
8471         (Process_End_Label): move here the check that end label is not missing
8472
8473 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8474
8475         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8476         representation clause in codepeer mode, since it confuses CodePeer and
8477         does not bring useful info.
8478
8479 2011-08-02  Ed Falis  <falis@adacore.com>
8480
8481         * init.c: initialize fp hw on MILS.
8482
8483 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8484
8485         * errout.adb (First_Node): for bodies, return the node itself (small
8486         optimization). For other nodes, do not check source_unit if the node
8487         comes from Standard.
8488
8489 2011-08-02  Robert Dewar  <dewar@adacore.com>
8490
8491         * exp_ch3.adb: Minor comment additions.
8492         * sem_ch13.adb: Minor reformatting.
8493
8494 2011-08-02  Pascal Obry  <obry@adacore.com>
8495
8496         * make.adb, makeutl.adb: Removes some superfluous directory separator.
8497
8498 2011-08-02  Robert Dewar  <dewar@adacore.com>
8499
8500         * sem_attr.adb: Minor reformatting.
8501
8502 2011-08-02  Robert Dewar  <dewar@adacore.com>
8503
8504         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8505         (Has_Default_Component_Value): Removed
8506         * einfo.ads Comment updates
8507         (Has_Default_Aspect): Replaces Has_Default_Value
8508         (Has_Default_Component_Value): Removed
8509         * exp_ch13.adb
8510         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8511         * exp_ch3.adb
8512         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8513         (Get_Simple_Init_Val): Handle Default_Value aspect
8514         (Needs_Simple_Initialization): Handle Default_Value aspect
8515         * exp_ch3.ads: Needs_Simple_Initialization
8516         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8517         * par-prag.adb (Pragma_Default[_Component]Value) Removed
8518         * sem_ch13.adb
8519         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8520         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8521         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8522
8523 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8524
8525         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8526         package containing iteration primitives.
8527         exp_ch5.adb (Expand_Iterator_Loop): ditto.
8528
8529 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8530
8531         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8532         "of", pre-analyze expression in case it is a function call with
8533         finalization actions that must be placed ahead of the loop.
8534         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8535         on an Ada2012 iterator, insert them ahead of the rewritten loop.
8536
8537 2011-08-02  Geert Bosch  <bosch@adacore.com>
8538
8539         * cstand.adb (Create_Float_Types): Only consider C's long double for
8540         Long_Long_Float, in addition to double.
8541
8542 2011-08-02  Robert Dewar  <dewar@adacore.com>
8543
8544         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8545         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8546         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8547         Minor reformatting.
8548
8549 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8550
8551         * sem_attr.adb: handle properly 'Result when it is a prefix of an
8552         indexed component.
8553
8554 2011-08-02  Javier Miranda  <miranda@adacore.com>
8555
8556         * einfo.ads, einfo.adb
8557         (Original_Access_Type): Move this attribute to Node26 since there was
8558         an undocumented use of Node21 in E_Access_Subprogram_Type entities
8559         which causes conflicts and breaks the generation of the .NET compiler.
8560         (Interface_Name): Add missing documentation on JGNAT only uses of
8561         this attribute.
8562
8563 2011-08-02  Geert Bosch  <bosch@adacore.com>
8564
8565         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8566         (Find_Back_End_Float_Type): Likewise
8567         (Create_Back_End_Float_Types): Likewise
8568         (Create_Float_Types): Likewise
8569         (Register_Float_Type): Likewise
8570         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8571         Nlist and split out type selection in new local Find_Base_Type function.
8572         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8573         Nlist
8574         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8575
8576 2011-08-02  Robert Dewar  <dewar@adacore.com>
8577
8578         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8579         alpha order).
8580         * opt.ads: Minor comment change.
8581         * sem_ch12.adb: Minor code reorganization.
8582
8583 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8584
8585         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8586         subtype's list of rep items to the list on the full subtype in the case
8587         where the lists are the same.
8588
8589 2011-08-02  Geert Bosch  <bosch@adacore.com>
8590
8591         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8592         using the one from System.Strings, which also deallocates all strings.
8593
8594 2011-08-02  Geert Bosch  <bosch@adacore.com>
8595
8596         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8597         function.
8598         * gcc-interface/Make-lang.in: Update dependencies.
8599
8600 2011-08-02  Olivier Hainque  <hainque@adacore.com>
8601
8602         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8603         end_locus.
8604
8605 2011-08-02  Javier Miranda  <miranda@adacore.com>
8606
8607         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8608         associated with anonymous access to subprograms.
8609
8610 2011-08-02  Geert Bosch  <bosch@adacore.com>
8611
8612         * opt.ads
8613         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8614         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8615         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8616         (Add_Symbol_Definition): Move to switch-c.adb
8617         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8618         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8619         (Add_Symbol_Definition): Move to switch-c.adb.
8620         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8621         * sem_warn.adb
8622         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8623         Move to warnsw.adb.
8624         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8625         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8626         Move to warnsw.adb.
8627         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8628         (Add_Symbol_Definition): Moved from Prepcomp.
8629         * switch-c.ads: Update copyright notice. Use String_List instead of
8630         Argument_List, removing dependency on System.OS_Lib.
8631
8632 2011-08-02  Yannick Moy  <moy@adacore.com>
8633
8634         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8635         mode on initialization expression which does not respect SPARK
8636         restrictions.
8637         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8638         if the tree referenced by its argument represents an initialization
8639         expression in SPARK, suitable for initializing an object in an object
8640         declaration.
8641
8642 2011-08-02  Javier Miranda  <miranda@adacore.com>
8643
8644         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8645         internally generated access to subprogram with its associated protected
8646         subprogram type.
8647         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8648
8649 2011-08-02  Geert Bosch  <bosch@adacore.com>
8650
8651         * cstand.adb (Register_Float_Type): Print information about type to
8652         register, if the Debug_Flag_Dot_B is set.
8653         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8654         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8655         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8656         with a requested precision of more than Max_Digits digits and no more
8657         than Max_Base_Digits digits, if a range specification is present and the
8658         Predefined_Float_Types list has a suitable type to derive from.
8659         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8660         case of type completion with pragma Import
8661         * sem_prag.adb
8662         (Process_Import_Predefined_Type): Processing to complete a type
8663         with pragma Import. Currently supports floating point types only.
8664         (Set_Convention_From_Pragma): Do nothing without underlying type.
8665         (Process_Convention): Guard against absence of underlying type,
8666         which may happen when importing incomplete types.
8667         (Process_Import_Or_Interface): Handle case of importing predefined
8668         types. Tweak error message.
8669
8670 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8671
8672         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8673         functions to previous change.  Reorganize code slightly.
8674
8675 2011-08-02  Geert Bosch  <bosch@adacore.com>
8676
8677         * back_end.ads (Register_Type_Proc): New call back procedure type for
8678         allowing the back end to provide information about available types.
8679         (Register_Back_End_Types): New procedure to register back end types.
8680         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8681         available types.
8682         * cstand.adb (Back_End_Float_Types): New list for floating point types
8683         supported by the back end.
8684         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8685         (Copy_Float_Type): New procedure to make new copies of predefined types.
8686         (Register_Float_Type): New call back procedure to populate the BEFT list
8687         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8688         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8689         (Create_Float_Types): New procedure to create entities for floating
8690         point types predefined in Standard, and put these and any remaining
8691         BEFTs on the Predefined_Float_Types list.
8692         * stand.ads (Predefined_Float_Types): New list for predefined floating
8693         point types that do not have declarations in package Standard.
8694
8695 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8696
8697         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
8698         entity node for the unit containing the parameter.
8699         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8700         (Add_Inlined_Subprogram): Likewise.
8701         * gcc-interface/Make-lang.in: Update dependencies.
8702
8703 2011-08-02  Thomas Quinot  <quinot@adacore.com>
8704
8705         * s-stusta.adb (Print): Make sure Pos is always initialized to a
8706         suitable value.
8707
8708 2011-08-02  Geert Bosch  <bosch@adacore.com>
8709
8710         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8711
8712 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8713
8714         * sem_type.adb (Covers): Move trivial case to the top and reuse the
8715         computed value of Base_Type.
8716
8717 2011-08-02  Yannick Moy  <moy@adacore.com>
8718
8719         * restrict.adb (Check_Restriction): issue an error for any use of
8720         class-wide, even if the No_Dispatch restriction is not set.
8721         * sem_aggr.adb: Correct typos in comments and messages in formal mode
8722         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8723         when completing a private extension, the type named in the private part
8724         is not the same as that named in the visible part.
8725         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8726         of an inherited primitive operations of a tagged type or type extension
8727         that returns the tagged type.
8728         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8729         function which returns True for an implicit operation inherited by the
8730         derived type declaration for the argument type.
8731         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8732         order.
8733
8734 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8735
8736         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8737         Process_Bounds, to perform analysis with expansion of a range or an
8738         expression that is the iteration scheme for a loop.
8739         (Analyze_Iterator_Specification): If domain of iteration is given by a
8740         function call with a controlled result, as is the case if call returns
8741         a predefined container, ensure that finalization actions are properly
8742         generated.
8743         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8744
8745 2011-08-02  Javier Miranda  <miranda@adacore.com>
8746
8747         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8748         * gcc-interface/Make-lang.in: Update dependencies.
8749
8750 2011-08-02  Javier Miranda  <miranda@adacore.com>
8751
8752         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8753         determine if the analysis is performed using N or Original_Node (N).
8754         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8755         functionality of routine Is_Variable avoids code duplication.
8756         * checks.adb (Determine_Range): Handle temporaries generated by
8757         Remove_Side_Effects.
8758
8759 2011-08-02  Javier Miranda  <miranda@adacore.com>
8760
8761         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8762         expansion of the condition. Required since the previous analysis was
8763         done with expansion disabled (see Resolve_Quantified_Expression) and
8764         hence checks were not inserted and record comparisons have not been
8765         expanded.
8766
8767 2011-08-02  Ed Falis  <falis@adacore.com>
8768
8769         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8770         Update header.
8771
8772 2011-08-02  Bob Duff  <duff@adacore.com>
8773
8774         * opt.ads: Minor comment fix.
8775
8776 2011-08-02  Bob Duff  <duff@adacore.com>
8777
8778         * sem_ch12.adb (Analyze_Package_Instantiation,
8779         Analyze_Subprogram_Instantiation): Turn off style checking while
8780         analyzing an instance. Whatever style checks that apply to the generic
8781         unit should apply, so it makes no sense to apply them in an instance.
8782         This was causing trouble when compiling an instance of a runtime
8783         unit that violates the -gnatyO switch.
8784         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8785         one of the two case statements, causing spurious errors.
8786
8787 2011-08-02  Robert Dewar  <dewar@adacore.com>
8788
8789         * uname.adb: Minor reformatting.
8790         * gnatcmd.adb: Minor reformatting.
8791         * exp_attr.adb: Minor reformatting.
8792
8793 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8794
8795         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8796         No_Dispatching_Calls, do not look for the Assign primitive, because
8797         predefined primitives are not created in this case.
8798
8799 2011-08-02  Bob Duff  <duff@adacore.com>
8800
8801         * stylesw.ads: Minor comment fixes.
8802
8803 2011-08-02  Robert Dewar  <dewar@adacore.com>
8804
8805         * freeze.adb (Add_To_Result): New procedure.
8806
8807 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
8808
8809         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8810         time, if the specific run-time routines for handling streams of strings
8811         are not available, use the default mechanism.
8812
8813 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8814
8815         * s-regpat.ads: Fix typo.
8816
8817 2011-08-02  Vincent Celier  <celier@adacore.com>
8818
8819         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8820         not null, call it to create the in memory config project file without
8821         parsing an existing default config project file.
8822
8823 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8824
8825         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8826
8827 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8828
8829         * sem_elim.adb: an abstract subprogram does not need an eliminate
8830         pragma for its descendant to be eliminable.
8831
8832 2011-08-02  Ed Falis  <falis@adacore.com>
8833
8834         * init.c: revert to handling before previous checkin for VxWorks
8835         * s-intman-vxworks.adb: delete unnecessary declarations related to
8836         using Ada interrupt facilities for handling signals.
8837         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8838         * s-intman-vxworks.ads: Import __gnat_install_handler as
8839         Initialize_Interrupts.
8840         * s-taprop-vxworks.adb: Delete Signal_Mask.
8841         (Abort_Handler): change construction of mask to unblock exception
8842         signals.
8843
8844 2011-08-02  Jerome Guitton  <guitton@adacore.com>
8845
8846         * a-except-2005.adb (Raise_From_Signal_Handler): Call
8847         Debug_Raise_Exception before propagation starts.
8848
8849 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8850
8851         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8852         to Restriction_Check_Required.
8853         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8854         * sem_res.adb (Resolve_Call): Likewise.
8855         * sem_attr.adb (Check_Stream_Attribute): Likewise.
8856
8857 2011-08-02  Bob Duff  <duff@adacore.com>
8858
8859         * stylesw.ads: Update comment.
8860         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8861         * errout.ads: Remove obsolete comment.
8862
8863 2011-08-02  Javier Miranda  <miranda@adacore.com>
8864
8865         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8866         (Set_Is_Safe_To_Reevaluate): new procedure.
8867         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8868         assignment is allowed on safe-to-reevaluate variables.
8869         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8870         temporary created to remove side effects in expressions that use
8871         the secondary stack as safe-to-reevaluate.
8872         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8873         variables that are not true constants.
8874
8875 2011-08-02  Robert Dewar  <dewar@adacore.com>
8876
8877         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8878         sem_res.adb, sem_ch6.adb: Minor reformatting.
8879
8880 2011-08-02  Jerome Guitton  <guitton@adacore.com>
8881
8882         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8883
8884 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8885
8886         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8887         not set Overridden_Operation if subprogram is an initialization
8888         procedure.
8889
8890 2011-08-02  Yannick Moy  <moy@adacore.com>
8891
8892         * par-ch6.adb: Correct obsolete name in comments
8893         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8894         which takes two message arguments (existing function takes one), with
8895         second message used for continuation.
8896         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8897         block statements that originate from a source block statement, not
8898         generated block statements
8899         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8900         symmetry with procedure case
8901         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8902         function to issue an error in formal mode if a package specification
8903         contains more than one tagged type or type extension.
8904         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8905         parameters matching formals of tagged types are objects (or ancestor
8906         type conversions of objects), not general expressions. Issue an error
8907         on view conversions that are not involving ancestor conversion of an
8908         extended type.
8909         (Resolve_Type_Conversion): in formal mode, issue an error on the
8910         operand of an ancestor type conversion which is not an object
8911         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8912         procedure so that it works also for actuals of function calls
8913         (Is_Actual_Tagged_Parameter): new function which determines if its
8914         argument is an actual parameter of a formal of tagged type in a
8915         subprogram call
8916         (Is_SPARK_Object_Reference): new function which determines if the tree
8917         referenced by its argument represents an object in SPARK
8918
8919 2011-08-02  Robert Dewar  <dewar@adacore.com>
8920
8921         * sem_ch3.adb: Minor reformatting
8922         Minor comment addition
8923         Minor error msg text change
8924
8925 2011-08-02  Javier Miranda  <miranda@adacore.com>
8926
8927         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8928         function. Used to be more precise when we generate a variable plus one
8929         assignment to remove side effects in the evaluation of the Bound
8930         expressions.
8931         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8932         of the bound expression to force its re-analysis and thus expand the
8933         associated transient scope (if required). Code cleanup replacing the
8934         previous code that declared the constant entity by an invocation to
8935         routine Force_Evaluation which centralizes this work in the frontend.
8936
8937 2011-08-02  Robert Dewar  <dewar@adacore.com>
8938
8939         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8940         (Base_Type): Now uses improved Is_Base_Type function
8941         * einfo.ads (Base_Type): Inline this function
8942
8943 2011-08-02  Robert Dewar  <dewar@adacore.com>
8944
8945         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8946         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8947
8948 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8949
8950         * gcc-interface/Make-lang.in: Update dependencies.
8951         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8952         targets.
8953
8954 2011-08-02  Yannick Moy  <moy@adacore.com>
8955
8956         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8957         non-simple expression used in delta constraint
8958         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8959         index constraint which is not a subtype mark
8960         * par.adb: With and use Restrict
8961         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8962         mode on component type which is not a subtype mark and default
8963         expression on component
8964         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8965         of string which does not have a lower index bound equal to 1
8966         (Array_Type_Declaration): issue an error in formal mode on index or
8967         component type which is not a subtype mark, and on aliased keyword on
8968         component
8969         (Derived_Type_Declaration): issue an error in formal mode on interface,
8970         limited or abstract type
8971         (Record_Type_Declaration): issue an error in formal mode on interface
8972         (Record_Type_Definition): issue an error in formal mode on tagged types
8973         and type extensions not declared in the specification of a library unit
8974         package; on null non-tagged record; on variant part
8975
8976 2011-08-02  Vincent Celier  <celier@adacore.com>
8977
8978         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8979         not declared for qualified library project when Library_Name is not
8980         declared, but Library_Dir is.
8981
8982 2011-08-02  Robert Dewar  <dewar@adacore.com>
8983
8984         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8985         pragmas (affects aspects [Component_]Default_Value
8986         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8987         component type for the resolution
8988
8989 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8990
8991         * einfo.adb (Base_Type): Tune implementation for speed.
8992
8993 2011-08-02  Robert Dewar  <dewar@adacore.com>
8994
8995         * freeze.adb: Minor reformatting.
8996
8997 2011-08-02  Thomas Quinot  <quinot@adacore.com>
8998
8999         * scos.ads: Update comments.
9000
9001 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9002
9003         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9004         base type, because the parent may be a subtype of a private type whose
9005         convention is established in a private part.
9006
9007 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9008
9009         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9010         statement in a block when the expansion of the return expression has
9011         created a finalization chain.
9012         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9013         with the parent node.
9014         Add N_Extended_Return_Statement to handle the case where a transient
9015         object declaration appears in the Return_Object_Declarations list of
9016         an extended return statement.
9017
9018 2011-08-02  Matthew Gingell  <gingell@adacore.com>
9019
9020         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9021         unused parameter 'name'.
9022
9023 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9024
9025         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9026         inherited operation, check whether its alias, which is the source
9027         operastion that it renames, has been marked eliminated.
9028
9029 2011-08-02  Javier Miranda  <miranda@adacore.com>
9030
9031         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9032         in-mode parameter whose type is an access type since it can be used to
9033         modify its designated object. Enforce code that handles as safe an
9034         access type that is not access-to-constant but it is the result of a
9035         previous removal of side-effects.
9036         (Remove_Side_Effects): Minor code reorganization of cases which require
9037         no action. Done to incorporate documentation on new cases uncovered
9038         working in this ticket: no action needed if this routine was invoked
9039         too early and the nodes are not yet decorated.
9040         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9041         to routine Remove_Side_Effects by calls to Force_Evaluation since they
9042         were issued with actuals that are implicitly provided by
9043         Force_Evaluation.
9044
9045 2011-08-02  Robert Dewar  <dewar@adacore.com>
9046
9047         * sem_ch3.adb, sem_res.adb: Minor reformatting.
9048
9049 2011-08-02  Yannick Moy  <moy@adacore.com>
9050
9051         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9052         to issue an error in formal mode on attribute not supported in this mode
9053         (Analyze_Attribute): issue errors on standard attributes not supported
9054         in formal mode.
9055         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9056         comment, and issue error in formal mode on modulus which is not a power
9057         of 2.
9058         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9059         range.
9060         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9061         subtype mark.
9062         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9063         operator on modular type (except 'not').
9064
9065 2011-08-02  Robert Dewar  <dewar@adacore.com>
9066
9067         * gnat_rm.texi: Minor reformatting.
9068
9069 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9070
9071         * s-osinte-linux.ads: Minor comment update and reformatting.
9072         * i-cexten.ads: Make this unit pure, as for its parent.
9073         Will allow its usage in more contexts if needed.
9074
9075 2011-08-02  Robert Dewar  <dewar@adacore.com>
9076
9077         * s-utf_32.ads: Minor comment fix.
9078
9079 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9080
9081         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9082         operation of a tagged synchronized type, handle the case where the
9083         controlling argument is overloaded.
9084
9085 2011-08-02  Yannick Moy  <moy@adacore.com>
9086
9087         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9088         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9089         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9090         SPARK mode and formal verification mode on processing SPARK restriction
9091         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9092         requiring consistency checking.
9093
9094 2011-08-02  Robert Dewar  <dewar@adacore.com>
9095
9096         * sem_res.adb: Minor reformatting.
9097
9098 2011-08-02  Robert Dewar  <dewar@adacore.com>
9099
9100         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9101         a-cforse.ads: Remove unneeded with of Ada.Containers
9102         Remove commented out pragma Inline's
9103         Move specifications of new subprograms to the actual specs
9104
9105 2011-08-02  Yannick Moy  <moy@adacore.com>
9106
9107         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9108         a-cforse.ads: Update comments.
9109
9110 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9111
9112         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9113
9114 2011-08-02  Robert Dewar  <dewar@adacore.com>
9115
9116         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9117         a-cforse.ads, a-cofove.ads: Minor reformatting.
9118
9119 2011-08-02  Claire Dross  <dross@adacore.com>
9120
9121         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9122         a-cofove.ads: Add comments.
9123
9124 2011-08-02  Yannick Moy  <moy@adacore.com>
9125
9126         * gnat_rm.texi: Document formal containers.
9127
9128 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9129
9130         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9131         are empty sections.
9132
9133 2011-08-02  Robert Dewar  <dewar@adacore.com>
9134
9135         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9136         reformatting.
9137
9138 2011-08-02  Robert Dewar  <dewar@adacore.com>
9139
9140         * aspects.adb: New aspects Default_Value and Default_Component_Value
9141         New format of Aspect_Names table checks for omitted entries
9142         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9143         handling of boolean aspects for derived types.
9144         New aspects Default_Value and Default_Component_Value
9145         New format of Aspect_Names table checks for omitted entries
9146         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9147         (Has_Default_Value): New flag
9148         (Has_Default_Component_Value): New flag
9149         (Has_Default_Value): New flag
9150         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9151         table.
9152         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9153         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9154         Default_Value and Default_Component_Value
9155         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9156         New aspects Default_Value and Default_Component_Value
9157         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9158         * sprint.adb: Print N_Aspect_Specification node when called from gdb
9159
9160 2011-08-02  Vincent Celier  <celier@adacore.com>
9161
9162         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9163         inherit library kind.
9164
9165 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9166
9167         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9168         Minor reformatting.
9169
9170 2011-08-02  Robert Dewar  <dewar@adacore.com>
9171
9172         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9173
9174 2011-08-02  Yannick Moy  <moy@adacore.com>
9175
9176         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9177
9178 2011-08-02  Robert Dewar  <dewar@adacore.com>
9179
9180         * impunit.adb: Add comment.
9181
9182 2011-08-02  Yannick Moy  <moy@adacore.com>
9183
9184         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9185         qualification of aggregates in formal mode
9186         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9187         another aggregate
9188         (Resolve_Aggregate): complete the test that an aggregate is adequately
9189         qualified in formal mode
9190
9191 2011-08-02  Pascal Obry  <obry@adacore.com>
9192
9193         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9194         * mlib-prj.adb: Supress warning when compiling binder generated file.
9195         (Build_Library): Supress all warnings when compiling the binder
9196         generated file.
9197
9198 2011-08-02  Yannick Moy  <moy@adacore.com>
9199
9200         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9201         from here...
9202         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9203         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9204         Add with/use clauses to make Check_Formal_Restriction visible
9205
9206 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9207
9208         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9209         in-parameters when type of the generic formal is private in the generic
9210         spec and non-private in the body.
9211
9212 2011-08-02  Claire Dross  <dross@adacore.com>
9213
9214         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9215         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9216         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9217         * impunit.adb, Makefile.rtl: Take new files into account.
9218
9219 2011-08-02  Robert Dewar  <dewar@adacore.com>
9220
9221         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9222         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9223
9224 2011-08-02  Yannick Moy  <moy@adacore.com>
9225
9226         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9227         formal mode
9228         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9229         matching static array bounds, taking into account the special case of
9230         string literals
9231         * sem_ch3.adb: Typo in comment.
9232
9233 2011-08-02  Yannick Moy  <moy@adacore.com>
9234
9235         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9236         which issues an error in formal mode if its argument node is originally
9237         from source
9238         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9239         has a discriminant specification so that it does not include the case
9240         of derived types
9241         (Derived_Type_Declaration): move here the test that a derived type has a
9242         discriminant specification
9243         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9244         first element of a component association before accessing its choices
9245         (presence of component association is not enough)
9246         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9247         declaration is a library item before accessing the next element in a
9248         list, as library items are not member of lists
9249         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9250         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9251         Check_Formal_Restriction whenever possible.
9252
9253 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9254
9255         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9256         reference when needed.
9257
9258 2011-08-02  Bob Duff  <duff@adacore.com>
9259
9260         * gnat_ugn.texi: Fix typo.
9261
9262 2011-08-02  Vincent Celier  <celier@adacore.com>
9263
9264         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9265         archive file name. Do not use the full path name of archives for Open
9266         VMS.
9267
9268 2011-08-02  Robert Dewar  <dewar@adacore.com>
9269
9270         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9271         Analyze_Aspect_Specifications
9272         * sem_ch13.adb
9273         (Analyze_Aspect_Specifications): New handling for boolean aspects
9274         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9275         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9276         sequence for Analyze_Aspect_Specifications
9277         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9278         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9279
9280 2011-08-02  Robert Dewar  <dewar@adacore.com>
9281
9282         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9283         aspects, since these no longer exist.
9284
9285 2011-08-02  Robert Dewar  <dewar@adacore.com>
9286
9287         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9288         semicolon, do not try to see if there are aspects following it.
9289         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9290         aspect spec.
9291
9292 2011-08-02  Robert Dewar  <dewar@adacore.com>
9293
9294         * sem_ch8.adb, aspects.ads: Minor reformatting.
9295
9296 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9297
9298         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9299         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9300         extracted from...
9301         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
9302
9303 2011-08-02  Yannick Moy  <moy@adacore.com>
9304
9305         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9306         mode on subprogram declaration outside of package specification, unless
9307         it is followed by a pragma Import
9308         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9309         Access_Type_Declaration): issue error in formal mode on access type
9310         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9311         incomplete type
9312         (Analyze_Object_Declaration): issue error in formal mode on object
9313         declaration which does not respect SPARK restrictions
9314         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9315         declaration which does not respect SPARK restrictions
9316         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9317         error in formal mode on digits or delta constraint
9318         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9319         decimal fixed point type
9320         (Derived_Type_Declaration): issue error in formal mode on derived type
9321         other than type extensions of tagged record types
9322         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9323         with check on access definition
9324         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9325         mode on protected definition.
9326         (Analyze_Task_Definition): issue error in formal mode on task definition
9327
9328 2011-08-02  Robert Dewar  <dewar@adacore.com>
9329
9330         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9331
9332 2011-08-02  Javier Miranda  <miranda@adacore.com>
9333
9334         * sem_ch6.adb (Can_Override_Operator): New function.
9335         (Verify_Overriding_Indicator): Add missing code to check overriding
9336         indicator in operators. Fixes regression.
9337         (Check_Overriding_Indicator): Minor reformating after replacing the
9338         code that evaluates if the subprogram can override an operator by
9339         invocations to the above new function.
9340         * einfo.adb
9341         (Write_Field26_Name): Add missing code to ensure that, following
9342         the documentation in einfo.ads, this field is not shown as attribute
9343         "Static_Initialization" on non-dispatching functions.
9344
9345 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9346
9347         * sem_res.adb (Resolve_Call): A call to
9348         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9349         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9350         i.e., when the second parameter is of type Time_Span.
9351
9352 2011-08-02  Vincent Celier  <celier@adacore.com>
9353
9354         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9355         with an archive instead of -L<library dir> -l<library name>.
9356
9357 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9358
9359         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9360         mark the base types In_Use in addition to making the operations
9361         use_visible.
9362
9363 2011-08-02  Ed Falis  <falis@adacore.com>
9364
9365         * init.c: add and setup __gnat_signal_mask for the exception signals
9366         * s-inmaop-vxworks.adb: new file.
9367         * s-intman-vxworks.adb: remove unnecessary initializations and
9368         simplify remaining
9369         * s-intman-vxworks.ads: remove unnecessary variable
9370         * s-taprop-vxworks.adb: simplify signal initialization
9371
9372 2011-08-02  Robert Dewar  <dewar@adacore.com>
9373
9374         * sem_ch8.adb: Minor code reorganization, comment updates.
9375
9376 2011-08-02  Robert Dewar  <dewar@adacore.com>
9377
9378         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9379         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9380         here from Sem_Res.
9381         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9382         (Matching_Static_Array_Bounds): Moved here from Sem_Res
9383
9384 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9385
9386         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9387         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9388         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9389         use_type_clauses, to handle more efficiently use_type and use_all_type
9390         constructs.
9391         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9392         Ada2012 Use_All_Type clause.
9393         (Use_Class_Wide_Operations): new procedure.
9394
9395 2011-08-02  Robert Dewar  <dewar@adacore.com>
9396
9397         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9398         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9399         expression to expression function.
9400
9401 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9402
9403         * sem_ch4.adb: transform simple Ada2012 membership into equality only
9404         if types are compatible.
9405
9406 2011-08-02  Yannick Moy  <moy@adacore.com>
9407
9408         * sem_res.adb (Matching_Static_Array_Bounds): new function which
9409         returns True if its argument array types have same dimension and same
9410         static bounds at each index.
9411         (Resolve_Actuals): issue an error in formal mode on actuals passed as
9412         OUT or IN OUT paramaters which are not view conversions in SPARK.
9413         (Resolve_Arithmetic_Op): issue an error in formal mode on
9414         multiplication or division with operands of fixed point types which are
9415         not qualified or explicitly converted.
9416         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9417         Boolean or array type (except String) operands.
9418         (Resolve_Equality_Op): issue an error in formal mode on equality
9419         operators for array types other than String with non-matching static
9420         bounds.
9421         (Resolve_Logical_Op): issue an error in formal mode on logical operators
9422         for array types with non-matching static bounds. Factorize the code in
9423         Matching_Static_Array_Bounds.
9424         (Resolve_Qualified_Expression): issue an error in formal mode on
9425         qualified expressions for array types with non-matching static bounds.
9426         (Resolve_Type_Conversion): issue an error in formal mode on type
9427         conversion for array types with non-matching static bounds
9428
9429 2011-08-02  Robert Dewar  <dewar@adacore.com>
9430
9431         * par-ch10.adb: Minor code reorganization (use Nkind_In).
9432
9433 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9434
9435         * par-ch9.adb: save location of entry for proper error message.
9436
9437 2011-08-02  Javier Miranda  <miranda@adacore.com>
9438
9439         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9440         (Use_Full_View) which permits this routine to climb through the
9441         ancestors using the full-view of private parents.
9442         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9443         Use_Full_View to true in calls to Is_Ancestor.
9444         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9445         true in call to Is_Ancestor.
9446         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9447         Use_Full_View to true in call to Is_Ancestor.
9448         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9449         call to Is_Ancestor.
9450         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9451         Use_Full_View to true in calls to Is_Ancestor.
9452         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9453         Make_Select_Specific_Data_Table, Register_Primitive,
9454         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9455         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9456         to true in call to Is_Ancestor.
9457         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9458         Use_Full_View to true in calls to Is_Ancestor.
9459         * exp_cg.adb
9460         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9461         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9462
9463 2011-08-02  Robert Dewar  <dewar@adacore.com>
9464
9465         * gnat_rm.texi: Minor reformatting.
9466         * sem_prag.adb: Minor reformatting.
9467
9468 2011-08-02  Tristan Gingold  <gingold@adacore.com>
9469
9470         * vms_data.ads: Add VMS qualifier for -gnateP.
9471
9472 2011-08-02  Robert Dewar  <dewar@adacore.com>
9473
9474         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9475         * par-ch7.adb (P_Package): Proper placement of aspects for package
9476         decl/instantiation.
9477         * par-endh.adb (Check_End): Ad Is_Sloc parameter
9478         (End_Statements): Add Is_Sloc parameterr
9479         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9480         (Check_End): Ad Is_Sloc parameter
9481         (End_Statements): Add Is_Sloc parameterr
9482
9483 2011-08-02  Vincent Celier  <celier@adacore.com>
9484
9485         * ug_words: Add VMS qualifier equivalent to -gnateP:
9486         /SYMBOL_PREPROCESSING.
9487
9488 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9489
9490         * gnat-style.texi: For hexadecimal numeric literals the typical
9491         grouping of digits is 4 to represent 2 bytes.
9492         A procedure spec which is split into several lines is indented two
9493         characters.
9494
9495 2011-08-02  Yannick Moy  <moy@adacore.com>
9496
9497         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9498         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9499         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9500         properly qualified
9501         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9502         choice in array aggregate
9503         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9504         mark as ancestor
9505         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9506         positional and named aggregate for record, or others in record
9507         aggregate, or multiple choice in record aggregate
9508         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9509         array operands to logical operations AND, OR and XOR do not have the
9510         same static lower and higher bounds
9511         * sem_ch5.adb, sinfo.ads: Correct typos in comments
9512
9513 2011-08-01  Robert Dewar  <dewar@adacore.com>
9514
9515         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9516         Replaces Last_Source_Node_In_Sequence.
9517         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9518         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9519         parens and blank in string (this was inconsistently implemented).
9520         * errout.ads
9521         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9522         blank in string (this was inconsistently implemented).
9523         * gnat1drv.adb
9524         (Set_Global_Switches): Set formal mode switches appropriately
9525         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9526         * par-prag.adb
9527         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9528         call Set_Error_Msg_Lang to set "spark" as language name.
9529         * par.adb: Remove unnecessary call to set formal language for errout
9530         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9531         appropriately and call Set_Error_Msg_Lang to set "spark" as language
9532         name.
9533         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9534         calls to it, moved after resolution so that types are known
9535         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9536         result of concatenation is not of type String
9537         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9538         concatenation is not properly restricted
9539         * gnat_rm.texi: Add doc on pragma Spark_95.
9540         * gcc-interface/Makefile.in: Remove obsolete target pairs for
9541         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9542         * gcc-interface/Make-lang.in: Update dependencies.
9543
9544 2011-08-01  Javier Miranda  <miranda@adacore.com>
9545
9546         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9547         condition that detects if the overridden operation must replace an
9548         existing entity.
9549
9550 2011-08-01  Javier Miranda  <miranda@adacore.com>
9551
9552         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9553         code declarations inserted by Insert_Actions in each alternative of the
9554         N_Case_Expression node.
9555
9556 2011-08-01  Robert Dewar  <dewar@adacore.com>
9557
9558         * sem_ch6.adb: Minor code reorganization.
9559         * sem_util.adb: Minor reformatting.
9560
9561 2011-08-01  Pascal Obry  <obry@adacore.com>
9562
9563         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9564         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9565
9566 2011-08-01  Yannick Moy  <moy@adacore.com>
9567
9568         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9569         literal or operator symbol which is prefixed
9570         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9571         mode on access attributes.
9572         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9573         that concatenation operands are properly restricted in formal mode
9574         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9575         Analyze_Concatenation_Operand. Issue an error in formal mode if the
9576         result of the concatenation has a type different from String.
9577         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9578         Analyze_Quantified_Expression, Analyze_Slice,
9579         Analyze_Null): issue an error in formal mode on unsupported constructs
9580         * sem_ch5.adb
9581         (Analyze_Block_Statement): only issue error on source block statement
9582         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9583         function which returns the last node in a list of nodes for which
9584         Comes_From_Source returns True, if any
9585         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9586         Last_Source_Node_In_Sequence
9587         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9588         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9589         mode on unsupported constructs
9590         * sem_ch9.adb Do not return after issuing error in formal mode, as the
9591         rest of the actions may be needed later on since the error is marked as
9592         not serious.
9593         * sinfo.ads: Typos in comments.
9594
9595 2011-08-01  Pascal Obry  <obry@adacore.com>
9596
9597         * projects.texi: Minor editing.
9598
9599 2011-08-01  Yannick Moy  <moy@adacore.com>
9600
9601         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9602         insertion character ~~
9603         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9604         (Set_Error_Msg_Lang): new procedure which fixes the language for use
9605         with insertion character ~~
9606         (Set_Msg_Text): treat insertion character ~~
9607         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9608         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9609         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9610         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9611         errors related to the formal language restriction not serious
9612         (insertion character |).
9613         * par.adb (Par): set formal language for error messages if needed
9614         * sem_ch6.adb (Check_Missing_Return): take into account possible
9615         generated statements at the end of the function
9616         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9617         enumeration value to define a new pragma SPARK_95
9618         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9619         SPARK_Version): new type and variables to store the SPARK version
9620         (none by default).
9621         (SPARK_Mode): return True when SPARK_Version is set
9622         * par-prag.adb: Correct indentation
9623         (Prag): take Pragma_SPARK_95 into account
9624         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9625         into account.
9626
9627 2011-08-01  Robert Dewar  <dewar@adacore.com>
9628
9629         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9630         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9631         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9632
9633 2011-08-01  Pascal Obry  <obry@adacore.com>
9634
9635         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9636         Target_Name to Get_Path call.
9637         (Parse_Single_Project): Likewise.
9638         (Post_Parse_Context_Clause): Likewise.
9639         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9640         Call Initialise_Project_Path with the proper Target_Name.
9641         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9642         search path.
9643         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9644         with the proper Target_Name.
9645         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9646         Part.Parse routine.
9647         (Parse_Project_And_Apply_Config): Likewise.
9648         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9649         This is fine as this part of the code is supporting only native
9650         compilation.
9651         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9652         is fine as this part of the code is supporting only native compilation.
9653
9654 2011-08-01  Yannick Moy  <moy@adacore.com>
9655
9656         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9657         of homonym, unless the homonym is one of the cases allowed in SPARK
9658         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9659         package declaration occurring after a body.
9660
9661 2011-08-01  Robert Dewar  <dewar@adacore.com>
9662
9663         * checks.adb, exp_ch4.adb: Minor reformatting.
9664
9665 2011-08-01  Javier Miranda  <miranda@adacore.com>
9666
9667         * einfo.ads (Access_Disp_Table): Fix documentation.
9668         (Dispatch_Table_Wrappers): Fix documentation.
9669
9670 2011-08-01  Pascal Obry  <obry@adacore.com>
9671
9672         * prj-env.adb, prj-env.ads: Minor reformatting.
9673
9674 2011-08-01  Yannick Moy  <moy@adacore.com>
9675
9676         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9677         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9678         procedures out of these packages.
9679         * errout.ads, errout.adb
9680         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9681         procedures in of this package
9682         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9683         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9684         on misplaced later vs initial declarations, like in Ada 83
9685         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9686         formal mode on attribute of private type whose full type declaration
9687         is not visible
9688         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9689         package declaration inside a package specification
9690         (Analyze_Full_Type_Declaration): issue error in formal mode on
9691         controlled type or discriminant type
9692         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9693         user-defined operator means that it should come from the source
9694         (New_Overloaded_Entity): issue error in formal mode on overloaded
9695         entity.
9696         * sem_ch6.ads, sem_ch13.ads: typos in comments.
9697
9698 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9699
9700         * atree.adb: Minor reformatting.
9701         * checks.adb: Minor reformatting.
9702
9703 2011-08-01  Vincent Celier  <celier@adacore.com>
9704
9705         * s-parame-vms-ia64.ads: Fix typo in comment
9706         Minor reformatting
9707         * s-parame-vms-restrict.ads: Removed, unused.
9708
9709 2011-08-01  Javier Miranda  <miranda@adacore.com>
9710
9711         * exp_ch3.adb
9712         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9713         * sem_ch3.adb
9714         (Constrain_Index): Remove side effects in the evaluation of the bounds.
9715         * sem_ch3.ads, sem_ch3.adb
9716         (Is_Constant_Bound): New extended version of the subprogram that was
9717         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9718         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9719         * sem_aux.ads (Constant_Value): Fix typo in comment.
9720         * checks.adb (Generate_Index_Checks): New implementation which, for
9721         array objects with constant bounds, generates the runtime check
9722         referencing the bounds of the array type. For other cases this routine
9723         provides its previous behavior obtaining such values from the array
9724         object.
9725         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9726         parent type.
9727         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9728         we cannot have semantic interpretations of the new node.
9729
9730 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9731
9732         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9733         expressions.
9734
9735 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9736
9737         * sem_ch8.adb: Minor code editing.
9738         * s-vxwext.adb: Remove trailing space.
9739         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9740         consistency with other files.
9741
9742 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9743
9744         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9745
9746 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9747
9748         * par-ch10.adb: reject parameterized expressions as compilation unit.
9749         * sem_ch4.adb: handle properly conditional expression with overloaded
9750         then_clause and no else_clause.
9751
9752 2011-08-01  Tristan Gingold  <gingold@adacore.com>
9753
9754         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9755         like done by System.Aux_DEC.
9756         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9757
9758 2011-08-01  Yannick Moy  <moy@adacore.com>
9759
9760         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9761         missing label at end of declaration (subprogram or package)
9762         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9763         of positional and named parameter association
9764         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9765         Error_Msg_SP which adds a prefix to the error message giving the name
9766         of the formal language analyzed
9767         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9768         access result type in subprogram, unconstrained array as result type,.
9769         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9770         procedure
9771         * sem_ch8.adb: Code clean up.
9772
9773 2011-08-01  Javier Miranda  <miranda@adacore.com>
9774
9775         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9776         * einfo.ads (Access_Disp_Table): Fix documentation.
9777         (Dispatch_Table_Wrappers): Fix documentation.
9778         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9779         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9780         to enforce the documentation of this attribute.
9781         (Set_Is_Interface): Cleanup the assertion.
9782         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9783         the Underlying_Type entity before reading attribute Access_Disp_Table.
9784         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9785         Locate the Underlying_Type before reading attribute Access_Disp_Table.
9786         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9787         the Underlying_Type entity before reading attribute Access_Disp_Table.
9788         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9789         Locate the Underlying_Type entity before reading attribute
9790         Access_Disp_Table.
9791
9792 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9793
9794         * s-poosiz.ads: Additional overriding indicators.
9795
9796 2011-08-01  Yannick Moy  <moy@adacore.com>
9797
9798         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9799         formal mode.
9800         (Analyze_Iteration_Scheme): issue error in formal mode when loop
9801         parameter specification does not include a subtype mark.
9802         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9803         formal mode on abstract subprogram.
9804         (Analyze_Subprogram_Specification): issue error in formal mode on
9805         user-defined operator.
9806         (Process_Formals): issue error in formal mode on access parameter and
9807         default expression.
9808         * sem_ch9.adb (Analyze_Abort_Statement,
9809         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9810         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9811         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9812         Analyze_Requeue, Analyze_Selective_Accept,
9813         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9814         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9815         issue error in formal mode on user-defined raise statement.
9816
9817 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9818
9819         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9820         declaration being hidden when overriding an implicit inherited
9821         subprogram.
9822         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9823         (-gnats), do not complain about a source file that contains only a
9824         pragma No_Body.
9825
9826 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9827
9828         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9829         variable if already set.
9830
9831 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9832
9833         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9834         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9835         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9836         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9837         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9838         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9839         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9840         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9841         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9842         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9843         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9844         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9845         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9846         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9847         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9848         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9849         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9850         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9851         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9852         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9853         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9854         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9855         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9856         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9857         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9858         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9859         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9860         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9861         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9862         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9863         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9864         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9865         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9866         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9867         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9868         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9869         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9870         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9871         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9872         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9873         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9874         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9875         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9876         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9877         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9878         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9879         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9880         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9881         s-osinte-mingw.ads: Update to GPLv3 run-time license.
9882         Use GNAT instead of GNARL.
9883
9884 2011-08-01  Bob Duff  <duff@adacore.com>
9885
9886         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9887         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9888         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9889         reformatting.
9890
9891 2011-08-01  Yannick Moy  <moy@adacore.com>
9892
9893         * debug.adb (d.D) reverve flag for the SPARK mode
9894         (d.E) reverve flag for SPARK generation mode
9895         (d.F) reverve flag for Why generation mode
9896         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9897         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
9898         functions which return True when the corresponding modes are set
9899         (Formal_Language): return "spark" or "alfa" when in formal verification
9900         mode.
9901         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9902         Error_Msg to prefix the error message with a tag giving the formal
9903         language
9904         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9905         message with a tag giving the formal language
9906         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9907         block statement
9908         (Analyze_Case_Statement): issue error in formal mode on case statement
9909         with a single "others" case alternative
9910         (Analyze_Exit_Statement): issue errors in formal mode on exit
9911         statements which do not respect SPARK restrictions
9912         (Analyze_Goto_Statement): issue error in formal mode on goto statement
9913         (Check_Unreachable_Code): always issue an error (not a warning) in
9914         formal mode on unreachable code (concerns both code after an infinite
9915         loop and after an unconditional jump, both not allowed in SPARK)
9916         * sem_ch6.adb (Analyze_Return_Statement): add call to
9917         Set_Return_Present for a procedure containing a return statement
9918         (already done for functions in Analyze_Function_Return)
9919         (Analyze_Function_Return): issue error in formal mode on extended
9920         return or if return is not last statement in function
9921         (Check_Missing_Return): issue error in formal mode if function does
9922         not end with return or if procedure contains a return
9923         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9924         function to detect if there is an inner scope of its parameter S which
9925         is a loop.
9926
9927 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9928
9929         * sem_ch6.ads: Minor reformatting.
9930
9931 2011-08-01  Javier Miranda  <miranda@adacore.com>
9932
9933         * sem_util.adb (Abstract_Interface_List): Complete condition when
9934         processing private type declarations to avoid reading unavailable
9935         attribute.
9936         (Is_Synchronized_Tagged_Type): Complete condition when processing
9937         private extension declaration nodes to avoid reading unavailable
9938         attribute.
9939
9940 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9941
9942         * sem_ch3.adb: Minor reformatting.
9943
9944 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9945
9946         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9947         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9948         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9949         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9950         for VMS, instead parametrize the common implementation with
9951         System.Parameters declarations.
9952
9953 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
9954
9955         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9956
9957 2011-08-01  Tristan Gingold  <gingold@adacore.com>
9958
9959         * seh_init.c: Fix SEH handler installation on win64.
9960
9961 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9962
9963         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9964         double analysis of an anonymous access to subprogram, because it can
9965         lead to improper sharing of profiles and a back-end crash.
9966
9967 2011-08-01  Robert Dewar  <dewar@adacore.com>
9968
9969         * make.adb, sem_ch4.adb: Minor reformatting.
9970         * gcc-interface/Make-lang.in: Update dependencies.
9971         * sem_util.adb, exp_ch5.adb: Minor reformatting.
9972
9973 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9974
9975         * gnat_rm.texi: Fix definition of Long_Integer.
9976
9977 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9978
9979         * exp_aggr.adb: check limit size of static aggregate unconditionally,
9980         to prevent storage exhaustion.
9981         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9982         finalized is a function body, insert the cleanup code before the final
9983         return statement, to prevent spurious warnings.
9984         * s-pooglo.ads: add overriding indicator.
9985
9986 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9987
9988         * sem_ch4.adb (Operator_Check): improve error message when both a
9989         with_clause and a use_clause are needed to make operator usage legal.
9990         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9991         determine whether a compilation unit is visible within an other,
9992         either through a with_clause in the current unit, or a with_clause in
9993         its library unit or one one of its parents.
9994
9995 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9996
9997         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9998         over an arbitrary expression of an array or container type.
9999         * lib-xref.adb: clarify comment.
10000
10001 2011-08-01  Bob Duff  <duff@adacore.com>
10002
10003         * einfo.ads: Minor reformatting.
10004         * debug.adb: Minor comment improvement.
10005
10006 2011-08-01  Javier Miranda  <miranda@adacore.com>
10007
10008         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10009         consider hidden subprograms as valid candidates.
10010
10011 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10012
10013         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10014
10015 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
10016
10017         * gnat_ugn.texi: Fix typo.
10018
10019 2011-08-01  Robert Dewar  <dewar@adacore.com>
10020
10021         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10022         lib-xref.adb: Minor reformatting
10023
10024 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
10025
10026         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10027         when to generate a call to Move_Final_List.
10028         (Has_Controlled_Parts): Remove this function.
10029
10030 2011-08-01  Geert Bosch  <bosch@adacore.com>
10031
10032         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10033         "," in choice list.
10034
10035 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10036
10037         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10038         explicit raise of a predefined exception as Comes_From_Source if the
10039         original N_Raise_Statement comes from source.
10040
10041 2011-08-01  Robert Dewar  <dewar@adacore.com>
10042
10043         * sinfo.ads: Add comment.
10044         * sem_ch6.adb: Minor reformatting.
10045
10046 2011-08-01  Robert Dewar  <dewar@adacore.com>
10047
10048         * freeze.adb (Freeze_Entity): Refine check for bad component size
10049         clause to avoid rejecting confirming clause when atomic/aliased present.
10050
10051 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10052
10053         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10054         better determine whether an entity reference is a write.
10055         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10056         subcomponent.
10057         * lib-xref.adb (Output_References): Do no suppress a read reference at
10058         the same location as an immediately preceeding modify-reference, to
10059         handle properly in-out actuals.
10060
10061 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10062
10063         * env.c (__gnat_setenv) [VMS]: Refine previous change.
10064
10065 2011-08-01  Quentin Ochem  <ochem@adacore.com>
10066
10067         * i-cstrin.adb (New_String): Changed implementation, now uses only the
10068         heap to compute the result.
10069
10070 2011-08-01  Robert Dewar  <dewar@adacore.com>
10071
10072         * atree.ads: Minor reformatting.
10073
10074 2011-08-01  Emmanuel Briot  <briot@adacore.com>
10075
10076         * g-expect.adb (Get_Command_Output): Fix memory leak.
10077
10078 2011-08-01  Geert Bosch  <bosch@adacore.com>
10079
10080         * cstand.adb (P_Float_Type): New procedure to print the definition of
10081         predefined fpt types.
10082         (P_Mixed_Name): New procedure to print a name using mixed case
10083         (Print_Standard): Use P_Float_Type for printing floating point types
10084         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10085         precision IEEE float.
10086
10087 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10088
10089         * sem_ch3.adb: Minor reformatting.
10090
10091 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10092
10093         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10094         the completion of a generic function, insert the new body rather than
10095         rewriting the original.
10096
10097 2011-08-01  Yannick Moy  <moy@adacore.com>
10098
10099         * sinfo.ads, errout.ads: Typos in comments.
10100
10101 2011-08-01  Robert Dewar  <dewar@adacore.com>
10102
10103         * par-endh.adb: Minor reformatting.
10104
10105 2011-08-01  Robert Dewar  <dewar@adacore.com>
10106
10107         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10108         (Pre_Post_Aspects): New subtype.
10109         * par-ch12.adb (P_Generic): New syntax for aspects in packages
10110         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10111         * par-ch7.adb (P_Package): Remove Decl parameter
10112         (P_Package): Handle new syntax for aspects (before IS)
10113         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10114         new aspect syntax
10115         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10116         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10117         (P_Package): Remove Decl parameter
10118         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10119         aspects
10120         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10121         specs
10122         * sem_util.ads, sem_util.adb (Static_Boolean): New function
10123         * sinfo.ads: Document new syntax for aspects in packages etc.
10124         * sprint.adb: Handle new syntax of aspects before IS in package
10125
10126 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10127
10128         * atree.ads: Minor reformatting.
10129         * sem_prag.adb: Minor reformatting.
10130
10131 2011-08-01  Robert Dewar  <dewar@adacore.com>
10132
10133         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10134         case expr alternative.
10135
10136 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10137
10138         * sem_ch12.adb: Fix typo.
10139
10140 2011-08-01  Geert Bosch  <bosch@adacore.com>
10141
10142         * sem_prag.adb (Check_No_Link_Name): New procedure.
10143         (Process_Import_Or_Interface): Use Check_No_Link_Name.
10144         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10145         instead of Standard_Long_Long_Float_Size global. Preparation for
10146         eventual removal of per type constants.
10147         * exp_util.ads (Get_Stream_Size): New function returning the stream
10148         size value of subtype E.
10149         * exp_util.adb (Get_Stream_Size): Implement new function.
10150         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10151         function.
10152         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10153         * einfo.adb:
10154         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10155
10156 2011-08-01  Geert Bosch  <bosch@adacore.com>
10157
10158         * cstand.adb: Fix comments.
10159         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10160         count of arguments.
10161
10162 2011-08-01  Robert Dewar  <dewar@adacore.com>
10163
10164         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10165
10166 2011-08-01  Geert Bosch  <bosch@adacore.com>
10167
10168         * atree.ads: Fix comment.
10169
10170 2011-08-01  Robert Dewar  <dewar@adacore.com>
10171
10172         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10173         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10174         * par.adb: Add with for Namet.Sp.
10175         * par-tchk.adb: Minor reformatting.
10176
10177 2011-08-01  Vincent Celier  <celier@adacore.com>
10178
10179         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10180         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10181         of the init procedure of a SAL.
10182         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10183         New procedure.
10184
10185 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10186
10187         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10188         reformatting.
10189
10190 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10191
10192         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10193
10194 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10195
10196         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10197         conformant with its spec (return True only for types that have
10198         an overriding Initialize primitive operation that prevents them from
10199         having preelaborable initialization).
10200         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10201         initialization for controlled types in Ada 2005 or later mode.
10202
10203 2011-08-01  Robert Dewar  <dewar@adacore.com>
10204
10205         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10206         Postcondition.
10207         (Same_Aspect): New function.
10208         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10209         Type_Invariant, Precondition, Postcondition.
10210         * snames.ads-tmpl: Add Name_Type_Invariant.
10211
10212 2011-08-01  Robert Dewar  <dewar@adacore.com>
10213
10214         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10215         here.
10216         (Freeze_All_Ent): Fix error in handling inherited aspects.
10217         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10218         already analyzed, but don't skip entire processing of a declaration,
10219         that's wrong in some cases of declarations being rewritten.
10220         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10221         Don't delay for integer, string literals
10222         Treat predicates in usual manner for delay, remove special case code,
10223         not needed.
10224         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10225         (Build_Predicate_Function): Update saved expression in aspect
10226         (Build_Invariant_Procedure): Update saved expression in aspect
10227         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10228         of replacement of discriminant references if the reference is simple.
10229
10230 2011-08-01  Robert Dewar  <dewar@adacore.com>
10231
10232         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10233         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10234         Static_Predicate and Dynamic_Predicate.
10235         (Build_Predicate_Function): Add processing for Static_Predicate
10236         and Dynamic_Predicate.
10237         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10238         (From_Static_Predicate): New flag
10239         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10240
10241 2011-08-01  Robert Dewar  <dewar@adacore.com>
10242
10243         * usage.adb: Documentation cleanup for Ada version modes in usage.
10244         * expander.adb: Minor reformatting.
10245
10246 2011-08-01  Robert Dewar  <dewar@adacore.com>
10247
10248         * atree.ads: Minor comment fix.
10249         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10250         a-witeio.ads, sem_prag.adb: Minor reformatting.
10251
10252 2011-08-01  Doug Rupp  <rupp@adacore.com>
10253
10254         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10255         pointers. Use descrip.h header file for convenience. Add some
10256         comments.
10257
10258 2011-08-01  Robert Dewar  <dewar@adacore.com>
10259
10260         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10261         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10262         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10263         New procedure.
10264         (Check_Aspect_At_End_Of_Declarations): New procedure
10265         (Analye_Aspect_Specification): Minor changes for above procedures
10266         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10267         specification node as well.
10268
10269 2011-08-01  Pascal Obry  <obry@adacore.com>
10270
10271         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10272         Windows files. Use GetFilesAttributes() in this case to check for file
10273         existence instead of returning with an error code.
10274
10275 2011-08-01  Vincent Celier  <celier@adacore.com>
10276
10277         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10278         High is above Source length.
10279
10280 2011-08-01  Robert Dewar  <dewar@adacore.com>
10281
10282         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10283
10284 2011-08-01  Robert Dewar  <dewar@adacore.com>
10285
10286         * aspects.ads (Boolean_Aspects): New subtype.
10287         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10288         for derived types in cases where the parent type and derived type have
10289         aspects.
10290         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10291         with aspects when parent type also has aspects.
10292         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10293         boolean expression at this point).
10294         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10295         accordance with final decision on the Ada 2012 feature.
10296         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10297
10298 2011-08-01  Matthew Heaney  <heaney@adacore.com>
10299
10300         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10301
10302 2011-08-01  Pascal Obry  <obry@adacore.com>
10303
10304         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10305         Fix Replace_Slice when High is above current string size.
10306         (Replace_Slice): Fix DL computation when High is above current
10307         string length.
10308
10309 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
10310
10311         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10312
10313 2011-08-01  Matthew Heaney  <heaney@adacore.com>
10314
10315         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10316         of node.
10317
10318 2011-08-01  Pascal Obry  <obry@adacore.com>
10319
10320         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10321         reformatting.
10322
10323 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10324
10325         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10326         access to protected subprograms in generic bodies.
10327         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10328         protected type, indicate that the convention of the subprogram is
10329         Convention_Protected, because it may be used in subsequent declarations
10330         within the protected declaration.
10331
10332 2011-08-01  Vincent Celier  <celier@adacore.com>
10333
10334         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10335         and "final" procedures when the name of the library is "ada", to avoid
10336         duplicate symbols "adainit" and "adafinal" in executables.
10337
10338 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10339
10340         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10341         quantified expression that appears within a postcondition and uses the
10342         Ada2012 'Result attribute.
10343
10344 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10345
10346         * init.c (__gnat_error_handler): Cast reason to int.
10347         (__gnat_install_handler): Explain sa_sigaction use.
10348
10349 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10350
10351         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10352         subprogram has copy-in copy-out parameters, try to promote the mode of
10353         the return type if it is passed in registers.
10354
10355 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10356
10357         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10358         left operand as addressable.
10359
10360 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10361
10362         * gcc-interface/gigi.h (build_function_stub): Remove.
10363         (build_return_expr): Likewise.
10364         (convert_vms_descriptor): Declare.
10365         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10366         (build_function_stub): Move to...
10367         * gcc-interface/utils2.c (build_return_expr): Move to...
10368         * gcc-interface/trans.c (build_function_stub): ...here.
10369         (build_return_expr): ...here.
10370         (Subprogram_Body_to_gnu): Add local variable for language_function.
10371         Disconnect the parameter attributes cache, if any, once done with it.
10372         Call end_subprog_body only after setting the end_locus.
10373         Build the stub associated with the function, if any, at the very end.
10374         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10375         variables and streamline control flow.
10376
10377 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
10378
10379         PR ada/49819
10380         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10381         g-trasym-dwarf.adb.
10382
10383 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10384
10385         PR bootstrap/49794
10386         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10387         Assign to act.sa_sigaction.
10388         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10389         current->return_address to char * before arithmetic.
10390
10391 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10392
10393         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10394         Correct argument types.
10395         Extract code from reason.
10396         (__gnat_install_handler): Assign to act.sa_sigaction.
10397
10398 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
10399
10400         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10401         (GNAT1_OBJS): ...here.
10402
10403 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
10404
10405         PR ada/48711
10406         * g-socthi-mingw.adb (Fill): Fix formatting.
10407
10408         * gcc-interface/gigi.h: Move around comment.
10409
10410 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
10411
10412         PR ada/46350
10413         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10414
10415 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
10416
10417         PR ada/48711
10418         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10419
10420 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
10421
10422         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10423         range comparison if Pmode is SImode.
10424
10425 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
10426             Eric Botcazou  <ebotcazou@adacore.com>
10427
10428         * adadecode.c: Wrap up in extern "C" block.
10429         * adadecode.h: Likewise.
10430         * adaint.c: Likewise.  Remove 'const' keyword.
10431         * adaint.h: Likewise.
10432         * argv.c: Likewise.
10433         * atree.h: Likewise.
10434         * cio.c: Likewise.
10435         * cstreams.c: Likewise.
10436         * env.c: Likewise.
10437         * exit.c: Likewise.
10438         * fe.h: Likewise.
10439         * final.c: Likewise.
10440         * init.c: Likewise.
10441         * initialize.c: Likewise.
10442         * link.c: Likewise.
10443         * namet.h: Likewise.
10444         * nlists.h: Likewise.
10445         * raise.c: Likewise.
10446         * raise.h: Likewise.
10447         * repinfo.h: Likewise.
10448         * seh_init.c: Likewise.
10449         * targext.c: Likewise.
10450         * tracebak.c: Likewise.
10451         * uintp.h: Likewise.
10452         * urealp.h: Likewise.
10453         * xeinfo.adb: Wrap up generated C code in extern "C" block.
10454         * xsinfo.adb: Likewise.
10455         * xsnamest.adb: Likewise.
10456         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10457         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10458         * gcc-interface/misc.c: Likewise.
10459         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10460         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
10461         ada/targext.o here...
10462         (GNAT_ADA_OBJS): ...and not here.
10463         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10464         (GNATBIND_OBJS): Reorder.
10465
10466 2011-07-07  Richard Henderson  <rth@redhat.com>
10467
10468         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10469         dwarf2out_frame_init.
10470
10471 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
10472
10473         * gcc-interface/misc.c (gnat_init): Tweak previous change.
10474
10475 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10476
10477         PR target/39150
10478         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10479
10480 2011-07-06  Richard Guenther  <rguenther@suse.de>
10481
10482         * gcc-interface/misc.c (gnat_init): Merge calls to
10483         build_common_tree_nodes and build_common_tree_nodes_2.
10484         Re-initialize boolean_false_node.
10485
10486 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
10487             Olivier Hainque  <hainque@adacore.com>
10488             Nicolas Setton  <setton@adacore.com>
10489
10490         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10491         the type according to the ARTIFICIAL_P parameter.
10492         (create_type_decl): Likewise.
10493         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10494
10495 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
10496
10497         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10498         (gnatbind): Likewise.
10499
10500 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10501
10502         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10503
10504 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10505
10506         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10507         local variable throughout.  Remove useless call to Base_Type.
10508         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10509         Take it also into account for the volatileness of the field.  Set the
10510         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
10511
10512 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10513
10514         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10515         on a dereference built for a by-ref object if it has an address clause.
10516
10517 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10518
10519         * einfo.ads (Address_Taken): Document use for the second argument of
10520         Asm_Input and Asm_Output attributes.
10521         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10522         argument is an entity name, then set Address_Taken on it.
10523         <Attribute_Asm_Output>: Likewise.
10524         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10525         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10526         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10527         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10528
10529 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
10530
10531         PR middle-end/46500
10532         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10533
10534 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
10535
10536         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10537         (ada/utils.o): Update dependencies.
10538         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10539         ../../../libcpp/libcpp.a.
10540         * gcc-interface/utils.c: Include common/common-target.h.
10541         (process_attributes): Use targetm_common.have_named_sections.
10542
10543 2011-06-07  Richard Guenther  <rguenther@suse.de>
10544
10545         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10546         set_sizetype.
10547
10548 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10549
10550         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10551         TREE_THIS_NOTRAP flag.
10552
10553 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10554
10555         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10556         Fix thinko.
10557
10558 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10559
10560         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10561         constants whose full view has discriminants specially.
10562
10563 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10564
10565         * gcc-interface/utils.c: Include diagnostic.h.
10566         (gnat_write_global_declarations): Output debug information for all
10567         global type declarations before finalizing the compilation unit.
10568         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10569
10570 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
10571
10572         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10573
10574 2011-05-25  Kai Tietz  <ktietz@redhat.com>
10575
10576         * adaint.c (__gnat_to_canonical_file_list_next): Use array
10577         initialization instead of const/none-const pointer assignment.
10578
10579 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
10580
10581         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10582         $(EXTRA_GNAT1_OBJS).
10583         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10584         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10585         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10586         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10587         libcommon-target.a instead of prefix.o.
10588
10589 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
10590
10591         PR ada/49097
10592         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10593
10594 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
10595
10596         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10597         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10598         instead of version.o.
10599
10600 2011-05-18  Kai Tietz <ktietz@redhat.com>
10601
10602         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10603         boolean_false_node instead of integer_zero_node.
10604         (convert_with_check): Likewise.
10605         * gcc-interface/decl.c (choices_to_gnu): Likewise.
10606
10607 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
10608
10609         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10610         type of the parameter is an unconstrained array, convert the actual to
10611         the type of the formal in the In Out and Out cases as well.
10612
10613 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
10614
10615         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10616         call build_function_type_array or build_varargs_function_type_array
10617         instead.
10618         (create_subprog_type): Don't call build_function_type; call
10619         build_function_type_vec instead.
10620
10621 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
10622
10623         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10624         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10625         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10626
10627 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
10628
10629         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10630
10631         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10632         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10633
10634 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
10635
10636         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10637
10638 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
10639
10640         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10641         instead of accessing TYPE_ARG_TYPES directly.
10642         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10643
10644 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
10645
10646         PR ada/48844
10647         * gcc-interface/gigi.h (get_variant_part): Declare.
10648         * gcc-interface/decl.c (get_variant_part): Make global.
10649         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10650         types have the same constant size, are record types and T1 has a
10651         variant part while T2 doesn't.
10652
10653 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
10654
10655         * gcc-interface/utils.c (begin_subprog_body): Do not call
10656         get_pending_sizes.
10657         (end_subprog_body): Likewise.
10658
10659 2011-05-04  Richard Guenther  <rguenther@suse.de>
10660
10661         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10662         int_const_binop.
10663         (pos_to_constructor): Likewise.
10664
10665 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
10666             Eric Botcazou  <ebotcazou@adacore.com>
10667
10668         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10669         of build_function_type.  Adjust calls to...
10670         (build_raise_check): ...this.  Do not take a void_tree parameter.
10671         Call build_function_type_list instead of build_function_type.
10672         Fix head comment and swap couple of conditional blocks.
10673
10674 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
10675
10676         * gnatvsn.ads (Library_Version): Bump to 4.7.
10677         (Current_Year): Bump to 2011.
10678
10679 2011-04-29  Michael Matz  <matz@suse.de>
10680
10681         * gcc-interface/misc.c (gnat_handle_option): Set
10682         warn_maybe_uninitialized.
10683
10684 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
10685
10686         * gnat_ugn.texi (Complexity Metrics Control): Update link to
10687         the Watson/McCabe paper.
10688
10689 2011-04-23  Jim Meyering  <meyering@redhat.com>
10690
10691         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10692
10693 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10694
10695         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10696         onto the new type.
10697
10698 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10699
10700         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10701         parameter.
10702         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
10703         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10704         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10705         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10706         <all>: Do not set flags on the reused DECL node coming from an alias.
10707         Set DECL_IGNORED_P on the DECL node built for subprograms if they
10708         don't need debug info here...
10709         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10710         (gigi): Adjust calls to create_subprog_decl.
10711         (build_raise_check): Likewise.
10712         (establish_gnat_vms_condition_handler): Likewise.
10713         (Compilation_Unit_to_gnu): Likewise.
10714         (gnat_to_gnu): Likewise.
10715
10716 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
10717
10718         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10719         (NO_REORDER_ADAFLAGS): New variable.
10720         (EXTRA_GNATTOOLS): Always define.
10721         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10722         Clean up and adjust list of files compiled with special options.
10723         * gcc-interface/Make-lang.in: Likewise.
10724         (ada/decl.o): Cosmetical change.
10725         (ada/misc.o): Remove dependency on $(PLUGIN_H).
10726
10727 2011-04-20  Jim Meyering  <meyering@redhat.com>
10728
10729         * initialize.c (__gnat_initialize): Remove useless if-before-free.
10730
10731 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
10732
10733         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10734         $(CFLAGS) on the link line.
10735
10736 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
10737
10738         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10739         padded type built for the return type if it is unconstrained.
10740
10741 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
10742
10743         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10744
10745 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
10746
10747         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10748         before calling TREE_CHAIN.
10749         * gcc-interface/misc.c (gnat_init_ts): New function.
10750         (LANG_HOOKS_INIT_TS): Define.
10751
10752 2011-04-12  Martin Jambor  <mjambor@suse.cz>
10753
10754         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10755         instead of cgraph_node.
10756
10757 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
10758
10759         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10760         alignment on fields of the RETURN type built for the Copy-In Copy-Out
10761         mechanism.
10762
10763 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
10764
10765         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10766         of aggregate types that contain a placeholder.
10767
10768 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
10769
10770         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10771         TYPE_ARG_TYPES.
10772         (handle_type_generic_attribute): Likewise.
10773
10774 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
10775
10776         PR ada/47163
10777         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10778
10779 2011-04-04  Kai Tietz  <ktietz@redhat.com>
10780
10781         PR ada/47163
10782         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10783         to flag value.
10784
10785 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10786
10787         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10788         type case, do not strip a padding type around the array type.
10789
10790 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10791
10792         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10793         types.
10794
10795 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10796
10797         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10798         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10799         code for -feliminate-unused-debug-types.
10800         (gnat_post_options): Likewise.
10801
10802 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10803
10804         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10805         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10806         distinct copy.
10807
10808 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10809
10810         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10811         DECL_ARTIFICIAL flag on enumeration types.
10812
10813 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10814
10815         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10816         fat pointer types artificial unconditionally.
10817         <E_Array_Subtype>: Attach the base array type as a parallel type if it
10818         isn't artificial.
10819
10820 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10821
10822         * gcc-interface/gigi.h (get_dummy_type): Declare.
10823         (build_dummy_unc_pointer_types): Likewise.
10824         (finish_fat_pointer_type): Likewise.
10825         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10826         fat pointer type has been built, complete it in place.
10827         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10828         and thin pointers.  Remove useless variable.
10829         (finish_fat_pointer_type): Make global and move to...
10830         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10831         (get_dummy_type): New function.
10832         (build_dummy_unc_pointer_types): Likewise.
10833         (gnat_pushdecl): Propage the name to the anonymous variants only.
10834         (update_pointer_to): Only adjust the pointer types in the unconstrained
10835         array case.
10836
10837 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10838
10839         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10840         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10841         if this is a Taft amendment type and the full declaration is available.
10842         * gcc-interface/trans.c (process_type): Likewise.
10843         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10844         (process_freeze_entity): Likewise.
10845         * gcc-interface/utils.c (dummy_global): New static variable.
10846         (gnat_write_global_declarations): If there are types declared as used
10847         at the global level, insert them in the global hash table.
10848
10849 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10850
10851         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10852         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10853         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10854         copy.
10855         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
10856         flag of the type accordingly.
10857         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10858
10859 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10860
10861         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10862         finalizing types when updating the pointers to the designated type.
10863         <all>: Finalize the deferred types even if we didn't defer processing
10864         of incomplete types in this invocation.
10865
10866 2011-04-01  Olivier Hainque  <hainque@adacore.com>
10867             Nicolas Setton  <setton@adacore.com>
10868             Eric Botcazou  <ebotcazou@adacore.com>
10869
10870         * gcc-interface/misc.c (gnat_descriptive_type): New function.
10871         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10872
10873 2011-03-28  Kai Tietz  <ktietz@redhat.com>
10874
10875         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10876         Windows targets.
10877         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10878         * system-mingw.ads (System): Change ZCX_By_Default default to True.
10879
10880         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10881
10882 2011-03-28  Tristan Gingold  <gingold@adacore.com>
10883
10884         PR ada/44431
10885         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10886         Use ada output of gnatbind.
10887         (ada/b_gnatb.adb): Ditto.
10888         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10889         (ada.mostlyclean, ada.stage1)
10890         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10891         (ada.stagefeedback): Adjust.
10892         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10893         Use ada output of gnatbind.
10894         (b_gnatm.adb): Ditto.
10895         (b_gnatl.o, b_gnatm.o): New rules.
10896
10897 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
10898
10899         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10900         for the padded type built to support a specified size or alignment.
10901
10902 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
10903
10904         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10905         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10906         unconditionally to the end of the unit when the designated type is
10907         limited_with'ed.
10908         <all>: Rename local variable.  Attempt to un-defer types only and do it
10909         for limited_with'ed types as well.
10910         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
10911         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10912         consistently and remove redundant call to finalize_from_with_types.
10913
10914 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
10915
10916         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10917         subprograms without a previous spec declared in the same unit.
10918         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10919         subprograms at the end of the unit instead of at the beginning.
10920         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10921         isn't public for the special handling of non-inline functions nested
10922         inside inline external functions.
10923
10924 2011-03-25  Jeff Law  <law@redhat.com>
10925
10926         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10927
10928 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
10929
10930         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10931         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10932         to compute Set_Size_Depends_On_Discriminant.
10933         (Layout_Type): Call it on array types in back-end layout mode.
10934         * sem_util.adb (Requires_Transient_Scope): Return true for array
10935         types only if the size depends on the value of discriminants.
10936         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10937         type if the RHS is a call to a function that returns an unconstrained
10938         type with default discriminant.
10939
10940 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
10941
10942         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10943         non-conversion to the nominal result type at the end.
10944
10945 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
10946
10947         * gcc-interface/trans.c (create_temporary): New function taken from...
10948         (create_init_temporary): ...here.  Call it.
10949         (call_to_gnu): Create the temporary for the return value early, if any.
10950         Create it for a function with copy-in/copy-out parameters if there is
10951         no target; in other cases of copy-in/copy-out, use another temporary.
10952         Push the new binding level lazily.  Add and rename local variables.
10953
10954 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
10955
10956         * gcc-interface/decl.c (validate_size): Improve comments and tweak
10957         error message.
10958         (set_rm_size): Likewise.
10959
10960 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
10961
10962         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10963         for the padded type built in order to support a specified alignment.
10964         Fix incorrect formatting.
10965
10966 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
10967
10968         PR bootstrap/48216
10969         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10970
10971 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
10972
10973         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10974         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10975         to the end of the list.  Adjust recursive call.  Rename local variable.
10976         If REORDER is true, reorder components of the record type.
10977         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10978         components_to_record and adjust the parameter list.
10979
10980 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
10981
10982         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10983         disabled, use the variable for bounds of loop iteration scheme.
10984
10985 2011-03-21  Kai Tietz  <ktietz@redhat.com>
10986
10987         PR target/12171
10988         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10989
10990 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
10991
10992         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10993         out whether the expression is read-only.  Short-circuit placeholder
10994         case and rename a couple of local variables.
10995
10996 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
10997
10998         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10999         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11000         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11001         (convert): Deal with conversions from a smaller form type specially.
11002
11003 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
11004
11005         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11006         its argument, except for the special -I- switch.
11007
11008 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
11009
11010         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11011         "Ada Issues".
11012
11013 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
11014
11015         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11016
11017 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
11018
11019         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11020         GNAT_FORMAL.
11021         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11022         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
11023         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
11024         Do not generate the check directly, instead instantiate the template
11025         check present in the descriptor.
11026         (make_descriptor_field): Move around.
11027         (build_vms_descriptor32): Build a template check in the POINTER field.
11028         (build_vms_descriptor): Remove useless suffixes.
11029         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11030
11031 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
11032
11033         PR bootstrap/47467
11034         * targext.c: Include target files if IN_RTS is defined.
11035
11036 2011-01-26  Richard Guenther  <rguenther@suse.de>
11037
11038         PR bootstrap/47467
11039         * targext.c: Include config.h.
11040         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11041         dependency.
11042
11043 2011-01-04  Pascal Obry  <obry@adacore.com>
11044             Eric Botcazou  <ebotcazou@adacore.com>
11045
11046         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11047
11048 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11049
11050         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11051         end-of-case on the end label and its associated gotos, if any.
11052
11053 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11054
11055         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11056         expressions of the parameter cache within the statement group of
11057         the CICO mechanism.
11058
11059 2011-01-04  Olivier Hainque  <hainque@adacore.com>
11060             Eric Botcazou  <ebotcazou@adacore.com>
11061
11062         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11063         (set_end_locus_from_node): New function.
11064         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11065         make and the function end_locus.
11066         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11067         for the elaboration subprogram.
11068         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11069         set the end_locus of the expression as well.
11070
11071 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11072
11073         PR ada/47131
11074         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11075         variables that are referenced in exception handlers volatile.
11076
11077
11078 \f
11079 Copyright (C) 2011 Free Software Foundation, Inc.
11080
11081 Copying and distribution of this file, with or without modification,
11082 are permitted in any medium without royalty provided the copyright
11083 notice and this notice are preserved.